xmr-btc-swap/docs/sequence.puml

63 lines
1.2 KiB
Plaintext
Raw Normal View History

2021-01-13 00:12:57 +00:00
@startuml
database Bitcoin
actor Bob
Actor Alice
database Monero
Bob --> Alice: Establish connection
group Request Response Channel
Bob -> Alice: Request Amounts
note left: Btc Amount
Alice --> Bob: Send Amounts
note right: Btc & Xmr Amounts
end
group Request Response Channel
Bob -> Alice: bob::Message0
2021-01-13 00:36:02 +00:00
note left: Pubkeys\ndleq proof s_b\nxmr viewkey v_b\nbtc refund addr
2021-01-13 00:12:57 +00:00
Alice --> Bob: alice::Message0
2021-01-13 00:36:02 +00:00
note right: Pubkeys\ndleq proof s_a\nxmr view key v_a\nbtc redeem addr\nbtc punish addr
2021-01-13 00:12:57 +00:00
end
group Request Response Channel
Bob -> Alice: bob::Message1
note left: btc lock tx
Alice --> Bob: alice::Message1
2021-01-13 00:36:02 +00:00
note right: cancel tx sig\nrefund tx enc sig S_b
2021-01-13 00:12:57 +00:00
end
group Request Response Channel
Bob -> Alice: bob::Message2
note left: punish tx sig\ncancel tx sig
== Negotiated ==
Bob ->> Bitcoin: Lock
Alice ->> Monero: Lock
Alice --> Bob: alice::Message2
2021-01-13 00:36:02 +00:00
note right: xmr lock tx transfer proof
2021-01-13 00:12:57 +00:00
end
2021-01-13 03:42:38 +00:00
group Request Response Channel
2021-01-13 00:12:57 +00:00
Bob -> Alice: bob::Message3
2021-01-13 00:36:02 +00:00
note left: redeem tx enc sig S_a
2021-01-13 03:42:38 +00:00
Alice --> Bob: alice::Message3
note right: Empty
end
2021-01-13 00:12:57 +00:00
Alice ->> Bitcoin: Redeem
Bitcoin ->> Bob: Signature
2021-01-13 00:36:02 +00:00
Bob -> Bob: Extract s_a
2021-01-13 00:12:57 +00:00
Bob ->> Monero: Redeem
@enduml