ADAEnterpriseAddress.fromCredential constructor

ADAEnterpriseAddress.fromCredential({
  1. required StakeCred credential,
  2. ADANetwork network = ADANetwork.mainnet,
})

Implementation

factory ADAEnterpriseAddress.fromCredential(
    {required StakeCred credential,
    ADANetwork network = ADANetwork.mainnet}) {
  final encode = AdaShelleyEnterpriseAddrEncoder().encodeCredential(
      AdaAddressUtils.toAdaStakeCredential(credential), {"net_tag": network});
  return ADAEnterpriseAddress._(
      paymentCredential: credential, address: encode, network: network);
}