Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 1.24 KB

cast-wallet-import.md

File metadata and controls

52 lines (31 loc) · 1.24 KB

cast wallet import

NAME

cast-wallet-import - Import a private key into an encrypted keystore

SYNOPSIS

cast wallet import [options] account_name

DESCRIPTION

Import a private key into an encrypted keystore.

If no keystore-dir is specified, it will be saved in the default ~/.foundry/keystores, so it can be accessed through the --account option in methods like forge script, cast send or any other that requires a private key.

OPTIONS

Directory Options

-k
--keystore-dir

    The path to store the encrypted keystore.
    Defaults to ~/.foundry/keystores.

{{#include ../common/wallet-options-raw.md}}

{{#include common-options.md}}

EXAMPLES

  1. Create a keystore from a private key:

    cast wallet import BOB --interactive
  2. Create a keystore from a mnemonic:

    cast wallet import ALICE --mnemonic "test test test test test test test test test test test test"
  3. Create a keystore from a mnemonic with a specific mnemonic index:

    cast wallet import ALICE --mnemonic "test test test test test test test test test test test test" --mnemonic-index 1

SEE ALSO

cast, cast wallet