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