toAdaStakeCredential static method
Convert a StakeCred to an AdaStakeCredential
.
credential
: The StakeCred to convert.
Returns an AdaStakeCredential
object.
Implementation
static AdaStakeCredential toAdaStakeCredential(StakeCred credential) {
if (credential.type == StakeCredType.key) {
return AdaStakeCredential(
hash: credential.data, type: AdaStakeCredType.key);
}
return AdaStakeCredential(
hash: credential.data, type: AdaStakeCredType.script);
}