HDWallet constructor
HDWallet(
- BIP32 bip32, {
- bool pIsMaster = false,
- String? coinType,
- NetworkType? overrideNetwork,
})
Implementation
HDWallet(BIP32 bip32,{bool pIsMaster=false,String? coinType,NetworkType? overrideNetwork}){
_bip32=bip32;
_isMaster=pIsMaster;
_coinType=coinType;
_networkType=overrideNetwork;
//Bitcoin
if(_coinType == "0"){
_p2pkh = P2PKH(
data: PaymentData(pubkey: _bip32.publicKey), network: _networkType ?? bitcoin);
}else if(_coinType=="60"){
_ethPrivateKey = EthPrivateKey.fromHex(HEX.encode(_bip32.privateKey!));
}
}