Module helpers

Source

Constants§

BLAKE2B_DIGEST_LENGTH

Functions§

cl_value_to_json
Converts a CLValue to a JSON Value.
get_base64_key_from_account_hash
Convert a formatted account hash to a base64-encoded Key as string (cep-18 key encoding).
get_base64_key_from_key_hash
Converts a formatted key hash to a base64-encoded string (CEP-18 key encoding).
get_blake2b_hash
Computes the Blake2b hash of the provided metadata.
get_current_timestamp
Gets the current timestamp.
get_gas_price_or_default
Gets the gas price or returns the default value if not provided.
get_ttl_or_default
Gets the time to live (TTL) value or returns the default value if not provided.
hex_to_string
Converts a hexadecimal string to a regular string.
hex_to_uint8_vec
Converts a hexadecimal string to a vector of unsigned 8-bit integers (Uint8Array).
json_pretty_print
Pretty prints a serializable value as a JSON string.
make_dictionary_item_key
Creates a dictionary item key by concatenating the serialized bytes of the key and value.
motes_to_cspr
Converts motes to CSPR (Casper tokens).
parse_timestamp
Parses a timestamp string into a Timestamp object.
parse_ttl
Parses a TTL (time to live) string into a TimeDiff object.
public_key_from_secret_key
Converts a secret key in PEM format to its corresponding public key as a string.
secret_key_from_pem
Parses a secret key in PEM format into a SecretKey object.
secret_key_generate
Generates a secret key using the Ed25519 algorithm.
secret_key_secp256k1_generate
Generates a secret key using the secp256k1 algorithm.