This allows the market maker to cooperatively close individual payout
contracts with specific winners, if some of an outcome's winners
cooperate but others do not.
We were using btrees indexed by players, which required each
btree to store the player in memory. This was inefficient.
Instead, we now index by usize, which is a player index in the
sorted set of players in ContractParameters.
These methods allow players and the market maker to execute the final
stages of a Ticketed DLC, including the forceful sellback TX, forceful
win transaction, and forceful reclaim transactions.
Each player only cares about the signatures which are needed
to enforce outcomes in which they receive money. Other outcomes
are entirely optional. The market maker must verify all signatures.
This adds additional states to the SigningSession state machine
which encapsulate the 2nd round of signing, and the final state
after signing is completed. Once all signatures have been received,
the Ticketed DLC is active and enforceable. Players can begin
buying ticket preimages from the market maker.
This is my first go at a higher level API which signers will
use to construct and sign the numerous transactions needed
for executing a Ticketed DLC. It revolves around the
SigningSession struct type, which has an API constrainted by
its current state.