ADAEnterpriseAddress.fromIcarus constructor

ADAEnterpriseAddress.fromIcarus({
  1. required CardanoIcarusBip32 bip32,
  2. ADANetwork network = ADANetwork.mainnet,
})

Implementation

factory ADAEnterpriseAddress.fromIcarus(
    {required CardanoIcarusBip32 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);
}