Code Monkey home page Code Monkey logo

keysmith's Introduction

Keysmith

Hierarchical Deterministic Key Derivation for the Internet Computer

Build Status

Introduction

Keysmith lets you derive cryptographic keys and identifiers for the Internet Computer. Among these identifiers includes an account identifier, which indicates the source or destination of an ICP token transfer. Keysmith does not sign or send messages to the Internet Computer. Hence, Keysmith does not facilitate ICP token transfer, but rather only ICP token custody. For use cases other than custody, such as payments, consider using Keysmith in conjunction with other software, such as the DFINITY Canister SDK.

Download

Download the latest tarball here.

Verify

If you want to verify the authenticity of the tarball, then please also download the supplementary SHA256.SIG and SHA256.SUM files, as well as my public key, which you can find here.

Verify the SHA256 checksum of the tarball.

grep "$(openssl dgst -sha256 keysmith-*.tar.gz)" SHA256.SUM

Verify the signature on the tarball.

openssl dgst -sha256 -verify public.key -signature SHA256.SIG SHA256.SUM

The command above should display the following output.

Verified OK

Install

Extract the executable from the tarball.

tar -f keysmith-*.tar.gz -x 

Add the executable to your PATH.

sudo install -d /usr/local/bin
sudo install keysmith /usr/local/bin

Usage

Below is list of commands and their behavior.

  • account prints your account identifier.
  • generate generates your mnemonic seed.
  • legacy-address prints your legacy address.
  • principal prints your principal identifier.
  • private-key derives your private key.
  • public-key prints your public key.
  • version prints the version number.
  • x-public-key prints your extended public key.

Integration with the DFINITY Canister SDK

The DFINITY Canister SDK can sign and send messages to the Internet Computer. Versions 0.7.0-beta.6 and greater provide a convenient ledger command that facilitates ICP token transfer. Consider the workflow below.

keysmith generate # Generate your mnemonic seed.
keysmith private-key # Derive your private key.
DFX_VERSION=0.7.0-beta.6 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)" # Install dfx.
echo {} > dfx.json # Create an empty project.
dfx identity import alternate identity.pem # Import your private key.
dfx identity use alternate # Use your private key to sign messages.
dfx ledger account-id # Print your account identifier.
dfx ledger --network=https://ic0.app balance # Check your balance.
dfx ledger --network=https://ic0.app transfer \ # Send me some tokens.
    --amount=1.23456789 \ # ICP is divisible by 10^(-8) just like Bitcoin.
    --memo=244837814094590 \ # Include a numeric memo.
    --to=89e99f79ec4d81f77a6c8cb243e536e7b3244d7294fb803bcd77b3dd4e32ae36

keysmith's People

Contributors

enzoh avatar nithalak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.