Wrapper for Cardano stake address bytes. An
StakeAddress consists of two parts internally:
- Header (1 byte, see CIP 8)
- Staking witness hash (28 bytes that represent the
Stake addresses are used to query the assets held by given staking credentials.
new helios.StakeAddress(bytes: number)
Convert a regular
Address into a
StakeAddress. Throws an error if the
Address doesn't have a staking credential.
helios.StakeAddress.fromAddress(address: helios.Address): helios.StakeAddress
Deserializes bytes into an
helios.StakeAddress.fromCbor(bytes: number): helios.StakeAddress
Converts a Bech32 string into an
helios.StakeAddress.fromBech32(str: string): helios.StakeAddress
helios.StakeAddress.fromHash( isTestnet: boolean, hash: helios.StakeKeyHash | helios.StakingValidatorHash )
Note: bech32 encoded stake addresses have a "stake" or "stake_test" prefix.
StakeAddress using a hexadecimal string representation of the address bytes.
helios.StakeAddress.fromHex(hex: string): helios.StakeAddress
true if the given
StakeAddress is a testnet address.
helios.StakeAddress.isForTestnet( stake_address: helios.StakeAddress ): boolean
Returns the underlying
StakeKeyHash](./stakekeyhash.md) or [StakingValidatorHash`.
stake_address.stakingHash: (helios.StakeKeyHash | helios.StakingValidatorHash)
StakeAddress into its Bech32 representation.
StakeAddress into its CBOR representation.
StakeAddress into its hexadecimal representation.