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
brain_key_info graphene::wallet::wallet_api::suggest_brain_key()const;

Parameters

Example Call

suggest_brain_key

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
pair<public_key_type, string> graphene::wallet::wallet_api::get_private_key_from_password(
    string account,
    string role,
    string password
    )const;

Parameters

Example Call

get_private_key_from_password myaccountname1 owner "EDIFICE PALLID ANOESIA STRIDE PARREL SPORTY AXIFORM INOPINE SWOONED TONETIC CORKER OATEN PUSHER MIN CERN TACT"

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
bool graphene::wallet::wallet_api::import_key(
    string account_name_or_id, 
    string wif_key);

Parameters

Example Call

import_key myaccountname1 5Kbhg1xaW7hceZhqJSqg3yZ4gsAUdFaA5uD4yBiHME2SYLsa7bU

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
signed_transaction graphene::wallet::wallet_api::upgrade_account(
    string name, 
    bool broadcast);

Parameters

Note that this operation currently costs 5 PPY. That fee may change in the future.

Example Call

upgrade_account myaccountname1 true

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
signed_transaction graphene::wallet::wallet_api::create_vesting_balance(
    string owner_account, 
    string amount,
    string asset_symbol,
    vesting_balance_type vesting_type,
    bool broadcast);

Parameters

Example Call

create_vesting_balance myaccountname-son 50 PPY son true

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
string graphene::wallet::wallet_api::get_private_key(
    public_key_type pubkey);

Parameters

Example Call

get_private_key PPY8kvUXLpoXE9rJHwppR48LkqSouAzFZomAPb3hW9gnkSHZCsozi

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
map<public_key_type, string> graphene::wallet::wallet_api::dump_private_keys();

Parameters

Example Call

dump_private_keys

1.8. get_account

Returns information about the given account.

return type, namespace, & method
account_object graphene::wallet::wallet_api::get_account(
    string account_name_or_id);

Parameters

Example Call

get_account 1.2.12345

Last updated