Skip to content

Commit 7f95ca1

Browse files
committed
rfqrpc: improve doc for endpoint AddAssetBuyOrder
1 parent ea82831 commit 7f95ca1

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

taprpc/rfqrpc/rfq.proto

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@ service Rfq {
88
/* tapcli: `rfq buyorder`
99
AddAssetBuyOrder is used to add a buy order for a specific asset. If a buy
1010
order already exists for the asset, it will be updated.
11+
12+
A buy order instructs the RFQ (Request For Quote) system to request a quote
13+
from a peer for the acquisition of an asset.
14+
15+
The normal use of a buy order is as follows:
16+
1. Alice, operating a wallet node, wants to receive a Tap asset as payment
17+
by issuing a Lightning invoice.
18+
2. Alice has an asset channel established with Bob's edge node.
19+
3. Before issuing the invoice, Alice needs to agree on an exchange rate with
20+
Bob, who will facilitate the asset transfer.
21+
4. To obtain the best exchange rate, Alice creates a buy order specifying
22+
the desired asset.
23+
5. Alice's RFQ subsystem processes the buy order and sends buy requests to
24+
relevant peers to find the best rate. In this example, Bob is the only
25+
available peer.
26+
6. Once Bob provides a satisfactory quote, Alice accepts it.
27+
7. Alice issues the Lightning invoice, which Charlie will pay.
28+
8. Instead of paying Alice directly, Charlie pays Bob.
29+
9. Bob then forwards the agreed amount of the Tap asset to Alice over their
30+
asset channel.
1131
*/
1232
rpc AddAssetBuyOrder (AddAssetBuyOrderRequest)
1333
returns (AddAssetBuyOrderResponse);

taprpc/rfqrpc/rfq.swagger.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
"/v1/taproot-assets/rfq/buyorder/asset-id/{asset_specifier.asset_id_str}": {
158158
"post": {
159159
"summary": "tapcli: `rfq buyorder`\nAddAssetBuyOrder is used to add a buy order for a specific asset. If a buy\norder already exists for the asset, it will be updated.",
160+
"description": "A buy order instructs the RFQ (Request For Quote) system to request a quote\nfrom a peer for the acquisition of an asset.\n\nThe normal use of a buy order is as follows:\n1. Alice, operating a wallet node, wants to receive a Tap asset as payment\nby issuing a Lightning invoice.\n2. Alice has an asset channel established with Bob's edge node.\n3. Before issuing the invoice, Alice needs to agree on an exchange rate with\nBob, who will facilitate the asset transfer.\n4. To obtain the best exchange rate, Alice creates a buy order specifying\nthe desired asset.\n5. Alice's RFQ subsystem processes the buy order and sends buy requests to\nrelevant peers to find the best rate. In this example, Bob is the only\navailable peer.\n6. Once Bob provides a satisfactory quote, Alice accepts it.\n7. Alice issues the Lightning invoice, which Charlie will pay.\n8. Instead of paying Alice directly, Charlie pays Bob.\n9. Bob then forwards the agreed amount of the Tap asset to Alice over their\nasset channel.",
160161
"operationId": "Rfq_AddAssetBuyOrder",
161162
"responses": {
162163
"200": {
@@ -240,6 +241,7 @@
240241
"/v1/taproot-assets/rfq/buyorder/group-key/{asset_specifier.group_key_str}": {
241242
"post": {
242243
"summary": "tapcli: `rfq buyorder`\nAddAssetBuyOrder is used to add a buy order for a specific asset. If a buy\norder already exists for the asset, it will be updated.",
244+
"description": "A buy order instructs the RFQ (Request For Quote) system to request a quote\nfrom a peer for the acquisition of an asset.\n\nThe normal use of a buy order is as follows:\n1. Alice, operating a wallet node, wants to receive a Tap asset as payment\nby issuing a Lightning invoice.\n2. Alice has an asset channel established with Bob's edge node.\n3. Before issuing the invoice, Alice needs to agree on an exchange rate with\nBob, who will facilitate the asset transfer.\n4. To obtain the best exchange rate, Alice creates a buy order specifying\nthe desired asset.\n5. Alice's RFQ subsystem processes the buy order and sends buy requests to\nrelevant peers to find the best rate. In this example, Bob is the only\navailable peer.\n6. Once Bob provides a satisfactory quote, Alice accepts it.\n7. Alice issues the Lightning invoice, which Charlie will pay.\n8. Instead of paying Alice directly, Charlie pays Bob.\n9. Bob then forwards the agreed amount of the Tap asset to Alice over their\nasset channel.",
243245
"operationId": "Rfq_AddAssetBuyOrder2",
244246
"responses": {
245247
"200": {

taprpc/rfqrpc/rfq_grpc.pb.go

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)