ADARewardAddress.fromPublicKey constructor
ADARewardAddress.fromPublicKey({})
Factory method to create an ADARewardAddress instance from a public key.
Implementation
factory ADARewardAddress.fromPublicKey(
{required List<int> pubkeyBytes,
ADANetwork network = ADANetwork.mainnet}) {
final credential = AdaAddressUtils.publicKeyToCredential(pubkeyBytes);
final encode = AdaShelleyStakingAddrEncoder().encodeCredential(
AdaAddressUtils.toAdaStakeCredential(credential), {"net_tag": network});
return ADARewardAddress._(
paymentCredential: credential, address: encode, network: network);
}