[][src]Crate cashaccount_sys

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
CASHACC_ERR_NO_PUSHDATA
CASHACC_ERR_PUSHDATA_ERROR
CASHACC_ERR_TOO_FEW_PARTS
CASHACC_ERR_WRONG_PREFIX
CASHACC_PAYMENT_KEYHASH
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