[][src]Module ergo_headless_dapp_framework::encoding

Enums

EncodingError

Functions

address_string_to_ergo_tree

Takes an Ergo address (either P2PK or P2S) as a Base58 String and returns the ErgoTree if it is a valid address.

deserialize_ergo_tree_constant

Deserialize ErgoTree inside of a Constant acquired from a register of an ErgoBox into a P2S Base58 String.

deserialize_p2s_to_ergo_tree

Acquire the ErgoTree of the P2S Base58 String.

erg_to_nano_erg

Convert from Erg to nanoErg

hash_and_serialize_p2s

Given a P2S address, extract its ErgoTree, serialize it into hex-encoded bytes, hash it with blake2b_256, and then prepare it to be used in a register as a Constant

nano_erg_to_erg

Convert from nanoErg to Erg

serialize_address_from_ergo_tree

Attempts to acquire the Base58 encoded P2S or P2PK Address from an ErgoTree

serialize_hex_encoded_string

Decodes a hex-encoded string into bytes and then serializes it into a properly formatted signed hex-encoded string and converted into a Constant

serialize_p2s_from_ergo_tree

Acquires the Base58 encoded P2S Address from an ErgoTree

serialize_string

Serialize a String value into a signed hex-encoded byte string and then convert it into a Constant to be used in registers.

string_to_blake2b_hash

Takes the blake2b hash of a String, then converted into/represented as hex as a String

unwrap_hex_encoded_string

Unwraps a hex-encoded String which is inside of a Constant acquired from a register of an ErgoBox.

unwrap_int

Unwraps a hex-encoded i32 Int inside of a Constant acquired from a register of an ErgoBox

unwrap_long

Unwrap a hex-encoded i64 Long inside of a Constant acquired from a register of an ErgoBox

unwrap_string

Unwrap a String which is inside of a Constant acquired from a register of an ErgoBox

Type Definitions

Result