Expand description
Implements types for tickets.
Structs§
- Acknowledged
Ticket - Contains acknowledgment information and the respective ticket
- Redeemable
Ticket - Represents a winning ticket that can be successfully redeemed on chain.
- Ticket
- Contains the overall description of a ticket with a signature.
- Ticket
Builder - Builder for Ticket and VerifiedTicket.
- Transferable
Winning Ticket - Represents a ticket that could be transferred over the wire and independently verified again by the other party.
- Unacknowledged
Ticket - Represents a VerifiedTicket with an unknown other part of the HalfKey. Once the other HalfKey is known (forming a Response), it can be acknowledged.
- Verified
Ticket - Holds a ticket that has been already verified.
This structure guarantees that
Ticket::get_hash()
ofVerifiedTicket::verified_ticket()
is always equal toVerifiedTicket::verified_hash
Enums§
- Acknowledged
Ticket Status - Status of the acknowledged ticket.
Constants§
- ALWAYS_
WINNING - Encodes 100% winning probability
- NEVER_
WINNING - Encodes 0% winning probability
Functions§
- f64_
to_ win_ prob - Encodes [0.0f64, 1.0f64] to [0x00000000000000, 0xffffffffffffff]
- win_
prob_ to_ f64 - Decodes [0x00000000000000, 0xffffffffffffff] to [0.0f64, 1.0f64]
Type Aliases§
- Encoded
WinProb - Winning probability encoded in 7-byte representation