Wallet.fromHDNode constructor

Wallet.fromHDNode(
  1. HDNode hdNode
)

Implementation

factory Wallet.fromHDNode(HDNode hdNode) {
  final publicKey =
      '0x04' + bytesToHex(privateKeyToPublic(hexToInt(hdNode.privateKey!)));
  return Wallet(
    signingKey: SigningKey(
      privateKey: hdNode.privateKey,
      compressedPublicKey: hdNode.publicKey,
      publicKey: publicKey,
    ),
    mnemonic: hdNode.mnemonic,
    address: hdNode.address,
    privateKey: hdNode.privateKey,
    publicKey: publicKey,
  );
}