Difference between revisions of "How-to: Add a hotkey to neuron"

From Internet Computer Wiki
Jump to: navigation, search
Line 9: Line 9:
 
== Adding hotkey to neuron controlled by Quill + networked machine ==
 
== Adding hotkey to neuron controlled by Quill + networked machine ==
  
==How to add a hot key to the neuron==
 
 
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.
 
  
 
===Step 1: Log into the NNS Frontend dapp===
 
===Step 1: Log into the NNS Frontend dapp===

Revision as of 16:36, 24 March 2022

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.

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

// Using the bash script, create a QR code from the "message.json" file created by quill with your message
$ bash ./quill-qr.sh < message.json

Step 4: Send the message to the IC via QR code

Since your air-gapped computer is not connected to the internet, we will use a QR app to send the message generated above to the Internet Computer. We will use IC Transaction Scanner which lives in a canister (and whose code is visible here: https://github.com/ninegua/ic-qr-scanner).

bridging air gap