cardano-serialization-lib icon indicating copy to clipboard operation
cardano-serialization-lib copied to clipboard

RewardAddress method naming: why payment_cred() and not stake_cred()?

Open klntsky opened this issue 1 year ago • 1 comments

Reward addresses contain stake key only, so why is the method called payment_cred?

klntsky avatar Jan 22 '24 15:01 klntsky

Hi @klntsky! I'm not sure about initial reason of naming, but it might be because a credential is used for reward withdrawal. Yes reward address contains a staking credential but purpose of the credential is different here and semantic of reward address is different from other address types. In CDDL it is just credential https://github.com/IntersectMBO/cardano-ledger/blob/5f76eb918c16645ed98a7fbab513c2d549837ed5/eras/babbage/impl/cddl-files/babbage.cddl#L172

lisicky avatar Jan 25 '24 08:01 lisicky