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,989 +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
- <dl class="rdoc-list label-list"><dt><code>:balance</code>
298
- <dd>
299
- <p><a href="Account.html">Account</a> balance</p>
300
- </dd><dt><code>:pending</code>
301
- <dd>
302
- <p>Amount pending and not yet received by the account</p>
303
- </dd></dl>
304
-
305
- <h4 id="method-i-balance-label-Arguments">Arguments</h4>
306
- <dl class="rdoc-list label-list"><dt><code>unit:</code>
307
- <dd>
308
- <p>Symbol (default is <code>:nano</code>) Represents the unit that the
309
- balances will be returned in. Must be either <code>:nano</code> or
310
- <code>:raw</code>. (Note: this method interprets <code>:nano</code> as
311
- NANO, which is technically Mnano See <a
312
- href="https://nano.org/en/faq#what-are-nano-units-">What are Nano’s
313
- Units</a>)</p>
314
- </dd></dl>
315
-
316
- <h5 id="method-i-balance-label-Example+response">Example response</h5>
317
-
318
- <pre><code>{
319
- &quot;balance&quot;: &quot;2&quot;,
320
- &quot;pending&quot;: &quot;1&quot;
321
- }
322
- </code></pre>
323
- </div>
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
- <div class="sourcecode">
333
-
334
- <p class="source-link">
335
- Source:
336
- <a href="javascript:toggleSource('method-i-balance_source')" id="l_method-i-balance_source">show</a>
337
-
338
- </p>
339
- <div id="method-i-balance_source" class="dyn-source">
340
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 121</span>
341
- <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>)
342
- <span class="ruby-identifier">account_required!</span>
343
-
344
- <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>)
345
- <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>)
346
- <span class="ruby-keyword">end</span>
347
-
348
- <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>
349
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">unit</span> <span class="ruby-operator">==</span> <span class="ruby-value">:nano</span>
350
- <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>])
351
- <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>])
352
- <span class="ruby-keyword">end</span>
353
- <span class="ruby-keyword">end</span>
354
- <span class="ruby-keyword">end</span></pre>
355
- </div>
356
- </div>
357
-
358
- </div>
359
-
360
- <div class="method">
361
- <div class="title method-title" id="method-i-delegators">
362
-
363
- <b>delegators</b>()
364
-
365
- <a href="../../classes/Nanook/Account.html#method-i-delegators" name="method-i-delegators" class="permalink">Link</a>
366
- </div>
367
-
368
-
369
- <div class="description">
370
- <h4 id="method-i-delegators-label-Example+response">Example response</h4>
371
-
372
- <pre><code>{
373
- &quot;xrb_13bqhi1cdqq8yb9szneoc38qk899d58i5rcrgdk5mkdm86hekpoez3zxw5sd&quot;: &quot;500000000000000000000000000000000000&quot;,
374
- &quot;xrb_17k6ug685154an8gri9whhe5kb5z1mf5w6y39gokc1657sh95fegm8ht1zpn&quot;: &quot;961647970820730000000000000000000000&quot;
375
- }
376
- </code></pre>
377
- </div>
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
- <div class="sourcecode">
387
-
388
- <p class="source-link">
389
- Source:
390
- <a href="javascript:toggleSource('method-i-delegators_source')" id="l_method-i-delegators_source">show</a>
391
-
392
- </p>
393
- <div id="method-i-delegators_source" class="dyn-source">
394
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 29</span>
395
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delegators</span>
396
- <span class="ruby-identifier">account_required!</span>
397
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:delegators</span>)[<span class="ruby-value">:delegators</span>]
398
- <span class="ruby-keyword">end</span></pre>
399
- </div>
400
- </div>
401
-
402
- </div>
403
-
404
- <div class="method">
405
- <div class="title method-title" id="method-i-exists-3F">
406
-
407
- <b>exists?</b>()
408
-
409
- <a href="../../classes/Nanook/Account.html#method-i-exists-3F" name="method-i-exists-3F" class="permalink">Link</a>
410
- </div>
411
-
412
-
413
- <div class="description">
414
- <p>Returns a boolean indicating if account is known. Note, the reliability of
415
- the check depends on the node host having synchronized itself with most of
416
- the blocks on the nano network, otherwise you may get a false
417
- <code>false</code>. You can check if a node&#39;s synchronization is
418
- particular low using <a
419
- href="Node.html#method-i-sync_progress">Nanook::Node#sync_progress</a>.</p>
420
-
421
- <h4 id="method-i-exists-3F-label-Example+response">Example response</h4>
422
-
423
- <pre><code>true
424
- </code></pre>
425
- </div>
426
-
427
-
428
-
429
-
430
-
431
-
432
-
433
-
434
- <div class="sourcecode">
435
-
436
- <p class="source-link">
437
- Source:
438
- <a href="javascript:toggleSource('method-i-exists-3F_source')" id="l_method-i-exists-3F_source">show</a>
439
-
440
- </p>
441
- <div id="method-i-exists-3F_source" class="dyn-source">
442
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 42</span>
443
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">exists?</span>
444
- <span class="ruby-identifier">account_required!</span>
445
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:validate_account_number</span>)
446
- <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>
447
- <span class="ruby-keyword">end</span></pre>
448
- </div>
449
- </div>
450
-
451
- </div>
452
-
453
- <div class="method">
454
- <div class="title method-title" id="method-i-history">
455
-
456
- <b>history</b>(limit: 1000)
457
-
458
- <a href="../../classes/Nanook/Account.html#method-i-history" name="method-i-history" class="permalink">Link</a>
459
- </div>
460
-
461
-
462
- <div class="description">
463
- <p>Returns an account&#39;s history of send and receive payments. Amounts are
464
- in <a href="https://nano.org/en/faq#what-are-nano-units-">raw</a>.</p>
465
-
466
- <h4 id="method-i-history-label-Arguments">Arguments</h4>
467
- <dl class="rdoc-list label-list"><dt><code>limit:</code>
468
- <dd>
469
- <p>Integer representing the maximum number of history items to return (default
470
- is 1000)</p>
471
- </dd></dl>
472
-
473
- <h4 id="method-i-history-label-Example">Example</h4>
474
-
475
- <pre><code>account.history
476
- account.history(limit: 1)
477
- </code></pre>
478
-
479
- <h4 id="method-i-history-label-Example+response">Example response</h4>
480
-
481
- <pre><code>[
482
- {
483
- :type=&gt;&quot;send&quot;,
484
- :account=&gt;&quot;xrb_1kdc5u48j3hr5r7eof9iao47szqh81ndqgq5e5hrsn1g9a3sa4hkkcotn3uq&quot;,
485
- :amount=&gt;200000000000000000000000000000,
486
- :hash=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;
487
- },
488
- {
489
- :type=&gt;&quot;receive&quot;,
490
- :account=&gt;&quot;xrb_1niabkx3gbxit5j5yyqcpas71dkffggbr6zpd3heui8rpoocm5xqbdwq44oh&quot;,
491
- :amount=&gt;7836413000000000000000000000000,
492
- :hash=&gt;&quot;16743E8FF52F454E876E68EDD11F23094DCB96795A3B7F32F74F88563ACDDB04&quot;
493
- }
494
- ]
495
- </code></pre>
496
- </div>
497
-
498
-
499
-
500
-
501
-
502
-
503
-
504
-
505
- <div class="sourcecode">
506
-
507
- <p class="source-link">
508
- Source:
509
- <a href="javascript:toggleSource('method-i-history_source')" id="l_method-i-history_source">show</a>
510
-
511
- </p>
512
- <div id="method-i-history_source" class="dyn-source">
513
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 76</span>
514
- <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>)
515
- <span class="ruby-identifier">account_required!</span>
516
- <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>]
517
- <span class="ruby-keyword">end</span></pre>
518
- </div>
519
- </div>
520
-
521
- </div>
522
-
523
- <div class="method">
524
- <div class="title method-title" id="method-i-id">
525
-
526
- <b>id</b>()
527
-
528
- <a href="../../classes/Nanook/Account.html#method-i-id" name="method-i-id" class="permalink">Link</a>
529
- </div>
530
-
531
-
532
- <div class="description">
533
- <p>Returns the id of the account</p>
534
- </div>
535
-
536
-
537
-
538
-
539
-
540
-
541
-
542
-
543
- <div class="sourcecode">
544
-
545
- <p class="source-link">
546
- Source:
547
- <a href="javascript:toggleSource('method-i-id_source')" id="l_method-i-id_source">show</a>
548
-
549
- </p>
550
- <div id="method-i-id_source" class="dyn-source">
551
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 137</span>
552
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">id</span>
553
- <span class="ruby-ivar">@block</span>
554
- <span class="ruby-keyword">end</span></pre>
555
- </div>
556
- </div>
557
-
558
- </div>
559
-
560
- <div class="method">
561
- <div class="title method-title" id="method-i-info">
562
-
563
- <b>info</b>(detailed: false)
564
-
565
- <a href="../../classes/Nanook/Account.html#method-i-info" name="method-i-info" class="permalink">Link</a>
566
- </div>
567
-
568
-
569
- <div class="description">
570
- <p>Returns a Hash containing the following information about an account:</p>
571
- <dl class="rdoc-list label-list"><dt><code>:frontier</code>
572
- <dd>
573
- <p>The latest block hash</p>
574
- </dd><dt><code>:open_block</code>
575
- <dd>
576
- <p>The first block in every account&#39;s blockchain. When this block was
577
- published the account was officially open</p>
578
- </dd><dt><code>:representative_block</code>
579
- <dd>
580
- <p>The block that named the representative for the account</p>
581
- </dd><dt><code>:balance</code>
582
- <dd>
583
- <p>Amount in <a href="https://nano.org/en/faq#what-are-nano-units-">NANO</a></p>
584
- </dd><dt><code>:last_modified</code>
585
- <dd>
586
- <p>Unix timestamp</p>
587
- </dd><dt><code>:block_count</code>
588
- <dd>
589
- <p>Number of blocks in the account&#39;s blockchain</p>
590
- </dd></dl>
591
-
592
- <p>When <code>detailed: true</code> is passed as an argument, this method
593
- makes four additional calls to the RPC to return more information about an
594
- account:</p>
595
- <dl class="rdoc-list label-list"><dt><code>:weight</code>
596
- <dd>
597
- <p>See <a href="Account.html#method-i-weight">weight</a></p>
598
- </dd><dt><code>:pending</code>
599
- <dd>
600
- <p>See <a href="Account.html#method-i-balance">balance</a></p>
601
- </dd><dt><code>:representative</code>
602
- <dd>
603
- <p>See <a href="Account.html#method-i-representative">representative</a></p>
604
- </dd><dt><code>:public_key</code>
605
- <dd>
606
- <p>See <a href="Account.html#method-i-public_key">public_key</a></p>
607
- </dd></dl>
608
-
609
- <h4 id="method-i-info-label-Arguments">Arguments</h4>
610
- <dl class="rdoc-list label-list"><dt><code>detailed:</code>
611
- <dd>
612
- <p>Boolean (default is false). When <code>true</code>, four additional calls
613
- are made to the RPC to return more information</p>
614
- </dd></dl>
615
-
616
- <h4 id="method-i-info-label-Example+1">Example 1</h4>
617
-
618
- <pre><code>account.info
619
- </code></pre>
620
-
621
- <h4 id="method-i-info-label-Example+1+response">Example 1 response</h4>
622
-
623
- <pre><code>{
624
- :balance=&gt;11.439597000000001,
625
- :block_count=&gt;4
626
- :frontier=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;,
627
- :modified_timestamp=&gt;1520500357,
628
- :open_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
629
- :representative_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
630
- }
631
- </code></pre>
632
-
633
- <h4 id="method-i-info-label-Example+2">Example 2</h4>
634
-
635
- <pre><code>account.info(detailed: true)
636
- </code></pre>
637
-
638
- <h4 id="method-i-info-label-Example+2+response">Example 2 response</h4>
639
-
640
- <pre><code>{
641
- :balance=&gt;11.439597000000001,
642
- :block_count=&gt;4,
643
- :frontier=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;,
644
- :modified_timestamp=&gt;1520500357,
645
- :open_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
646
- :pending=&gt;0,
647
- :public_key=&gt;&quot;A82C906460046D230D7D37C6663723DC3EFCECC4B3254EBF45294B66746F4FEF&quot;,
648
- :representative=&gt;&quot;xrb_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh&quot;,
649
- :representative_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
650
- :weight=&gt;0
651
- }
652
- </code></pre>
653
- </div>
654
-
655
-
656
-
657
-
658
-
659
-
660
-
661
-
662
- <div class="sourcecode">
663
-
664
- <p class="source-link">
665
- Source:
666
- <a href="javascript:toggleSource('method-i-info_source')" id="l_method-i-info_source">show</a>
667
-
668
- </p>
669
- <div id="method-i-info_source" class="dyn-source">
670
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 197</span>
671
- <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>)
672
- <span class="ruby-identifier">account_required!</span>
673
-
674
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_info</span>)
675
-
676
- <span class="ruby-comment"># Return the response if we don&#39;t need any more info</span>
677
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">response</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">detailed</span>
678
-
679
- <span class="ruby-comment"># Otherwise make additional calls</span>
680
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">response</span>.<span class="ruby-identifier">merge</span>({
681
- <span class="ruby-value">weight:</span> <span class="ruby-identifier">weight</span>,
682
- <span class="ruby-value">pending:</span> <span class="ruby-identifier">balance</span>[<span class="ruby-value">:pending</span>],
683
- <span class="ruby-value">representative:</span> <span class="ruby-identifier">representative</span>,
684
- <span class="ruby-value">public_key:</span> <span class="ruby-identifier">public_key</span>
685
- })
686
-
687
- <span class="ruby-comment"># Sort this new hash by keys</span>
688
- <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>
689
- <span class="ruby-keyword">end</span></pre>
690
- </div>
691
- </div>
692
-
693
- </div>
694
-
695
- <div class="method">
696
- <div class="title method-title" id="method-i-ledger">
697
-
698
- <b>ledger</b>(limit: 1)
699
-
700
- <a href="../../classes/Nanook/Account.html#method-i-ledger" name="method-i-ledger" class="permalink">Link</a>
701
- </div>
702
-
703
-
704
- <div class="description">
705
- <p>Returns information about the given account as well as other accounts up
706
- the ledger. The number of accounts returned is determined by the
707
- <code>limit:</code> argument.</p>
708
-
709
- <p>The information in each Hash is the same as what the <a
710
- href="Account.html#method-i-info">info</a>(detailed: false) method returns.</p>
711
-
712
- <h4 id="method-i-ledger-label-Arguments">Arguments</h4>
713
- <dl class="rdoc-list label-list"><dt><code>limit:</code>
714
- <dd>
715
- <p>Number of accounts to return in the ledger (default is 1)</p>
716
- </dd></dl>
717
-
718
- <h4 id="method-i-ledger-label-Example">Example</h4>
719
-
720
- <pre><code>ledger(limit: 2)
721
- </code></pre>
722
-
723
- <h4 id="method-i-ledger-label-Example+response">Example response</h4>
724
-
725
- <pre><code> {
726
- :xrb_3c3ek3k8135f6e8qtfy8eruk9q3yzmpebes7btzncccdest8ymzhjmnr196j=&gt;{
727
- :frontier=&gt;&quot;2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570&quot;,
728
- :open_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
729
- :representative_block=&gt;&quot;C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9&quot;,
730
- :balance=&gt;11439597000000000000000000000000,
731
- :modified_timestamp=&gt;1520500357,
732
- :block_count=&gt;4
733
- },
734
- :xrb_3c3ettq59kijuuad5fnaq35itc9schtr4r7r6rjhmwjbairowzq3wi5ap7h8=&gt;{ ... }
735
- }
736
- </code></pre>
737
- </div>
738
-
739
-
740
-
741
-
742
-
743
-
744
-
745
-
746
- <div class="sourcecode">
747
-
748
- <p class="source-link">
749
- Source:
750
- <a href="javascript:toggleSource('method-i-ledger_source')" id="l_method-i-ledger_source">show</a>
751
-
752
- </p>
753
- <div id="method-i-ledger_source" class="dyn-source">
754
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 248</span>
755
- <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>)
756
- <span class="ruby-identifier">account_required!</span>
757
- <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>]
758
- <span class="ruby-keyword">end</span></pre>
759
- </div>
760
- </div>
761
-
762
- </div>
763
-
764
- <div class="method">
765
- <div class="title method-title" id="method-i-pending">
766
-
767
- <b>pending</b>(limit: 1000, detailed: false)
768
-
769
- <a href="../../classes/Nanook/Account.html#method-i-pending" name="method-i-pending" class="permalink">Link</a>
770
- </div>
771
-
772
-
773
- <div class="description">
774
- <p>Returns information about pending block hashes that are waiting to be
775
- received by the account.</p>
776
-
777
- <p>The default response is an Array of block hashes. With the
778
- <code>detailed:</code> argument, the method can return a more complex Hash
779
- containing the amount in <a
780
- href="https://nano.org/en/faq#what-are-nano-units-">raw</a> of the pending
781
- block and the source account that sent it.</p>
782
-
783
- <h4 id="method-i-pending-label-Arguments">Arguments</h4>
784
- <dl class="rdoc-list label-list"><dt><code>limit:</code>
785
- <dd>
786
- <p>Number of pending blocks to return (default is 1000)</p>
787
- </dd><dt><code>detailed:</code>
788
- <dd>
789
- <p>Boolean to have this method return a more complex Hash of pending block
790
- information (default is <code>false</code>)</p>
791
- </dd></dl>
792
-
793
- <h4 id="method-i-pending-label-Example+1">Example 1</h4>
794
-
795
- <pre><code>pending
796
- </code></pre>
797
-
798
- <h4 id="method-i-pending-label-Example+1+response">Example 1 response</h4>
799
-
800
- <pre><code>[&quot;000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F&quot;]
801
- </code></pre>
802
-
803
- <h4 id="method-i-pending-label-Example+2">Example 2</h4>
804
-
805
- <pre><code>pending(detailed: true)
806
- </code></pre>
807
-
808
- <h4 id="method-i-pending-label-Example+2+response">Example 2 response</h4>
809
-
810
- <pre><code>{
811
- &quot;000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F&quot;=&gt;{
812
- &quot;amount&quot;=&gt;&quot;6000000000000000000000000000000&quot;,
813
- &quot;source&quot;=&gt;&quot;xrb_3dcfozsmekr1tr9skf1oa5wbgmxt81qepfdnt7zicq5x3hk65fg4fqj58mbr&quot;
814
- }
815
- }
816
- </code></pre>
817
- </div>
818
-
819
-
820
-
821
-
822
-
823
-
824
-
825
-
826
- <div class="sourcecode">
827
-
828
- <p class="source-link">
829
- Source:
830
- <a href="javascript:toggleSource('method-i-pending_source')" id="l_method-i-pending_source">show</a>
831
-
832
- </p>
833
- <div id="method-i-pending_source" class="dyn-source">
834
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 289</span>
835
- <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>)
836
- <span class="ruby-identifier">account_required!</span>
837
-
838
- <span class="ruby-identifier">args</span> = { <span class="ruby-value">count:</span> <span class="ruby-identifier">limit</span> }
839
- <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>
840
-
841
- <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>]
842
- <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>))
843
- <span class="ruby-keyword">end</span></pre>
844
- </div>
845
- </div>
846
-
847
- </div>
848
-
849
- <div class="method">
850
- <div class="title method-title" id="method-i-public_key">
851
-
852
- <b>public_key</b>()
853
-
854
- <a href="../../classes/Nanook/Account.html#method-i-public_key" name="method-i-public_key" class="permalink">Link</a>
855
- </div>
856
-
857
-
858
- <div class="description">
859
- <p>Returns the public key belonging to an account.</p>
860
-
861
- <h4 id="method-i-public_key-label-Example+response">Example response</h4>
862
-
863
- <pre><code>&quot;3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039&quot;
864
- </code></pre>
865
- </div>
866
-
867
-
868
-
869
-
870
-
871
-
872
-
873
-
874
- <div class="sourcecode">
875
-
876
- <p class="source-link">
877
- Source:
878
- <a href="javascript:toggleSource('method-i-public_key_source')" id="l_method-i-public_key_source">show</a>
879
-
880
- </p>
881
- <div id="method-i-public_key_source" class="dyn-source">
882
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 85</span>
883
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">public_key</span>
884
- <span class="ruby-identifier">account_required!</span>
885
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_key</span>)[<span class="ruby-value">:key</span>]
886
- <span class="ruby-keyword">end</span></pre>
887
- </div>
888
- </div>
889
-
890
- </div>
891
-
892
- <div class="method">
893
- <div class="title method-title" id="method-i-representative">
894
-
895
- <b>representative</b>()
896
-
897
- <a href="../../classes/Nanook/Account.html#method-i-representative" name="method-i-representative" class="permalink">Link</a>
898
- </div>
899
-
900
-
901
- <div class="description">
902
- <p>Returns a String of the representative account for the account.
903
- Representatives are accounts which cast votes in the case of a fork in the
904
- network.</p>
905
-
906
- <h4 id="method-i-representative-label-Example+response">Example response</h4>
907
-
908
- <pre><code>&quot;xrb_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh&quot;
909
- </code></pre>
910
- </div>
911
-
912
-
913
-
914
-
915
-
916
-
917
-
918
-
919
- <div class="sourcecode">
920
-
921
- <p class="source-link">
922
- Source:
923
- <a href="javascript:toggleSource('method-i-representative_source')" id="l_method-i-representative_source">show</a>
924
-
925
- </p>
926
- <div id="method-i-representative_source" class="dyn-source">
927
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 97</span>
928
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">representative</span>
929
- <span class="ruby-identifier">account_required!</span>
930
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_representative</span>)[<span class="ruby-value">:representative</span>]
931
- <span class="ruby-keyword">end</span></pre>
932
- </div>
933
- </div>
934
-
935
- </div>
936
-
937
- <div class="method">
938
- <div class="title method-title" id="method-i-weight">
939
-
940
- <b>weight</b>()
941
-
942
- <a href="../../classes/Nanook/Account.html#method-i-weight" name="method-i-weight" class="permalink">Link</a>
943
- </div>
944
-
945
-
946
- <div class="description">
947
- <p>Returns the account&#39;s weight. Weight is determined by the account&#39;s
948
- balance, and represents the voting weight that account has on the network
949
- if it is a representative.</p>
950
-
951
- <h4 id="method-i-weight-label-Example+response">Example response</h4>
952
-
953
- <pre><code>1
954
- </code></pre>
955
- </div>
956
-
957
-
958
-
959
-
960
-
961
-
962
-
963
-
964
- <div class="sourcecode">
965
-
966
- <p class="source-link">
967
- Source:
968
- <a href="javascript:toggleSource('method-i-weight_source')" id="l_method-i-weight_source">show</a>
969
-
970
- </p>
971
- <div id="method-i-weight_source" class="dyn-source">
972
- <pre><span class="ruby-comment"># File lib/nanook/account.rb, line 305</span>
973
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">weight</span>
974
- <span class="ruby-identifier">account_required!</span>
975
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_weight</span>)[<span class="ruby-value">:weight</span>]
976
- <span class="ruby-keyword">end</span></pre>
977
- </div>
978
- </div>
979
-
980
- </div>
981
-
982
-
983
-
984
-
985
- </div>
986
-
987
- </div>
988
- </body>
989
- </html>