nanook 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/nanook/version.rb +1 -1
  4. data/nanook.gemspec +1 -1
  5. metadata +1 -185
  6. data/docs/0.7.0/apple-touch-icon.png +0 -0
  7. data/docs/0.7.0/classes/Nanook.html +0 -572
  8. data/docs/0.7.0/classes/Nanook/Account.html +0 -909
  9. data/docs/0.7.0/classes/Nanook/Block.html +0 -717
  10. data/docs/0.7.0/classes/Nanook/Error.html +0 -84
  11. data/docs/0.7.0/classes/Nanook/Key.html +0 -253
  12. data/docs/0.7.0/classes/Nanook/Node.html +0 -657
  13. data/docs/0.7.0/classes/Nanook/Rpc.html +0 -247
  14. data/docs/0.7.0/classes/Nanook/Util.html +0 -197
  15. data/docs/0.7.0/classes/Nanook/Wallet.html +0 -986
  16. data/docs/0.7.0/classes/Nanook/WalletAccount.html +0 -446
  17. data/docs/0.7.0/classes/Nanook/WorkPeer.html +0 -294
  18. data/docs/0.7.0/created.rid +0 -14
  19. data/docs/0.7.0/css/github.css +0 -123
  20. data/docs/0.7.0/css/main.css +0 -374
  21. data/docs/0.7.0/css/panel.css +0 -360
  22. data/docs/0.7.0/css/reset.css +0 -48
  23. data/docs/0.7.0/favicon.ico +0 -0
  24. data/docs/0.7.0/files/README_md.html +0 -418
  25. data/docs/0.7.0/files/lib/nanook/account_rb.html +0 -89
  26. data/docs/0.7.0/files/lib/nanook/block_rb.html +0 -89
  27. data/docs/0.7.0/files/lib/nanook/error_rb.html +0 -89
  28. data/docs/0.7.0/files/lib/nanook/key_rb.html +0 -89
  29. data/docs/0.7.0/files/lib/nanook/node_rb.html +0 -89
  30. data/docs/0.7.0/files/lib/nanook/rpc_rb.html +0 -99
  31. data/docs/0.7.0/files/lib/nanook/util_rb.html +0 -89
  32. data/docs/0.7.0/files/lib/nanook/version_rb.html +0 -84
  33. data/docs/0.7.0/files/lib/nanook/wallet_account_rb.html +0 -89
  34. data/docs/0.7.0/files/lib/nanook/wallet_rb.html +0 -89
  35. data/docs/0.7.0/files/lib/nanook/work_peer_rb.html +0 -89
  36. data/docs/0.7.0/files/lib/nanook_rb.html +0 -94
  37. data/docs/0.7.0/i/arrow-down.svg +0 -8
  38. data/docs/0.7.0/i/arrow-right.svg +0 -8
  39. data/docs/0.7.0/i/search.svg +0 -12
  40. data/docs/0.7.0/i/tree_bg.svg +0 -8
  41. data/docs/0.7.0/index.html +0 -11
  42. data/docs/0.7.0/js/highlight.pack.js +0 -1
  43. data/docs/0.7.0/js/jquery-1.3.2.min.js +0 -19
  44. data/docs/0.7.0/js/main.js +0 -25
  45. data/docs/0.7.0/js/navigation.js +0 -142
  46. data/docs/0.7.0/js/search_index.js +0 -1
  47. data/docs/0.7.0/js/searchdoc.js +0 -465
  48. data/docs/0.7.0/js/searcher.js +0 -229
  49. data/docs/0.7.0/panel/index.html +0 -47
  50. data/docs/0.7.0/panel/links.html +0 -32
  51. data/docs/0.7.0/panel/tree.js +0 -1
  52. data/docs/0.8.0/apple-touch-icon.png +0 -0
  53. data/docs/0.8.0/classes/Nanook.html +0 -621
  54. data/docs/0.8.0/classes/Nanook/Account.html +0 -971
  55. data/docs/0.8.0/classes/Nanook/Block.html +0 -759
  56. data/docs/0.8.0/classes/Nanook/Error.html +0 -84
  57. data/docs/0.8.0/classes/Nanook/Key.html +0 -295
  58. data/docs/0.8.0/classes/Nanook/Node.html +0 -657
  59. data/docs/0.8.0/classes/Nanook/Rpc.html +0 -247
  60. data/docs/0.8.0/classes/Nanook/Util.html +0 -264
  61. data/docs/0.8.0/classes/Nanook/Wallet.html +0 -1056
  62. data/docs/0.8.0/classes/Nanook/WalletAccount.html +0 -582
  63. data/docs/0.8.0/classes/Nanook/WorkPeer.html +0 -294
  64. data/docs/0.8.0/created.rid +0 -14
  65. data/docs/0.8.0/css/github.css +0 -123
  66. data/docs/0.8.0/css/main.css +0 -374
  67. data/docs/0.8.0/css/panel.css +0 -360
  68. data/docs/0.8.0/css/reset.css +0 -48
  69. data/docs/0.8.0/favicon.ico +0 -0
  70. data/docs/0.8.0/files/README_md.html +0 -423
  71. data/docs/0.8.0/files/lib/nanook/account_rb.html +0 -89
  72. data/docs/0.8.0/files/lib/nanook/block_rb.html +0 -89
  73. data/docs/0.8.0/files/lib/nanook/error_rb.html +0 -89
  74. data/docs/0.8.0/files/lib/nanook/key_rb.html +0 -89
  75. data/docs/0.8.0/files/lib/nanook/node_rb.html +0 -89
  76. data/docs/0.8.0/files/lib/nanook/rpc_rb.html +0 -99
  77. data/docs/0.8.0/files/lib/nanook/util_rb.html +0 -97
  78. data/docs/0.8.0/files/lib/nanook/version_rb.html +0 -84
  79. data/docs/0.8.0/files/lib/nanook/wallet_account_rb.html +0 -89
  80. data/docs/0.8.0/files/lib/nanook/wallet_rb.html +0 -89
  81. data/docs/0.8.0/files/lib/nanook/work_peer_rb.html +0 -89
  82. data/docs/0.8.0/files/lib/nanook_rb.html +0 -94
  83. data/docs/0.8.0/i/arrow-down.svg +0 -8
  84. data/docs/0.8.0/i/arrow-right.svg +0 -8
  85. data/docs/0.8.0/i/search.svg +0 -12
  86. data/docs/0.8.0/i/tree_bg.svg +0 -8
  87. data/docs/0.8.0/index.html +0 -11
  88. data/docs/0.8.0/js/highlight.pack.js +0 -1
  89. data/docs/0.8.0/js/jquery-1.3.2.min.js +0 -19
  90. data/docs/0.8.0/js/main.js +0 -25
  91. data/docs/0.8.0/js/navigation.js +0 -142
  92. data/docs/0.8.0/js/search_index.js +0 -1
  93. data/docs/0.8.0/js/searchdoc.js +0 -465
  94. data/docs/0.8.0/js/searcher.js +0 -229
  95. data/docs/0.8.0/panel/index.html +0 -47
  96. data/docs/0.8.0/panel/links.html +0 -32
  97. data/docs/0.8.0/panel/tree.js +0 -1
  98. data/docs/1.0.0/apple-touch-icon.png +0 -0
  99. data/docs/1.0.0/classes/Nanook.html +0 -621
  100. data/docs/1.0.0/classes/Nanook/Account.html +0 -989
  101. data/docs/1.0.0/classes/Nanook/Block.html +0 -929
  102. data/docs/1.0.0/classes/Nanook/Error.html +0 -84
  103. data/docs/1.0.0/classes/Nanook/Key.html +0 -295
  104. data/docs/1.0.0/classes/Nanook/Node.html +0 -657
  105. data/docs/1.0.0/classes/Nanook/Rpc.html +0 -247
  106. data/docs/1.0.0/classes/Nanook/Util.html +0 -264
  107. data/docs/1.0.0/classes/Nanook/Wallet.html +0 -1084
  108. data/docs/1.0.0/classes/Nanook/WalletAccount.html +0 -582
  109. data/docs/1.0.0/classes/Nanook/WorkPeer.html +0 -294
  110. data/docs/1.0.0/created.rid +0 -14
  111. data/docs/1.0.0/css/github.css +0 -123
  112. data/docs/1.0.0/css/main.css +0 -374
  113. data/docs/1.0.0/css/panel.css +0 -360
  114. data/docs/1.0.0/css/reset.css +0 -48
  115. data/docs/1.0.0/favicon.ico +0 -0
  116. data/docs/1.0.0/files/README_md.html +0 -443
  117. data/docs/1.0.0/files/lib/nanook/account_rb.html +0 -89
  118. data/docs/1.0.0/files/lib/nanook/block_rb.html +0 -89
  119. data/docs/1.0.0/files/lib/nanook/error_rb.html +0 -89
  120. data/docs/1.0.0/files/lib/nanook/key_rb.html +0 -89
  121. data/docs/1.0.0/files/lib/nanook/node_rb.html +0 -89
  122. data/docs/1.0.0/files/lib/nanook/rpc_rb.html +0 -99
  123. data/docs/1.0.0/files/lib/nanook/util_rb.html +0 -97
  124. data/docs/1.0.0/files/lib/nanook/version_rb.html +0 -84
  125. data/docs/1.0.0/files/lib/nanook/wallet_account_rb.html +0 -89
  126. data/docs/1.0.0/files/lib/nanook/wallet_rb.html +0 -89
  127. data/docs/1.0.0/files/lib/nanook/work_peer_rb.html +0 -89
  128. data/docs/1.0.0/files/lib/nanook_rb.html +0 -94
  129. data/docs/1.0.0/i/arrow-down.svg +0 -8
  130. data/docs/1.0.0/i/arrow-right.svg +0 -8
  131. data/docs/1.0.0/i/search.svg +0 -12
  132. data/docs/1.0.0/i/tree_bg.svg +0 -8
  133. data/docs/1.0.0/index.html +0 -11
  134. data/docs/1.0.0/js/highlight.pack.js +0 -1
  135. data/docs/1.0.0/js/jquery-1.3.2.min.js +0 -19
  136. data/docs/1.0.0/js/main.js +0 -25
  137. data/docs/1.0.0/js/navigation.js +0 -142
  138. data/docs/1.0.0/js/search_index.js +0 -1
  139. data/docs/1.0.0/js/searchdoc.js +0 -465
  140. data/docs/1.0.0/js/searcher.js +0 -229
  141. data/docs/1.0.0/panel/index.html +0 -47
  142. data/docs/1.0.0/panel/links.html +0 -32
  143. data/docs/1.0.0/panel/tree.js +0 -1
  144. data/docs/apple-touch-icon.png +0 -0
  145. data/docs/classes/Nanook.html +0 -572
  146. data/docs/classes/Nanook/Account.html +0 -907
  147. data/docs/classes/Nanook/Block.html +0 -717
  148. data/docs/classes/Nanook/Error.html +0 -84
  149. data/docs/classes/Nanook/Key.html +0 -253
  150. data/docs/classes/Nanook/Node.html +0 -657
  151. data/docs/classes/Nanook/Rpc.html +0 -247
  152. data/docs/classes/Nanook/Util.html +0 -197
  153. data/docs/classes/Nanook/Wallet.html +0 -778
  154. data/docs/classes/Nanook/WalletAccount.html +0 -447
  155. data/docs/classes/Nanook/WorkPeer.html +0 -294
  156. data/docs/created.rid +0 -14
  157. data/docs/css/github.css +0 -123
  158. data/docs/css/main.css +0 -374
  159. data/docs/css/panel.css +0 -360
  160. data/docs/css/reset.css +0 -48
  161. data/docs/favicon.ico +0 -0
  162. data/docs/files/README_md.html +0 -408
  163. data/docs/files/lib/nanook/account_rb.html +0 -89
  164. data/docs/files/lib/nanook/block_rb.html +0 -89
  165. data/docs/files/lib/nanook/error_rb.html +0 -89
  166. data/docs/files/lib/nanook/key_rb.html +0 -89
  167. data/docs/files/lib/nanook/node_rb.html +0 -89
  168. data/docs/files/lib/nanook/rpc_rb.html +0 -99
  169. data/docs/files/lib/nanook/util_rb.html +0 -89
  170. data/docs/files/lib/nanook/version_rb.html +0 -84
  171. data/docs/files/lib/nanook/wallet_account_rb.html +0 -89
  172. data/docs/files/lib/nanook/wallet_rb.html +0 -89
  173. data/docs/files/lib/nanook/work_peer_rb.html +0 -89
  174. data/docs/files/lib/nanook_rb.html +0 -94
  175. data/docs/i/arrow-down.svg +0 -8
  176. data/docs/i/arrow-right.svg +0 -8
  177. data/docs/i/search.svg +0 -12
  178. data/docs/i/tree_bg.svg +0 -8
  179. data/docs/index.html +0 -11
  180. data/docs/js/highlight.pack.js +0 -1
  181. data/docs/js/jquery-1.3.2.min.js +0 -19
  182. data/docs/js/main.js +0 -25
  183. data/docs/js/navigation.js +0 -142
  184. data/docs/js/search_index.js +0 -1
  185. data/docs/js/searchdoc.js +0 -465
  186. data/docs/js/searcher.js +0 -229
  187. data/docs/panel/index.html +0 -47
  188. data/docs/panel/links.html +0 -32
  189. data/docs/panel/tree.js +0 -1
