CLI Commands for All Nodes
CLI commands that all node operators use.

1. Node Operators CLI Command Reference

1.1. suggest_brain_key

Suggests a safe brain key to use for creating your account keys. A brain key is a long passphrase that provides enough entropy to generate cryptographic keys. This function will suggest a suitably random string that should be easy to write down (and, with effort, memorize).
The GUI Wallet generates a brain key for your password when creating a new account. But in the case of the GUI Wallet, rather than a long passphrase (i.e. set of words), it generates a string of 52 random letters (a-z & A-Z) and numbers (0-9).
For example, the suggest_brain_key method could give you:
"EDIFICE PALLID ANOESIA STRIDE PARREL SPORTY AXIFORM INOPINE SWOONED TONETIC CORKER OATEN PUSHER MIN CERN TACT"
And the GUI Wallet could produce the password of:
EyqFQDRpydZJDgTV8EJIcpmPLhfmdq6Yjbo45pNsBe7wSJSpvq0v
Although they look different, both are brain keys and will work for generating public and private keys.
return type, namespace, & method
1
brain_key_info graphene::wallet::wallet_api::suggest_brain_key()const;
Copied!
Function Call
Return
Parameters
name
data type
description
details
ℹ This command has no parameters!
n/a
n/a
n/a
Example Call
1
suggest_brain_key
Copied!
Return Format
1
struct brain_key_info
2
{
3
string brain_priv_key;
4
string wif_priv_key;
5
public_key_type pub_key;
6
};
Copied!
Example Successful Return
1
suggest_brain_key
2
{
3
"brain_priv_key": "EDIFICE PALLID ANOESIA STRIDE PARREL SPORTY AXIFORM INOPINE SWOONED TONETIC CORKER OATEN PUSHER MIN CERN TACT",
4
"wif_priv_key": "5JyK47o1xFmA6fE4Z4Pgzcdd7dGhQnorW2sTPzPxeXH7QaT4eN6",
5
"pub_key": "PPY6TK9mXBaFr8ewaJa9zpgbRQVN7VkvAKay4hHGA2hDceDQvrRBv"
6
}
Copied!
Note that the returned "pub_key" value will be prefixed with:
  • "PPY" in mainnet (Alice) as per the example above
  • "TEST" in the public testnet (Beatrice)

1.2. get_private_key_from_password

Returns the public-private key-pair for the owner, active, or memo role for a given account and its password.
return type, namespace, & method
1
pair<public_key_type, string> graphene::wallet::wallet_api::get_private_key_from_password(
2
string account,
3
string role,
4
string password
5
)const;
Copied!
Function Call
Return
Parameters
name
data type
description
details
account
string
The account name we're creating keys for.
no quotes required.
role
string
The role we're creating keys for. One of: owner, active, or memo
no quotes required.
password
string
A brain key. It might be the password provided by the GUI wallet, or obtained from the suggest_brain_keycommand (brain_priv_key).
quotes required if there are spaces!
Example Call
1
get_private_key_from_password myaccountname1 owner "EDIFICE PALLID ANOESIA STRIDE PARREL SPORTY AXIFORM INOPINE SWOONED TONETIC CORKER OATEN PUSHER MIN CERN TACT"
Copied!
Return Format
1
pair<public_key_type, string>
2
[
3
//the public key,
4
//the private key
5
]
Copied!
Example Successful Return
1
get_private_key_from_password myaccountname1 owner "EDIFICE PALLID ANOESIA STRIDE PARREL SPORTY AXIFORM INOPINE SWOONED TONETIC CORKER OATEN PUSHER MIN CERN TACT"
2
[
3
"PPY8fAzCBgJhfL6YWsJUycw6SvU7VZnNgq4t5vuzEVP168PHVKJXn",
4
"5Kbhg1xaW7hceZhqJSqg3yZ4gsAUdFaA5uD4yBiHME2SYLsa7bU"
5
]
Copied!

1.3. import_key

