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