lnd_ruby_sdk 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,549 @@
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
+ Module: LightningSDK
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 = "LightningSDK";
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 (L)</a> &raquo;
40
+
41
+
42
+ <span class="title">LightningSDK</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>Module: LightningSDK
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/lightning/node.rb<span class="defines">,<br />
82
+ lib/lightning/stub.rb,<br /> lib/lightning/invoice.rb,<br /> lib/lightning/version.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+
89
+
90
+ <h2>
91
+ Constant Summary
92
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
93
+ </h2>
94
+
95
+ <dl class="constants">
96
+
97
+ <dt id="VERSION-constant" class="">VERSION =
98
+
99
+ </dt>
100
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
101
+
102
+ </dl>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h2>
113
+ Class Method Summary
114
+ <small><a href="#" class="summary_toggle">collapse</a></small>
115
+ </h2>
116
+
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#add-class_method" title="add (class method)">.<strong>add</strong>(**args) &#x21d2; Lnrpc::AddInvoiceResponse </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'>
137
+ <p>Attempts to add a new invoice to the invoice database and returns a payment
138
+ request.</p>
139
+ </div></span>
140
+
141
+ </li>
142
+
143
+
144
+ <li class="public ">
145
+ <span class="summary_signature">
146
+
147
+ <a href="#info-class_method" title="info (class method)">.<strong>info</strong> &#x21d2; Lnrpc::GetInfoResponse </a>
148
+
149
+
150
+
151
+ </span>
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ <span class="summary_desc"><div class='inline'>
162
+ <p>Returns general information concerning the lightning node including
163
+ it&#39;s identity pubkey, alias, the chains it is connected to, and
164
+ information concerning the number of open+pending channels.</p>
165
+ </div></span>
166
+
167
+ </li>
168
+
169
+
170
+ <li class="public ">
171
+ <span class="summary_signature">
172
+
173
+ <a href="#list-class_method" title="list (class method)">.<strong>list</strong>(**args) &#x21d2; Lnrpc::ListInvoiceResponse </a>
174
+
175
+
176
+
177
+ </span>
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>Returns a list of all the invoices currently stored within the database.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ </ul>
195
+
196
+
197
+
198
+
199
+ <div id="class_method_details" class="method_details_list">
200
+ <h2>Class Method Details</h2>
201
+
202
+
203
+ <div class="method_details first">
204
+ <h3 class="signature first" id="add-class_method">
205
+
206
+ .<strong>add</strong>(**args) &#x21d2; <tt>Lnrpc::AddInvoiceResponse</tt>
207
+
208
+
209
+
210
+
211
+
212
+ </h3><div class="docstring">
213
+ <div class="discussion">
214
+
215
+ <p>Attempts to add a new invoice to the invoice database and returns a payment
216
+ request.</p>
217
+
218
+
219
+ </div>
220
+ </div>
221
+ <div class="tags">
222
+
223
+ <div class="examples">
224
+ <p class="tag_title">Examples:</p>
225
+
226
+
227
+ <p class="example_title"><div class='inline'>
228
+ <p>Create a new invoice</p>
229
+ </div></p>
230
+
231
+ <pre class="example code"><code><span class='const'>Lightning</span><span class='op'>::</span><span class='const'>Invoice</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>
232
+
233
+ </div>
234
+ <p class="tag_title">Parameters:</p>
235
+ <ul class="param">
236
+
237
+ <li>
238
+
239
+ <span class='name'>args</span>
240
+
241
+
242
+ <span class='type'>(<tt>Hash</tt>)</span>
243
+
244
+
245
+
246
+ &mdash;
247
+ <div class='inline'>
248
+ <p>a customizable set of options</p>
249
+ </div>
250
+
251
+ </li>
252
+
253
+ </ul>
254
+
255
+
256
+
257
+
258
+ <p class="tag_title">Options Hash (<tt>**args</tt>):</p>
259
+ <ul class="option">
260
+
261
+ <li>
262
+ <span class="name">:value</span>
263
+ <span class="type">(<tt>Integer</tt>)</span>
264
+ <span class="default">
265
+
266
+ &mdash; default:
267
+ <tt>0</tt>
268
+
269
+ </span>
270
+
271
+ &mdash; <div class='inline'>
272
+ <p>Amount in satoshis</p>
273
+ </div>
274
+
275
+ </li>
276
+
277
+ <li>
278
+ <span class="name">:expiry</span>
279
+ <span class="type">(<tt>Integer</tt>)</span>
280
+ <span class="default">
281
+
282
+ &mdash; default:
283
+ <tt>3600</tt>
284
+
285
+ </span>
286
+
287
+ &mdash; <div class='inline'>
288
+ <p>Payment request expiry time in seconds.</p>
289
+ </div>
290
+
291
+ </li>
292
+
293
+ <li>
294
+ <span class="name">:memo</span>
295
+ <span class="type">(<tt>String</tt>)</span>
296
+ <span class="default">
297
+
298
+ &mdash; default:
299
+ <tt>&#39;&#39;</tt>
300
+
301
+ </span>
302
+
303
+ &mdash; <div class='inline'>
304
+ <p>An optional memo to attach along with the invoice. Used for record keeping
305
+ purposes for the invoices creator, and will also be set in the description
306
+ field of the encoded payment request if the description_hash field is not
307
+ being used.</p>
308
+ </div>
309
+
310
+ </li>
311
+
312
+ </ul>
313
+
314
+
315
+ <p class="tag_title">Returns:</p>
316
+ <ul class="return">
317
+
318
+ <li>
319
+
320
+
321
+ <span class='type'>(<tt>Lnrpc::AddInvoiceResponse</tt>)</span>
322
+
323
+
324
+
325
+ &mdash;
326
+ <div class='inline'>
327
+ <p>response</p>
328
+ </div>
329
+
330
+ </li>
331
+
332
+ </ul>
333
+
334
+ </div><table class="source_code">
335
+ <tr>
336
+ <td>
337
+ <pre class="lines">
338
+
339
+
340
+ 22
341
+ 23
342
+ 24
343
+ 25
344
+ 26
345
+ 27
346
+ 28
347
+ 29
348
+ 30</pre>
349
+ </td>
350
+ <td>
351
+ <pre class="code"><span class="info file"># File 'lib/lightning/invoice.rb', line 22</span>
352
+
353
+ <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>
354
+ <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>
355
+ <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>
356
+ <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>
357
+
358
+ <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>
359
+ <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>
360
+ <span class='rparen'>)</span>
361
+ <span class='kw'>end</span></pre>
362
+ </td>
363
+ </tr>
364
+ </table>
365
+ </div>
366
+
367
+ <div class="method_details ">
368
+ <h3 class="signature " id="info-class_method">
369
+
370
+ .<strong>info</strong> &#x21d2; <tt>Lnrpc::GetInfoResponse</tt>
371
+
372
+
373
+
374
+
375
+
376
+ </h3><div class="docstring">
377
+ <div class="discussion">
378
+
379
+ <p>Returns general information concerning the lightning node including
380
+ it&#39;s identity pubkey, alias, the chains it is connected to, and
381
+ information concerning the number of open+pending channels.</p>
382
+
383
+
384
+ </div>
385
+ </div>
386
+ <div class="tags">
387
+
388
+ <div class="examples">
389
+ <p class="tag_title">Examples:</p>
390
+
391
+
392
+ <p class="example_title"><div class='inline'>
393
+ <p>Receive node info</p>
394
+ </div></p>
395
+
396
+ <pre class="example code"><code><span class='const'>Lightning</span><span class='op'>::</span><span class='const'>Node</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='comment'>#=&gt; {:identity_pubkey=&gt;... }</span></code></pre>
397
+
398
+ </div>
399
+
400
+ <p class="tag_title">Returns:</p>
401
+ <ul class="return">
402
+
403
+ <li>
404
+
405
+
406
+ <span class='type'>(<tt>Lnrpc::GetInfoResponse</tt>)</span>
407
+
408
+
409
+
410
+ &mdash;
411
+ <div class='inline'>
412
+ <p>the response</p>
413
+ </div>
414
+
415
+ </li>
416
+
417
+ </ul>
418
+
419
+ </div><table class="source_code">
420
+ <tr>
421
+ <td>
422
+ <pre class="lines">
423
+
424
+
425
+ 11
426
+ 12
427
+ 13</pre>
428
+ </td>
429
+ <td>
430
+ <pre class="code"><span class="info file"># File 'lib/lightning/node.rb', line 11</span>
431
+
432
+ <span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span>
433
+ <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_get_info'>get_info</span><span class='lparen'>(</span><span class='const'>Lnrpc</span><span class='op'>::</span><span class='const'>GetInfoRequest</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
434
+ <span class='kw'>end</span></pre>
435
+ </td>
436
+ </tr>
437
+ </table>
438
+ </div>
439
+
440
+ <div class="method_details ">
441
+ <h3 class="signature " id="list-class_method">
442
+
443
+ .<strong>list</strong>(**args) &#x21d2; <tt>Lnrpc::ListInvoiceResponse</tt>
444
+
445
+
446
+
447
+
448
+
449
+ </h3><div class="docstring">
450
+ <div class="discussion">
451
+
452
+ <p>Returns a list of all the invoices currently stored within the database.
453
+ Any active debug invoices are ignored. It has full support for paginated
454
+ responses, allowing users to query for specific invoices through their
455
+ add_index. This can be done by using either the first_index_offset or
456
+ last_index_offset fields included in the response as the index_offset of
457
+ the next request. By default, the first 100 invoices created will be
458
+ returned. Backwards pagination is also supported through the Reversed flag.</p>
459
+
460
+
461
+ </div>
462
+ </div>
463
+ <div class="tags">
464
+
465
+ <div class="examples">
466
+ <p class="tag_title">Examples:</p>
467
+
468
+
469
+ <p class="example_title"><div class='inline'>
470
+ <p>List all invoices</p>
471
+ </div></p>
472
+
473
+ <pre class="example code"><code><span class='const'>Lightning</span><span class='op'>::</span><span class='const'>Invoice</span><span class='period'>.</span><span class='id identifier rubyid_list'>list</span></code></pre>
474
+
475
+ </div>
476
+
477
+ <p class="tag_title">Returns:</p>
478
+ <ul class="return">
479
+
480
+ <li>
481
+
482
+
483
+ <span class='type'>(<tt>Lnrpc::ListInvoiceResponse</tt>)</span>
484
+
485
+
486
+
487
+ &mdash;
488
+ <div class='inline'>
489
+ <p>response</p>
490
+ </div>
491
+
492
+ </li>
493
+
494
+ </ul>
495
+
496
+ </div><table class="source_code">
497
+ <tr>
498
+ <td>
499
+ <pre class="lines">
500
+
501
+
502
+ 45
503
+ 46
504
+ 47
505
+ 48
506
+ 49
507
+ 50
508
+ 51
509
+ 52
510
+ 53
511
+ 54
512
+ 55
513
+ 56
514
+ 57</pre>
515
+ </td>
516
+ <td>
517
+ <pre class="code"><span class="info file"># File 'lib/lightning/invoice.rb', line 45</span>
518
+
519
+ <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>
520
+ <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>
521
+ <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>
522
+ <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>
523
+ <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>
524
+
525
+ <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>
526
+ <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>
527
+ <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>
528
+ <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>
529
+ <span class='rparen'>)</span>
530
+ <span class='rparen'>)</span>
531
+ <span class='kw'>end</span></pre>
532
+ </td>
533
+ </tr>
534
+ </table>
535
+ </div>
536
+
537
+ </div>
538
+
539
+ </div>
540
+
541
+ <div id="footer">
542
+ Generated on Thu Apr 18 02:13:04 2019 by
543
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
544
+ 0.9.19 (ruby-2.3.1).
545
+ </div>
546
+
547
+ </div>
548
+ </body>
549
+ </html>