Obtaining private keys for cli_wallet

Using password generated in GUI wallet in cli_wallet

In the Graphene based blockchains like Peerplays the hierarchical permissions like fund transfer, sending memo etc are separated using different roles and Public-Private key-pairs for each role. We have 3 types of roles OWNER, ACTIVE and MEMO. These keys are generated using a brain key.

The password auto generated by the wallet is a brain key. And the brain key is used to generate various key-pairs in the Wallet Import Format (WIF).

WIF = SHA256( username + role + brain key)

example:

OWNER WIF = SHA256(peerplays user name + owner + brain key)

The above brain key belongs to the user t3st123

Note that the above password is not the private or public key. So we need to create the key pairs to be used in the cli_wallet using the method get_private_key_from_password

  • To generate the OWNER keypair, use the following command

get_private_key_from_password t3st123 owner RAjoOuuSX9N2semIlQOM52iHCQMUrDZPqnpPUDZNpMu2HSYj1gQi

Result:

unlocked >>> get_private_key_from_password t3st123 owner RAjoOuuSX9N2semIlQOM52iHCQMUrDZPqnpPUDZNpMu2HSYj1gQi get_private_key_from_password t3st123 owner RAjoOuuSX9N2semIlQOM52iHCQMUrDZPqnpPUDZNpMu2HSYj1gQi [ "PPY5xmkfRJhsG54kxNpoBtWqnEpScGBxczooapTbCpmetFAmzUvJ1", "5KPHKeuqRyNfuc32LGDzc6tqcCPzyLgfguQzN4Xkrys3VfMxtjB" ]

ACTIVE & MEMO keys also can be obtained in the same way.

Last updated