ed25519 HD Key
Key Derivation for ed25519
SLIP-0010 - Specification
Installation
npm i --save ed25519-hd-key
Usage
example:
const { derivePath, getMasterKeyFromSeed, getPublicKey } = require('ed25519-hd-key')
const hexSeed = 'fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542';
const { key, chainCode } = getMasterKeyFromSeed(hexSeed);
console.log(key.toString('hex'))
console.log(chainCode.toString('hex'));
const { key, chainCode} = derivePath("m/0'/2147483647'", hexSeed);
console.log(key.toString('hex'))
console.log(chainCode.toString('hex'));
console.log(getPublicKey(key).toString('hex'))
Tests
npm test
References
SLIP-0010
BIP-0032
BIP-0044