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,84 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::Error</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::Error">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::Error class">
19
-
20
- </head>
21
-
22
- <body>
23
- <div class="banner">
24
-
25
- <h1>
26
- <span class="type">Class</span>
27
- Nanook::Error
28
-
29
- <span class="parent">&lt;
30
-
31
- StandardError
32
-
33
- </span>
34
-
35
- </h1>
36
- <ul class="files">
37
-
38
- <li><a href="../../files/lib/nanook/error_rb.html">lib/nanook/error.rb</a></li>
39
-
40
- </ul>
41
- </div>
42
- <div id="bodyContent">
43
- <div id="content">
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
- <!-- Methods -->
76
-
77
-
78
-
79
-
80
- </div>
81
-
82
- </div>
83
- </body>
84
- </html>
@@ -1,295 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::Key</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::Key">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::Key class">
19
-
20
- <meta name="keywords" content="new, generate, id, info">
21
-
22
- </head>
23
-
24
- <body>
25
- <div class="banner">
26
-
27
- <h1>
28
- <span class="type">Class</span>
29
- Nanook::Key
30
-
31
- <span class="parent">&lt;
32
-
33
- Object
34
-
35
- </span>
36
-
37
- </h1>
38
- <ul class="files">
39
-
40
- <li><a href="../../files/lib/nanook/key_rb.html">lib/nanook/key.rb</a></li>
41
-
42
- </ul>
43
- </div>
44
- <div id="bodyContent">
45
- <div id="content">
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
- <!-- Method ref -->
61
- <div class="sectiontitle">Methods</div>
62
- <dl class="methods">
63
-
64
- <dt>G</dt>
65
- <dd>
66
- <ul>
67
-
68
-
69
- <li>
70
- <a href="#method-i-generate">generate</a>
71
- </li>
72
-
73
- </ul>
74
- </dd>
75
-
76
- <dt>I</dt>
77
- <dd>
78
- <ul>
79
-
80
-
81
- <li>
82
- <a href="#method-i-id">id</a>,
83
- </li>
84
-
85
-
86
- <li>
87
- <a href="#method-i-info">info</a>
88
- </li>
89
-
90
- </ul>
91
- </dd>
92
-
93
- <dt>N</dt>
94
- <dd>
95
- <ul>
96
-
97
-
98
- <li>
99
- <a href="#method-c-new">new</a>
100
- </li>
101
-
102
- </ul>
103
- </dd>
104
-
105
- </dl>
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
- <!-- Methods -->
125
-
126
- <div class="sectiontitle">Class Public methods</div>
127
-
128
- <div class="method">
129
- <div class="title method-title" id="method-c-new">
130
-
131
- <b>new</b>(rpc, key=nil)
132
-
133
- <a href="../../classes/Nanook/Key.html#method-c-new" name="method-c-new" class="permalink">Link</a>
134
- </div>
135
-
136
-
137
- <div class="description">
138
-
139
- </div>
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <div class="sourcecode">
149
-
150
- <p class="source-link">
151
- Source:
152
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
153
-
154
- </p>
155
- <div id="method-c-new_source" class="dyn-source">
156
- <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 4</span>
157
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>, <span class="ruby-identifier">key</span>=<span class="ruby-keyword">nil</span>)
158
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
159
- <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">key</span>
160
- <span class="ruby-keyword">end</span></pre>
161
- </div>
162
- </div>
163
-
164
- </div>
165
-
166
-
167
-
168
- <div class="sectiontitle">Instance Public methods</div>
169
-
170
- <div class="method">
171
- <div class="title method-title" id="method-i-generate">
172
-
173
- <b>generate</b>(seed: nil, index: nil)
174
-
175
- <a href="../../classes/Nanook/Key.html#method-i-generate" name="method-i-generate" class="permalink">Link</a>
176
- </div>
177
-
178
-
179
- <div class="description">
180
-
181
- </div>
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
- <div class="sourcecode">
191
-
192
- <p class="source-link">
193
- Source:
194
- <a href="javascript:toggleSource('method-i-generate_source')" id="l_method-i-generate_source">show</a>
195
-
196
- </p>
197
- <div id="method-i-generate_source" class="dyn-source">
198
- <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 9</span>
199
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">generate</span>(<span class="ruby-value">seed:</span> <span class="ruby-keyword">nil</span>, <span class="ruby-value">index:</span> <span class="ruby-keyword">nil</span>)
200
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">seed</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">index</span>.<span class="ruby-identifier">nil?</span>
201
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:key_create</span>)
202
- <span class="ruby-keyword">elsif</span> <span class="ruby-operator">!</span><span class="ruby-identifier">seed</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">index</span>.<span class="ruby-identifier">nil?</span>
203
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:deterministic_key</span>, <span class="ruby-value">seed:</span> <span class="ruby-identifier">seed</span>, <span class="ruby-value">index:</span> <span class="ruby-identifier">index</span>)
204
- <span class="ruby-keyword">else</span>
205
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;This method must be called with either seed AND index params given or no params&quot;</span>)
206
- <span class="ruby-keyword">end</span>
207
- <span class="ruby-keyword">end</span></pre>
208
- </div>
209
- </div>
210
-
211
- </div>
212
-
213
- <div class="method">
214
- <div class="title method-title" id="method-i-id">
215
-
216
- <b>id</b>()
217
-
218
- <a href="../../classes/Nanook/Key.html#method-i-id" name="method-i-id" class="permalink">Link</a>
219
- </div>
220
-
221
-
222
- <div class="description">
223
-
224
- </div>
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
- <div class="sourcecode">
234
-
235
- <p class="source-link">
236
- Source:
237
- <a href="javascript:toggleSource('method-i-id_source')" id="l_method-i-id_source">show</a>
238
-
239
- </p>
240
- <div id="method-i-id_source" class="dyn-source">
241
- <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 19</span>
242
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">id</span>
243
- <span class="ruby-ivar">@key</span>
244
- <span class="ruby-keyword">end</span></pre>
245
- </div>
246
- </div>
247
-
248
- </div>
249
-
250
- <div class="method">
251
- <div class="title method-title" id="method-i-info">
252
-
253
- <b>info</b>()
254
-
255
- <a href="../../classes/Nanook/Key.html#method-i-info" name="method-i-info" class="permalink">Link</a>
256
- </div>
257
-
258
-
259
- <div class="description">
260
-
261
- </div>
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
- <div class="sourcecode">
271
-
272
- <p class="source-link">
273
- Source:
274
- <a href="javascript:toggleSource('method-i-info_source')" id="l_method-i-info_source">show</a>
275
-
276
- </p>
277
- <div id="method-i-info_source" class="dyn-source">
278
- <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 23</span>
279
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">info</span>
280
- <span class="ruby-identifier">key_required!</span>
281
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:key_expand</span>)
282
- <span class="ruby-keyword">end</span></pre>
283
- </div>
284
- </div>
285
-
286
- </div>
287
-
288
-
289
-
290
-
291
- </div>
292
-
293
- </div>
294
- </body>
295
- </html>
@@ -1,657 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Nanook::Node</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::Node">
15
-
16
-
17
-
18
- <meta name="keywords" content="Nanook::Node class">
19
-
20
- <meta name="keywords" content="new, block_count, block_count_type, bootstrap, bootstrap_any, frontier_count, peers, representatives, stop, sync_progress, synced?, version">
21
-
22
- </head>
23
-
24
- <body>
25
- <div class="banner">
26
-
27
- <h1>
28
- <span class="type">Class</span>
29
- Nanook::Node
30
-
31
- <span class="parent">&lt;
32
-
33
- Object
34
-
35
- </span>
36
-
37
- </h1>
38
- <ul class="files">
39
-
40
- <li><a href="../../files/lib/nanook/node_rb.html">lib/nanook/node.rb</a></li>
41
-
42
- </ul>
43
- </div>
44
- <div id="bodyContent">
45
- <div id="content">
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
- <!-- Method ref -->
61
- <div class="sectiontitle">Methods</div>
62
- <dl class="methods">
63
-
64
- <dt>B</dt>
65
- <dd>
66
- <ul>
67
-
68
-
69
- <li>
70
- <a href="#method-i-block_count">block_count</a>,
71
- </li>
72
-
73
-
74
- <li>
75
- <a href="#method-i-block_count_type">block_count_type</a>,
76
- </li>
77
-
78
-
79
- <li>
80
- <a href="#method-i-bootstrap">bootstrap</a>,
81
- </li>
82
-
83
-
84
- <li>
85
- <a href="#method-i-bootstrap_any">bootstrap_any</a>
86
- </li>
87
-
88
- </ul>
89
- </dd>
90
-
91
- <dt>F</dt>
92
- <dd>
93
- <ul>
94
-
95
-
96
- <li>
97
- <a href="#method-i-frontier_count">frontier_count</a>
98
- </li>
99
-
100
- </ul>
101
- </dd>
102
-
103
- <dt>N</dt>
104
- <dd>
105
- <ul>
106
-
107
-
108
- <li>
109
- <a href="#method-c-new">new</a>
110
- </li>
111
-
112
- </ul>
113
- </dd>
114
-
115
- <dt>P</dt>
116
- <dd>
117
- <ul>
118
-
119
-
120
- <li>
121
- <a href="#method-i-peers">peers</a>
122
- </li>
123
-
124
- </ul>
125
- </dd>
126
-
127
- <dt>R</dt>
128
- <dd>
129
- <ul>
130
-
131
-
132
- <li>
133
- <a href="#method-i-representatives">representatives</a>
134
- </li>
135
-
136
- </ul>
137
- </dd>
138
-
139
- <dt>S</dt>
140
- <dd>
141
- <ul>
142
-
143
-
144
- <li>
145
- <a href="#method-i-stop">stop</a>,
146
- </li>
147
-
148
-
149
- <li>
150
- <a href="#method-i-sync_progress">sync_progress</a>,
151
- </li>
152
-
153
-
154
- <li>
155
- <a href="#method-i-synced-3F">synced?</a>
156
- </li>
157
-
158
- </ul>
159
- </dd>
160
-
161
- <dt>V</dt>
162
- <dd>
163
- <ul>
164
-
165
-
166
- <li>
167
- <a href="#method-i-version">version</a>
168
- </li>
169
-
170
- </ul>
171
- </dd>
172
-
173
- </dl>
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
- <!-- Methods -->
193
-
194
- <div class="sectiontitle">Class Public methods</div>
195
-
196
- <div class="method">
197
- <div class="title method-title" id="method-c-new">
198
-
199
- <b>new</b>(rpc)
200
-
201
- <a href="../../classes/Nanook/Node.html#method-c-new" name="method-c-new" class="permalink">Link</a>
202
- </div>
203
-
204
-
205
- <div class="description">
206
-
207
- </div>
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
- <div class="sourcecode">
217
-
218
- <p class="source-link">
219
- Source:
220
- <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
221
-
222
- </p>
223
- <div id="method-c-new_source" class="dyn-source">
224
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 4</span>
225
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>)
226
- <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
227
- <span class="ruby-keyword">end</span></pre>
228
- </div>
229
- </div>
230
-
231
- </div>
232
-
233
-
234
-
235
- <div class="sectiontitle">Instance Public methods</div>
236
-
237
- <div class="method">
238
- <div class="title method-title" id="method-i-block_count">
239
-
240
- <b>block_count</b>()
241
-
242
- <a href="../../classes/Nanook/Node.html#method-i-block_count" name="method-i-block_count" class="permalink">Link</a>
243
- </div>
244
-
245
-
246
- <div class="description">
247
-
248
- </div>
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
- <div class="sourcecode">
258
-
259
- <p class="source-link">
260
- Source:
261
- <a href="javascript:toggleSource('method-i-block_count_source')" id="l_method-i-block_count_source">show</a>
262
-
263
- </p>
264
- <div id="method-i-block_count_source" class="dyn-source">
265
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 8</span>
266
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">block_count</span>
267
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block_count</span>)
268
- <span class="ruby-keyword">end</span></pre>
269
- </div>
270
- </div>
271
-
272
- </div>
273
-
274
- <div class="method">
275
- <div class="title method-title" id="method-i-block_count_type">
276
-
277
- <b>block_count_type</b>()
278
-
279
- <a href="../../classes/Nanook/Node.html#method-i-block_count_type" name="method-i-block_count_type" class="permalink">Link</a>
280
- </div>
281
-
282
-
283
- <div class="description">
284
-
285
- </div>
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
- <div class="sourcecode">
295
-
296
- <p class="source-link">
297
- Source:
298
- <a href="javascript:toggleSource('method-i-block_count_type_source')" id="l_method-i-block_count_type_source">show</a>
299
-
300
- </p>
301
- <div id="method-i-block_count_type_source" class="dyn-source">
302
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 12</span>
303
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">block_count_type</span>
304
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block_count_type</span>)
305
- <span class="ruby-keyword">end</span></pre>
306
- </div>
307
- </div>
308
-
309
- </div>
310
-
311
- <div class="method">
312
- <div class="title method-title" id="method-i-bootstrap">
313
-
314
- <b>bootstrap</b>(address:, port:)
315
-
316
- <a href="../../classes/Nanook/Node.html#method-i-bootstrap" name="method-i-bootstrap" class="permalink">Link</a>
317
- </div>
318
-
319
-
320
- <div class="description">
321
-
322
- </div>
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
- <div class="sourcecode">
332
-
333
- <p class="source-link">
334
- Source:
335
- <a href="javascript:toggleSource('method-i-bootstrap_source')" id="l_method-i-bootstrap_source">show</a>
336
-
337
- </p>
338
- <div id="method-i-bootstrap_source" class="dyn-source">
339
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 16</span>
340
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bootstrap</span>(<span class="ruby-value">address:</span>, <span class="ruby-value">port:</span>)
341
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:bootstrap</span>, <span class="ruby-value">address:</span> <span class="ruby-identifier">address</span>, <span class="ruby-value">port:</span> <span class="ruby-identifier">port</span>).<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:success</span>)
342
- <span class="ruby-keyword">end</span></pre>
343
- </div>
344
- </div>
345
-
346
- </div>
347
-
348
- <div class="method">
349
- <div class="title method-title" id="method-i-bootstrap_any">
350
-
351
- <b>bootstrap_any</b>()
352
-
353
- <a href="../../classes/Nanook/Node.html#method-i-bootstrap_any" name="method-i-bootstrap_any" class="permalink">Link</a>
354
- </div>
355
-
356
-
357
- <div class="description">
358
-
359
- </div>
360
-
361
-
362
-
363
-
364
-
365
-
366
-
367
-
368
- <div class="sourcecode">
369
-
370
- <p class="source-link">
371
- Source:
372
- <a href="javascript:toggleSource('method-i-bootstrap_any_source')" id="l_method-i-bootstrap_any_source">show</a>
373
-
374
- </p>
375
- <div id="method-i-bootstrap_any_source" class="dyn-source">
376
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 20</span>
377
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bootstrap_any</span>
378
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:bootstrap_any</span>).<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:success</span>)
379
- <span class="ruby-keyword">end</span></pre>
380
- </div>
381
- </div>
382
-
383
- </div>
384
-
385
- <div class="method">
386
- <div class="title method-title" id="method-i-frontier_count">
387
-
388
- <b>frontier_count</b>()
389
-
390
- <a href="../../classes/Nanook/Node.html#method-i-frontier_count" name="method-i-frontier_count" class="permalink">Link</a>
391
- </div>
392
-
393
-
394
- <div class="description">
395
-
396
- </div>
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
- <div class="sourcecode">
406
-
407
- <p class="source-link">
408
- Source:
409
- <a href="javascript:toggleSource('method-i-frontier_count_source')" id="l_method-i-frontier_count_source">show</a>
410
-
411
- </p>
412
- <div id="method-i-frontier_count_source" class="dyn-source">
413
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 24</span>
414
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">frontier_count</span>
415
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:frontier_count</span>)[<span class="ruby-value">:count</span>]
416
- <span class="ruby-keyword">end</span></pre>
417
- </div>
418
- </div>
419
-
420
- </div>
421
-
422
- <div class="method">
423
- <div class="title method-title" id="method-i-peers">
424
-
425
- <b>peers</b>()
426
-
427
- <a href="../../classes/Nanook/Node.html#method-i-peers" name="method-i-peers" class="permalink">Link</a>
428
- </div>
429
-
430
-
431
- <div class="description">
432
-
433
- </div>
434
-
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
- <div class="sourcecode">
443
-
444
- <p class="source-link">
445
- Source:
446
- <a href="javascript:toggleSource('method-i-peers_source')" id="l_method-i-peers_source">show</a>
447
-
448
- </p>
449
- <div id="method-i-peers_source" class="dyn-source">
450
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 32</span>
451
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">peers</span>
452
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:peers</span>)[<span class="ruby-value">:peers</span>]
453
- <span class="ruby-keyword">end</span></pre>
454
- </div>
455
- </div>
456
-
457
- </div>
458
-
459
- <div class="method">
460
- <div class="title method-title" id="method-i-representatives">
461
-
462
- <b>representatives</b>()
463
-
464
- <a href="../../classes/Nanook/Node.html#method-i-representatives" name="method-i-representatives" class="permalink">Link</a>
465
- </div>
466
-
467
-
468
- <div class="description">
469
-
470
- </div>
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
- <div class="sourcecode">
480
-
481
- <p class="source-link">
482
- Source:
483
- <a href="javascript:toggleSource('method-i-representatives_source')" id="l_method-i-representatives_source">show</a>
484
-
485
- </p>
486
- <div id="method-i-representatives_source" class="dyn-source">
487
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 36</span>
488
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">representatives</span>
489
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:representatives</span>)[<span class="ruby-value">:representatives</span>]
490
- <span class="ruby-keyword">end</span></pre>
491
- </div>
492
- </div>
493
-
494
- </div>
495
-
496
- <div class="method">
497
- <div class="title method-title" id="method-i-stop">
498
-
499
- <b>stop</b>()
500
-
501
- <a href="../../classes/Nanook/Node.html#method-i-stop" name="method-i-stop" class="permalink">Link</a>
502
- </div>
503
-
504
-
505
- <div class="description">
506
-
507
- </div>
508
-
509
-
510
-
511
-
512
-
513
-
514
-
515
-
516
- <div class="sourcecode">
517
-
518
- <p class="source-link">
519
- Source:
520
- <a href="javascript:toggleSource('method-i-stop_source')" id="l_method-i-stop_source">show</a>
521
-
522
- </p>
523
- <div id="method-i-stop_source" class="dyn-source">
524
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 40</span>
525
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">stop</span>
526
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:stop</span>).<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:success</span>)
527
- <span class="ruby-keyword">end</span></pre>
528
- </div>
529
- </div>
530
-
531
- </div>
532
-
533
- <div class="method">
534
- <div class="title method-title" id="method-i-sync_progress">
535
-
536
- <b>sync_progress</b>()
537
-
538
- <a href="../../classes/Nanook/Node.html#method-i-sync_progress" name="method-i-sync_progress" class="permalink">Link</a>
539
- </div>
540
-
541
-
542
- <div class="description">
543
-
544
- </div>
545
-
546
-
547
-
548
-
549
-
550
-
551
-
552
-
553
- <div class="sourcecode">
554
-
555
- <p class="source-link">
556
- Source:
557
- <a href="javascript:toggleSource('method-i-sync_progress_source')" id="l_method-i-sync_progress_source">show</a>
558
-
559
- </p>
560
- <div id="method-i-sync_progress_source" class="dyn-source">
561
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 44</span>
562
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sync_progress</span>
563
- <span class="ruby-identifier">response</span> = <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block_count</span>)
564
-
565
- <span class="ruby-identifier">count</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value">:count</span>]
566
- <span class="ruby-identifier">unchecked</span> = <span class="ruby-identifier">response</span>[<span class="ruby-value">:unchecked</span>]
567
- <span class="ruby-identifier">total</span> = <span class="ruby-identifier">count</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">unchecked</span>
568
-
569
- <span class="ruby-identifier">count</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-value">100</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">total</span>.<span class="ruby-identifier">to_f</span>
570
- <span class="ruby-keyword">end</span></pre>
571
- </div>
572
- </div>
573
-
574
- </div>
575
-
576
- <div class="method">
577
- <div class="title method-title" id="method-i-synced-3F">
578
-
579
- <b>synced?</b>()
580
-
581
- <a href="../../classes/Nanook/Node.html#method-i-synced-3F" name="method-i-synced-3F" class="permalink">Link</a>
582
- </div>
583
-
584
-
585
- <div class="description">
586
-
587
- </div>
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
- <div class="sourcecode">
597
-
598
- <p class="source-link">
599
- Source:
600
- <a href="javascript:toggleSource('method-i-synced-3F_source')" id="l_method-i-synced-3F_source">show</a>
601
-
602
- </p>
603
- <div id="method-i-synced-3F_source" class="dyn-source">
604
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 54</span>
605
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">synced?</span>
606
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:block_count</span>)[<span class="ruby-value">:unchecked</span>] <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
607
- <span class="ruby-keyword">end</span></pre>
608
- </div>
609
- </div>
610
-
611
- </div>
612
-
613
- <div class="method">
614
- <div class="title method-title" id="method-i-version">
615
-
616
- <b>version</b>()
617
-
618
- <a href="../../classes/Nanook/Node.html#method-i-version" name="method-i-version" class="permalink">Link</a>
619
- </div>
620
-
621
-
622
- <div class="description">
623
-
624
- </div>
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
- <div class="sourcecode">
634
-
635
- <p class="source-link">
636
- Source:
637
- <a href="javascript:toggleSource('method-i-version_source')" id="l_method-i-version_source">show</a>
638
-
639
- </p>
640
- <div id="method-i-version_source" class="dyn-source">
641
- <pre><span class="ruby-comment"># File lib/nanook/node.rb, line 58</span>
642
- <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">version</span>
643
- <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:version</span>)
644
- <span class="ruby-keyword">end</span></pre>
645
- </div>
646
- </div>
647
-
648
- </div>
649
-
650
-
651
-
652
-
653
- </div>
654
-
655
- </div>
656
- </body>
657
- </html>