Expand description
Payment-sender declaration and payment-account history (anti-triangulation).
A buyer commits to the fiat account it will pay from by sending only a
hash of the canonicalised account details (PayerDeclaration); the
plaintext travels buyer → seller over the peer channel and never reaches
Mostro. Mostro answers the seller with aggregate counters for that
(buyer, payment_hash) pair (PaymentHistory).
The canonicalisation rules are a client contract defined in the protocol
book (payer_declaration.md); this module only fixes the hash
construction so every client derives the same value from the same
canonical string.
Structs§
- Payer
Declaration - Buyer’s commitment to the fiat payer identity for one order.
- Payment
History - Aggregate, order-scoped history of a
(buyer, payment_hash)pair.
Enums§
- Buyer
Mode - Whether the buyer’s history is meaningful for this order.
Constants§
- PAYMENT_
HASH_ DOMAIN - Domain-separation prefix hashed in front of the canonical payment data.
- PAYMENT_
HASH_ HEX_ LEN - Length, in hex characters, of a valid
PayerDeclaration::payment_hash. - PAYMENT_
HASH_ ORDER_ DOMAIN - Domain-separation prefix of the order-bound declaration a full-privacy
buyer sends (see
order_bound_payment_hash).
Functions§
- is_
valid_ payment_ hash truewhenhashis exactly 64 lowercase hexadecimal characters.- order_
bound_ payment_ hash - The declaration hash of a full-privacy buyer, bound to one order.
- payment_
hash - Hash an already-canonicalised payment-data string.