HDWallet.fromSeed constructor
HDWallet.fromSeed(
- Seed seed
Implementation
HDWallet.fromSeed(Seed seed) {
index = 0;
path = Wallet.BIP0044_STANDARD_MASTER;
var hmac = HMac(SHA512Digest(), 128);
var hmacBits = hmac.process(seed.seed);
var leftBits = left256Bits(hmacBits);
var rightBits = right256Bits(hmacBits);
privateKey = hex.encode(leftBits);
chainCode = hex.encode(rightBits);
publicKey = Crypto.secp256k1Compressed(privateKey);
address = 'NULL';
}