Crate cashaccount_sys

Source

Structs§

CashAccount
A cash account registration
Payload
A cash account playload. One registration can contain multiple payloads.

Constants§

CASHACC_ERR_INVALID_ACCOUNT_NAME
CASHACC_ERR_MALLOC_FAILED
Parsing failed to to out of memory.
CASHACC_ERR_NO_PUSHDATA
PUSHDATA op code missing
CASHACC_ERR_PUSHDATA_ERROR
PUSHDATA requested more data parsed than remains in OP_RETURN array.
CASHACC_ERR_TOO_FEW_PARTS
Registration contains too few registration parts. For example, it may have a account name, but no payloads.
CASHACC_ERR_WRONG_PREFIX
OP_RETURN does not have the correct cashaccount prefix.
CASHACC_PAYMENT_KEYHASH
Known (and valid) payment types
CASHACC_PAYMENT_PAYMENTCODE
CASHACC_PAYMENT_SCRIPTHASH
CASHACC_PAYMENT_STEALTHKEYS
CASHACC_PAYMENT_TOKEN_KEYHASH
CASHACC_PAYMENT_TOKEN_PAYMENTCODE
CASHACC_PAYMENT_TOKEN_SCRIPTHASH
CASHACC_PAYMENT_TOKEN_STEALTHKEYS

Functions§

cashacc_account_clear⚠
Clear name/payloads from CashAccount. The struct can be reused after calling this.
cashacc_account_destroy⚠
Free all memory, including payloads.
cashacc_account_init⚠
Allocate the cash account result data. Free using cashacc_account_destroy.
cashacc_check_name⚠
Check if string is a valid cashaccount name (used in cashacc_parse_opreturn)
cashacc_check_payload_type⚠
Check if payload type is a know type. Paylods with unknown types will be ignored.
cashacc_check_prefix⚠
Check if opreturn has the correct cashaccount prefix (used in cashacc_parse_opreturn)
cashacc_parse_opreturn⚠
Parse CashAccount from an OP_RETURN script \param opreturn Pointer to script \param opreturn_len Length of the script \param store_payload If payload is to be stored. If you just need to verify that script contains a cashaccount and get the name, you can set to false for increased performance. \param account The variable where the result is stored \return Number of payloads found, or error code on error