Commit Graph

1110 Commits (wait-for-cancel-timelock-when-enc-sig-fails)

Author SHA1 Message Date
Tobin C. Harding ad0d8d5713 Emit message0 out of NB (both parties) 4 years ago
Tobin C. Harding bb94643943 Remove data from message until Message0 impl serde 4 years ago
Tobin C. Harding e7504de76c Add state0 -> state1 messages 4 years ago
Tobin C. Harding 08ec776daa Move monero/bitcoin modules to files 4 years ago
Tobin C. Harding aaf1363c05 Refine peer tracker and amounts protocol
We model the getting of amounts as a network behaviour even though conceptually
it is a protocol. Refine/refactor the code a bit to make this more obvious.

- Use `Amounts` instead of `Messenger`

We only ever connect to a single peer, update peer tracker to reflect this. This
is a single patch because the handling of the two network behaviours is a
intertwined.

- Only track one peer connection
- Track the peer id and the multiaddr of the counterparty
- Emit an event for connection established on Alice's side as well as Bob's side
4 years ago
Tobin C. Harding 47eaa44f76 Remove unneeded From<Never> impl 4 years ago
Tobin C. Harding 40e97ffdc3 Add todo to check amounts calculation 4 years ago
Tobin C. Harding 1251681cfd Calculate amounts from BTC 4 years ago
Tobin C. Harding 3492c46e71 Verify amounts with user 4 years ago
Tobin C. Harding 05766d3146 Add swap/
Add a binary crate `swap` that implements two nodes (Alice and Bob). With this
applied we can start up a node for each role and do:

- Bob: Requests current amounts using BTC is input
- Alice: Responds with amounts
- Bob: (mock) get user input to Ok the amounts

... continue with swap (TODO)
4 years ago