toCerdential static method
Convert an AdaStakeCredential
to a StakeCred.
credential
: The AdaStakeCredential
to convert.
Returns a StakeCred object.
Implementation
static StakeCred toCerdential(AdaStakeCredential credential) {
if (credential.type == AdaStakeCredType.key) {
return StakeCredKey(credential.hash);
}
return StakeCredScript(credential.hash);
}