ADARewardAddress.fromIcarus constructor
ADARewardAddress.fromIcarus({
- required CardanoIcarusBip32 bip32,
- ADANetwork network = ADANetwork.mainnet,
Factory method to create an ADARewardAddress instance from an Icarus structure.
Implementation
factory ADARewardAddress.fromIcarus(
{required CardanoIcarusBip32 bip32,
ADANetwork network = ADANetwork.mainnet}) {
final credential =
AdaAddressUtils.publicKeyToCredential(bip32.publicKey.compressed);
final encode = AdaShelleyStakingAddrEncoder().encodeCredential(
AdaAddressUtils.toAdaStakeCredential(credential), {"net_tag": network});
return ADARewardAddress._(
paymentCredential: credential, address: encode, network: network);
}