Expand description
Crate documentation is TODO.
See the Github README.
Re-exports§
Modules§
- hashlock
- This module contains utilities for constructing LN-compatible preimages and SHA256 hashes.
Structs§
- Contract
Parameters - Represents the parameters which all players and the market maker must agree on to construct a ticketed DLC.
- Contract
Signatures - A set of signatures produced by running a cooperative
SigningSessionon aTicketedDLC. These are only the signatures needed for enforcing outcomes which multiple members of the group must agree on. - Contributor
Partial Signature Sharing Round - A
SigningSessionStatestate for the second signature-sharing round of communication used by individual signing contributors. Usually this would be used by a player. - Coordinator
Partial Signature Sharing Round - A
SigningSessionStatestate for the second signature-sharing round of communication used by the signing coordinator (usually this would be the market maker). - Event
Locking Conditions - The locking points derived from the oracle’s announcement of a future event.
- Market
Maker - The agent who provides the on-chain capital to facilitate the ticketed DLC. Could be one of the players in the DLC, or could be a neutral 3rd party who wishes to profit by leveraging their capital.
- Nonce
Sharing Round - A
SigningSessionStatestate for the initial nonce-sharing round of communication. - Player
- A player in a ticketed DLC. Each player is identified by a public key, but also by their ticket hash. If a player can learn the preimage of their ticket hash (usually by purchasing it via Lightning), they can claim winnings from DLC outcomes.
- SigMap
- Represents a mapping of different signature requirements to some arbitrary type T.
This can be used to efficiently look up signatures, nonces, etc, for each
outcome transaction, and for different
WinConditions within each split transaction. - Signed
Contract - Represents a fully signed and enforceable
TicketedDLC, created by running aSigningSession. - Signing
Session - This is a state machine to manage signing the various transactions in a
TicketedDLC. The generic parameterSdetermines which of the two stages of the signing session we are in. - TicketedDLC
- Represents the combined output of building all transactions and precomputing all necessary data for a ticketed DLC.
- WinCondition
- Points to a situation where a player wins a payout from the DLC.
Enums§
- Outcome
- Represents one possible outcome branch of the DLC. This includes both outcomes attested-to by the Oracle, and expiry.
Traits§
- Signing
Session State - A marker trait used to constrain the API of
SigningSession.
Functions§
- attestation_
locking_ point - Computes the attestation locking point given an oracle pubkey, nonce, and message.
- attestation_
secret - Computes the oracle’s attestation secret scalar - the discrete log of the locking point - for the given outcome message.
- convert_
point - Used to convert secp point into bitcoin xonly key only needed until crate bitcoin updates secp256k1 to v0.30 will be removed/deprecated once the dependency has upgraded
- convert_
xonly_ key - Used to convert musig2 xonly key into bitcoin xonly key only needed until crate bitcoin updates secp256k1 to v0.30 will be removed/deprecated once the dependency has upgraded
Type Aliases§
- Outcome
Index - A type alias for clarity. DLC outcomes are sometimes referred to by their index in the set of possible outcome messages.
- Payout
Weights - Represents a mapping of player to payout weight for a given outcome.
- Player
Index - A type alias for clarity. Players in the DLC are often referred to by their index in the sorted set of players.