ADAEnterpriseAddress.fromPublicKey constructor

ADAEnterpriseAddress.fromPublicKey({
  1. required List<int> pubkeyBytes,
  2. ADANetwork network = ADANetwork.mainnet,
})

Implementation

factory ADAEnterpriseAddress.fromPublicKey(
    {required List<int> pubkeyBytes,
    ADANetwork network = ADANetwork.mainnet}) {
  final credential = AdaAddressUtils.publicKeyToCredential(pubkeyBytes);
  final encode = AdaShelleyEnterpriseAddrEncoder().encodeCredential(
      AdaAddressUtils.toAdaStakeCredential(credential), {"net_tag": network});
  return ADAEnterpriseAddress._(
      paymentCredential: credential, address: encode, network: network);
}