Credential
Represents the non-staking part of an Address
. Internally represented as an enum with two variants:
PubKey
(wrapsPubKeyHash
)Validator
(wrapsValidatorHash
)
Example instantiation:
pubkey_credential: Credential::PubKey = Credential::new_pubkey(PubKeyHash::new(#...));
validator_credential: Credential::Validator = Credential::new_validator(ValidatorHash::new(#...)); ...
Associated functions
new_pubkey
Credential::new_pubkey(pkh: PubKeyHash) -> Credential::PubKey
new_validator
Credential::new_validator(vh: ValidatorHash) -> Credential::Validator
from_data
Credential::from_data(data: Data) -> Credential
Getters
hash
Get the underlying hash.
pubkey_credential.hash -> PubKeyHash
validator_credential.hash -> ValidatorHash
Operators
==
Credential == Credential -> Bool
!=
Credential != Credential -> Bool
Methods
serialize
credential.serialize() -> ByteArray