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