keoken 0.0.4 → 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,732 @@
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: Keoken::Token
8
+
9
+ &mdash; Documentation by YARD 0.9.18
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 = "Keoken::Token";
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 (T)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span>
41
+ &raquo;
42
+ <span class="title">Token</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: Keoken::Token
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">Keoken::Token</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/keoken/token.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
107
+ <ul class="summary">
108
+
109
+ <li class="public ">
110
+ <span class="summary_signature">
111
+
112
+ <a href="#hex-instance_method" title="#hex (instance method)">#<strong>hex</strong> &#x21d2; Object </a>
113
+
114
+
115
+
116
+ </span>
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'>Returns the value of attribute hex.</div></span>
130
+
131
+ </li>
132
+
133
+
134
+ <li class="public ">
135
+ <span class="summary_signature">
136
+
137
+ <a href="#id-instance_method" title="#id (instance method)">#<strong>id</strong> &#x21d2; Object </a>
138
+
139
+
140
+
141
+ </span>
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+ <span class="summary_desc"><div class='inline'>Returns the value of attribute id.</div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+ <span class="summary_desc"><div class='inline'>Returns the value of attribute name.</div></span>
180
+
181
+ </li>
182
+
183
+
184
+ </ul>
185
+
186
+
187
+
188
+
189
+
190
+ <h2>
191
+ Instance Method Summary
192
+ <small><a href="#" class="summary_toggle">collapse</a></small>
193
+ </h2>
194
+
195
+ <ul class="summary">
196
+
197
+ <li class="public ">
198
+ <span class="summary_signature">
199
+
200
+ <a href="#create-instance_method" title="#create (instance method)">#<strong>create</strong>(amount) &#x21d2; Keoken::Token </a>
201
+
202
+
203
+
204
+ </span>
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+ <span class="summary_desc"><div class='inline'>Generate the script to create a token.</div></span>
215
+
216
+ </li>
217
+
218
+
219
+ <li class="public ">
220
+ <span class="summary_signature">
221
+
222
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(options = {}) &#x21d2; Token </a>
223
+
224
+
225
+
226
+ </span>
227
+
228
+
229
+ <span class="note title constructor">constructor</span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <span class="summary_desc"><div class='inline'>Creates a new token object.</div></span>
239
+
240
+ </li>
241
+
242
+
243
+ <li class="public ">
244
+ <span class="summary_signature">
245
+
246
+ <a href="#send_amount-instance_method" title="#send_amount (instance method)">#<strong>send_amount</strong>(amount) &#x21d2; Keoken::Token </a>
247
+
248
+
249
+
250
+ </span>
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'>Generate the script to send an amount from one address to another.</div></span>
261
+
262
+ </li>
263
+
264
+
265
+ </ul>
266
+
267
+
268
+ <div id="constructor_details" class="method_details_list">
269
+ <h2>Constructor Details</h2>
270
+
271
+ <div class="method_details first">
272
+ <h3 class="signature first" id="initialize-instance_method">
273
+
274
+ #<strong>initialize</strong>(options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Keoken::Token (class)">Token</a></span></tt>
275
+
276
+
277
+
278
+
279
+
280
+ </h3><div class="docstring">
281
+ <div class="discussion">
282
+ Creates a new token object.
283
+
284
+ </div>
285
+ </div>
286
+ <div class="tags">
287
+ <p class="tag_title">Parameters:</p>
288
+ <ul class="param">
289
+
290
+ <li>
291
+
292
+ <span class='name'>options</span>
293
+
294
+
295
+ <span class='type'>(<tt>Hash</tt>)</span>
296
+
297
+
298
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
299
+
300
+
301
+ &mdash;
302
+ <div class='inline'>options parameters to create the token.</div>
303
+
304
+ </li>
305
+
306
+ </ul>
307
+
308
+
309
+
310
+
311
+ <p class="tag_title">Options Hash (<tt>options</tt>):</p>
312
+ <ul class="option">
313
+
314
+ <li>
315
+ <span class="name">:name</span>
316
+ <span class="type">(<tt>String</tt>)</span>
317
+ <span class="default">
318
+
319
+ </span>
320
+
321
+ &mdash; <div class='inline'>The name of token to create.</div>
322
+
323
+ </li>
324
+
325
+ <li>
326
+ <span class="name">:id</span>
327
+ <span class="type">(<tt>Number</tt>)</span>
328
+ <span class="default">
329
+
330
+ </span>
331
+
332
+ &mdash; <div class='inline'>The id of token to obtain an amount to send to another address.</div>
333
+
334
+ </li>
335
+
336
+ </ul>
337
+
338
+
339
+
340
+ </div><table class="source_code">
341
+ <tr>
342
+ <td>
343
+ <pre class="lines">
344
+
345
+
346
+ 11
347
+ 12
348
+ 13
349
+ 14</pre>
350
+ </td>
351
+ <td>
352
+ <pre class="code"><span class="info file"># File 'lib/keoken/token.rb', line 11</span>
353
+
354
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
355
+ <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span>
356
+ <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span>
357
+ <span class='kw'>end</span></pre>
358
+ </td>
359
+ </tr>
360
+ </table>
361
+ </div>
362
+
363
+ </div>
364
+
365
+ <div id="instance_attr_details" class="attr_details">
366
+ <h2>Instance Attribute Details</h2>
367
+
368
+
369
+ <span id="hex=-instance_method"></span>
370
+ <div class="method_details first">
371
+ <h3 class="signature first" id="hex-instance_method">
372
+
373
+ #<strong>hex</strong> &#x21d2; <tt>Object</tt>
374
+
375
+
376
+
377
+
378
+
379
+ </h3><div class="docstring">
380
+ <div class="discussion">
381
+ Returns the value of attribute hex
382
+
383
+ </div>
384
+ </div>
385
+ <div class="tags">
386
+
387
+
388
+ </div><table class="source_code">
389
+ <tr>
390
+ <td>
391
+ <pre class="lines">
392
+
393
+
394
+ 3
395
+ 4
396
+ 5</pre>
397
+ </td>
398
+ <td>
399
+ <pre class="code"><span class="info file"># File 'lib/keoken/token.rb', line 3</span>
400
+
401
+ <span class='kw'>def</span> <span class='id identifier rubyid_hex'>hex</span>
402
+ <span class='ivar'>@hex</span>
403
+ <span class='kw'>end</span></pre>
404
+ </td>
405
+ </tr>
406
+ </table>
407
+ </div>
408
+
409
+
410
+ <span id="id=-instance_method"></span>
411
+ <div class="method_details ">
412
+ <h3 class="signature " id="id-instance_method">
413
+
414
+ #<strong>id</strong> &#x21d2; <tt>Object</tt>
415
+
416
+
417
+
418
+
419
+
420
+ </h3><div class="docstring">
421
+ <div class="discussion">
422
+ Returns the value of attribute id
423
+
424
+ </div>
425
+ </div>
426
+ <div class="tags">
427
+
428
+
429
+ </div><table class="source_code">
430
+ <tr>
431
+ <td>
432
+ <pre class="lines">
433
+
434
+
435
+ 3
436
+ 4
437
+ 5</pre>
438
+ </td>
439
+ <td>
440
+ <pre class="code"><span class="info file"># File 'lib/keoken/token.rb', line 3</span>
441
+
442
+ <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
443
+ <span class='ivar'>@id</span>
444
+ <span class='kw'>end</span></pre>
445
+ </td>
446
+ </tr>
447
+ </table>
448
+ </div>
449
+
450
+
451
+ <span id="name=-instance_method"></span>
452
+ <div class="method_details ">
453
+ <h3 class="signature " id="name-instance_method">
454
+
455
+ #<strong>name</strong> &#x21d2; <tt>Object</tt>
456
+
457
+
458
+
459
+
460
+
461
+ </h3><div class="docstring">
462
+ <div class="discussion">
463
+ Returns the value of attribute name
464
+
465
+ </div>
466
+ </div>
467
+ <div class="tags">
468
+
469
+
470
+ </div><table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
474
+
475
+
476
+ 3
477
+ 4
478
+ 5</pre>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/keoken/token.rb', line 3</span>
482
+
483
+ <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
484
+ <span class='ivar'>@name</span>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ </div>
492
+
493
+
494
+ <div id="instance_method_details" class="method_details_list">
495
+ <h2>Instance Method Details</h2>
496
+
497
+
498
+ <div class="method_details first">
499
+ <h3 class="signature first" id="create-instance_method">
500
+
501
+ #<strong>create</strong>(amount) &#x21d2; <tt><span class='object_link'><a href="" title="Keoken::Token (class)">Keoken::Token</a></span></tt>
502
+
503
+
504
+
505
+
506
+
507
+ </h3><div class="docstring">
508
+ <div class="discussion">
509
+ Generate the script to create a token.
510
+
511
+ </div>
512
+ </div>
513
+ <div class="tags">
514
+ <p class="tag_title">Parameters:</p>
515
+ <ul class="param">
516
+
517
+ <li>
518
+
519
+ <span class='name'>amount</span>
520
+
521
+
522
+ <span class='type'>(<tt>Number</tt>)</span>
523
+
524
+
525
+
526
+ &mdash;
527
+ <div class='inline'>The token amount limit.</div>
528
+
529
+ </li>
530
+
531
+ </ul>
532
+
533
+ <p class="tag_title">Returns:</p>
534
+ <ul class="return">
535
+
536
+ <li>
537
+
538
+
539
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Keoken::Token (class)">Keoken::Token</a></span></tt>)</span>
540
+
541
+
542
+
543
+ &mdash;
544
+ <div class='inline'>An object with the data needed to crate the token.</div>
545
+
546
+ </li>
547
+
548
+ </ul>
549
+ <p class="tag_title">Raises:</p>
550
+ <ul class="raise">
551
+
552
+ <li>
553
+
554
+
555
+ <span class='type'>(<tt><span class='object_link'><a href="NameNotFound.html" title="Keoken::NameNotFound (class)">Keoken::NameNotFound</a></span></tt>)</span>
556
+
557
+
558
+
559
+ </li>
560
+
561
+ </ul>
562
+
563
+ </div><table class="source_code">
564
+ <tr>
565
+ <td>
566
+ <pre class="lines">
567
+
568
+
569
+ 22
570
+ 23
571
+ 24
572
+ 25
573
+ 26
574
+ 27
575
+ 28
576
+ 29
577
+ 30
578
+ 31
579
+ 32
580
+ 33
581
+ 34
582
+ 35
583
+ 36</pre>
584
+ </td>
585
+ <td>
586
+ <pre class="code"><span class="info file"># File 'lib/keoken/token.rb', line 22</span>
587
+
588
+ <span class='kw'>def</span> <span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_amount'>amount</span><span class='rparen'>)</span>
589
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="NameNotFound.html" title="Keoken::NameNotFound (class)">NameNotFound</a></span></span> <span class='kw'>unless</span> <span class='ivar'>@name</span>
590
+ <span class='id identifier rubyid_data_script'>data_script</span> <span class='op'>=</span>
591
+ <span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#VERSION_NODE-constant" title="Keoken::VERSION_NODE (constant)">VERSION_NODE</a></span></span><span class='comma'>,</span>
592
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#TYPE_CREATE_ASSET-constant" title="Keoken::TYPE_CREATE_ASSET (constant)">TYPE_CREATE_ASSET</a></span></span><span class='comma'>,</span>
593
+ <span class='id identifier rubyid_name_to_hex'>name_to_hex</span><span class='lparen'>(</span><span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
594
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX_BYTE_AMOUNT-constant" title="Keoken::PREFIX_BYTE_AMOUNT (constant)">PREFIX_BYTE_AMOUNT</a></span></span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#AMOUNT_SIZE-constant" title="Keoken::AMOUNT_SIZE (constant)">AMOUNT_SIZE</a></span></span> <span class='op'>-</span> <span class='id identifier rubyid_amount'>amount</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_amount'>amount</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
595
+ <span class='id identifier rubyid_data_length'>data_length</span> <span class='op'>=</span> <span class='id identifier rubyid_data_script'>data_script</span><span class='period'>.</span><span class='id identifier rubyid_htb'>htb</span><span class='period'>.</span><span class='id identifier rubyid_bytesize'>bytesize</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span>
596
+
597
+ <span class='ivar'>@hex</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'>Bitcoin</span><span class='op'>::</span><span class='const'>Script</span><span class='op'>::</span><span class='const'>OP_RETURN</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span><span class='comma'>,</span>
598
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX_SIZE-constant" title="Keoken::PREFIX_SIZE (constant)">PREFIX_SIZE</a></span></span><span class='comma'>,</span>
599
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX-constant" title="Keoken::PREFIX (constant)">PREFIX</a></span></span><span class='comma'>,</span>
600
+ <span class='id identifier rubyid_data_length'>data_length</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='op'>+</span> <span class='id identifier rubyid_data_script'>data_script</span>
601
+ <span class='kw'>self</span>
602
+ <span class='kw'>end</span></pre>
603
+ </td>
604
+ </tr>
605
+ </table>
606
+ </div>
607
+
608
+ <div class="method_details ">
609
+ <h3 class="signature " id="send_amount-instance_method">
610
+
611
+ #<strong>send_amount</strong>(amount) &#x21d2; <tt><span class='object_link'><a href="" title="Keoken::Token (class)">Keoken::Token</a></span></tt>
612
+
613
+
614
+
615
+
616
+
617
+ </h3><div class="docstring">
618
+ <div class="discussion">
619
+ Generate the script to send an amount from one address to another.
620
+
621
+ </div>
622
+ </div>
623
+ <div class="tags">
624
+ <p class="tag_title">Parameters:</p>
625
+ <ul class="param">
626
+
627
+ <li>
628
+
629
+ <span class='name'>amount</span>
630
+
631
+
632
+ <span class='type'>(<tt>Number</tt>)</span>
633
+
634
+
635
+
636
+ &mdash;
637
+ <div class='inline'>The amount to send.</div>
638
+
639
+ </li>
640
+
641
+ </ul>
642
+
643
+ <p class="tag_title">Returns:</p>
644
+ <ul class="return">
645
+
646
+ <li>
647
+
648
+
649
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Keoken::Token (class)">Keoken::Token</a></span></tt>)</span>
650
+
651
+
652
+
653
+ &mdash;
654
+ <div class='inline'>An object with the data needed to send the amount.</div>
655
+
656
+ </li>
657
+
658
+ </ul>
659
+ <p class="tag_title">Raises:</p>
660
+ <ul class="raise">
661
+
662
+ <li>
663
+
664
+
665
+ <span class='type'>(<tt><span class='object_link'><a href="IdNotFound.html" title="Keoken::IdNotFound (class)">Keoken::IdNotFound</a></span></tt>)</span>
666
+
667
+
668
+
669
+ </li>
670
+
671
+ </ul>
672
+
673
+ </div><table class="source_code">
674
+ <tr>
675
+ <td>
676
+ <pre class="lines">
677
+
678
+
679
+ 44
680
+ 45
681
+ 46
682
+ 47
683
+ 48
684
+ 49
685
+ 50
686
+ 51
687
+ 52
688
+ 53
689
+ 54
690
+ 55
691
+ 56
692
+ 57
693
+ 58
694
+ 59</pre>
695
+ </td>
696
+ <td>
697
+ <pre class="code"><span class="info file"># File 'lib/keoken/token.rb', line 44</span>
698
+
699
+ <span class='kw'>def</span> <span class='id identifier rubyid_send_amount'>send_amount</span><span class='lparen'>(</span><span class='id identifier rubyid_amount'>amount</span><span class='rparen'>)</span>
700
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="IdNotFound.html" title="Keoken::IdNotFound (class)">IdNotFound</a></span></span> <span class='kw'>unless</span> <span class='ivar'>@id</span>
701
+ <span class='id identifier rubyid_data_script'>data_script</span> <span class='op'>=</span>
702
+ <span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#VERSION_NODE-constant" title="Keoken::VERSION_NODE (constant)">VERSION_NODE</a></span></span><span class='comma'>,</span>
703
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#TYPE_SEND_TOKEN-constant" title="Keoken::TYPE_SEND_TOKEN (constant)">TYPE_SEND_TOKEN</a></span></span><span class='comma'>,</span>
704
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX_BYTE_ASSET_ID-constant" title="Keoken::PREFIX_BYTE_ASSET_ID (constant)">PREFIX_BYTE_ASSET_ID</a></span></span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#ASSET_ID_SIZE-constant" title="Keoken::ASSET_ID_SIZE (constant)">ASSET_ID_SIZE</a></span></span> <span class='op'>-</span> <span class='ivar'>@id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='ivar'>@id</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span>
705
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX_BYTE_AMOUNT-constant" title="Keoken::PREFIX_BYTE_AMOUNT (constant)">PREFIX_BYTE_AMOUNT</a></span></span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#AMOUNT_SIZE-constant" title="Keoken::AMOUNT_SIZE (constant)">AMOUNT_SIZE</a></span></span> <span class='op'>-</span> <span class='id identifier rubyid_amount'>amount</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='id identifier rubyid_amount'>amount</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span>
706
+
707
+ <span class='id identifier rubyid_data_length'>data_length</span> <span class='op'>=</span> <span class='id identifier rubyid_data_script'>data_script</span><span class='period'>.</span><span class='id identifier rubyid_htb'>htb</span><span class='period'>.</span><span class='id identifier rubyid_bytesize'>bytesize</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span>
708
+
709
+ <span class='ivar'>@hex</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='const'>Bitcoin</span><span class='op'>::</span><span class='const'>Script</span><span class='op'>::</span><span class='const'>OP_RETURN</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='int'>16</span><span class='rparen'>)</span><span class='comma'>,</span>
710
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX_SIZE-constant" title="Keoken::PREFIX_SIZE (constant)">PREFIX_SIZE</a></span></span><span class='comma'>,</span>
711
+ <span class='const'><span class='object_link'><a href="../Keoken.html" title="Keoken (module)">Keoken</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Keoken.html#PREFIX-constant" title="Keoken::PREFIX (constant)">PREFIX</a></span></span><span class='comma'>,</span>
712
+ <span class='id identifier rubyid_data_length'>data_length</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='op'>+</span> <span class='id identifier rubyid_data_script'>data_script</span>
713
+ <span class='kw'>self</span>
714
+ <span class='kw'>end</span></pre>
715
+ </td>
716
+ </tr>
717
+ </table>
718
+ </div>
719
+
720
+ </div>
721
+
722
+ </div>
723
+
724
+ <div id="footer">
725
+ Generated on Thu Jan 31 18:12:23 2019 by
726
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
727
+ 0.9.18 (ruby-2.3.3).
728
+ </div>
729
+
730
+ </div>
731
+ </body>
732
+ </html>