-
Notifications
You must be signed in to change notification settings - Fork 9
/
trade.json
59 lines (59 loc) · 1.48 KB
/
trade.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"id": "/Trade",
"type": "object",
"properties": {
"initialSide": {
"enum": ["stellar", "ethereum"]
},
"timelock": {"type": "number"},
"commitment": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"preimage": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"ethereum": {
"type": "object",
"properties": {
"token": {"enum": ["ETH", "OMG", "QTUM"]},
"amount": {"type": "number"},
"depositor": {
"format": "ethereumPublicAddress"
},
"withdrawer": {
"format": "ethereumPublicAddress"
},
"htlcContractId": {
"format": "sha256Hash"
}
},
"required": ["token", "amount", "depositor", "withdrawer"]
},
"stellar": {
"type": "object",
"properties": {
"token": {"enum": ["XLM", "JPY", "CNY", "BTC"]},
"amount": {"type": "number"},
"depositor": {
"oneOf": [
{"format": "stellarPublicAddress"},
{"format": "stellarFederatedAddress"}
]
},
"withdrawer": {
"oneOf": [
{"format": "stellarPublicAddress"},
{"format": "stellarFederatedAddress"}
]
},
"holdingAccount": {
"format": "stellarPublicAddress"
}
},
"required": ["token", "amount", "depositor", "withdrawer"]
}
},
"required": ["timelock", "commitment", "ethereum", "stellar"]
}