Module token

Source
Expand description

Token types

Structs§

Token
Token represented with token id paired with its amount
TokenAmount
Token amount with bound checks
TokenId
Token id (32 byte digest)

Functions§

token_amount_as_i64
Get value as signed 64-bit long
token_amount_from_i64
Create from i64 with bounds check
token_get_amount
Get token amount
token_get_id
Get token id
token_id_from_box_id
Create token id from ergo box id (32 byte digest)
token_id_from_str
Parse token id (32 byte digest) from base16-encoded string
token_id_to_str
Base16 encoded string
token_new
Create a token with given token id and amount
token_to_json_eip12
JSON representation according to EIP-12 https://github.com/ergoplatform/eips/pull/23

Type Aliases§

ConstTokenAmountPtr
ConstTokenIdPtr
ConstTokenPtr
TokenAmountPtr
TokenIdPtr
TokenPtr