class
RewardsAddressA Cardano rewards address object.
Base classes
- class IShelleyAddress
- Interface class for all Shelley era addresses.
Public static functions
-
static auto fromBech32(const std::
string_view addr) → RewardsAddress - Factory method to create a RewardsAddress object from a bech32 address.
-
static auto fromKey(NetworkID nid,
const bip32_ed25519::
PublicKey& stake_key) → RewardsAddress - Factory method to create a RewardsAddress object from a key.
Constructors, destructors, conversion operators
-
RewardsAddress(NetworkID nid,
std::
array<uint8_t, KEY_HASH_LENGTH> key_hash) - Construct a new RewardsAddress object.
Public functions
-
auto toBech32() const → std::
string final virtual - Encode the address as a CIP-0005 compliant bech32 string.
-
auto toBytes() const → std::
vector<uint8_t> final virtual - Return the address as a byte array including the header byte.
-
auto toBytesRaw() const → std::
vector<uint8_t> final virtual - Return the address as a byte array without the header byte.
Function documentation
static RewardsAddress cardano:: RewardsAddress:: fromBech32(const std:: string_view addr)
Factory method to create a RewardsAddress object from a bech32 address.
Parameters | |
---|---|
addr | The bech32 address. |
Returns | The created RewardsAddress object. |
static RewardsAddress cardano:: RewardsAddress:: fromKey(NetworkID nid,
const bip32_ed25519:: PublicKey& stake_key)
Factory method to create a RewardsAddress object from a key.
Parameters | |
---|---|
nid | The network ID enum. |
stake_key | The stake key. |
Returns | The created RewardsAddress object. |
cardano:: RewardsAddress:: RewardsAddress(NetworkID nid,
std:: array<uint8_t, KEY_HASH_LENGTH> key_hash)
Construct a new RewardsAddress object.
Parameters | |
---|---|
nid | The network ID enum. |
key_hash | The key hash. |
std:: string final cardano:: RewardsAddress:: toBech32() const virtual
Encode the address as a CIP-0005 compliant bech32 string.
Returns | The bech32 encoded address. |
---|
std:: vector<uint8_t> final cardano:: RewardsAddress:: toBytes() const virtual
Return the address as a byte array including the header byte.
Returns | The address as a byte array. |
---|
std:: vector<uint8_t> final cardano:: RewardsAddress:: toBytesRaw() const virtual
Return the address as a byte array without the header byte.
Returns | The address as a byte array. |
---|