Skip to content

Commit 69a0bc3

Browse files
authored
Merge pull request #13 from MostroP2P/replace-uuid-number-with-order-id-reference
Replace uuid number with order id reference
2 parents 01d0165 + 4d941b8 commit 69a0bc3

24 files changed

+113
-115
lines changed

src/admin_cancel_order.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An admin can cancel an order, most of the time this is done when admin is solvin
66
{
77
"order": {
88
"version": 1,
9-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
9+
"id": "<Order Id>",
1010
"action": "admin-cancel",
1111
"payload": null
1212
}
@@ -21,7 +21,7 @@ Mostro will send this message to the both parties buyer/seller and to the admin:
2121
{
2222
"order": {
2323
"version": 1,
24-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
24+
"id": "<Order Id>",
2525
"action": "admin-canceled",
2626
"payload": null
2727
}
@@ -42,7 +42,7 @@ Mostro will publish two addressable events, one for the order to update the stat
4242
"created_at": 1703260182,
4343
"kind": 38383,
4444
"tags": [
45-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
45+
["d", "<Order Id>"],
4646
["k", "sell"],
4747
["f", "VES"],
4848
["s", "canceled-by-admin"],

src/admin_settle_order.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ An admin can settle an order, most of the time this is done when admin is solvin
66
{
77
"order": {
88
"version": 1,
9-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
9+
"id": "<Order Id>",
1010
"action": "admin-settle",
1111
"payload": null
1212
}
@@ -21,7 +21,7 @@ Mostro will send this message to the both parties buyer/seller and to the admin:
2121
{
2222
"order": {
2323
"version": 1,
24-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
24+
"id": "<Order Id>",
2525
"action": "admin-settled",
2626
"payload": null
2727
}
@@ -42,7 +42,7 @@ Mostro will publish two addressable events, one for the order to update the stat
4242
"created_at": 1703260182,
4343
"kind": 38383,
4444
"tags": [
45-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
45+
["d", "<Order Id>"],
4646
["k", "sell"],
4747
["f", "VES"],
4848
["s", "settled-by-admin"],
@@ -96,7 +96,7 @@ At this point Mostro is trying to pay the buyer's invoice, right after complete
9696
"created_at": 1703274032,
9797
"kind": 38383,
9898
"tags": [
99-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
99+
["d", "<Order Id>"],
100100
["k", "sell"],
101101
["f", "VES"],
102102
["s", "success"],

src/cancel.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A user can cancel an order created by himself and with status `pending` sending
66
{
77
"order": {
88
"version": 1,
9-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
9+
"id": "<Order Id>",
1010
"action": "cancel",
1111
"payload": null
1212
}
@@ -21,14 +21,14 @@ Mostro will send a message with action `cancel` confirming the order was cancele
2121
{
2222
"order": {
2323
"version": 1,
24-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
24+
"id": "<Order Id>",
2525
"action": "canceled",
2626
"payload": null
2727
}
2828
}
2929
```
3030

31-
Mostro updates the parameterized replaceable event with `d` tag `ede61c96-4c13-4519-bf3a-dcf7f1e9d842` to change the status to `canceled`:
31+
Mostro updates the parameterized replaceable event with `d` tag `<Order Id>` to change the status to `canceled`:
3232

3333
```json
3434
[
@@ -40,7 +40,7 @@ Mostro updates the parameterized replaceable event with `d` tag `ede61c96-4c13-4
4040
"created_at": 1702549437,
4141
"kind": 38383,
4242
"tags": [
43-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
43+
["d", "<Order Id>"],
4444
["k", "sell"],
4545
["f", "VES"],
4646
["s", "canceled"],
@@ -68,7 +68,7 @@ A user can cancel an `active` order, but will need the counterparty to agree, le
6868
{
6969
"order": {
7070
"version": 1,
71-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
71+
"id": "<Order Id>",
7272
"action": "cancel",
7373
"payload": null
7474
}
@@ -81,7 +81,7 @@ Mostro will send this message to the seller:
8181
{
8282
"order": {
8383
"version": 1,
84-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
84+
"id": "<Order Id>",
8585
"action": "cooperative-cancel-initiated-by-you",
8686
"payload": null
8787
}
@@ -94,14 +94,14 @@ And this message to the buyer:
9494
{
9595
"order": {
9696
"version": 1,
97-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
97+
"id": "<Order Id>",
9898
"action": "cooperative-cancel-initiated-by-peer",
9999
"payload": null
100100
}
101101
}
102102
```
103103

104-
Mostro updates the parameterized replaceable event with `d` tag `ede61c96-4c13-4519-bf3a-dcf7f1e9d842` to change the status to `cooperatively-canceled`:
104+
Mostro updates the parameterized replaceable event with `d` tag `<Order Id>` to change the status to `cooperatively-canceled`:
105105

106106
```json
107107
[
@@ -113,7 +113,7 @@ Mostro updates the parameterized replaceable event with `d` tag `ede61c96-4c13-4
113113
"created_at": 1702549437,
114114
"kind": 38383,
115115
"tags": [
116-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
116+
["d", "<Order Id>"],
117117
["k", "sell"],
118118
["f", "VES"],
119119
["s", "cooperatively-canceled"],
@@ -136,7 +136,7 @@ The buyer can accept the cooperative cancellation sending this message:
136136
{
137137
"order": {
138138
"version": 1,
139-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
139+
"id": "<Order Id>",
140140
"action": "cancel",
141141
"payload": null
142142
}
@@ -149,7 +149,7 @@ And Mostro will send this message to both parties:
149149
{
150150
"order": {
151151
"version": 1,
152-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
152+
"id": "<Order Id>",
153153
"action": "cooperative-cancel-accepted",
154154
"payload": null
155155
}

src/dispute.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A use can start a dispute in an order with status `active` or `fiat-sent` sendin
66
{
77
"order": {
88
"version": 1,
9-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
9+
"id": "<Order Id>",
1010
"action": "dispute",
1111
"payload": null
1212
}
@@ -21,10 +21,10 @@ Mostro will send this message to the seller:
2121
{
2222
"order": {
2323
"version": 1,
24-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
24+
"id": "<Order Id>",
2525
"action": "dispute-initiated-by-you",
2626
"payload": {
27-
"dispute": "efc75871-2568-40b9-a6ee-c382d4d6de01"
27+
"dispute": "<Dispute Id>"
2828
}
2929
}
3030
}
@@ -36,16 +36,16 @@ And here is the message to the buyer:
3636
{
3737
"order": {
3838
"version": 1,
39-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
39+
"id": "<Order Id>",
4040
"action": "dispute-initiated-by-peer",
4141
"payload": {
42-
"dispute": "efc75871-2568-40b9-a6ee-c382d4d6de01"
42+
"dispute": "<Dispute Id>"
4343
}
4444
}
4545
}
4646
```
4747

48-
Mostro will not update the addressable event with `d` tag `ede61c96-4c13-4519-bf3a-dcf7f1e9d842` to change the status to `dispute`, this is because the order is still active, the dispute is just a way to let the admins and the other party know that there is a problem with the order.
48+
Mostro will not update the addressable event with `d` tag `<Order Id>` to change the status to `dispute`, this is because the order is still active, the dispute is just a way to let the admins and the other party know that there is a problem with the order.
4949

5050
## Mostro send a addressable event to show the dispute
5151

@@ -61,7 +61,7 @@ Here is an example of the event sent by Mostro:
6161
"created_at": 1703016565,
6262
"kind": 38383,
6363
"tags": [
64-
["d", "efc75871-2568-40b9-a6ee-c382d4d6de01"],
64+
["d", "<Dispute Id>"],
6565
["s", "initiated"],
6666
["y", "mostrop2p"],
6767
["z", "dispute"]
@@ -72,13 +72,13 @@ Here is an example of the event sent by Mostro:
7272
]
7373
```
7474

75-
Mostro admin will see the dispute and can take it using the dispute `Id` from `d` tag, in this case `efc75871-2568-40b9-a6ee-c382d4d6de01`.
75+
Mostro admin will see the dispute and can take it using the dispute `Id` from `d` tag, here how should look the message sent by the admin:
7676

7777
```json
7878
{
7979
"dispute": {
8080
"version": 1,
81-
"id": "efc75871-2568-40b9-a6ee-c382d4d6de01",
81+
"id": "<Dispute Id>",
8282
"action": "admin-take-dispute",
8383
"payload": null
8484
}
@@ -91,11 +91,11 @@ Mostro will send a confirmation message to the admin with the order details:
9191
{
9292
"dispute": {
9393
"version": 1,
94-
"id": "efc75871-2568-40b9-a6ee-c382d4d6de01",
94+
"id": "<Dispute Id>",
9595
"action": "admin-took-dispute",
9696
"payload": {
9797
"order": {
98-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
98+
"id": "<Order Id>",
9999
"kind": "sell",
100100
"status": "active",
101101
"amount": 7851,
@@ -125,7 +125,7 @@ Also Mostro will broadcast a new addressable dispute event to update the dispute
125125
"created_at": 1703020540,
126126
"kind": 38383,
127127
"tags": [
128-
["d", "efc75871-2568-40b9-a6ee-c382d4d6de01"],
128+
["d", "<Dispute Id>"],
129129
["s", "in-progress"],
130130
["y", "mostrop2p"],
131131
["z", "dispute"]

src/fiatsent.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ After the buyer sends the fiat money to the seller, the buyer should send a mess
66
{
77
"order": {
88
"version": 1,
9-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
9+
"id": "<Order Id>",
1010
"action": "fiat-sent",
1111
"payload": null
1212
}
@@ -21,7 +21,7 @@ In most of the cases after complete a range order, a child order needs to be cre
2121
{
2222
"order": {
2323
"version": 1,
24-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
24+
"id": "<Order Id>",
2525
"action": "fiat-sent",
2626
"payload": {
2727
"next_trade": ["<trade pubkey>", <trade index>]
@@ -38,7 +38,7 @@ Mostro send messages to both parties confirming `fiat-sent` action and sending a
3838
{
3939
"order": {
4040
"version": 1,
41-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
41+
"id": "<Order Id>",
4242
"action": "fiat-sent-ok",
4343
"payload": {
4444
"Peer": {
@@ -55,7 +55,7 @@ And here an example of the message from Mostro to the seller:
5555
{
5656
"order": {
5757
"version": 1,
58-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
58+
"id": "<Order Id>",
5959
"pubkey": "<Seller's trade pubkey>",
6060
"action": "fiat-sent-ok",
6161
"payload": {
@@ -67,7 +67,7 @@ And here an example of the message from Mostro to the seller:
6767
}
6868
```
6969

70-
Mostro updates the addressable event with `d` tag `ede61c96-4c13-4519-bf3a-dcf7f1e9d842` to change the status to `fiat-sent`:
70+
Mostro updates the addressable event with `d` tag `<Order Id>` to change the status to `fiat-sent`:
7171

7272
```json
7373
[
@@ -79,7 +79,7 @@ Mostro updates the addressable event with `d` tag `ede61c96-4c13-4519-bf3a-dcf7f
7979
"created_at": 1702549437,
8080
"kind": 38383,
8181
"tags": [
82-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
82+
["d", "<Order Id>"],
8383
["k", "sell"],
8484
["f", "VES"],
8585
["s", "fiat-sent"],

src/key_management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Clients will always use the first key (zero) `m/44'/1237'/38383'/0/0` to identif
3737
{
3838
"order": {
3939
"version": 1,
40-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
40+
"id": "<Order Id>",
4141
"trade_index": 1,
4242
"action": "take-sell",
4343
"payload": null
@@ -141,7 +141,7 @@ Clients must offer a more private version where the client never send the identi
141141
{
142142
"order": {
143143
"version": 1,
144-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
144+
"id": "<Order Id>",
145145
// "trade_index": 1, // not needed
146146
"action": "take-sell",
147147
"payload": null

src/list_disputes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Mostro publishes new disputes with event kind `38383` and status `initiated`:
1212
"created_at": 1703016565,
1313
"kind": 38383,
1414
"tags": [
15-
["d", "efc75871-2568-40b9-a6ee-c382d4d6de01"],
15+
["d", "<Dispute Id>"],
1616
["s", "initiated"],
1717
["y", "mostrop2p"],
1818
["z", "dispute"]

src/list_orders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Mostro publishes new orders with event kind `38383` and status `pending`:
1212
"created_at": 1702548701,
1313
"kind": 38383,
1414
"tags": [
15-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
15+
["d", "<Order Id>"],
1616
["k", "sell"],
1717
["f", "VES"],
1818
["s", "pending"],

src/new_buy_order.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ Mostro will send back a nip59 event as a confirmation message to the user like t
4646
{
4747
"order": {
4848
"version": 1,
49-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
49+
"id": "<Order id>",
5050
"action": "new-order",
5151
"payload": {
5252
"order": {
53-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
53+
"id": "<Order id>",
5454
"kind": "buy",
5555
"status": "pending",
5656
"amount": 0,
@@ -80,7 +80,7 @@ Mostro publishes this order as an event kind `38383` with status `pending`:
8080
"created_at": 1702548701,
8181
"kind": 38383,
8282
"tags": [
83-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
83+
["d", "<Order id>"],
8484
["k", "buy"],
8585
["f", "VES"],
8686
["s", "pending"],

src/new_buy_order_ln_address.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ Mostro will send back a nip59 event as a confirmation message to the user like t
4747
{
4848
"order": {
4949
"version": 1,
50-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
50+
"id": "<Order Id>",
5151
"action": "new-order",
5252
"payload": {
5353
"order": {
54-
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
54+
"id": "<Order Id>",
5555
"kind": "buy",
5656
"status": "pending",
5757
"amount": 0,
@@ -81,7 +81,7 @@ Mostro publishes this order as an event kind `38383` with status `pending`:
8181
"created_at": 1702548701,
8282
"kind": 38383,
8383
"tags": [
84-
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
84+
["d", "<Order Id>"],
8585
["k", "buy"],
8686
["f", "VES"],
8787
["s", "pending"],

0 commit comments

Comments
 (0)