ADABaseAddress.fromCredential constructor
ADABaseAddress.fromCredential({})
Factory method to create an ADABaseAddress instance from payment and stake credentials.
Implementation
factory ADABaseAddress.fromCredential(
{required StakeCred baseCredential,
required StakeCred stakeCredential,
ADANetwork network = ADANetwork.mainnet}) {
final encode = AdaShelleyAddrEncoder().encodeCredential(
AdaAddressUtils.toAdaStakeCredential(baseCredential), {
"net_tag": network,
"pub_skey": AdaAddressUtils.toAdaStakeCredential(stakeCredential)
});
return ADABaseAddress._(
paymentCredential: baseCredential,
address: encode,
stakeCredential: stakeCredential,
network: network);
}