ADAPointerAddress.fromCredential constructor
ADAPointerAddress.fromCredential({
- required StakeCred paymentCredential,
- required Pointer pointer,
- ADANetwork network = ADANetwork.mainnet,
Factory constructor to create an ADAPointerAddress instance from a payment credential and a pointer.
Implementation
factory ADAPointerAddress.fromCredential(
{required StakeCred paymentCredential,
required Pointer pointer,
ADANetwork network = ADANetwork.mainnet}) {
final encode = AdaPointerAddrEncoder().encodeCredential(
AdaAddressUtils.toAdaStakeCredential(paymentCredential),
{"pointer": pointer, "net_tag": network});
return ADAPointerAddress._(
paymentCredential: paymentCredential,
pointer: pointer,
address: encode,
network: network);
}