forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlightning-listoffers.json
156 lines (156 loc) · 4.39 KB
/
lightning-listoffers.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
{
"$schema": "../rpc-schema-draft.json",
"type": "object",
"rpc": "listoffers",
"title": "Command for listing offers",
"description": [
"The **listoffers** RPC command list all offers, or with `offer_id`, only the offer with that offer_id (if it exists)."
],
"categories": [
"readonly"
],
"request": {
"required": [],
"additionalProperties": false,
"properties": {
"offer_id": {
"type": "hash",
"description": [
"Offer_id to get details for (if it exists)."
]
},
"active_only": {
"type": "boolean",
"description": [
"If set and is true, only offers with `active` true are returned."
]
}
}
},
"response": {
"required": [
"offers"
],
"additionalProperties": false,
"properties": {
"offers": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"offer_id",
"active",
"single_use",
"bolt12",
"used"
],
"properties": {
"offer_id": {
"type": "hash",
"description": [
"The id of this offer (merkle hash of non-signature fields)."
]
},
"active": {
"type": "boolean",
"description": [
"Whether this can still be used."
]
},
"single_use": {
"type": "boolean",
"description": [
"Whether this expires as soon as it's paid."
]
},
"bolt12": {
"type": "string",
"description": [
"The bolt12 encoding of the offer."
]
},
"used": {
"type": "boolean",
"description": [
"True if an associated invoice has been paid."
]
},
"label": {
"type": "string",
"description": [
"The (optional) user-specified label."
]
}
}
}
}
}
},
"author": [
"Rusty Russell <<[email protected]>> is mainly responsible."
],
"see_also": [
"lightning-offer(7)",
"lightning-listoffers(7)"
],
"resources": [
"Main web site: <https://github.com/ElementsProject/lightning>"
],
"examples": [
{
"request": {
"id": "example:listoffers#1",
"method": "listoffers",
"params": {
"active_only": true
}
},
"response": {
"offers": [
{
"offer_id": "offeridl23000002300000230000023000002300000230000023000002300000",
"active": true,
"single_use": false,
"bolt12": "lno1qgsq000bolt230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000",
"used": false
},
{
"offer_id": "offeridl21000002100000210000021000002100000210000021000002100000",
"active": true,
"single_use": false,
"bolt12": "lno1qgsq000bolt210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000210002100021000",
"used": false
},
{
"offer_id": "offeridl22000002200000220000022000002200000220000022000002200000",
"active": true,
"single_use": false,
"bolt12": "lno1qgsq000bolt220002200022000220002200022000220002200022000220002200022000220002200022000220002200022000220002200022000220002200022000",
"used": false
}
]
}
},
{
"request": {
"id": "example:listoffers#2",
"method": "listoffers",
"params": [
"b791f88cebf775853112c30828e116487f4d6c252d669372532b468bc7de8a24"
]
},
"response": {
"offers": [
{
"offer_id": "offeridl23000002300000230000023000002300000230000023000002300000",
"active": true,
"single_use": false,
"bolt12": "lno1qgsq000bolt230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000230002300023000",
"used": false
}
]
}
}
]
}