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,115 @@
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: Keoken::Backend::BitcoinRuby
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::Backend::BitcoinRuby";
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 (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Keoken.html" title="Keoken (module)">Keoken</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Backend.html" title="Keoken::Backend (module)">Backend</a></span></span>
41
+ &raquo;
42
+ <span class="title">BitcoinRuby</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: Keoken::Backend::BitcoinRuby
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/keoken/backend/bitcoin_ruby/transaction.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Defined Under Namespace</h2>
87
+ <p class="children">
88
+
89
+
90
+
91
+
92
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="BitcoinRuby/Transaction.html" title="Keoken::Backend::BitcoinRuby::Transaction (class)">Transaction</a></span>
93
+
94
+
95
+ </p>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </div>
106
+
107
+ <div id="footer">
108
+ Generated on Thu Jan 31 18:12:23 2019 by
109
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
+ 0.9.18 (ruby-2.3.3).
111
+ </div>
112
+
113
+ </div>
114
+ </body>
115
+ </html>
@@ -0,0 +1,115 @@
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: Keoken::Backend
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::Backend";
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 (B)</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">Backend</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: Keoken::Backend
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/keoken/backend/bitcoin_ruby/transaction.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Defined Under Namespace</h2>
87
+ <p class="children">
88
+
89
+
90
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Backend/BitcoinRuby.html" title="Keoken::Backend::BitcoinRuby (module)">BitcoinRuby</a></span>
91
+
92
+
93
+
94
+
95
+ </p>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </div>
106
+
107
+ <div id="footer">
108
+ Generated on Thu Jan 31 18:12:23 2019 by
109
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
+ 0.9.18 (ruby-2.3.3).
111
+ </div>
112
+
113
+ </div>
114
+ </body>
115
+ </html>
@@ -0,0 +1,354 @@
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::Bitprim::Transaction
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::Bitprim::Transaction";
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> &raquo; <span class='title'><span class='object_link'><a href="../Bitprim.html" title="Keoken::Bitprim (module)">Bitprim</a></span></span>
41
+ &raquo;
42
+ <span class="title">Transaction</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::Bitprim::Transaction
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::Bitprim::Transaction</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/bitprim/transaction.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance 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="#get_assets_by_address-instance_method" title="#get_assets_by_address (instance method)">#<strong>get_assets_by_address</strong>(address) &#x21d2; Array </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'>Get tokens from address.</div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#send_tx-instance_method" title="#send_tx (instance method)">#<strong>send_tx</strong>(raw) &#x21d2; String </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'>Broadcast a raw transaction.</div></span>
157
+
158
+ </li>
159
+
160
+
161
+ </ul>
162
+
163
+
164
+
165
+
166
+ <div id="instance_method_details" class="method_details_list">
167
+ <h2>Instance Method Details</h2>
168
+
169
+
170
+ <div class="method_details first">
171
+ <h3 class="signature first" id="get_assets_by_address-instance_method">
172
+
173
+ #<strong>get_assets_by_address</strong>(address) &#x21d2; <tt>Array</tt>
174
+
175
+
176
+
177
+
178
+
179
+ </h3><div class="docstring">
180
+ <div class="discussion">
181
+ Get tokens from address.
182
+
183
+ </div>
184
+ </div>
185
+ <div class="tags">
186
+ <p class="tag_title">Parameters:</p>
187
+ <ul class="param">
188
+
189
+ <li>
190
+
191
+ <span class='name'>address</span>
192
+
193
+
194
+ <span class='type'>(<tt>String</tt>)</span>
195
+
196
+
197
+
198
+ &mdash;
199
+ <div class='inline'>The address that contains the tokens.</div>
200
+
201
+ </li>
202
+
203
+ </ul>
204
+
205
+ <p class="tag_title">Returns:</p>
206
+ <ul class="return">
207
+
208
+ <li>
209
+
210
+
211
+ <span class='type'>(<tt>Array</tt>)</span>
212
+
213
+
214
+
215
+ &mdash;
216
+ <div class='inline'>Detailed info from tokens associated to the address.</div>
217
+
218
+ </li>
219
+
220
+ </ul>
221
+
222
+ </div><table class="source_code">
223
+ <tr>
224
+ <td>
225
+ <pre class="lines">
226
+
227
+
228
+ 32
229
+ 33
230
+ 34
231
+ 35
232
+ 36
233
+ 37
234
+ 38
235
+ 39</pre>
236
+ </td>
237
+ <td>
238
+ <pre class="code"><span class="info file"># File 'lib/keoken/bitprim/transaction.rb', line 32</span>
239
+
240
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_assets_by_address'>get_assets_by_address</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
241
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_root_keoken_url'>root_keoken_url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/get_assets_by_address</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
242
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>address:</span> <span class='id identifier rubyid_address'>address</span> <span class='rbrace'>}</span>
243
+ <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_encode_www_form'>encode_www_form</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
244
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_get_response'>get_response</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span>
245
+
246
+ <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span><span class='period'>.</span><span class='id identifier rubyid_tr'>tr</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\&#39;</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&quot;</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
247
+ <span class='kw'>end</span></pre>
248
+ </td>
249
+ </tr>
250
+ </table>
251
+ </div>
252
+
253
+ <div class="method_details ">
254
+ <h3 class="signature " id="send_tx-instance_method">
255
+
256
+ #<strong>send_tx</strong>(raw) &#x21d2; <tt>String</tt>
257
+
258
+
259
+
260
+
261
+
262
+ </h3><div class="docstring">
263
+ <div class="discussion">
264
+ Broadcast a raw transaction.
265
+
266
+ </div>
267
+ </div>
268
+ <div class="tags">
269
+ <p class="tag_title">Parameters:</p>
270
+ <ul class="param">
271
+
272
+ <li>
273
+
274
+ <span class='name'>raw</span>
275
+
276
+
277
+ <span class='type'>(<tt>String</tt>)</span>
278
+
279
+
280
+
281
+ &mdash;
282
+ <div class='inline'>The raw transaction.</div>
283
+
284
+ </li>
285
+
286
+ </ul>
287
+
288
+ <p class="tag_title">Returns:</p>
289
+ <ul class="return">
290
+
291
+ <li>
292
+
293
+
294
+ <span class='type'>(<tt>String</tt>)</span>
295
+
296
+
297
+
298
+ &mdash;
299
+ <div class='inline'>Value from response.</div>
300
+
301
+ </li>
302
+
303
+ </ul>
304
+
305
+ </div><table class="source_code">
306
+ <tr>
307
+ <td>
308
+ <pre class="lines">
309
+
310
+
311
+ 14
312
+ 15
313
+ 16
314
+ 17
315
+ 18
316
+ 19
317
+ 20
318
+ 21
319
+ 22
320
+ 23
321
+ 24</pre>
322
+ </td>
323
+ <td>
324
+ <pre class="code"><span class="info file"># File 'lib/keoken/bitprim/transaction.rb', line 14</span>
325
+
326
+ <span class='kw'>def</span> <span class='id identifier rubyid_send_tx'>send_tx</span><span class='lparen'>(</span><span class='id identifier rubyid_raw'>raw</span><span class='rparen'>)</span>
327
+ <span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='const'>URI</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_root_node_url'>root_node_url</span><span class='embexpr_end'>}</span><span class='tstring_content'>/tx/send</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
328
+ <span class='id identifier rubyid_request'>request</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='op'>::</span><span class='const'>Post</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='rparen'>)</span>
329
+ <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_set_form_data'>set_form_data</span><span class='lparen'>(</span><span class='label'>rawtx:</span> <span class='id identifier rubyid_raw'>raw</span><span class='rparen'>)</span>
330
+
331
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>Net</span><span class='op'>::</span><span class='const'>HTTP</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_hostname'>hostname</span><span class='comma'>,</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_http'>http</span><span class='op'>|</span>
332
+ <span class='id identifier rubyid_http'>http</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
333
+ <span class='kw'>end</span>
334
+
335
+ <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
336
+ <span class='kw'>end</span></pre>
337
+ </td>
338
+ </tr>
339
+ </table>
340
+ </div>
341
+
342
+ </div>
343
+
344
+ </div>
345
+
346
+ <div id="footer">
347
+ Generated on Thu Jan 31 18:12:23 2019 by
348
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
349
+ 0.9.18 (ruby-2.3.3).
350
+ </div>
351
+
352
+ </div>
353
+ </body>
354
+ </html>