How-to: Add a hotkey to neuron

From Internet Computer Wiki
Jump to: navigation, search

A hot key is a lot like a read-only view of a neuron, in that it lets you use a different controller to see the balance, maturity, dissolve delay and other details of a neuron. Where this becomes most useful is in conjunction with the NNS frontend dapp and your Internet Identity. This how to is about adding your NNS Frontend dapp as a hot key to self-custodied neurons.

There are few ways of adding hotkeys depending on what staking or custody setup you use:

Adding hotkey to neuron controlled by Quill + airgapped machine

See ICP_staking_with_seed_phrase_and_air-gapped_computer#How_to_add_a_hot_key_to_the_neuron.

Adding hotkey to neuron controlled by Quill + networked machine

Step 1: Log into the NNS Frontend dapp

(note: This will require you create an Internet Identity)

Log in to the NNS frontend dapp and visit the Neurons tab, it will display a principal id.

nns frontend dapp

Step 2: Get the principal id from your NNS Frontend dapp

In our example variable it is 2xt3l-tqk2i-fpygm-lseru-pvgek-t67vb-tu3ap-k0mnu-dr4hl-z3kpn-o2e.

Step 3: Create a message to the neuron to "add hot key to the neuron"

Structure of command:

$ target/release/quill --pem-file private.pem neuron-manage $NEURON_ID --add-hot-key "$PRINCIPAL"

Command with example variables:

// Add the hot key from the NNS frontend dapp to your self-custodied neuron
$ target/release/quill --pem-file private.pem neuron-manage 5241875388871980017 --add-hot-key "2xt3l-tqk2i-fpygm-lseru-pvgek-t67vb-tu3ap-k0mnu-dr4hl-z3kpn-o2e" > message.json

//send the message to the IC 
$ target/release/quill send message.json

Step 4: Check your self-custodied neuron is your NNS Frontend dapp

If you go to the neurons tab, you should see your self-custodied neuron in the list of neurons (via hot key control).