Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
230 stars 124 forks source link

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

Open klntsky opened 6 months ago

klntsky commented 6 months ago

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

lisicky commented 6 months ago

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