cardano::BaseAddress class

A Cardano base address object.

Base classes

class IShelleyAddress
Interface class for all Shelley era addresses.

Public static functions

static auto fromBech32(const std::string_view addr) →  BaseAddress
Create a new BaseAddress object from a bech32 address.
static auto fromKeys(NetworkID nid, const bip32_ed25519::PublicKey& pmt_key, const bip32_ed25519::PublicKey& stake_key) →  BaseAddress
Create a new BaseAddress object from the public keys.

Constructors, destructors, conversion operators

BaseAddress(NetworkID nid, std::array<uint8_t, KEY_HASH_LENGTH> pmt_key_hash, std::array<uint8_t, KEY_HASH_LENGTH> stake_key_hash)
Construct a new BaseAddress 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 BaseAddress cardano::BaseAddress::fromKeys(NetworkID nid, const bip32_ed25519::PublicKey& pmt_key, const bip32_ed25519::PublicKey& stake_key)

Create a new BaseAddress object from the public keys.

Parameters
nid The network ID.
pmt_key The payment key.
stake_key The stake key.
Returns The created BaseAddress object.

cardano::BaseAddress::BaseAddress(NetworkID nid, std::array<uint8_t, KEY_HASH_LENGTH> pmt_key_hash, std::array<uint8_t, KEY_HASH_LENGTH> stake_key_hash)

Construct a new BaseAddress object.

Parameters
nid The network ID.
pmt_key_hash The payment key hash.
stake_key_hash The stake key hash.

std::string final cardano::BaseAddress::toBech32() const virtual

Encode the address as a CIP-0005 compliant bech32 string.

Returns The bech32 encoded address.

std::vector<uint8_t> final cardano::BaseAddress::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::BaseAddress::toBytesRaw() const virtual

Return the address as a byte array without the header byte.

Returns The address as a byte array.