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

IC Academy » Developer Resources » Introducing Quill

Quill

Ledger and Governance Toolkit for the Internet Computer

What is Quill?

Quill is the open-source toolkit of the Internet Computer that maximizes the convenience and security of managing cold wallets. It supports self-custody options for managing ICP tokens and makes it easy to create sign messages for ledger and governance canisters on an offline computer.

Messages signed with Quill need to be sent back to the Internet Computer via an online machine to take effect.

Open-source release of Quill on GitHub.com

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:

Centralized wallet services

Hot wallets connected to the Internet

Cold wallets on off-line devices

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

The aforementioned approaches provide their users with increased levels of security at the cost of decreasing convenience. Quill is designed to provide the highest level of security without sacrificing convenience and user-friendliness.

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:

Copy to Clipboard

You can get help on specific quick commands by appending the given command name, such as $ quill help public-ids

Copy to Clipboard

As of now, the quill toolkit only supports secret keys in the PEM format.

Privacy-Enhanced Mail (PEM) is a de facto file format for storing and sending cryptographic keys, certificates, and other data, based on a set of 1993 IETF standards defining “privacy-enhanced mail.”
Source: Wikipedia

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.

Copy to Clipboard

If you want to sign a transfer of ICP tokens to someone else’s account, run the following command:

Copy to Clipboard

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:

Copy to Clipboard

For the highest level of security, only transmit the signed transaction to an online computer after you have verified its contents. This allows you to prevent your original inputs such as the destination address from being compromised.

Ideally, use a tool provided by a different trusted developer than the signing tool.

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.

Copy to Clipboard

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:

Copy to Clipboard

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:

Copy to Clipboard

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.

Copy to Clipboard

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.

Noninteractive Key Generation

Discover Noninteractive Distributed Key Generation and how it helps the IC to apply advanced cryptography

NIDKG

Interface Specification

Learn more about the Interface Specification that details how users and services communicate

IC Internet Specification