Personal
The page describes the APIs and console methods for managing accounts.
personal.loadAccount
Load an existing or imported account as the console default account. The loaded account will be used to sign transactions. If the passphrase is not provided as a argument, an interactive session is started to collect your passphrase in a way that does not reveal it as you type.
Parameters
Argument
Type
Required
Description
address
String
True
The address of the account.
passphrase
String
False
The passphrase of the account.
(not recommended, use interactive mode)
Console Example
personal.loadedAccount
Get the loaded account.
Parameters: None
Console Example
Returns:
String
- The address of the loaded account.
Output:
personal.createAccount
Create an account. If the passphrase is not provided as a argument, an interactive session is started to collect your passphrase in a way that does not reveal it as you type.
Parameters
Argument
Type
Required
Description
passphrase
String
False
The passphrase of the account.
(not recommended, use interactive mode)
Console Example
Returns:
String
- The address of the new account.
Output:
personal.importAccount
Import a private key. Creates an account from a private key.
Parameters
Argument
Type
Required
Description
privateKey
String
True
A private key.
passphrase
String
False
The passphrase of the account.
(not recommended, use interactive mode)
Console Example
Returns:
String
- The address of the newly imported account.
Output:
personal_listAccounts
List all accounts that exist on the node. It the console is attached to a remote node, it will return the addresses of accounts on the node and not those on the attaching node. Accounts are stored in DATA_DIR/accounts
.
Parameters: None
Curl Example:
Console Example
Returns:
Array<String>
- A list of addresses.
Output:
personal.listLocalAccounts
List all accounts that exist locally on the node. It the console is attached to a remote node, it will return the addresses of accounts on the attaching node. Accounts are stored in DATA_DIR/accounts
.
Parameters: None
Console Example
Returns:
Array<String>
- A list of addresses.
Output:
Last updated