Developer Resources
Introducing Quill
Find out more about Quill, the open source ledger and governance toolkit for the Internet Computer and how it makes cold wallet management secure and convenient
Quill
Ledger and Governance Toolkit for the Internet Computer
Messages signed with Quill need to be sent back to the Internet Computer via an online machine to take effect.
Existing Trade-Offs between Convenience and Security
Existing solutions for managing, holding, and sending tokens are confronted with considerable trade-offs between convenience and security. These solutions can be roughly categorized as follows:
Let’s have a quick look at the reasons why the existing solutions come with trade-offs.
Centralized services
While managing assets via centralized services is convenient as well as user-friendly, users risk losing their assets. This is because users of centralized services do not have control over their private keys which introduces a single point of failure.
- convenient
- user-friendly
- no control over private key
Hot wallets
In contrast to centralized services, users of hot wallets have full control over the private key. The secret key of a user is loaded into an app on a smartphone, computer, or browser. However, the private key is exposed to an app connected to the internet which introduces several attack vendors.
- Full control over private key
- Private key exposed to app connected to the internet
Cold wallets
Cold wallets are fully disconnected from the Internet. The user’s private key is not exposed to the internet but only to the offline computer. This reduces potential attack vendors but is still open to certain exploits.
- Private key not exposed to the internet
- Compromised software can lead to loss of funds
Discover Quill
Quill’s toolkit for self-custody allows ICP token holders to seamlessly create signed messages in an offline environment. Developers wishing to explore the quill API can run the help
command which returns the following:
You can get help on specific quick commands by appending the given command name, such as $ quill help public-ids
As of now, the quill toolkit only supports secret keys in the PEM format.
To generate a serialized private key in PEM format from your BIP39 seed phrase, you can use DFINITY’s keysmith tool or other established tools. Once generated, you can use your PEM file to display your account number for receiving ICP token transfers as well as the corresponding principal id.
If you want to sign a transfer of ICP tokens to someone else’s account, run the following command:
The message generated from running the command contains two signed messages. One is the actual transfer transaction and the other is the request status query:
Developers inspecting the source code beforehand and compiling Quill all by themselves can use Quill for displaying the verified transaction’s contents. To do so, use the send
command along with the --dry-run
option on an offline computer. Sending is fine in this case as you are not sending the transaction anywhere because of the dry-run mode.
Doing so helps you to verify if the transaction is correct. If this is the case, you can transmit the message to an online computer. Save the message to a file and then use Quill on your Internet-connected computer in order to broadcast it to the IC:
Let’s have a look at what happened above:
- In the first step, the user was asked by Quill for an explicit
[y/N]
confirmation - Secondly, the transaction was submitted to the Internet Computer
- The status of the transaction was then polled from the IC
- Because a testing account without ICP tokens was used, an error was returned
If you wish to stake ICP tokens in a new/existing neuron, you can use the following command:
Executing this command will result in Quill returning the neuron ID. The ID can then be used for the neuron’s subsequent configuration.
Neuron configuration
Run the neuron-stake
command to configure the neuron.
Developers should follow this workflow when configuring their neuron:
- Run
neuron-stake
to stake ICP tokens Specify dissolve delay via
neuron-manage
. Be sure to include the--additional-dissolve-delay-seconds
option- You can start the process of dissolving the neuron via
neuron-manage
and--start-dissolving
- Lastly, use
neuron-manage
and--add-hot-key
to add your internet identity’s principal id as a hot key
The above workflow allows you to use your cold wallet for creating a neuron while giving you access to the NNS dApp.