Imports the private key for an existing account for use in the CLI Wallet. The private key must match either an owner key or an active key for the named account.
return type, namespace, & method
1
bool graphene::wallet::wallet_api::import_key(
2
string account_name_or_id,
3
string wif_key);
Copied!
Function Call
Return
Parameters
name
data type
description
details
account_name_or_id
string
The name or id of the account that owns the key.
no quotes required.
wif_key
string
The private key.
no quotes required.
Example Call
1
import_key myaccountname1 5Kbhg1xaW7hceZhqJSqg3yZ4gsAUdFaA5uD4yBiHME2SYLsa7bU
Copied!
Return Format
1
true
2
#if successful
3
4
false
5
#if an error
Copied!
Example Successful Return
1
import_key myaccountname1 5Kbhg1xaW7hceZhqJSqg3yZ4gsAUdFaA5uD4yBiHME2SYLsa7bU
2
true
Copied!

1.4. upgrade_account

Upgrades an account to prime status. This makes the account holder a 'lifetime member'. This is necessary for the account to become a Witness or SON.
return type, namespace, & method
1
signed_transaction graphene::wallet::wallet_api::upgrade_account(
2
string name,
3
bool broadcast);
Copied!
Function Call
Return
Parameters
name
data type
description
details
name
string
The name or id of the account to upgrade.
no quotes required.
broadcast
bool
true to broadcast the transaction on the network.
n/a
Note that this operation currently costs 5 PPY. That fee may change in the future.
Example Call
1
upgrade_account myaccountname1 true
Copied!
Return Format
1
{
2
"ref_block_num": number,
3
"ref_block_prefix": number,
4
"expiration": "datetime",
5
"operations": [],
6
"extensions": [],
7
"signatures": []
8
}
Copied!
Example Successful Return
1
upgrade_account myaccountname1 true
2
{
3
"ref_block_num": 10412,
4
"ref_block_prefix": 1003801100,
5
"expiration": "2015-02-05T00:11:00",
6
"operations": [[
7
8,{
8
"fee": {
9
"amount": 500000,
10
"asset_id": "1.3.0"
11
},
12
"account_to_upgrade": "1.2.1234",
13
"upgrade_to_lifetime_member": true,
14
"extensions": []
15
}
16
]
17
],
18
"extensions": [],
19
"signatures": [
20
"268bd8....."
21
]
22
}
Copied!

1.5. create_vesting_balance

Creates a vesting deposit owned by the given account. This is used to supply vested assets to operate certain nodes, such as a SON node. In the case of SONs, 100 PPY (at the time of writing) must be set aside in two separate vesting deposits (50 PPY each) to dedicate to the operation of the SON node transactions.
return type, namespace, & method
1
signed_transaction graphene::wallet::wallet_api::create_vesting_balance(
2
string owner_account,
3
string amount,
4
string asset_symbol,
5
vesting_balance_type vesting_type,
6
bool broadcast);
Copied!
Function Call
Return
Parameters
name
data type
description
details
owner_account
string
The name or id of the vesting balance owner and creator.
no quotes required.
amount
string
The amount to vest.
In nominal units. For example, enter 0.5 for half of a PPY.
asset_symbol
string
The symbol of the asset to vest.
no quotes required.
vesting_type
vesting_balance_type
One of normal, gpos, or son.
no quotes required.
broadcast
bool
true to broadcast the transaction on the network.
n/a
Example Call
1
create_vesting_balance myaccountname-son 50 PPY son true
Copied!
Return Format
1
{
2
"ref_block_num": number,
3
"ref_block_prefix": number,
4
"expiration": "datetime",
5
"operations": [],
6
"extensions": [],
7
"signatures": []
8
}
Copied!

1.6. get_private_key

Get the WIF private key corresponding to a public key. The private key must already be in the wallet.
return type, namespace, & method
1
string graphene::wallet::wallet_api::get_private_key(
2
public_key_type pubkey);
Copied!
Function Call
Return
Parameters
name
data type
description
details
pubkey
public_key_type
The public key you wish to get the private key for.
no quotes required.
Example Call
1
get_private_key PPY8kvUXLpoXE9rJHwppR48LkqSouAzFZomAPb3hW9gnkSHZCsozi
Copied!
Return Format
1
string
Copied!
Example Successful Return
1
get_private_key PPY5D13DULV2gKLQ324bmyTVFGW2wm9QYz6uVEmnUmkifRyxcSifk
2
"5JCLzEW4T4ALFKZeKef7qF8T2MhndmtZoj2sbcXhNTVZWen2Xn1"
Copied!

