ADAEnterpriseAddress.fromBip32 constructor
ADAEnterpriseAddress.fromBip32({
- required CardanoByronLegacyBip32 bip32,
- ADANetwork network = ADANetwork.mainnet,
Implementation
factory ADAEnterpriseAddress.fromBip32(
{required CardanoByronLegacyBip32 bip32,
ADANetwork network = ADANetwork.mainnet}) {
final credential =
AdaAddressUtils.publicKeyToCredential(bip32.publicKey.compressed);
final encode = AdaShelleyEnterpriseAddrEncoder().encodeCredential(
AdaAddressUtils.toAdaStakeCredential(credential), {"net_tag": network});
return ADAEnterpriseAddress._(
paymentCredential: credential, address: encode, network: network);
}