forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlistsendpays.schema.json
163 lines (163 loc) · 3.5 KB
/
listsendpays.schema.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": false,
"required": [ "payments" ],
"properties": {
"payments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": [ "id", "payment_hash", "status", "created_at", "amount_sent_msat" ],
"properties": {
"id": {
"type": "u64",
"description": "unique ID for this payment attempt"
},
"payment_hash": {
"type": "hex",
"description": "the hash of the *payment_preimage* which will prove payment",
"maxLength": 64,
"minLength": 64
},
"status": {
"type": "string",
"enum": [ "pending", "failed", "complete" ],
"description": "status of the payment"
},
"msatoshi": {
"deprecated": true
},
"amount_msat": {
"type": "msat",
"description": "The amount delivered to destination (if known)"
},
"destination": {
"type": "pubkey",
"description": "the final destination of the payment if known"
},
"created_at": {
"type": "u64",
"description": "the UNIX timestamp showing when this payment was initiated"
},
"msatoshi_sent": {
"deprecated": true
},
"amount_sent_msat": {
"type": "msat",
"description": "The amount sent"
},
"label": {
"type": "string",
"description": "the label, if given to sendpay"
},
"bolt11": {
"type": "string",
"description": "the bolt11 string (if pay supplied one)"
},
"bolt12": {
"type": "string",
"description": "the bolt12 string (if supplied for pay: **experimental-offers** only)."
}
},
"allOf": [
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [ "complete" ]
}
}
},
"then": {
"additionalProperties": false,
"required": [ "payment_preimage" ],
"properties": {
"id": { },
"payment_hash": { },
"status": { },
"msatoshi": { },
"amount_msat": { },
"destination": { },
"created_at": { },
"msatoshi_sent": { },
"amount_sent_msat": { },
"label": { },
"bolt11": { },
"bolt12": { },
"payment_preimage": {
"type": "hex",
"description": "the proof of payment: SHA256 of this **payment_hash**",
"maxLength": 64,
"minLength": 64
}
}
}
},
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [ "failed" ]
}
}
},
"then": {
"additionalProperties": false,
"required": [ ],
"properties": {
"id": { },
"payment_hash": { },
"status": { },
"msatoshi": { },
"amount_msat": { },
"destination": { },
"created_at": { },
"msatoshi_sent": { },
"amount_sent_msat": { },
"label": { },
"bolt11": { },
"bolt12": { },
"erroronion": {
"type": "hex",
"description": "the onion message returned"
}
}
}
},
{
"if": {
"properties": {
"status": {
"type": "string",
"enum": [ "pending" ]
}
}
},
"then": {
"additionalProperties": false,
"required": [ ],
"properties": {
"id": { },
"payment_hash": { },
"status": { },
"msatoshi": { },
"amount_msat": { },
"destination": { },
"created_at": { },
"msatoshi_sent": { },
"amount_sent_msat": { },
"label": { },
"bolt11": { },
"bolt12": { }
}
}
}
]
}
}
}
}