1.7. dump_private_keys

Displays all private keys owned by the wallet. The keys are printed in WIF format. You can import these keys into another wallet using import_key().
return type, namespace, & method
1
map<public_key_type, string> graphene::wallet::wallet_api::dump_private_keys();
Copied!
Function Call
Return
Parameters
name
data type
description
details
ℹ This command has no parameters!
n/a
n/a
n/a
Example Call
1
dump_private_keys
Copied!
Return Format
1
[[
2
"Public Key String 1",
3
"Private Key String 1"
4
],[
5
"Public Key String 2",
6
"Private Key String 2"
7
],[
8
"Public Key String 3",
9
"Private Key String 3"
10
],[
11
"Public Key String n...",
12
"Private Key String n..."
13
]
14
]
Copied!
Example Successful Return
1
dump_private_keys
2
[[
3
"PPY7sxBKU1...",
4
"5Jh04o8q..."
5
],[
6
"PPY6oAqs9...",
7
"5JMR32LV..."
8
],[
9
"PPY586S...",
10
"5JN59ePX..."
11
],[
12
And so on...
13
]
14
]
Copied!

1.8. get_account

Returns information about the given account.
return type, namespace, & method
1
account_object graphene::wallet::wallet_api::get_account(
2
string account_name_or_id);
Copied!
Function Call
Return
Parameters
name
data type
description
details
account_name_or_id
string
The name or id of the account to provide information about.
No quotes required.
Example Call
1
get_account 1.2.12345
Copied!
Return Format
1
{
2
"id": "string",
3
"membership_expiration_date": "datetime",
4
"registrar": "string",
5
"referrer": "string",
6
"lifetime_referrer": "string",
7
"network_fee_percentage": number,
8
"lifetime_referrer_fee_percentage": number,
9
"referrer_rewards_percentage": number,
10
"name": "string",
11
"owner": {
12
"weight_threshold": number,
13
"account_auths": [],
14
"key_auths": [],
15
"address_auths": []
16
},
17
"active": {
18
"weight_threshold": number,
19
"account_auths": [],
20
"key_auths": [],
21
"address_auths": []
22
},
23
"options": {
24
"memo_key": "string",
25
"voting_account": "string",
26
"num_witness": number,
27
"num_committee": number,
28
"votes": [],
29
"extensions": []
30
},
31
"statistics": "string",
32
"whitelisting_accounts": [],
33
"blacklisting_accounts": [],
34
"whitelisted_accounts": [],
35
"blacklisted_accounts": [],
36
"owner_special_authority": [],
37
"active_special_authority": [],
38
"top_n_control_flags": number
39
}
Copied!
Example Successful Return
1
get_account 1.2.12345
2
{
3
"id": "1.2.12345",
4
"membership_expiration_date": "2106-02-07T06:28:15",
5
"registrar": "1.2.12345",
6
"referrer": "1.2.12345",
7
"lifetime_referrer": "1.2.12345",
8
"network_fee_percentage": 10000,
9
"lifetime_referrer_fee_percentage": 0,
10
"referrer_rewards_percentage": 0,
11
"name": "myawesome-son",
12
"owner": {
13
"weight_threshold": 1,
14
"account_auths": [],
15
"key_auths": [[
16
"PPY8XGp5...",
17
1
18
]
19
],
20
"address_auths": []
21
},
22
"active": {
23
"weight_threshold": 1,
24
"account_auths": [],
25
"key_auths": [[
26
"PPY2j4ySFX...",
27
1
28
]
29
],
30
"address_auths": []
31
},
32
"options": {
33
"memo_key": "PPY15sZ1A...",
34
"voting_account": "1.2.8",
35
"num_witness": 0,
36
"num_committee": 0,
37
"votes": [],
38
"extensions": []
39
},
40
"statistics": "2.6.12345",
41
"whitelisting_accounts": [],
42
"blacklisting_accounts": [],
43
"whitelisted_accounts": [],
44
"blacklisted_accounts": [],
45
"owner_special_authority": [
46
0,{}
47
],
48
"active_special_authority": [
49
0,{}
50
],
51
"top_n_control_flags": 0
52
}
Copied!