Keys Management

Insert your Aura keys

While waiting for the node to finish syncing, you can already proceed with the next required step. This is about inserting an authority key pair to your node, i.e. a pair of private and public keys that will allow you to have control on the node, and it's required for the next step, where we will guide you through the staking and rewards configuration.

So, if you already own an account that you want to use, you can skip the next section. But if you still don't have a key pair already generated, let's first do that.

Generating Aura keys

There are many ways of generating a new account or pair of keys. To stay secure, the best is to generate them offline using a tool called subkey. You can follow the steps there in order to install it in your system.

Then, to generate the keys you simply run:

subkey generate

You'll get an output like:

Secret phrase:       rubber begin sail spider green hope two fetch immune nation connect swarm
  Network ID:        substrate
  Secret seed:       0xe691a1a17f124bc41ce59b4a4ae1343ac975dc98d5edb4fd68460cdbc2f1ef42
  Public key (hex):  0x422cf4ec55a544d31e6a1ecf21afe005f94373214b87be66c613d97e9db8ea18
  Account ID:        0x422cf4ec55a544d31e6a1ecf21afe005f94373214b87be66c613d97e9db8ea18
  Public key (SS58): 5DZUNZJr6nfMwgbx1MNijoEojkARa6mvS5nbnZHJ9EHWnhAq
  SS58 Address:      5DZUNZJr6nfMwgbx1MNijoEojkARa6mvS5nbnZHJ9EHWnhAq

Take note of your secret seed and your public key, they're gonna be required in the next step.

Add your sessions keys to Aura

Assuming that your node is running and accessible through DNS, connect to it via PolkadotJS Apps.

  1. Select the RPC method: author -> insertKey(keyType, suri, publicKey)

  2. Complete the fields:

    1. keyType: aura

    2. suri: your secret phrase or secret seed (both are accepted)

    3. publicKey: your public key either in SS58 format or hexadecimal.

As an example, with the above generated keys it would look like this:

Key management from the CLI

If you do not have a web interface enabled you can insert the keys running the following command on the node.

curl --location --request POST 'localhost:9955' \\
    --header 'Content-Type: application/json' \\
    --data-raw "{
        "jsonrpc": "2.0",
        "method": "author_insertKey",
        "params": ["aura","$privatekey","$publickey"],
        "id": 1
    }"

Where the $privatekey is equivalent with the “Secret Seed” and the $publickey equal to “Account ID” ( see the example below ).

Secret phrase:       rubber begin sail spider green hope two fetch immune nation connect swarm
  Network ID:        substrate
  Secret seed:       0xe691a1a17f124bc41ce59b4a4ae1343ac975dc98d5edb4fd68460cdbc2f1ef42
  Public key (hex):  0x422cf4ec55a544d31e6a1ecf21afe005f94373214b87be66c613d97e9db8ea18
  Account ID:        0x422cf4ec55a544d31e6a1ecf21afe005f94373214b87be66c613d97e9db8ea18
  Public key (SS58): 5DZUNZJr6nfMwgbx1MNijoEojkARa6mvS5nbnZHJ9EHWnhAq
  SS58 Address:      5DZUNZJr6nfMwgbx1MNijoEojkARa6mvS5nbnZHJ9EHWnhAq

Setting your keys

After having added your keys to Aura you need to set them on Polkadot.js.

  1. Select the Extrinsic method session -> setKeys(keys,proof)

  2. In the keys parameter insert your key hex value

  3. In the proof parameter you can leave 0x00

Submit the Extrinsic call, and you are good to go now!

Last updated