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

From Internet Computer Wiki
Jump to: navigation, search
Line 1: Line 1:
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.
+
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:
 
There are few ways of adding hotkeys depending on what staking or custody setup you use:
Line 36: Line 36:
 
$ 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
 
$ 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
+
//send the message to the IC
$ bash ./quill-qr.sh < message.json
+
$ target/release/quill send message.json
 
</pre>
 
</pre>
 
===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).
 
 
[[File:qr-code-scan-2.png|512px|bridging air gap]]
 
 
* See [[Bridging the air gap with quill and QR codes]]
 

Revision as of 16:39, 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. 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