class
EnterpriseAddressA Cardano enterprise address object.
Public static functions
-
static auto fromBech32(const std::
string_view addr) → EnterpriseAddress - Factory method to create an EnterpriseAddress object from a bech32 address.
-
static auto fromKey(NetworkID nid,
const bip32_ed25519::
PublicKey& pub_key) → EnterpriseAddress - Factory method to create an EnterpriseAddress object from a key.
Constructors, destructors, conversion operators
-
EnterpriseAddress(NetworkID nid,
std::
array<uint8_t, KEY_HASH_LENGTH> key_hash) - Construct a new EnterpriseAddress object.
Public functions
- auto toBase16(bool with_header = false) const → std::string
- Encode the address as a base16 string.
-
auto toBech32(const std::
string_view addr) const → std::string - Encode the address as a bech32 string.
- auto toBytes(bool with_header = false) const → std::vector<uint8_t>
- Return the address as a byte array.
Function documentation
static EnterpriseAddress cardano:: EnterpriseAddress:: fromBech32(const std:: string_view addr)
Factory method to create an EnterpriseAddress object from a bech32 address.
Parameters | |
---|---|
addr | The bech32 address. |
Returns | The created EnterpriseAddress object. |
static EnterpriseAddress cardano:: EnterpriseAddress:: fromKey(NetworkID nid,
const bip32_ed25519:: PublicKey& pub_key)
Factory method to create an EnterpriseAddress object from a key.
Parameters | |
---|---|
nid | The network ID enum. |
pub_key | The public key. |
Returns | The created EnterpriseAddress object. |
cardano:: EnterpriseAddress:: EnterpriseAddress(NetworkID nid,
std:: array<uint8_t, KEY_HASH_LENGTH> key_hash)
Construct a new EnterpriseAddress object.
Parameters | |
---|---|
nid | The network ID enum. |
key_hash | The key hash. |
std::string cardano:: EnterpriseAddress:: toBase16(bool with_header = false) const
Encode the address as a base16 string.
Parameters | |
---|---|
with_header | Whether to include the header byte in the output. |
Returns | The base16 encoded address. |
std::string cardano:: EnterpriseAddress:: toBech32(const std:: string_view addr) const
Encode the address as a bech32 string.
Returns | The bech32 encoded address. |
---|
std::vector<uint8_t> cardano:: EnterpriseAddress:: toBytes(bool with_header = false) const
Return the address as a byte array.
Parameters | |
---|---|
with_header | Whether to include the header byte in the output. |
Returns | The address as a byte array. |