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,84 @@
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>
@@ -0,0 +1,253 @@
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, 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-info">info</a>
83
+ </li>
84
+
85
+ </ul>
86
+ </dd>
87
+
88
+ <dt>N</dt>
89
+ <dd>
90
+ <ul>
91
+
92
+
93
+ <li>
94
+ <a href="#method-c-new">new</a>
95
+ </li>
96
+
97
+ </ul>
98
+ </dd>
99
+
100
+ </dl>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <!-- Methods -->
120
+
121
+ <div class="sectiontitle">Class Public methods</div>
122
+
123
+ <div class="method">
124
+ <div class="title method-title" id="method-c-new">
125
+
126
+ <b>new</b>(rpc, key=nil)
127
+
128
+ <a href="../../classes/Nanook/Key.html#method-c-new" name="method-c-new" class="permalink">Link</a>
129
+ </div>
130
+
131
+
132
+ <div class="description">
133
+
134
+ </div>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <div class="sourcecode">
144
+
145
+ <p class="source-link">
146
+ Source:
147
+ <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
148
+
149
+ </p>
150
+ <div id="method-c-new_source" class="dyn-source">
151
+ <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 4</span>
152
+ <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>)
153
+ <span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
154
+ <span class="ruby-ivar">@key</span> = <span class="ruby-identifier">key</span>
155
+ <span class="ruby-keyword">end</span></pre>
156
+ </div>
157
+ </div>
158
+
159
+ </div>
160
+
161
+
162
+
163
+ <div class="sectiontitle">Instance Public methods</div>
164
+
165
+ <div class="method">
166
+ <div class="title method-title" id="method-i-generate">
167
+
168
+ <b>generate</b>(seed: nil, index: nil)
169
+
170
+ <a href="../../classes/Nanook/Key.html#method-i-generate" name="method-i-generate" class="permalink">Link</a>
171
+ </div>
172
+
173
+
174
+ <div class="description">
175
+
176
+ </div>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+ <div class="sourcecode">
186
+
187
+ <p class="source-link">
188
+ Source:
189
+ <a href="javascript:toggleSource('method-i-generate_source')" id="l_method-i-generate_source">show</a>
190
+
191
+ </p>
192
+ <div id="method-i-generate_source" class="dyn-source">
193
+ <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 9</span>
194
+ <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>)
195
+ <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>
196
+ <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:key_create</span>)
197
+ <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>
198
+ <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>)
199
+ <span class="ruby-keyword">else</span>
200
+ <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>)
201
+ <span class="ruby-keyword">end</span>
202
+ <span class="ruby-keyword">end</span></pre>
203
+ </div>
204
+ </div>
205
+
206
+ </div>
207
+
208
+ <div class="method">
209
+ <div class="title method-title" id="method-i-info">
210
+
211
+ <b>info</b>()
212
+
213
+ <a href="../../classes/Nanook/Key.html#method-i-info" name="method-i-info" class="permalink">Link</a>
214
+ </div>
215
+
216
+
217
+ <div class="description">
218
+
219
+ </div>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <div class="sourcecode">
229
+
230
+ <p class="source-link">
231
+ Source:
232
+ <a href="javascript:toggleSource('method-i-info_source')" id="l_method-i-info_source">show</a>
233
+
234
+ </p>
235
+ <div id="method-i-info_source" class="dyn-source">
236
+ <pre><span class="ruby-comment"># File lib/nanook/key.rb, line 19</span>
237
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">info</span>
238
+ <span class="ruby-identifier">key_required!</span>
239
+ <span class="ruby-identifier">rpc</span>(<span class="ruby-value">:key_expand</span>)
240
+ <span class="ruby-keyword">end</span></pre>
241
+ </div>
242
+ </div>
243
+
244
+ </div>
245
+
246
+
247
+
248
+
249
+ </div>
250
+
251
+ </div>
252
+ </body>
253
+ </html>
@@ -0,0 +1,657 @@
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 28</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 32</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 36</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 40</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 50</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 54</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>