Documentation
Search…
Wallet
Description The subcommands can be used to interact with local wallet.
Subcommands

Wallet Create

Description

This subcommand creates a wallet with the specified name. If no name is given, the wallet will be created with the name 'default'.

Positional Parameters

None.

Options

  • -n, --name TEXT — The name of the new wallet.
  • -f, --file TEXT — Name of file to write wallet password output to (must be set, unless --to-console is passed).
  • --to-console — Print password to console.

Command

1
$ cleos wallet create [OPTIONS]
Copied!

Examples

1
$ cleos wallet create --name=walletname1 --to-console
Copied!

Wallet Open

Description

This subcommand can be used to open an existing wallet.

Positional Parameters

None.

Options

  • -n, --name TEXT — The name of the wallet to open.

Command

1
$ cleos wallet open [OPTIONS]
Copied!

Examples

Example 1
1
$ cleos wallet open
Copied!
Example 2
1
$ cleos wallet open --name=walletname1
Copied!
Output
1
Opened: walletname1
Copied!

Wallet Lock

Description

This subcommand can be used to lock wallet.

Positional Parameters

None.

Options

  • -n, --name TEXT — The name of the wallet to lock.

Command

1
$ cleos wallet lock [OPTIONS]
Copied!

Examples

Example 1
1
$ cleos wallet lock
Copied!
Example 2
1
$ cleos wallet lock --name=walletname1
Copied!
Output
1
Locked: walletname1
Copied!

Wallet Lock All

Description

This subcommand can be used to lock all unlocked wallets.

Positional Parameters

None.

Options

None.

Command

1
$ cleos wallet lock_all
Copied!
Output
1
Locked All Wallets
Copied!

Wallet Unlock

Description

This subcommand can be used to unlock wallet.

Positional Parameters

None.

Options

  • -n, --name TEXT — The name of the wallet to unlock.
  • --password TEXT — The password returned by wallet create.

Command

1
$ cleos wallet unlock [OPTIONS]
Copied!

Examples

To unlock a wallet, specify the password provided when it was created.
1
$ cleos wallet unlock --name=walletname1 --password=XXXXXXXX
Copied!
Output
1
Unlocked: walletname1
Copied!

Wallet Import

Description

This subcommand can be used to import private key into wallet.

Positional Parameters

None.

Options

  • -n,--name TEXT — The name of the wallet to import key into.
  • --private-key TEXT — Private key in WIF format to import.

Command

1
$ cleos wallet import [OPTIONS]
Copied!

Examples

1
$ cleos wallet import --name=walletname1 --private-key=3Rft...Uh6
Copied!

Wallet Remove Key

Description

This subcommand can be used to remove key from wallet.

Positional Parameters

  • (string) key — Public key in WIF format to remove (required).

Options

  • -n, --name TEXT — The name of the wallet to remove key from.
  • --password TEXT — The password returned by wallet create.

Command

1
$ cleos wallet remove_key <key> [OPTIONS]
Copied!

Examples

1
$ cleos wallet remove_key GLS8PE...rS3T --name=walletname1 --password=XXXXXXXX
Copied!

Wallet Create Key

Description

This subcommand can be used to creates a key pair within the wallet so that you don't need to manually import it like you would with cleos create key. By default, this will create a key with the type "favored" by the wallet, which is a "K1" key. This subcommand also lets you create a key in "R1" format.

Positional Parameters

  • (string) key_type — "K1" or "R1" key type to create. "K1" generates privileged key. Defaults to "K1".

Options

  • -n, --name TEXT — The name of the wallet to create key into.

Command

1
$ cleos wallet create_key [OPTIONS]
Copied!

Examples

1
$ cleos wallet create_key K1 --name-walletname1
Copied!
1
Created new private key with a public key of: "GLS8PE...6tR, X6P...5EfG"
Copied!

Wallet List

Description

The subcommand can be used to list opened wallets ("*" means "unlocked").

Positional Parameters

None.

Options

None.

Command

1
$ cleos wallet list
Copied!
Output
1
Wallets:
2
[
3
"default *",
4
"walletname1 *"
5
]
Copied!
or when there are no wallets:
1
Wallets:
2
[
3
]
Copied!

Wallet Keys

Description

The subcommand can be used to list of public keys from all unlocked wallets. These are the keys that could be used to sign transactions.

Positional Parameters

None.

Options

None.

Command

1
$ cleos wallet keys
Copied!
Output
1
[[
2
"GLS6MR...qcVpscN",
3
"PbwdL6...FSSwsST3"
4
]
5
]
Copied!

Examples

1
$ cleos wallet
Copied!

Wallet Private Keys

Description

The subcommand can be used to list of private keys from an unlocked wallet in WIF or PVT_R1 format. It is possible to query for the public and private key pairs of an individual wallet. The wallet must already be unlocked and you must give the password again.

Positional Parameters

None.

Options

  • -n, --name TEXT — The name of the wallet to list keys from.
  • --password TEXT — The password returned by wallet create.

Command

1
$ cleos wallet private_keys [OPTIONS]
Copied!

Examples

1
$ cleos wallet private_keys --name-walletname1 --password=XXXXXXXX
Copied!
Last modified 1yr ago