Skip to main content

Module invoice

Module invoice 

Source
Expand description

Invoice-related types: status, currency, hash algorithm, script wrapper, signature.

Structs§

CkbInvoice
Represents a syntactically and semantically correct Fiber invoice.
CkbScript
A wrapper around ckb_types::packed::Script with hex serialization.
InvoiceData
The metadata of the invoice.
InvoiceSignature
Recoverable signature
UnknownCurrencyError
Error for unknown currency
UnknownHashAlgorithmError
Error for unknown hash algorithm
VerificationError
Wrapper for molecule verification errors.

Enums§

Attribute
The attributes of the invoice.
CkbInvoiceStatus
The currency of the invoice, can also used to represent the CKB network chain.
Currency
The currency of the invoice, can also used to represent the CKB network chain.
HashAlgorithm
HashAlgorithm is the hash algorithm used in the hash lock.
InvoiceError
Errors that can occur when parsing or validating an invoice.

Constants§

MAX_DESCRIPTION_LENGTH
Maximum allowed length for an invoice description.
SIGNATURE_U5_SIZE
Size of the signature in u5 encoding.

Functions§

construct_invoice_preimage
Construct the invoice’s HRP and signatureless data into a preimage to be hashed.
parse_hrp
Parse the human-readable part of an invoice.
sha256
SHA-256 hash helper function.