Helios language/ Builtins/

Address

Represents a Cardano address.

Associated functions

from_bytes

Decodes raw address bytes (see CIP 19). IS_TESTNET must be set to false for this to work for mainnet addresses.

Address::from_bytes(bytes: ByteArray) -> Address

from_data

Address::from_data(data: Data) -> Address

from_hex

Decodes the hexadecimal encoded bytes of a raw address (see CIP 19). IS_TESTNET must be set to false for this to work for mainnet addresses.

Address::from_hex(hex: String) -> Address

new

Construct a new Address from a Credential and an optional StakingCredential:

Address::new(
    credential: Credential, 
    staking_credential: Option[StakingCredential]
) -> Address

Getters

credential

Get the payment Credential of an Address:

address.credential -> Credential

staking_credential

Get the StakingCredential of an Address:

address.staking_credential -> Option[StakingCredential]

Operators

==

Address == Address -> Bool

!=

Address != Address -> Bool

Methods

serialize

address.serialize() -> ByteArray

show

Alias for to_hex.

address.show() -> String

to_bytes

Returns the raw address bytes (see CIP 19). IS_TESTNET must be set to false for this to return a raw mainnet addresses.

address.to_bytes() -> ByteArray

to_hex

Encodes the raw address bytes as a hexadecimal String (see CIP 19). IS_TESTNET must be set to false for this to return a raw mainnet addresses.

address.to_hex() -> String