How-to: Add a hotkey to neuron

From Internet Computer Wiki
Revision as of 20:21, 22 November 2024 by Katie.peters (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

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

In the upper right-hand corner, click the small profile icon: Profileicon.png When the menu opens, you will see your "Principal ID." Click the copy button to copy the full principal (which is much longer than what is visible). Profile menu.png

In our example variable it is uok4z-yyrwt-owuo4-6hizi-6cwp4-yzh2a-pt4kh-suwul-sameh-czoki-bae.

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 if you are using a pem file:

// 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


Command with example variables for a Mac that is using an HSM.

// Add the hot key from the NNS frontend dapp to your self-custodied neuron
$ quill neuron-manage 1234567890123456 --add-hot-key "abcd-1234-efgh-5647-ijkl-8901-monp-2345-qrst-678" > message.json

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

Command with example variables for a Windows computer that is using an HSM.

// Add the hot key from the NNS frontend dapp to your self-custodied neuron
$ quill-windows-x86_64 --hsm neuron-manage 1234567890123456 --add-hot-key "abcd-1234-efgh-5647-ijkl-8901-monp-2345-qrst-678" > out.json

//send the message to the IC 
$ quill-windows-x86_64 send out.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). You can expand it to see more details, adjust following, see how it has voted in the past, etc.