File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,23 @@ const (
1919)
2020
2121// BuyRequest is a struct that represents an asset buy quote request.
22+ //
23+ // Normal usage of a buy request:
24+ // 1. Alice, operating a wallet node, wants to receive a Tap asset as payment
25+ // by issuing a Lightning invoice.
26+ // 2. Alice has an asset channel established with Bob's edge node.
27+ // 3. Before issuing the invoice, Alice needs to agree on an exchange rate with
28+ // Bob, who will facilitate the asset transfer.
29+ // 4. To obtain the best exchange rate, Alice creates a buy order specifying
30+ // the desired asset.
31+ // 5. Alice's RFQ subsystem processes the buy order and sends buy requests to
32+ // relevant peers to find the best rate. In this example, Bob is the only
33+ // available peer.
34+ // 6. Once Bob provides a satisfactory quote, Alice accepts it.
35+ // 7. Alice issues the Lightning invoice, which Charlie will pay.
36+ // 8. Instead of paying Alice directly, Charlie pays Bob.
37+ // 9. Bob then forwards the agreed amount of the Tap asset to Alice over their
38+ // asset channel.
2239type BuyRequest struct {
2340 // Peer is the peer that sent the quote request.
2441 Peer route.Vertex
You can’t perform that action at this time.
0 commit comments