nanook 0.7.0 → 1.0.0

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