Expand description

Protocol execution and messages exchanged between peers. Execution steps of a swap are carried by Alice and Bob structures. Each contain the list of methods needed to proceed a swap.

Modules

Protocol messages exchanged between swap daemons at each step of the swap protocol. These messages are untrusted and must be validated uppon reception by each swap participant.

Structs

Alice, a SwapRole, starts with accordant blockchain assets and exchange them for arbitrating blockchain assets.
Container for the set of parameters needed to build or verify some parameters on the CoreArbitratingTransactions.
Bob, a SwapRole, starts with arbitrating blockchain assets and exchange them for accordant blockchain assets.
Container for the three main transactions used as the arbitrating engine on-chain. The lock, the lock cancel, and the cancel refund.
The partial punish transaction with its signature.
One has to produce a set of parameters at the start of a swap and receive a mostly equivalent set from counter-party during the reveal procedure. Container for all the parameters a participant needs to execture a swap.
A pair of signatures, one regular and one encrypted.

Functions

Transform a vector of tagged elements K into a vector of tagged commitments. CanonicalBytes are used for computing the commitment of each elements.
Verifies a vector of tagged commitments against a vector of revealed tagged elements. Fails if a tag is not found in the commitments or doesn’t match the commitment. CanonicalBytes are used for computing the commitment of each elements.