lnd_ruby_sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,448 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Lightning::Invoice
8
+
9
+ &mdash; Documentation by YARD 0.9.19
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Lightning::Invoice";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (I)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Lightning.html" title="Lightning (class)">Lightning</a></span></span>
41
+ &raquo;
42
+ <span class="title">Invoice</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Lightning::Invoice
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Lightning::Invoice</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/lightning/invoice.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Class Method Summary
112
+ <small><a href="#" class="summary_toggle">collapse</a></small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#add-class_method" title="add (class method)">.<strong>add</strong>(**args) &#x21d2; Lnrpc::AddInvoiceResponse </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'>
135
+ <p>Attempts to add a new invoice to the invoice database and returns a payment
136
+ request.</p>
137
+ </div></span>
138
+
139
+ </li>
140
+
141
+
142
+ <li class="public ">
143
+ <span class="summary_signature">
144
+
145
+ <a href="#list-class_method" title="list (class method)">.<strong>list</strong>(**args) &#x21d2; Lnrpc::ListInvoiceResponse </a>
146
+
147
+
148
+
149
+ </span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Returns a list of all the invoices currently stored within the database.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ </ul>
167
+
168
+
169
+
170
+
171
+ <div id="class_method_details" class="method_details_list">
172
+ <h2>Class Method Details</h2>
173
+
174
+
175
+ <div class="method_details first">
176
+ <h3 class="signature first" id="add-class_method">
177
+
178
+ .<strong>add</strong>(**args) &#x21d2; <tt>Lnrpc::AddInvoiceResponse</tt>
179
+
180
+
181
+
182
+
183
+
184
+ </h3><div class="docstring">
185
+ <div class="discussion">
186
+
187
+ <p>Attempts to add a new invoice to the invoice database and returns a payment
188
+ request.</p>
189
+
190
+
191
+ </div>
192
+ </div>
193
+ <div class="tags">
194
+
195
+ <div class="examples">
196
+ <p class="tag_title">Examples:</p>
197
+
198
+
199
+ <p class="example_title"><div class='inline'>
200
+ <p>Create a new invoice</p>
201
+ </div></p>
202
+
203
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../Lightning.html" title="Lightning (class)">Lightning</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Lightning::Invoice (class)">Invoice</a></span></span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='int'>500</span><span class='comma'>,</span> <span class='label'>memo:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1x Cappuccino</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span></code></pre>
204
+
205
+ </div>
206
+ <p class="tag_title">Parameters:</p>
207
+ <ul class="param">
208
+
209
+ <li>
210
+
211
+ <span class='name'>args</span>
212
+
213
+
214
+ <span class='type'>(<tt>Hash</tt>)</span>
215
+
216
+
217
+
218
+ &mdash;
219
+ <div class='inline'>
220
+ <p>a customizable set of options</p>
221
+ </div>
222
+
223
+ </li>
224
+
225
+ </ul>
226
+
227
+
228
+
229
+
230
+ <p class="tag_title">Options Hash (<tt>**args</tt>):</p>
231
+ <ul class="option">
232
+
233
+ <li>
234
+ <span class="name">:value</span>
235
+ <span class="type">(<tt>Integer</tt>)</span>
236
+ <span class="default">
237
+
238
+ &mdash; default:
239
+ <tt>0</tt>
240
+
241
+ </span>
242
+
243
+ &mdash; <div class='inline'>
244
+ <p>Amount in satoshis</p>
245
+ </div>
246
+
247
+ </li>
248
+
249
+ <li>
250
+ <span class="name">:expiry</span>
251
+ <span class="type">(<tt>Integer</tt>)</span>
252
+ <span class="default">
253
+
254
+ &mdash; default:
255
+ <tt>3600</tt>
256
+
257
+ </span>
258
+
259
+ &mdash; <div class='inline'>
260
+ <p>Payment request expiry time in seconds.</p>
261
+ </div>
262
+
263
+ </li>
264
+
265
+ <li>
266
+ <span class="name">:memo</span>
267
+ <span class="type">(<tt>String</tt>)</span>
268
+ <span class="default">
269
+
270
+ &mdash; default:
271
+ <tt>&#39;&#39;</tt>
272
+
273
+ </span>
274
+
275
+ &mdash; <div class='inline'>
276
+ <p>An optional memo to attach along with the invoice. Used for record keeping
277
+ purposes for the invoices creator, and will also be set in the description
278
+ field of the encoded payment request if the description_hash field is not
279
+ being used.</p>
280
+ </div>
281
+
282
+ </li>
283
+
284
+ </ul>
285
+
286
+
287
+ <p class="tag_title">Returns:</p>
288
+ <ul class="return">
289
+
290
+ <li>
291
+
292
+
293
+ <span class='type'>(<tt>Lnrpc::AddInvoiceResponse</tt>)</span>
294
+
295
+
296
+
297
+ &mdash;
298
+ <div class='inline'>
299
+ <p>response</p>
300
+ </div>
301
+
302
+ </li>
303
+
304
+ </ul>
305
+
306
+ </div><table class="source_code">
307
+ <tr>
308
+ <td>
309
+ <pre class="lines">
310
+
311
+
312
+ 23
313
+ 24
314
+ 25
315
+ 26
316
+ 27
317
+ 28
318
+ 29
319
+ 30
320
+ 31</pre>
321
+ </td>
322
+ <td>
323
+ <pre class="code"><span class="info file"># File 'lib/lightning/invoice.rb', line 23</span>
324
+
325
+ <span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
326
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span>
327
+ <span class='id identifier rubyid_expiry'>expiry</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:expiry</span><span class='rbracket'>]</span>
328
+ <span class='id identifier rubyid_memo'>memo</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:memo</span><span class='rbracket'>]</span>
329
+
330
+ <span class='id identifier rubyid_return_res'>return_res</span> <span class='id identifier rubyid_stub'>stub</span><span class='period'>.</span><span class='id identifier rubyid_add_invoice'>add_invoice</span><span class='lparen'>(</span>
331
+ <span class='const'>Lnrpc</span><span class='op'>::</span><span class='const'>Invoice</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='label'>value:</span> <span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='label'>expiry:</span> <span class='id identifier rubyid_expiry'>expiry</span><span class='comma'>,</span> <span class='label'>memo:</span> <span class='id identifier rubyid_memo'>memo</span><span class='rparen'>)</span>
332
+ <span class='rparen'>)</span>
333
+ <span class='kw'>end</span></pre>
334
+ </td>
335
+ </tr>
336
+ </table>
337
+ </div>
338
+
339
+ <div class="method_details ">
340
+ <h3 class="signature " id="list-class_method">
341
+
342
+ .<strong>list</strong>(**args) &#x21d2; <tt>Lnrpc::ListInvoiceResponse</tt>
343
+
344
+
345
+
346
+
347
+
348
+ </h3><div class="docstring">
349
+ <div class="discussion">
350
+
351
+ <p>Returns a list of all the invoices currently stored within the database.
352
+ Any active debug invoices are ignored. It has full support for paginated
353
+ responses, allowing users to query for specific invoices through their
354
+ add_index. This can be done by using either the first_index_offset or
355
+ last_index_offset fields included in the response as the index_offset of
356
+ the next request. By default, the first 100 invoices created will be
357
+ returned. Backwards pagination is also supported through the Reversed flag.</p>
358
+
359
+
360
+ </div>
361
+ </div>
362
+ <div class="tags">
363
+
364
+ <div class="examples">
365
+ <p class="tag_title">Examples:</p>
366
+
367
+
368
+ <p class="example_title"><div class='inline'>
369
+ <p>List all invoices</p>
370
+ </div></p>
371
+
372
+ <pre class="example code"><code><span class='const'><span class='object_link'><a href="../Lightning.html" title="Lightning (class)">Lightning</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Lightning::Invoice (class)">Invoice</a></span></span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span></code></pre>
373
+
374
+ </div>
375
+
376
+ <p class="tag_title">Returns:</p>
377
+ <ul class="return">
378
+
379
+ <li>
380
+
381
+
382
+ <span class='type'>(<tt>Lnrpc::ListInvoiceResponse</tt>)</span>
383
+
384
+
385
+
386
+ &mdash;
387
+ <div class='inline'>
388
+ <p>response</p>
389
+ </div>
390
+
391
+ </li>
392
+
393
+ </ul>
394
+
395
+ </div><table class="source_code">
396
+ <tr>
397
+ <td>
398
+ <pre class="lines">
399
+
400
+
401
+ 46
402
+ 47
403
+ 48
404
+ 49
405
+ 50
406
+ 51
407
+ 52
408
+ 53
409
+ 54
410
+ 55
411
+ 56
412
+ 57
413
+ 58</pre>
414
+ </td>
415
+ <td>
416
+ <pre class="code"><span class="info file"># File 'lib/lightning/invoice.rb', line 46</span>
417
+
418
+ <span class='kw'>def</span> <span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
419
+ <span class='id identifier rubyid_num_max_invoices'>num_max_invoices</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:num_max_invoices</span><span class='rbracket'>]</span>
420
+ <span class='id identifier rubyid_index_offset'>index_offset</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:index_offset</span><span class='rbracket'>]</span>
421
+ <span class='id identifier rubyid_pending_only'>pending_only</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:pending_only</span><span class='rbracket'>]</span>
422
+ <span class='id identifier rubyid_reversed'>reversed</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='symbol'>:reversed</span><span class='rbracket'>]</span>
423
+
424
+ <span class='id identifier rubyid_return_res'>return_res</span> <span class='id identifier rubyid_stub'>stub</span><span class='period'>.</span><span class='id identifier rubyid_list_invoices'>list_invoices</span><span class='lparen'>(</span>
425
+ <span class='const'>Lnrpc</span><span class='op'>::</span><span class='const'>ListInvoiceRequest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
426
+ <span class='label'>num_max_invoices:</span> <span class='id identifier rubyid_num_max_invoices'>num_max_invoices</span><span class='comma'>,</span> <span class='label'>index_offset:</span> <span class='id identifier rubyid_index_offset'>index_offset</span><span class='comma'>,</span>
427
+ <span class='label'>pending_only:</span> <span class='id identifier rubyid_pending_only'>pending_only</span><span class='comma'>,</span> <span class='label'>reversed:</span> <span class='id identifier rubyid_reversed'>reversed</span>
428
+ <span class='rparen'>)</span>
429
+ <span class='rparen'>)</span>
430
+ <span class='kw'>end</span></pre>
431
+ </td>
432
+ </tr>
433
+ </table>
434
+ </div>
435
+
436
+ </div>
437
+
438
+ </div>
439
+
440
+ <div id="footer">
441
+ Generated on Thu Apr 18 02:11:03 2019 by
442
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
443
+ 0.9.19 (ruby-2.3.1).
444
+ </div>
445
+
446
+ </div>
447
+ </body>
448
+ </html>
@@ -0,0 +1,121 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Lightning::Node
8
+
9
+ &mdash; Documentation by YARD 0.9.19
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Lightning::Node";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (N)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Lightning.html" title="Lightning (module)">Lightning</a></span></span>
41
+ &raquo;
42
+ <span class="title">Node</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Lightning::Node
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Lightning::Node</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/lightning/invoice.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ </div>
112
+
113
+ <div id="footer">
114
+ Generated on Thu Apr 18 02:25:12 2019 by
115
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
116
+ 0.9.19 (ruby-2.3.1).
117
+ </div>
118
+
119
+ </div>
120
+ </body>
121
+ </html>