@@ -1,971 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::Account</title>
5
- <meta charset="UTF-8" />
6
- <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
7
- <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
8
- <link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
9
- <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
10
- <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
11
- <script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
12
-
13
-
14
- <meta property="og:title" value="Nanook::Account">
15
-
16
-
17
-
18
- <meta name="description" content="The Nanook::Account class contains methods to discover publicly-available information about accounts on the nano network.">
19
- <meta property="og:description" content="The Nanook::Account class contains methods to discover publicly-available information about accounts on the nano network.">
20
-
21
-
22
- <meta name="keywords" content="Nanook::Account class">
23
-
24
- <meta name="keywords" content="new, delegators, exists?, history, public_key, representative, balance, id, info, ledger, pending, weight">
25
-
26
- </head>
27
-
28
- <body>
29
- <div class="banner">
30
-
31
- <h1>
32
- <span class="type">Class</span>
33
- Nanook::Account
34
-
35
- <span class="parent">&lt;
36
-
37
- Object
38
-
39
- </span>
40
-
41
- </h1>
42
- <ul class="files">
43
-
44
- <li><a href="../../files/lib/nanook/account_rb.html">lib/nanook/account.rb</a></li>
45
-
46
- </ul>
47
- </div>
48
- <div id="bodyContent">
49
- <div id="content">
50
-
51
- <div class="description">
52
-
53
- <p>The <code>Nanook::Account</code> class contains methods to discover
54
- publicly-available information about accounts on the nano network.</p>
55
-
56
- <h3 id="class-Nanook::Account-label-Initializing">Initializing</h3>
57
-
58
- <p>Initialize this class through the convenient <a
59
- href="../Nanook.html#method-i-account">Nanook#account</a> method:</p>
60
-
61
- <pre><code>nanook = Nanook.new
62
- account = nanook.account(&quot;xrb_...&quot;)
63
- </code></pre>
64
-
65
- <p>Or compose the longhand way like this:</p>
66
-
67
- <pre><code>rpc_conn = Nanook::Rpc.new
68
- account = Nanook::Account.new(rpc_conn, &quot;xrb_...&quot;)
69
- </code></pre>
70
-
71
- </div>
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
- <!-- Method ref -->
87
- <div class="sectiontitle">Methods</div>
88
- <dl class="methods">
89
-
90
- <dt>B</dt>
91
- <dd>
92
- <ul>
93
-
94
-
95
- <li>
96
- <a href="#method-i-balance">balance</a>
97
- </li>
98
-
99
- </ul>
100
- </dd>
101
-
102
- <dt>D</dt>
103
- <dd>
104
- <ul>
105
-
106
-
107
- <li>
108
- <a href="#method-i-delegators">delegators</a>
109
- </li>
110
-
111
- </ul>
112
- </dd>
113
-
114
- <dt>E</dt>
115
- <dd>
116
- <ul>
117
-
118
-
119
- <li>
120
- <a href="#method-i-exists-3F">exists?</a>
121
- </li>
122
-
123
- </ul>
124
- </dd>
125
-
126
- <dt>H</dt>
127
- <dd>
128
- <ul>
129
-
130
-
131
- <li>
132
- <a href="#method-i-history">history</a>
133
- </li>
134
-
135
- </ul>
136
- </dd>
137
-
138
- <dt>I</dt>
139
- <dd>
140
- <ul>
141
-
142
-
143
- <li>
144
- <a href="#method-i-id">id</a>,
145
- </li>
146
-
147
-
148
- <li>
149
- <a href="#method-i-info">info</a>
150
- </li>
151
-
152
- </ul>
153
- </dd>
154
-
155
- <dt>L</dt>
156
- <dd>
157
- <ul>
158
-
159
-
160
- <li>
161
- <a href="#method-i-ledger">ledger</a>
162
- </li>
163
-
164
- </ul>
165
- </dd>
166
-
167
- <dt>N</dt>
168
- <dd>
169
- <ul>
170
-
171
-
172
- <li>
173
- <a href="#method-c-new">new</a>
174
- </li>
175
-
176
- </ul>
177
- </dd>
178
-
179
- <dt>P</dt>
180
- <dd>
181
- <ul>
182
-
183
-
184
- <li>
185
- <a href="#method-i-pending">pending</a>,
186
- </li>
187
-
188
-
189
- <li>
190
- <a href="#method-i-public_key">public_key</a>
191
- </li>
192
-
193
- </ul>
194
- </dd>
195
-
196
- <dt>R</dt>
197
- <dd>
198
- <ul>
199
-
200
-
201
- <li>
202
- <a href="#method-i-representative">representative</a>
203
- </li>
204
-
205
- </ul>
206
- </dd>
207
-
208
- <dt>W</dt>
209
- <dd>
210
- <ul>
211
-
212
-
213
- <li>
214
- <a href="#method-i-weight">weight</a>
215
- </li>
216
-
217
- </ul>
218
- </dd>
219
-
220
- </dl>
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
- <!-- Methods -->
240
-
241
- <div class="sectiontitle">Class Public methods</div>
242
-
243
- <div class="method">
244
- <div class="title method-title" id="method-c-new">
245
-
246
- <b>new</b>(rpc, account)
247
-
248
- <a href="../../classes/Nanook/Account.html#method-c-new" name="method-c-new" class="permalink">Link</a>
249
- </div>
250
-
251
-
252
- <div class="description">
253
-
254
- </div>
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
- <div class="sourcecode">
264
-
265
- <p class="source-link">
266
- Source:
267
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
268
-
269
- </p>
270
- <div id="method-c-new_source" class="dyn-source">
271
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 19</span>
272
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>, <span class="ruby-identifier">account</span>)
273
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
274
- <span class="ruby-ivar">@account</span> = <span class="ruby-identifier">account</span>
275
- <span class="ruby-keyword">end</span></pre>
276
- </div>
277
- </div>
278
-
279
- </div>
280
-
281
-
282
-
283
- <div class="sectiontitle">Instance Public methods</div>
284
-
285
- <div class="method">
286
- <div class="title method-title" id="method-i-balance">
287
-
288
- <b>balance</b>(unit: Nanook::WalletAccount::DEFAULT_UNIT)
289
-
290
- <a href="../../classes/Nanook/Account.html#method-i-balance" name="method-i-balance" class="permalink">Link</a>
291
- </div>
292
-
293
-
294
- <div class="description">
295
- <p>Returns a Hash containing the account&#39;s balance. Units are in <a
296
- href="https://nano.org/en/faq#what-are-nano-units-">raw</a>.</p>
297
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>:balance</code></td><td>
298
- <p><a href="Account.html">Account</a> balance</p>
299
- </td></tr><tr><td class='label'><code>:pending</code></td><td>
300
- <p>Amount pending and not yet received by the account</p>
301
- </td></tr></tbody></table>
302
-
303
- <h4 id="method-i-balance-label-Arguments">Arguments</h4>
304
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>unit:</code></td><td>
305
- <p>Symbol (default is <code>:nano</code>) Represents the unit that the
306
- balances will be returned in. Must be either <code>:nano</code> or
307
- <code>:raw</code>. (Note: this method interprets <code>:nano</code> as
308
- NANO, which is technically Mnano See <a
309
- href="https://nano.org/en/faq#what-are-nano-units-">What are Nano’s
310
- Units</a>)</p>
311
- </td></tr></tbody></table>
312
-
313
- <h5 id="method-i-balance-label-Example+response">Example response</h5>
314
-
315
- <pre><code>{
316
- &quot;balance&quot;: &quot;2&quot;,
317
- &quot;pending&quot;: &quot;1&quot;
318
- }
319
- </code></pre>
320
- </div>
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
- <div class="sourcecode">
330
-
331
- <p class="source-link">
332
- Source:
333
- <a href="javascript:toggleSource('method-i-balance_source')" id="l_method-i-balance_source">show</a>
334
-
335
- </p>
336
- <div id="method-i-balance_source" class="dyn-source">
337
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 121</span>
338
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">balance</span>(<span class="ruby-value">unit:</span> <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">WalletAccount</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_UNIT</span>)
339
- <span class="ruby-identifier">account_required!</span>
340
-
341
- <span class="ruby-keyword">unless</span> <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">WalletAccount</span><span class="ruby-operator">::</span><span class="ruby-constant">UNITS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">unit</span>)
342
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;Unsupported unit: #{unit}&quot;</span>)
343
- <span class="ruby-keyword">end</span>
344
-
345
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_balance</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
346
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">unit</span> <span class="ruby-operator">==</span> <span class="ruby-value">:nano</span>
347
- <span class="ruby-identifier">r</span>[<span class="ruby-value">:balance</span>] = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">raw_to_NANO</span>(<span class="ruby-identifier">r</span>[<span class="ruby-value">:balance</span>])
348
- <span class="ruby-identifier">r</span>[<span class="ruby-value">:pending</span>] = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">raw_to_NANO</span>(<span class="ruby-identifier">r</span>[<span class="ruby-value">:pending</span>])
349
- <span class="ruby-keyword">end</span>
350
- <span class="ruby-keyword">end</span>
351
- <span class="ruby-keyword">end</span></pre>
352
- </div>
353
- </div>
354
-
355
- </div>
356
-
357
- <div class="method">
358
- <div class="title method-title" id="method-i-delegators">
359
-
360
- <b>delegators</b>()
361
-
362
- <a href="../../classes/Nanook/Account.html#method-i-delegators" name="method-i-delegators" class="permalink">Link</a>
363
- </div>
364
-
365
-
366
- <div class="description">
367
- <h4 id="method-i-delegators-label-Example+response">Example response</h4>
368
-
369
- <pre><code>{
370
- &quot;xrb_13bqhi1cdqq8yb9szneoc38qk899d58i5rcrgdk5mkdm86hekpoez3zxw5sd&quot;: &quot;500000000000000000000000000000000000&quot;,
371
- &quot;xrb_17k6ug685154an8gri9whhe5kb5z1mf5w6y39gokc1657sh95fegm8ht1zpn&quot;: &quot;961647970820730000000000000000000000&quot;
372
- }
373
- </code></pre>
374
- </div>
375
-
376
-
377
-
378
-
379
-
380
-
381
-
382
-
383
- <div class="sourcecode">
384
-
385
- <p class="source-link">
386
- Source:
387
- <a href="javascript:toggleSource('method-i-delegators_source')" id="l_method-i-delegators_source">show</a>
388
-
389
- </p>
390
- <div id="method-i-delegators_source" class="dyn-source">
391
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 29</span>
392
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delegators</span>
393
- <span class="ruby-identifier">account_required!</span>
394
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:delegators</span>)[<span class="ruby-value">:delegators</span>]
395
- <span class="ruby-keyword">end</span></pre>
396
- </div>
397
- </div>
398
-
399
- </div>
400
-
401
- <div class="method">
402
- <div class="title method-title" id="method-i-exists-3F">
403
-
404
- <b>exists?</b>()
405
-
406
- <a href="../../classes/Nanook/Account.html#method-i-exists-3F" name="method-i-exists-3F" class="permalink">Link</a>
407
- </div>
408
-
409
-
410
- <div class="description">
411
- <p>Returns a boolean indicating if account is known. Note, the reliability of
412
- the check depends on the node host having synchronized itself with most of
413
- the blocks on the nano network, otherwise you may get a false
414
- <code>false</code>. You can check if a node&#39;s synchronization is
415
- particular low using <a
416
- href="Node.html#method-i-sync_progress">Nanook::Node#sync_progress</a>.</p>
417
-
418
- <h4 id="method-i-exists-3F-label-Example+response">Example response</h4>
419
-
420
- <pre><code>true
421
- </code></pre>
422
- </div>
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
- <div class="sourcecode">
432
-
433
- <p class="source-link">
434
- Source:
435
- <a href="javascript:toggleSource('method-i-exists-3F_source')" id="l_method-i-exists-3F_source">show</a>
436
-
437
- </p>
438
- <div id="method-i-exists-3F_source" class="dyn-source">
439
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 42</span>
440
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">exists?</span>
441
- <span class="ruby-identifier">account_required!</span>
442
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:validate_account_number</span>)
443
- <span class="ruby-operator">!</span><span class="ruby-identifier">response</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:valid</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
444
- <span class="ruby-keyword">end</span></pre>
445
- </div>
446
- </div>
447
-
448
- </div>
449
-
450
- <div class="method">
451
- <div class="title method-title" id="method-i-history">
452
-
453
- <b>history</b>(limit: 1000)
454
-
455
- <a href="../../classes/Nanook/Account.html#method-i-history" name="method-i-history" class="permalink">Link</a>
456
- </div>
457
-
458
-
459
- <div class="description">
460
- <p>Returns an account&#39;s history of send and receive payments. Amounts are
461
- in <a href="https://nano.org/en/faq#what-are-nano-units-">raw</a>.</p>
462
-
463
- <h4 id="method-i-history-label-Arguments">Arguments</h4>
464
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>limit:</code></td><td>
465
- <p>Integer representing the maximum number of history items to return (default
466
- is 1000)</p>
467
- </td></tr></tbody></table>
468
-
469
- <h4 id="method-i-history-label-Example">Example</h4>
470
-
471
- <pre><code>account.history
472
- account.history(limit: 1)
473
- </code></pre>
474
-
475
- <h4 id="method-i-history-label-Example+response">Example response</h4>
476
-
477
- <pre><code>[
478
- {
479
- :type=&gt;&quot;send&quot;,
480
- :account=&gt;&quot;xrb_1kdc5u48j3hr5r7eof9iao47szqh81ndqgq5e5hrsn1g9a3sa4hkkcotn3uq&quot;,
481
- :amount=&gt;200000000000000000000000000000,
482
- :hash=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;
483
- },
484
- {
485
- :type=&gt;&quot;receive&quot;,
486
- :account=&gt;&quot;xrb_1niabkx3gbxit5j5yyqcpas71dkffggbr6zpd3heui8rpoocm5xqbdwq44oh&quot;,
487
- :amount=&gt;7836413000000000000000000000000,
488
- :hash=&gt;&quot;16743E8FF52F454E876E68EDD11F23094DCB96795A3B7F32F74F88563ACDDB04&quot;
489
- }
490
- ]
491
- </code></pre>
492
- </div>
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
-
501
- <div class="sourcecode">
502
-
503
- <p class="source-link">
504
- Source:
505
- <a href="javascript:toggleSource('method-i-history_source')" id="l_method-i-history_source">show</a>
506
-
507
- </p>
508
- <div id="method-i-history_source" class="dyn-source">
509
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 76</span>
510
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">history</span>(<span class="ruby-value">limit:</span> <span class="ruby-value">1000</span>)
511
- <span class="ruby-identifier">account_required!</span>
512
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_history</span>, <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span>)[<span class="ruby-value">:history</span>]
513
- <span class="ruby-keyword">end</span></pre>
514
- </div>
515
- </div>
516
-
517
- </div>
518
-
519
- <div class="method">
520
- <div class="title method-title" id="method-i-id">
521
-
522
- <b>id</b>()
523
-
524
- <a href="../../classes/Nanook/Account.html#method-i-id" name="method-i-id" class="permalink">Link</a>
525
- </div>
526
-
527
-
528
- <div class="description">
529
-
530
- </div>
531
-
532
-
533
-
534
-
535
-
536
-
537
-
538
-
539
- <div class="sourcecode">
540
-
541
- <p class="source-link">
542
- Source:
543
- <a href="javascript:toggleSource('method-i-id_source')" id="l_method-i-id_source">show</a>
544
-
545
- </p>
546
- <div id="method-i-id_source" class="dyn-source">
547
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 136</span>
548
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">id</span>
549
- <span class="ruby-ivar">@block</span>
550
- <span class="ruby-keyword">end</span></pre>
551
- </div>
552
- </div>
553
-
554
- </div>
555
-
556
- <div class="method">
557
- <div class="title method-title" id="method-i-info">
558
-
559
- <b>info</b>(detailed: false)
560
-
561
- <a href="../../classes/Nanook/Account.html#method-i-info" name="method-i-info" class="permalink">Link</a>
562
- </div>
563
-
564
-
565
- <div class="description">
566
- <p>Returns a Hash containing the following information about an account:</p>
567
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>:frontier</code></td><td>
568
- <p>The latest block hash</p>
569
- </td></tr><tr><td class='label'><code>:open_block</code></td><td>
570
- <p>The first block in every account&#39;s blockchain. When this block was
571
- published the account was officially open</p>
572
- </td></tr><tr><td class='label'><code>:representative_block</code></td><td>
573
- <p>The block that named the representative for the account</p>
574
- </td></tr><tr><td class='label'><code>:balance</code></td><td>
575
- <p>Amount in <a href="https://nano.org/en/faq#what-are-nano-units-">NANO</a></p>
576
- </td></tr><tr><td class='label'><code>:last_modified</code></td><td>
577
- <p>Unix timestamp</p>
578
- </td></tr><tr><td class='label'><code>:block_count</code></td><td>
579
- <p>Number of blocks in the account&#39;s blockchain</p>
580
- </td></tr></tbody></table>
581
-
582
- <p>When <code>detailed: true</code> is passed as an argument, this method
583
- makes four additional calls to the RPC to return more information about an
584
- account:</p>
585
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>:weight</code></td><td>
586
- <p>See <a href="Account.html#method-i-weight">weight</a></p>
587
- </td></tr><tr><td class='label'><code>:pending</code></td><td>
588
- <p>See <a href="Account.html#method-i-balance">balance</a></p>
589
- </td></tr><tr><td class='label'><code>:representative</code></td><td>
590
- <p>See <a href="Account.html#method-i-representative">representative</a></p>
591
- </td></tr><tr><td class='label'><code>:public_key</code></td><td>
592
- <p>See <a href="Account.html#method-i-public_key">public_key</a></p>
593
- </td></tr></tbody></table>
594
-
595
- <h4 id="method-i-info-label-Arguments">Arguments</h4>
596
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>detailed:</code></td><td>
597
- <p>Boolean (default is false). When <code>true</code>, four additional calls
598
- are made to the RPC to return more information</p>
599
- </td></tr></tbody></table>
600
-
601
- <h4 id="method-i-info-label-Example+1">Example 1</h4>
602
-
603
- <pre><code>account.info
604
- </code></pre>
605
-
606
- <h4 id="method-i-info-label-Example+1+response">Example 1 response</h4>
607
-
608
- <pre><code>{
609
- :balance=&gt;11.439597000000001,
610
- :block_count=&gt;4
611
- :frontier=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;,
612
- :modified_timestamp=&gt;1520500357,
613
- :open_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
614
- :representative_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
615
- }
616
- </code></pre>
617
-
618
- <h4 id="method-i-info-label-Example+2">Example 2</h4>
619
-
620
- <pre><code>account.info(detailed: true)
621
- </code></pre>
622
-
623
- <h4 id="method-i-info-label-Example+2+response">Example 2 response</h4>
624
-
625
- <pre><code>{
626
- :balance=&gt;11.439597000000001,
627
- :block_count=&gt;4,
628
- :frontier=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;,
629
- :modified_timestamp=&gt;1520500357,
630
- :open_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
631
- :pending=&gt;0,
632
- :public_key=&gt;&quot;A82C906460046D230D7D37C6663723DC3EFCECC4B3254EBF45294B66746F4FEF&quot;,
633
- :representative=&gt;&quot;xrb_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh&quot;,
634
- :representative_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
635
- :weight=&gt;0
636
- }
637
- </code></pre>
638
- </div>
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
-
647
- <div class="sourcecode">
648
-
649
- <p class="source-link">
650
- Source:
651
- <a href="javascript:toggleSource('method-i-info_source')" id="l_method-i-info_source">show</a>
652
-
653
- </p>
654
- <div id="method-i-info_source" class="dyn-source">
655
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 196</span>
656
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">info</span>(<span class="ruby-value">detailed:</span> <span class="ruby-keyword">false</span>)
657
- <span class="ruby-identifier">account_required!</span>
658
-
659
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_info</span>)
660
-
661
- <span class="ruby-comment"># Return the response if we don&#39;t need any more info</span>
662
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">response</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">detailed</span>
663
-
664
- <span class="ruby-comment"># Otherwise make additional calls</span>
665
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">merge</span>({
666
- <span class="ruby-value">weight:</span> <span class="ruby-identifier">weight</span>,
667
- <span class="ruby-value">pending:</span> <span class="ruby-identifier">balance</span>[<span class="ruby-value">:pending</span>],
668
- <span class="ruby-value">representative:</span> <span class="ruby-identifier">representative</span>,
669
- <span class="ruby-value">public_key:</span> <span class="ruby-identifier">public_key</span>
670
- })
671
-
672
- <span class="ruby-comment"># Sort this new hash by keys</span>
673
- <span class="ruby-constant">Hash</span>[<span class="ruby-identifier">response</span>.<span class="ruby-identifier">sort</span>].<span class="ruby-identifier">to_symbolized_hash</span>
674
- <span class="ruby-keyword">end</span></pre>
675
- </div>
676
- </div>
677
-
678
- </div>
679
-
680
- <div class="method">
681
- <div class="title method-title" id="method-i-ledger">
682
-
683
- <b>ledger</b>(limit: 1)
684
-
685
- <a href="../../classes/Nanook/Account.html#method-i-ledger" name="method-i-ledger" class="permalink">Link</a>
686
- </div>
687
-
688
-
689
- <div class="description">
690
- <p>Returns information about the given account as well as other accounts up
691
- the ledger. The number of accounts returned is determined by the
692
- <code>limit:</code> argument.</p>
693
-
694
- <p>The information in each Hash is the same as what the <a
695
- href="Account.html#method-i-info">info</a>(detailed: false) method returns.</p>
696
-
697
- <h4 id="method-i-ledger-label-Arguments">Arguments</h4>
698
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>limit:</code></td><td>
699
- <p>Number of accounts to return in the ledger (default is 1)</p>
700
- </td></tr></tbody></table>
701
-
702
- <h4 id="method-i-ledger-label-Example">Example</h4>
703
-
704
- <pre><code>ledger(limit: 2)
705
- </code></pre>
706
-
707
- <h4 id="method-i-ledger-label-Example+response">Example response</h4>
708
-
709
- <pre><code> {
710
- :xrb_3c3ek3k8135f6e8qtfy8eruk9q3yzmpebes7btzncccdest8ymzhjmnr196j=&gt;{
711
- :frontier=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;,
712
- :open_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
713
- :representative_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
714
- :balance=&gt;11439597000000000000000000000000,
715
- :modified_timestamp=&gt;1520500357,
716
- :block_count=&gt;4
717
- },
718
- :xrb_3c3ettq59kijuuad5fnaq35itc9schtr4r7r6rjhmwjbairowzq3wi5ap7h8=&gt;{ ... }
719
- }
720
- </code></pre>
721
- </div>
722
-
723
-
724
-
725
-
726
-
727
-
728
-
729
-
730
- <div class="sourcecode">
731
-
732
- <p class="source-link">
733
- Source:
734
- <a href="javascript:toggleSource('method-i-ledger_source')" id="l_method-i-ledger_source">show</a>
735
-
736
- </p>
737
- <div id="method-i-ledger_source" class="dyn-source">
738
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 247</span>
739
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">ledger</span>(<span class="ruby-value">limit:</span> <span class="ruby-value">1</span>)
740
- <span class="ruby-identifier">account_required!</span>
741
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:ledger</span>, <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span>)[<span class="ruby-value">:accounts</span>]
742
- <span class="ruby-keyword">end</span></pre>
743
- </div>
744
- </div>
745
-
746
- </div>
747
-
748
- <div class="method">
749
- <div class="title method-title" id="method-i-pending">
750
-
751
- <b>pending</b>(limit: 1000, detailed: false)
752
-
753
- <a href="../../classes/Nanook/Account.html#method-i-pending" name="method-i-pending" class="permalink">Link</a>
754
- </div>
755
-
756
-
757
- <div class="description">
758
- <p>Returns information about pending block hashes that are waiting to be
759
- received by the account.</p>
760
-
761
- <p>The default response is an Array of block hashes. With the
762
- <code>detailed:</code> argument, the method can return a more complex Hash
763
- containing the amount in <a
764
- href="https://nano.org/en/faq#what-are-nano-units-">raw</a> of the pending
765
- block and the source account that sent it.</p>
766
-
767
- <h4 id="method-i-pending-label-Arguments">Arguments</h4>
768
- <table class="rdoc-list label-list"><tbody><tr><td class='label'><code>limit:</code></td><td>
769
- <p>Number of pending blocks to return (default is 1000)</p>
770
- </td></tr><tr><td class='label'><code>detailed:</code></td><td>
771
- <p>Boolean to have this method return a more complex Hash of pending block
772
- information (default is <code>false</code>)</p>
773
- </td></tr></tbody></table>
774
-
775
- <h4 id="method-i-pending-label-Example+1">Example 1</h4>
776
-
777
- <pre><code>pending
778
- </code></pre>
779
-
780
- <h4 id="method-i-pending-label-Example+1+response">Example 1 response</h4>
781
-
782
- <pre><code>[&quot;000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F&quot;]
783
- </code></pre>
784
-
785
- <h4 id="method-i-pending-label-Example+2">Example 2</h4>
786
-
787
- <pre><code>pending(detailed: true)
788
- </code></pre>
789
-
790
- <h4 id="method-i-pending-label-Example+2+response">Example 2 response</h4>
791
-
792
- <pre><code>{
793
- &quot;000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F&quot;=&gt;{
794
- &quot;amount&quot;=&gt;&quot;6000000000000000000000000000000&quot;,
795
- &quot;source&quot;=&gt;&quot;xrb_3dcfozsmekr1tr9skf1oa5wbgmxt81qepfdnt7zicq5x3hk65fg4fqj58mbr&quot;
796
- }
797
- }
798
- </code></pre>
799
- </div>
800
-
801
-
802
-
803
-
804
-
805
-
806
-
807
-
808
- <div class="sourcecode">
809
-
810
- <p class="source-link">
811
- Source:
812
- <a href="javascript:toggleSource('method-i-pending_source')" id="l_method-i-pending_source">show</a>
813
-
814
- </p>
815
- <div id="method-i-pending_source" class="dyn-source">
816
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 288</span>
817
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pending</span>(<span class="ruby-value">limit:</span> <span class="ruby-value">1000</span>, <span class="ruby-value">detailed:</span> <span class="ruby-keyword">false</span>)
818
- <span class="ruby-identifier">account_required!</span>
819
-
820
- <span class="ruby-identifier">args</span> = { <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span> }
821
- <span class="ruby-identifier">args</span>[<span class="ruby-value">:source</span>] = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">detailed</span>
822
-
823
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:pending</span>, <span class="ruby-identifier">args</span>)[<span class="ruby-value">:blocks</span>]
824
- <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-identifier">coerce_empty_string_to_type</span>(<span class="ruby-identifier">response</span>, (<span class="ruby-identifier">detailed</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Hash</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Array</span>))
825
- <span class="ruby-keyword">end</span></pre>
826
- </div>
827
- </div>
828
-
829
- </div>
830
-
831
- <div class="method">
832
- <div class="title method-title" id="method-i-public_key">
833
-
834
- <b>public_key</b>()
835
-
836
- <a href="../../classes/Nanook/Account.html#method-i-public_key" name="method-i-public_key" class="permalink">Link</a>
837
- </div>
838
-
839
-
840
- <div class="description">
841
- <p>Returns the public key belonging to an account.</p>
842
-
843
- <h4 id="method-i-public_key-label-Example+response">Example response</h4>
844
-
845
- <pre><code>&quot;3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039&quot;
846
- </code></pre>
847
- </div>
848
-
849
-
850
-
851
-
852
-
853
-
854
-
855
-
856
- <div class="sourcecode">
857
-
858
- <p class="source-link">
859
- Source:
860
- <a href="javascript:toggleSource('method-i-public_key_source')" id="l_method-i-public_key_source">show</a>
861
-
862
- </p>
863
- <div id="method-i-public_key_source" class="dyn-source">
864
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 85</span>
865
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">public_key</span>
866
- <span class="ruby-identifier">account_required!</span>
867
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_key</span>)[<span class="ruby-value">:key</span>]
868
- <span class="ruby-keyword">end</span></pre>
869
- </div>
870
- </div>
871
-
872
- </div>
873
-
874
- <div class="method">
875
- <div class="title method-title" id="method-i-representative">
876
-
877
- <b>representative</b>()
878
-
879
- <a href="../../classes/Nanook/Account.html#method-i-representative" name="method-i-representative" class="permalink">Link</a>
880
- </div>
881
-
882
-
883
- <div class="description">
884
- <p>Returns a String of the representative account for the account.
885
- Representatives are accounts which cast votes in the case of a fork in the
886
- network.</p>
887
-
888
- <h4 id="method-i-representative-label-Example+response">Example response</h4>
889
-
890
- <pre><code>&quot;xrb_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh&quot;
891
- </code></pre>
892
- </div>
893
-
894
-
895
-
896
-
897
-
898
-
899
-
900
-
901
- <div class="sourcecode">
902
-
903
- <p class="source-link">
904
- Source:
905
- <a href="javascript:toggleSource('method-i-representative_source')" id="l_method-i-representative_source">show</a>
906
-
907
- </p>
908
- <div id="method-i-representative_source" class="dyn-source">
909
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 97</span>
910
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">representative</span>
911
- <span class="ruby-identifier">account_required!</span>
912
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_representative</span>)[<span class="ruby-value">:representative</span>]
913
- <span class="ruby-keyword">end</span></pre>
914
- </div>
915
- </div>
916
-
917
- </div>
918
-
919
- <div class="method">
920
- <div class="title method-title" id="method-i-weight">
921
-
922
- <b>weight</b>()
923
-
924
- <a href="../../classes/Nanook/Account.html#method-i-weight" name="method-i-weight" class="permalink">Link</a>
925
- </div>
926
-
927
-
928
- <div class="description">
929
- <p>Returns the account&#39;s weight. Weight is determined by the account&#39;s
930
- balance, and represents the voting weight that account has on the network
931
- if it is a representative.</p>
932
-
933
- <h4 id="method-i-weight-label-Example+response">Example response</h4>
934
-
935
- <pre><code>1
936
- </code></pre>
937
- </div>
938
-
939
-
940
-
941
-
942
-
943
-
944
-
945
-
946
- <div class="sourcecode">
947
-
948
- <p class="source-link">
949
- Source:
950
- <a href="javascript:toggleSource('method-i-weight_source')" id="l_method-i-weight_source">show</a>
951
-
952
- </p>
953
- <div id="method-i-weight_source" class="dyn-source">
954
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 304</span>
955
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">weight</span>
956
- <span class="ruby-identifier">account_required!</span>
957
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_weight</span>)[<span class="ruby-value">:weight</span>]
958
- <span class="ruby-keyword">end</span></pre>
959
- </div>
960
- </div>
961
-
962
- </div>
963
-
964
-
965
-
966
-
967
- </div>
968
-
969
- </div>
970
- </body>
971
- </html>