-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
The flow could be:
- When the game is created in the
ChessContractconstructor we add another sub-object of classTxWrapper(see the swap packet) that does not contain a txHex yet. This object is owned by both players and the operator - All players and the operator subscribe to the TxWrapper object using this: https://docs.bitcoincomputer.io/lib/computer/subscribe/
- When the game is over winner creates a partially signed transaction (like the one that is sent to the server now)
- The winner calls the
setTxfunction on the TxWrapper object with the partially signed transaction. - When the other player receives a notification from the subscription on the TxWrapper object (that is in the
onMessagefunction of thesubscribefunction, they check if they should sign the transaction and if so sign and broadcast it.
The next step will be to implement the operator on the client which will be very similar.
Metadata
Metadata
Assignees
Labels
No labels