cardano-crypto.js
input-output-hk/cardano-crypto compiled to pure javascript using Emscripten
examples
signing
var lib = require('cardano-crypto.js')
var mnemonic = 'logic easily waste eager injury oval sentence wine bomb embrace gossip supreme'
var parentWalletSecret = lib.walletSecretFromMnemonic(mnemonic)
var msg = new Buffer('hello there')
var sig = lib.sign(msg, walletSecret)
deriving child keys (hardened derivation, you can choose either derivation mode 1 or 2)
var lib = require('cardano-crypto.js')
var mnemonic = 'logic easily waste eager injury oval sentence wine bomb embrace gossip supreme'
var parentWalletSecret = lib.walletSecretFromMnemonic(mnemonic)
var childWalletSecret = lib.derivePrivate(parentWalletSecret, 0x80000001, 1)
deriving child public keys (nonhardened derivation, you can choose either derivation mode 1 or 2)
var lib = require('cardano-crypto.js')
var mnemonic = 'logic easily waste eager injury oval sentence wine bomb embrace gossip supreme'
var parentWalletSecret = lib.walletSecretFromMnemonic(mnemonic)
var parentWalletPublicKey = parentWalletSecret.slice(64, 128)
var childWalletSecret = lib.derivePublic(parentWalletPublicKey, 1, 1)