Skip to content

Commit 4885741

Browse files
authored
Merge pull request #22 from MostroP2P/fix-json-syntax
Fix json syntax
2 parents fe3d298 + 77fdc27 commit 4885741

16 files changed

+341
-306
lines changed

src/admin_add_solver.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ To add a solver the admin will need to send an `order` message to Mostro with ac
1212
[
1313
{
1414
"order": {
15-
"version": 1,
16-
"action": "admin-add-solver",
17-
"payload": {
18-
"text_message": "npub1qqq884wtp2jn96lqhqlnarl4kk3rmvrc9z2nmrvqujx3m4l2ea5qd5d0fq"
15+
"version": 1,
16+
"action": "admin-add-solver",
17+
"payload": {
18+
"text_message": "npub1qqq884wtp2jn96lqhqlnarl4kk3rmvrc9z2nmrvqujx3m4l2ea5qd5d0fq"
19+
}
1920
}
2021
},
2122
null
@@ -30,9 +31,10 @@ Mostro will send this message to the admin:
3031
[
3132
{
3233
"order": {
33-
"version": 1,
34-
"action": "admin-add-solver",
35-
"payload": null
34+
"version": 1,
35+
"action": "admin-add-solver",
36+
"payload": null
37+
}
3638
},
3739
null
3840
]

src/admin_cancel_order.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ An admin can cancel an order, most of the time this is done when admin is solvin
66
[
77
{
88
"order": {
9-
"version": 1,
10-
"id": "<Order Id>",
11-
"action": "admin-cancel",
12-
"payload": null
9+
"version": 1,
10+
"id": "<Order Id>",
11+
"action": "admin-cancel",
12+
"payload": null
13+
}
1314
},
1415
null
1516
]
@@ -23,10 +24,11 @@ Mostro will send this message to the both parties buyer/seller and to the admin:
2324
[
2425
{
2526
"order": {
26-
"version": 1,
27-
"id": "<Order Id>",
28-
"action": "admin-canceled",
29-
"payload": null
27+
"version": 1,
28+
"id": "<Order Id>",
29+
"action": "admin-canceled",
30+
"payload": null
31+
}
3032
},
3133
null
3234
]

src/admin_settle_order.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ An admin can settle an order, most of the time this is done when admin is solvin
66
[
77
{
88
"order": {
9-
"version": 1,
10-
"id": "<Order Id>",
11-
"action": "admin-settle",
12-
"payload": null
9+
"version": 1,
10+
"id": "<Order Id>",
11+
"action": "admin-settle",
12+
"payload": null
13+
}
1314
},
1415
null
1516
]
@@ -23,10 +24,11 @@ Mostro will send this message to the both parties buyer/seller and to the admin:
2324
[
2425
{
2526
"order": {
26-
"version": 1,
27-
"id": "<Order Id>",
28-
"action": "admin-settled",
29-
"payload": null
27+
"version": 1,
28+
"id": "<Order Id>",
29+
"action": "admin-settled",
30+
"payload": null
31+
}
3032
},
3133
null
3234
]

src/cancel.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ A user can cancel an `active` order, but will need the counterparty to agree, le
7474
[
7575
{
7676
"order": {
77-
"version": 1,
78-
"id": "<Order Id>",
79-
"action": "cancel",
80-
"payload": null
77+
"version": 1,
78+
"id": "<Order Id>",
79+
"action": "cancel",
80+
"payload": null
81+
}
8182
},
8283
null
8384
]
@@ -89,10 +90,11 @@ Mostro will send this message to the seller:
8990
[
9091
{
9192
"order": {
92-
"version": 1,
93-
"id": "<Order Id>",
94-
"action": "cooperative-cancel-initiated-by-you",
95-
"payload": null
93+
"version": 1,
94+
"id": "<Order Id>",
95+
"action": "cooperative-cancel-initiated-by-you",
96+
"payload": null
97+
}
9698
},
9799
null
98100
]
@@ -104,10 +106,11 @@ And this message to the buyer:
104106
[
105107
{
106108
"order": {
107-
"version": 1,
108-
"id": "<Order Id>",
109-
"action": "cooperative-cancel-initiated-by-peer",
110-
"payload": null
109+
"version": 1,
110+
"id": "<Order Id>",
111+
"action": "cooperative-cancel-initiated-by-peer",
112+
"payload": null
113+
}
111114
},
112115
null
113116
]
@@ -119,10 +122,11 @@ The buyer can accept the cooperative cancellation sending this message:
119122
[
120123
{
121124
"order": {
122-
"version": 1,
123-
"id": "<Order Id>",
124-
"action": "cancel",
125-
"payload": null
125+
"version": 1,
126+
"id": "<Order Id>",
127+
"action": "cancel",
128+
"payload": null
129+
}
126130
},
127131
null
128132
]
@@ -134,10 +138,11 @@ And Mostro will send this message to both parties:
134138
[
135139
{
136140
"order": {
137-
"version": 1,
138-
"id": "<Order Id>",
139-
"action": "cooperative-cancel-accepted",
140-
"payload": null
141+
"version": 1,
142+
"id": "<Order Id>",
143+
"action": "cooperative-cancel-accepted",
144+
"payload": null
145+
}
141146
},
142147
null
143148
]

src/dispute.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ Mostro admin will see the dispute and can take it using the dispute `Id` from `d
8787
[
8888
{
8989
"dispute": {
90-
"version": 1,
91-
"id": "<Dispute Id>",
92-
"action": "admin-take-dispute",
93-
"payload": null
90+
"version": 1,
91+
"id": "<Dispute Id>",
92+
"action": "admin-take-dispute",
93+
"payload": null
94+
}
9495
},
9596
null
9697
]
@@ -102,23 +103,24 @@ Mostro will send a confirmation message to the admin with the order details:
102103
[
103104
{
104105
"dispute": {
105-
"version": 1,
106-
"id": "<Dispute Id>",
107-
"action": "admin-took-dispute",
108-
"payload": {
109-
"order": {
110-
"id": "<Order Id>",
111-
"kind": "sell",
112-
"status": "active",
113-
"amount": 7851,
114-
"fiat_code": "VES",
115-
"fiat_amount": 100,
116-
"payment_method": "face to face",
117-
"premium": 1,
118-
"buyer_trade_pubkey": "<Buyer's trade pubkey>",
119-
"seller_trade_pubkey": "<Seller's trade pubkey>",
120-
"buyer_invoice": "lnbcrt11020n1pjcypj3pp58m3d9gcu4cc8l3jgkpfn7zhqv2jfw7p3t6z3tq2nmk9cjqam2c3sdqqcqzzsxqyz5vqsp5mew44wzjs0a58d9sfpkrdpyrytswna6gftlfrv8xghkc6fexu6sq9qyyssqnwfkqdxm66lxjv8z68ysaf0fmm50ztvv773jzuyf8a5tat3lnhks6468ngpv3lk5m7yr7vsg97jh6artva5qhd95vafqhxupyuawmrcqnthl9y",
121-
"created_at": 1698870173
106+
"version": 1,
107+
"id": "<Dispute Id>",
108+
"action": "admin-took-dispute",
109+
"payload": {
110+
"order": {
111+
"id": "<Order Id>",
112+
"kind": "sell",
113+
"status": "active",
114+
"amount": 7851,
115+
"fiat_code": "VES",
116+
"fiat_amount": 100,
117+
"payment_method": "face to face",
118+
"premium": 1,
119+
"buyer_trade_pubkey": "<Buyer's trade pubkey>",
120+
"seller_trade_pubkey": "<Seller's trade pubkey>",
121+
"buyer_invoice": "lnbcrt11020n1pjcypj3pp58m3d9gcu4cc8l3jgkpfn7zhqv2jfw7p3t6z3tq2nmk9cjqam2c3sdqqcqzzsxqyz5vqsp5mew44wzjs0a58d9sfpkrdpyrytswna6gftlfrv8xghkc6fexu6sq9qyyssqnwfkqdxm66lxjv8z68ysaf0fmm50ztvv773jzuyf8a5tat3lnhks6468ngpv3lk5m7yr7vsg97jh6artva5qhd95vafqhxupyuawmrcqnthl9y",
122+
"created_at": 1698870173
123+
}
122124
}
123125
}
124126
},

src/last_trade_index.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ Defines the `last-trade-index` action used to retrieve the user's last `trade_in
77
Client sends a Gift wrap Nostr event to Mostro with the following rumor's content. The request sends a `null` payload to indicate that the client is querying for the last trade index.
88

99
```json
10-
{
11-
"restore": {
12-
"version": 1,
13-
"action": "last-trade-index",
14-
"payload": null
15-
}
16-
}
10+
[
11+
{
12+
"restore": {
13+
"version": 1,
14+
"action": "last-trade-index",
15+
"payload": null
16+
}
17+
},
18+
null
19+
]
1720
```
1821

1922
## Response

src/new_buy_order.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,24 @@ Mostro will send back a nip59 event as a confirmation message, the message in th
4646
[
4747
{
4848
"order": {
49-
"version": 1,
50-
"id": "<Order id>",
51-
"action": "new-order",
52-
"payload": {
53-
"order": {
54-
"id": "<Order id>",
55-
"kind": "buy",
56-
"status": "pending",
57-
"amount": 0,
58-
"fiat_code": "VES",
59-
"fiat_amount": 100,
60-
"payment_method": "face to face",
61-
"premium": 1,
62-
"buyer_trade_pubkey": null,
63-
"seller_trade_pubkey": null,
64-
"buyer_invoice": null,
65-
"created_at": 1698870173
49+
"version": 1,
50+
"id": "<Order id>",
51+
"action": "new-order",
52+
"payload": {
53+
"order": {
54+
"id": "<Order id>",
55+
"kind": "buy",
56+
"status": "pending",
57+
"amount": 0,
58+
"fiat_code": "VES",
59+
"fiat_amount": 100,
60+
"payment_method": "face to face",
61+
"premium": 1,
62+
"buyer_trade_pubkey": null,
63+
"seller_trade_pubkey": null,
64+
"buyer_invoice": null,
65+
"created_at": 1698870173
66+
}
6667
}
6768
}
6869
},

src/new_buy_order_ln_address.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,24 @@ Mostro will send back a nip59 event as a confirmation message to the user like t
5050
[
5151
{
5252
"order": {
53-
"version": 1,
54-
"id": "<Order Id>",
55-
"action": "new-order",
56-
"payload": {
57-
"order": {
58-
"id": "<Order Id>",
59-
"kind": "buy",
60-
"status": "pending",
61-
"amount": 0,
62-
"fiat_code": "VES",
63-
"fiat_amount": 100,
64-
"payment_method": "face to face,mobile",
65-
"premium": 1,
66-
"buyer_trade_pubkey": null,
67-
"seller_trade_pubkey": null,
68-
"buyer_invoice": "mostro_p2p@ln.tips",
69-
"created_at": 1698870173
53+
"version": 1,
54+
"id": "<Order Id>",
55+
"action": "new-order",
56+
"payload": {
57+
"order": {
58+
"id": "<Order Id>",
59+
"kind": "buy",
60+
"status": "pending",
61+
"amount": 0,
62+
"fiat_code": "VES",
63+
"fiat_amount": 100,
64+
"payment_method": "face to face,mobile",
65+
"premium": 1,
66+
"buyer_trade_pubkey": null,
67+
"seller_trade_pubkey": null,
68+
"buyer_invoice": "mostro_p2p@ln.tips",
69+
"created_at": 1698870173
70+
}
7071
}
7172
}
7273
},

src/new_sell_range_order.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,23 @@ Mostro will send back a nip59 event as a confirmation message to the user like t
3838
[
3939
{
4040
"order": {
41-
"version": 1,
42-
"id": "<Order id>",
43-
"action": "new-order",
44-
"payload": {
45-
"order": {
46-
"id": "<Order id>",
47-
"kind": "sell",
48-
"status": "pending",
49-
"amount": 0,
50-
"fiat_code": "VES",
51-
"min_amount": 10,
52-
"max_amount": 20,
53-
"fiat_amount": 0,
54-
"payment_method": "face to face",
55-
"premium": 1,
56-
"created_at": 1698870173
41+
"version": 1,
42+
"id": "<Order id>",
43+
"action": "new-order",
44+
"payload": {
45+
"order": {
46+
"id": "<Order id>",
47+
"kind": "sell",
48+
"status": "pending",
49+
"amount": 0,
50+
"fiat_code": "VES",
51+
"min_amount": 10,
52+
"max_amount": 20,
53+
"fiat_amount": 0,
54+
"payment_method": "face to face",
55+
"premium": 1,
56+
"created_at": 1698870173
57+
}
5758
}
5859
}
5960
},

0 commit comments

Comments
 (0)