Skip to main content

StakingPurpose

A staking purpose script has a StakingPurpose, which is an enum with 2 variants:

  • Rewarding
  • Certifying

Associated functions​

from_data​

StakingPurpose::from_data(data: Data) -> StakingPurpose

Getters​

StakingPurpose::Rewarding​

credential​

Returns the StakingCredential for which rewards are being withdrawn.

rewarding_staking_purpose.credential -> StakingCredential

StakingPurpose::Certifying​

dcert​

Returns the current stake certifying action as a DCert.

certifying_staking_purpose.dcert -> DCert

Operators​

==

StakingPurpose == StakingPurpose -> Bool

!=​

StakingPurpose != StakingPurpose -> Bool

Methods​

serialize​

staking_purpose.serialize() -> ByteArray