nanook 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +26 -0
- data/Gemfile.lock +2 -2
- data/README.md +18 -7
- data/Rakefile +18 -0
- data/docs/0.7.0/apple-touch-icon.png +0 -0
- data/docs/0.7.0/classes/Nanook.html +572 -0
- data/docs/0.7.0/classes/Nanook/Account.html +909 -0
- data/docs/0.7.0/classes/Nanook/Block.html +717 -0
- data/docs/0.7.0/classes/Nanook/Error.html +84 -0
- data/docs/0.7.0/classes/Nanook/Key.html +253 -0
- data/docs/0.7.0/classes/Nanook/Node.html +657 -0
- data/docs/0.7.0/classes/Nanook/Rpc.html +247 -0
- data/docs/0.7.0/classes/Nanook/Util.html +197 -0
- data/docs/0.7.0/classes/Nanook/Wallet.html +986 -0
- data/docs/0.7.0/classes/Nanook/WalletAccount.html +446 -0
- data/docs/0.7.0/classes/Nanook/WorkPeer.html +294 -0
- data/docs/0.7.0/created.rid +14 -0
- data/docs/0.7.0/css/github.css +123 -0
- data/docs/0.7.0/css/main.css +374 -0
- data/docs/0.7.0/css/panel.css +360 -0
- data/docs/0.7.0/css/reset.css +48 -0
- data/docs/0.7.0/favicon.ico +0 -0
- data/docs/0.7.0/files/README_md.html +418 -0
- data/docs/0.7.0/files/lib/nanook/account_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/block_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/error_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/key_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/node_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/0.7.0/files/lib/nanook/util_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/version_rb.html +84 -0
- data/docs/0.7.0/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/0.7.0/files/lib/nanook_rb.html +94 -0
- data/docs/0.7.0/i/arrow-down.svg +8 -0
- data/docs/0.7.0/i/arrow-right.svg +8 -0
- data/docs/0.7.0/i/search.svg +12 -0
- data/docs/0.7.0/i/tree_bg.svg +8 -0
- data/docs/0.7.0/index.html +11 -0
- data/docs/0.7.0/js/highlight.pack.js +1 -0
- data/docs/0.7.0/js/jquery-1.3.2.min.js +19 -0
- data/docs/0.7.0/js/main.js +25 -0
- data/docs/0.7.0/js/navigation.js +142 -0
- data/docs/0.7.0/js/search_index.js +1 -0
- data/docs/0.7.0/js/searchdoc.js +465 -0
- data/docs/0.7.0/js/searcher.js +229 -0
- data/docs/0.7.0/panel/index.html +47 -0
- data/docs/0.7.0/panel/links.html +32 -0
- data/docs/0.7.0/panel/tree.js +1 -0
- data/docs/0.8.0/apple-touch-icon.png +0 -0
- data/docs/0.8.0/classes/Nanook.html +621 -0
- data/docs/0.8.0/classes/Nanook/Account.html +971 -0
- data/docs/0.8.0/classes/Nanook/Block.html +759 -0
- data/docs/0.8.0/classes/Nanook/Error.html +84 -0
- data/docs/0.8.0/classes/Nanook/Key.html +295 -0
- data/docs/0.8.0/classes/Nanook/Node.html +657 -0
- data/docs/0.8.0/classes/Nanook/Rpc.html +247 -0
- data/docs/0.8.0/classes/Nanook/Util.html +264 -0
- data/docs/0.8.0/classes/Nanook/Wallet.html +1056 -0
- data/docs/0.8.0/classes/Nanook/WalletAccount.html +582 -0
- data/docs/0.8.0/classes/Nanook/WorkPeer.html +294 -0
- data/docs/0.8.0/created.rid +14 -0
- data/docs/0.8.0/css/github.css +123 -0
- data/docs/0.8.0/css/main.css +374 -0
- data/docs/0.8.0/css/panel.css +360 -0
- data/docs/0.8.0/css/reset.css +48 -0
- data/docs/0.8.0/favicon.ico +0 -0
- data/docs/0.8.0/files/README_md.html +423 -0
- data/docs/0.8.0/files/lib/nanook/account_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/block_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/error_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/key_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/node_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/0.8.0/files/lib/nanook/util_rb.html +97 -0
- data/docs/0.8.0/files/lib/nanook/version_rb.html +84 -0
- data/docs/0.8.0/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/0.8.0/files/lib/nanook_rb.html +94 -0
- data/docs/0.8.0/i/arrow-down.svg +8 -0
- data/docs/0.8.0/i/arrow-right.svg +8 -0
- data/docs/0.8.0/i/search.svg +12 -0
- data/docs/0.8.0/i/tree_bg.svg +8 -0
- data/docs/0.8.0/index.html +11 -0
- data/docs/0.8.0/js/highlight.pack.js +1 -0
- data/docs/0.8.0/js/jquery-1.3.2.min.js +19 -0
- data/docs/0.8.0/js/main.js +25 -0
- data/docs/0.8.0/js/navigation.js +142 -0
- data/docs/0.8.0/js/search_index.js +1 -0
- data/docs/0.8.0/js/searchdoc.js +465 -0
- data/docs/0.8.0/js/searcher.js +229 -0
- data/docs/0.8.0/panel/index.html +47 -0
- data/docs/0.8.0/panel/links.html +32 -0
- data/docs/0.8.0/panel/tree.js +1 -0
- data/docs/1.0.0/apple-touch-icon.png +0 -0
- data/docs/1.0.0/classes/Nanook.html +621 -0
- data/docs/1.0.0/classes/Nanook/Account.html +971 -0
- data/docs/1.0.0/classes/Nanook/Block.html +759 -0
- data/docs/1.0.0/classes/Nanook/Error.html +84 -0
- data/docs/1.0.0/classes/Nanook/Key.html +295 -0
- data/docs/1.0.0/classes/Nanook/Node.html +657 -0
- data/docs/1.0.0/classes/Nanook/Rpc.html +247 -0
- data/docs/1.0.0/classes/Nanook/Util.html +264 -0
- data/docs/1.0.0/classes/Nanook/Wallet.html +1056 -0
- data/docs/1.0.0/classes/Nanook/WalletAccount.html +582 -0
- data/docs/1.0.0/classes/Nanook/WorkPeer.html +294 -0
- data/docs/1.0.0/created.rid +14 -0
- data/docs/1.0.0/css/github.css +123 -0
- data/docs/1.0.0/css/main.css +374 -0
- data/docs/1.0.0/css/panel.css +360 -0
- data/docs/1.0.0/css/reset.css +48 -0
- data/docs/1.0.0/favicon.ico +0 -0
- data/docs/1.0.0/files/README_md.html +423 -0
- data/docs/1.0.0/files/lib/nanook/account_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/block_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/error_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/key_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/node_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/1.0.0/files/lib/nanook/util_rb.html +97 -0
- data/docs/1.0.0/files/lib/nanook/version_rb.html +84 -0
- data/docs/1.0.0/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/1.0.0/files/lib/nanook_rb.html +94 -0
- data/docs/1.0.0/i/arrow-down.svg +8 -0
- data/docs/1.0.0/i/arrow-right.svg +8 -0
- data/docs/1.0.0/i/search.svg +12 -0
- data/docs/1.0.0/i/tree_bg.svg +8 -0
- data/docs/1.0.0/index.html +11 -0
- data/docs/1.0.0/js/highlight.pack.js +1 -0
- data/docs/1.0.0/js/jquery-1.3.2.min.js +19 -0
- data/docs/1.0.0/js/main.js +25 -0
- data/docs/1.0.0/js/navigation.js +142 -0
- data/docs/1.0.0/js/search_index.js +1 -0
- data/docs/1.0.0/js/searchdoc.js +465 -0
- data/docs/1.0.0/js/searcher.js +229 -0
- data/docs/1.0.0/panel/index.html +47 -0
- data/docs/1.0.0/panel/links.html +32 -0
- data/docs/1.0.0/panel/tree.js +1 -0
- data/docs/apple-touch-icon.png +0 -0
- data/docs/classes/Nanook.html +572 -0
- data/docs/classes/Nanook/Account.html +907 -0
- data/docs/classes/Nanook/Block.html +717 -0
- data/docs/classes/Nanook/Error.html +84 -0
- data/docs/classes/Nanook/Key.html +253 -0
- data/docs/classes/Nanook/Node.html +657 -0
- data/docs/classes/Nanook/Rpc.html +247 -0
- data/docs/classes/Nanook/Util.html +197 -0
- data/docs/classes/Nanook/Wallet.html +778 -0
- data/docs/classes/Nanook/WalletAccount.html +447 -0
- data/docs/classes/Nanook/WorkPeer.html +294 -0
- data/docs/created.rid +14 -0
- data/docs/css/github.css +123 -0
- data/docs/css/main.css +374 -0
- data/docs/css/panel.css +360 -0
- data/docs/css/reset.css +48 -0
- data/docs/favicon.ico +0 -0
- data/docs/files/README_md.html +408 -0
- data/docs/files/lib/nanook/account_rb.html +89 -0
- data/docs/files/lib/nanook/block_rb.html +89 -0
- data/docs/files/lib/nanook/error_rb.html +89 -0
- data/docs/files/lib/nanook/key_rb.html +89 -0
- data/docs/files/lib/nanook/node_rb.html +89 -0
- data/docs/files/lib/nanook/rpc_rb.html +99 -0
- data/docs/files/lib/nanook/util_rb.html +89 -0
- data/docs/files/lib/nanook/version_rb.html +84 -0
- data/docs/files/lib/nanook/wallet_account_rb.html +89 -0
- data/docs/files/lib/nanook/wallet_rb.html +89 -0
- data/docs/files/lib/nanook/work_peer_rb.html +89 -0
- data/docs/files/lib/nanook_rb.html +94 -0
- data/docs/i/arrow-down.svg +8 -0
- data/docs/i/arrow-right.svg +8 -0
- data/docs/i/search.svg +12 -0
- data/docs/i/tree_bg.svg +8 -0
- data/docs/index.html +11 -0
- data/docs/js/highlight.pack.js +1 -0
- data/docs/js/jquery-1.3.2.min.js +19 -0
- data/docs/js/main.js +25 -0
- data/docs/js/navigation.js +142 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/searchdoc.js +465 -0
- data/docs/js/searcher.js +229 -0
- data/docs/panel/index.html +47 -0
- data/docs/panel/links.html +32 -0
- data/docs/panel/tree.js +1 -0
- data/lib/nanook.rb +40 -4
- data/lib/nanook/account.rb +250 -8
- data/lib/nanook/block.rb +25 -2
- data/lib/nanook/key.rb +10 -2
- data/lib/nanook/node.rb +4 -0
- data/lib/nanook/rpc.rb +5 -1
- data/lib/nanook/util.rb +9 -1
- data/lib/nanook/version.rb +1 -1
- data/lib/nanook/wallet.rb +275 -14
- data/lib/nanook/wallet_account.rb +63 -11
- data/lib/nanook/work_peer.rb +4 -0
- metadata +188 -3
@@ -0,0 +1,360 @@
|
|
1
|
+
/* Panel (begin) */
|
2
|
+
.panel
|
3
|
+
{
|
4
|
+
position: absolute;
|
5
|
+
width: 100%;
|
6
|
+
height: 100%;
|
7
|
+
top: 0;
|
8
|
+
left: 0;
|
9
|
+
background: #FFF;
|
10
|
+
z-index: 2;
|
11
|
+
font-family: "Helvetica Neue", "Arial", sans-serif;
|
12
|
+
overflow-x: hidden;
|
13
|
+
}
|
14
|
+
|
15
|
+
.panel_tree .results,
|
16
|
+
.panel_results .tree
|
17
|
+
{
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Header with search box (begin) */
|
22
|
+
.panel .header
|
23
|
+
{
|
24
|
+
background: white url(../i/search.svg) no-repeat;
|
25
|
+
background-position: 5px;
|
26
|
+
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
|
27
|
+
height: 40px;
|
28
|
+
width: 100%;
|
29
|
+
position: absolute;
|
30
|
+
left: 0; top: 0;
|
31
|
+
z-index: 300;
|
32
|
+
}
|
33
|
+
|
34
|
+
.panel .header input
|
35
|
+
{
|
36
|
+
border: 0;
|
37
|
+
box-sizing: border-box;
|
38
|
+
display: inline-block;
|
39
|
+
font-size: 14px;
|
40
|
+
height: 40px;
|
41
|
+
width: 100%;
|
42
|
+
padding: 0 5px;
|
43
|
+
margin: 0;
|
44
|
+
margin-left: 25px;
|
45
|
+
outline: none;
|
46
|
+
}
|
47
|
+
|
48
|
+
/* Header with search box (end) */
|
49
|
+
|
50
|
+
|
51
|
+
/* Results (begin) */
|
52
|
+
.panel .result
|
53
|
+
{
|
54
|
+
position: absolute;
|
55
|
+
top: 40px;
|
56
|
+
bottom: 0;
|
57
|
+
left: 0;
|
58
|
+
width: 100%;
|
59
|
+
overflow-y: scroll;
|
60
|
+
overflow-x: hidden;
|
61
|
+
z-index: 2;
|
62
|
+
}
|
63
|
+
|
64
|
+
.panel .result ul
|
65
|
+
{
|
66
|
+
font-size: 0.8em;
|
67
|
+
width: 100%;
|
68
|
+
}
|
69
|
+
|
70
|
+
.panel .result ul li
|
71
|
+
{
|
72
|
+
height: 46px;
|
73
|
+
overflow: hidden;
|
74
|
+
padding: 4px 10px 0 10px;
|
75
|
+
cursor: pointer;
|
76
|
+
}
|
77
|
+
|
78
|
+
.panel .result ul li:nth-child(2n) {
|
79
|
+
background: #F0EFEF;
|
80
|
+
}
|
81
|
+
|
82
|
+
.panel .result ul li h1
|
83
|
+
{
|
84
|
+
font-size: 13px;
|
85
|
+
font-weight: normal;
|
86
|
+
color: #333;
|
87
|
+
margin-bottom: 2px;
|
88
|
+
white-space: nowrap;
|
89
|
+
}
|
90
|
+
|
91
|
+
.panel .result ul li p
|
92
|
+
{
|
93
|
+
font-size: 11px;
|
94
|
+
color: #333;
|
95
|
+
margin-bottom: 2px;
|
96
|
+
white-space: nowrap;
|
97
|
+
}
|
98
|
+
|
99
|
+
.panel .result ul li h1 i,
|
100
|
+
.panel .result ul li p.snippet
|
101
|
+
{
|
102
|
+
color: #777;
|
103
|
+
}
|
104
|
+
|
105
|
+
.panel .result ul li b
|
106
|
+
{
|
107
|
+
color: #000;
|
108
|
+
}
|
109
|
+
|
110
|
+
.panel .result ul li.current
|
111
|
+
{
|
112
|
+
background: #B61D1D;
|
113
|
+
}
|
114
|
+
|
115
|
+
.panel .result ul li.current h1,
|
116
|
+
.panel .result ul li.current p
|
117
|
+
{
|
118
|
+
color: #D9D9D9;
|
119
|
+
}
|
120
|
+
|
121
|
+
.panel .result ul li.current h1 i,
|
122
|
+
.panel .result ul li.current p.snippet
|
123
|
+
{
|
124
|
+
color: #ACACAC;
|
125
|
+
}
|
126
|
+
|
127
|
+
.panel .result ul li.current b
|
128
|
+
{
|
129
|
+
color: #FFF;
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
.panel .result ul li:hover,
|
134
|
+
.panel .result ul li.selected
|
135
|
+
{
|
136
|
+
background: #d0d0d0;
|
137
|
+
}
|
138
|
+
|
139
|
+
.panel .result ul li.current:hover
|
140
|
+
{
|
141
|
+
background: #B61D1D;
|
142
|
+
}
|
143
|
+
|
144
|
+
.panel .result ul li .badge
|
145
|
+
{
|
146
|
+
margin-right: 0.4em;
|
147
|
+
margin-left: -0.2em;
|
148
|
+
padding: 0 0.2em;
|
149
|
+
color: #000;
|
150
|
+
border-radius: 3px;
|
151
|
+
}
|
152
|
+
|
153
|
+
.panel .result ul li .badge_1
|
154
|
+
{
|
155
|
+
background: #ACDBF4;
|
156
|
+
}
|
157
|
+
|
158
|
+
.panel .result ul li.current .badge_1
|
159
|
+
{
|
160
|
+
background: #97BFD7;
|
161
|
+
}
|
162
|
+
|
163
|
+
.panel .result ul li .badge_2
|
164
|
+
{
|
165
|
+
background: #ACF3C3;
|
166
|
+
}
|
167
|
+
|
168
|
+
.panel .result ul li.current .badge_2
|
169
|
+
{
|
170
|
+
background: #98D7AC;
|
171
|
+
}
|
172
|
+
|
173
|
+
.panel .result ul li .badge_3
|
174
|
+
{
|
175
|
+
background: #E0F3AC;
|
176
|
+
}
|
177
|
+
|
178
|
+
.panel .result ul li.current .badge_3
|
179
|
+
{
|
180
|
+
background: #C4D798;
|
181
|
+
}
|
182
|
+
|
183
|
+
.panel .result ul li .badge_4
|
184
|
+
{
|
185
|
+
background: #D7CA98;
|
186
|
+
}
|
187
|
+
|
188
|
+
.panel .result ul li.current .badge_4
|
189
|
+
{
|
190
|
+
background: #A6B0AC;
|
191
|
+
}
|
192
|
+
|
193
|
+
.panel .result ul li .badge_5
|
194
|
+
{
|
195
|
+
background: #F3C8AC;
|
196
|
+
}
|
197
|
+
|
198
|
+
.panel .result ul li.current .badge_5
|
199
|
+
{
|
200
|
+
background: #D7B198;
|
201
|
+
}
|
202
|
+
|
203
|
+
.panel .result ul li .badge_6
|
204
|
+
{
|
205
|
+
background: #F3ACC3;
|
206
|
+
}
|
207
|
+
|
208
|
+
.panel .result ul li.current .badge_6
|
209
|
+
{
|
210
|
+
background: #D798AB;
|
211
|
+
}
|
212
|
+
|
213
|
+
/* Results (end) */
|
214
|
+
|
215
|
+
/* Tree (begin) */ /**/
|
216
|
+
.panel .tree
|
217
|
+
{
|
218
|
+
background: white;
|
219
|
+
position: absolute;
|
220
|
+
top: 40px;
|
221
|
+
bottom: 0;
|
222
|
+
left: 0;
|
223
|
+
width: 100%;
|
224
|
+
overflow-y: scroll;
|
225
|
+
overflow-x: hidden;
|
226
|
+
z-index: 30;
|
227
|
+
}
|
228
|
+
|
229
|
+
.panel .tree ul:first-child
|
230
|
+
{
|
231
|
+
background: url(../i/tree_bg.svg);
|
232
|
+
background-size: 1px 60px;
|
233
|
+
}
|
234
|
+
|
235
|
+
.panel .tree li
|
236
|
+
{
|
237
|
+
cursor: pointer;
|
238
|
+
overflow: hidden;
|
239
|
+
height: 30px;
|
240
|
+
line-height: 100%;
|
241
|
+
}
|
242
|
+
|
243
|
+
|
244
|
+
.panel .tree li .content
|
245
|
+
{
|
246
|
+
padding-left: 18px;
|
247
|
+
padding-top: 5px;
|
248
|
+
height: 18px;
|
249
|
+
overflow: hidden;
|
250
|
+
position: relative;
|
251
|
+
}
|
252
|
+
|
253
|
+
.panel .tree li .icon
|
254
|
+
{
|
255
|
+
width: 10px;
|
256
|
+
height: 9px;
|
257
|
+
background: url(../i/arrow-down.svg);
|
258
|
+
background-size: 10px;
|
259
|
+
position: absolute;
|
260
|
+
left: 1px;
|
261
|
+
top: 8px;
|
262
|
+
cursor: default;
|
263
|
+
}
|
264
|
+
|
265
|
+
.panel .tree li.closed .icon
|
266
|
+
{
|
267
|
+
background: url(../i/arrow-right.svg);
|
268
|
+
background-size: 10px;
|
269
|
+
}
|
270
|
+
|
271
|
+
.panel .tree ul li h1
|
272
|
+
{
|
273
|
+
font-size: 13px;
|
274
|
+
font-weight: normal;
|
275
|
+
color: #000;
|
276
|
+
margin-bottom: 2px;
|
277
|
+
white-space: nowrap;
|
278
|
+
}
|
279
|
+
|
280
|
+
.panel .tree ul li p
|
281
|
+
{
|
282
|
+
font-size: 11px;
|
283
|
+
color: #666;
|
284
|
+
margin-bottom: 2px;
|
285
|
+
white-space: nowrap;
|
286
|
+
}
|
287
|
+
|
288
|
+
.panel .tree ul li h1 i
|
289
|
+
{
|
290
|
+
color: #999;
|
291
|
+
font-style: normal;
|
292
|
+
}
|
293
|
+
|
294
|
+
.panel .tree ul li.current h1 i
|
295
|
+
{
|
296
|
+
color: #CCC;
|
297
|
+
}
|
298
|
+
|
299
|
+
.panel .tree ul li.empty
|
300
|
+
{
|
301
|
+
cursor: text;
|
302
|
+
}
|
303
|
+
|
304
|
+
.panel .tree ul li.empty h1,
|
305
|
+
.panel .tree ul li.empty p
|
306
|
+
{
|
307
|
+
color: #666;
|
308
|
+
font-style: italic;
|
309
|
+
}
|
310
|
+
|
311
|
+
.panel .tree ul li.current
|
312
|
+
{
|
313
|
+
background: #B61D1D;
|
314
|
+
}
|
315
|
+
|
316
|
+
.panel .tree ul li.current .icon
|
317
|
+
{
|
318
|
+
background: url(../i/arrow-right.svg);
|
319
|
+
background-size: 10px;
|
320
|
+
}
|
321
|
+
|
322
|
+
.panel .tree ul li.current.closed .icon
|
323
|
+
{
|
324
|
+
background: url(../i/arrow-down.svg);
|
325
|
+
background-size: 10px;
|
326
|
+
}
|
327
|
+
|
328
|
+
.panel .tree ul li.current h1
|
329
|
+
{
|
330
|
+
color: #FFF;
|
331
|
+
}
|
332
|
+
|
333
|
+
.panel .tree ul li.current p
|
334
|
+
{
|
335
|
+
color: #CCC;
|
336
|
+
}
|
337
|
+
|
338
|
+
.panel .tree ul li.current.empty h1,
|
339
|
+
.panel .tree ul li.current.empty p
|
340
|
+
{
|
341
|
+
color: #999;
|
342
|
+
}
|
343
|
+
|
344
|
+
.panel .tree ul li:hover
|
345
|
+
{
|
346
|
+
background: #d0d0d0;
|
347
|
+
}
|
348
|
+
|
349
|
+
.panel .tree ul li.current:hover
|
350
|
+
{
|
351
|
+
background: #B61D1D;
|
352
|
+
}
|
353
|
+
|
354
|
+
.panel .tree .stopper
|
355
|
+
{
|
356
|
+
display: none;
|
357
|
+
}
|
358
|
+
/* Tree (end) */ /**/
|
359
|
+
|
360
|
+
/* Panel (end) */
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/* http://meyerweb.com/eric/tools/css/reset/ */
|
2
|
+
/* v1.0 | 20080212 */
|
3
|
+
|
4
|
+
html, body, div, span, applet, object, iframe,
|
5
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
6
|
+
a, abbr, acronym, address, big, cite, code,
|
7
|
+
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
8
|
+
small, strike, strong, sub, sup, tt, var,
|
9
|
+
b, u, i, center,
|
10
|
+
dl, dt, dd, ol, ul, li,
|
11
|
+
fieldset, form, label, legend,
|
12
|
+
table, caption, tbody, tfoot, thead, tr, th, td {
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
border: 0;
|
16
|
+
outline: 0;
|
17
|
+
font-size: 100%;
|
18
|
+
vertical-align: baseline;
|
19
|
+
background: transparent;
|
20
|
+
}
|
21
|
+
body {
|
22
|
+
line-height: 1;
|
23
|
+
}
|
24
|
+
ol, ul {
|
25
|
+
list-style: none;
|
26
|
+
}
|
27
|
+
blockquote, q {
|
28
|
+
quotes: none;
|
29
|
+
}
|
30
|
+
blockquote:before, blockquote:after,
|
31
|
+
q:before, q:after {
|
32
|
+
content: '';
|
33
|
+
content: none;
|
34
|
+
}
|
35
|
+
|
36
|
+
/* remember to highlight inserts somehow! */
|
37
|
+
ins {
|
38
|
+
text-decoration: none;
|
39
|
+
}
|
40
|
+
del {
|
41
|
+
text-decoration: line-through;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* tables still need 'cellspacing="0"' in the markup */
|
45
|
+
table {
|
46
|
+
border-collapse: collapse;
|
47
|
+
border-spacing: 0;
|
48
|
+
}
|
Binary file
|
@@ -0,0 +1,418 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>README.md</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
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
<div class="banner">
|
17
|
+
|
18
|
+
<h1>
|
19
|
+
README.md
|
20
|
+
</h1>
|
21
|
+
<ul class="files">
|
22
|
+
|
23
|
+
<li>
|
24
|
+
README.md
|
25
|
+
|
26
|
+
</li>
|
27
|
+
<li>Last modified: 2018-03-11 21:20:16 +1300</li>
|
28
|
+
</ul>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="bodyContent">
|
32
|
+
<div id="content">
|
33
|
+
|
34
|
+
<div class="description">
|
35
|
+
|
36
|
+
<h1 id="label-Nanook"><a href="../classes/Nanook.html">Nanook</a></h1>
|
37
|
+
|
38
|
+
<p>This is a Ruby library for managing a <a href="https://nano.org/">nano
|
39
|
+
currency</a> node, including making and receiving payments, using the <a
|
40
|
+
href="https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol">nano RPC
|
41
|
+
protocol</a>. Nano is a fee-less, fast, environmentally-friendly
|
42
|
+
cryptocurrency. It's awesome. See <a
|
43
|
+
href="https://nano.org/">nano.org</a>.</p>
|
44
|
+
|
45
|
+
<p><a href="https://badge.fury.io/rb/nanook"><img
|
46
|
+
src="https://badge.fury.io/rb/nanook.svg"></a> <a
|
47
|
+
href="https://circleci.com/gh/lukes/nanook/tree/master"><img
|
48
|
+
src="https://circleci.com/gh/lukes/nanook/tree/master.svg?style=shield"></a></p>
|
49
|
+
|
50
|
+
<h2 id="label-Installation">Installation</h2>
|
51
|
+
|
52
|
+
<p>Add this line to your application's Gemfile:</p>
|
53
|
+
|
54
|
+
<pre><code>gem 'nanook', "~> 0.7"
|
55
|
+
</code></pre>
|
56
|
+
|
57
|
+
<p>And then execute:</p>
|
58
|
+
|
59
|
+
<pre><code>$ bundle
|
60
|
+
</code></pre>
|
61
|
+
|
62
|
+
<p>Or install it yourself as:</p>
|
63
|
+
|
64
|
+
<pre><code>$ gem install nanook
|
65
|
+
</code></pre>
|
66
|
+
|
67
|
+
<h1 id="label-Getting+Started">Getting Started</h1>
|
68
|
+
|
69
|
+
<h2 id="label-Initializing">Initializing</h2>
|
70
|
+
|
71
|
+
<p><a href="../classes/Nanook.html">Nanook</a> will by default connect to
|
72
|
+
<code>http://localhost:7076</code>.</p>
|
73
|
+
|
74
|
+
<pre><code>nanook = Nanook.new
|
75
|
+
</code></pre>
|
76
|
+
|
77
|
+
<p>To connect to another host instead:</p>
|
78
|
+
|
79
|
+
<pre><code>nanook = Nanook.new("http://ip6-localhost:7076")
|
80
|
+
</code></pre>
|
81
|
+
|
82
|
+
<h2 id="label-Basics">Basics</h2>
|
83
|
+
|
84
|
+
<h3 id="label-Working+with+wallets+and+accounts">Working with wallets and accounts</h3>
|
85
|
+
|
86
|
+
<p>Create a wallet:</p>
|
87
|
+
|
88
|
+
<pre><code>Nanook.new.wallet.create
|
89
|
+
</code></pre>
|
90
|
+
|
91
|
+
<p>Create an account within a wallet:</p>
|
92
|
+
|
93
|
+
<pre><code>Nanook.new.wallet(wallet_id).account.create
|
94
|
+
</code></pre>
|
95
|
+
|
96
|
+
<p>List accounts within a wallet:</p>
|
97
|
+
|
98
|
+
<pre><code>Nanook.new.wallet(wallet_id).accounts
|
99
|
+
</code></pre>
|
100
|
+
|
101
|
+
<h3 id="label-Sending+a+payment">Sending a payment</h3>
|
102
|
+
|
103
|
+
<p>You can send a payment from an account in a wallet:</p>
|
104
|
+
|
105
|
+
<pre><code>account = Nanook.new.wallet(wallet_id).account(account_id)
|
106
|
+
account.pay(to: recipient_account_id, amount: 0.2, id: unique_id)
|
107
|
+
</code></pre>
|
108
|
+
|
109
|
+
<p>Or, a wallet:</p>
|
110
|
+
|
111
|
+
<pre><code>wallet = Nanook.new.wallet(wallet_id)
|
112
|
+
wallet.pay(from: your_account_id, to: recipient_account_id, amount: 0.2, id: unique_id)
|
113
|
+
</code></pre>
|
114
|
+
|
115
|
+
<p>The <code>id</code> can be any string and needs to be unique per payment.
|
116
|
+
It serves an important purpose; it allows you to make this call multiple
|
117
|
+
times with the same <code>id</code> and be reassured that you will only
|
118
|
+
ever send that nano payment once. From the <a
|
119
|
+
href="https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol#account-create">Nano
|
120
|
+
RPC</a>:</p>
|
121
|
+
|
122
|
+
<blockquote>
|
123
|
+
<p>You can (and should) specify a unique id for each spend to provide
|
124
|
+
idempotency. That means that if you [make the payment call] two times with
|
125
|
+
the same id, the second request won't send any additional Nano.</p>
|
126
|
+
</blockquote>
|
127
|
+
|
128
|
+
<p>The unit of the <code>amount</code> is NANO (which is currently technically
|
129
|
+
1Mnano — see <a href="https://nano.org/en/faq#what-are-nano-units-">What
|
130
|
+
are Nano’s Units</a>).</p>
|
131
|
+
|
132
|
+
<p>Note, there may be a delay in receiving a response due to Proof of Work
|
133
|
+
being done. From the <a
|
134
|
+
href="https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol#account-create">Nano
|
135
|
+
RPC</a>:</p>
|
136
|
+
|
137
|
+
<blockquote>
|
138
|
+
<p>Proof of Work is precomputed for one transaction in the background. If it
|
139
|
+
has been a while since your last transaction it will send instantly, the
|
140
|
+
next one will need to wait for Proof of Work to be generated.</p>
|
141
|
+
</blockquote>
|
142
|
+
|
143
|
+
<h3 id="label-Receiving+a+payment">Receiving a payment</h3>
|
144
|
+
|
145
|
+
<p>The simplest way to receive a payment is:</p>
|
146
|
+
|
147
|
+
<pre><code>account = Nanook.new.wallet(wallet_id).account(account_id)
|
148
|
+
account.receive
|
149
|
+
|
150
|
+
# or:
|
151
|
+
|
152
|
+
wallet = Nanook.new.wallet(wallet_id)
|
153
|
+
wallet.receive(into: account_id)
|
154
|
+
</code></pre>
|
155
|
+
|
156
|
+
<p>The <code>receive</code> method when called as above will receive the
|
157
|
+
latest pending payment for an account in a wallet. It will either return a
|
158
|
+
block hash if a payment was received, or <code>false</code> if there were
|
159
|
+
no pending payments to receive.</p>
|
160
|
+
|
161
|
+
<p>You can also receive a specific pending block if you know it (you may have
|
162
|
+
discovered it through calling <code>account.pending</code> for example):</p>
|
163
|
+
|
164
|
+
<pre><code>account = Nanook.new.wallet(wallet_id).account(account_id)
|
165
|
+
account.receive(block_id)
|
166
|
+
|
167
|
+
# or:
|
168
|
+
|
169
|
+
wallet = Nanook.new.wallet(wallet_id)
|
170
|
+
wallet.receive(block_id, into: account_id)
|
171
|
+
</code></pre>
|
172
|
+
|
173
|
+
<h2 id="label-All+commands">All commands</h2>
|
174
|
+
|
175
|
+
<h3 id="label-Wallets">Wallets</h3>
|
176
|
+
|
177
|
+
<p>See the <a
|
178
|
+
href="https://lukes.github.io/nanook/0.7.0/classes/Nanook/Wallet.html">full
|
179
|
+
documentation for Nanook::Wallet</a> for a detailed description of each
|
180
|
+
method and example responses.</p>
|
181
|
+
|
182
|
+
<h4 id="label-Create+wallet-3A">Create wallet:</h4>
|
183
|
+
|
184
|
+
<pre><code>Nanook.new.wallet.create
|
185
|
+
</code></pre>
|
186
|
+
|
187
|
+
<h4 id="label-Working+with+a+single+wallet-3A">Working with a single wallet:</h4>
|
188
|
+
|
189
|
+
<pre><code>wallet = Nanook.new.wallet(wallet_id)
|
190
|
+
|
191
|
+
wallet.export
|
192
|
+
wallet.locked?
|
193
|
+
wallet.unlock(password)
|
194
|
+
wallet.change_password(password)
|
195
|
+
|
196
|
+
wallet.balance
|
197
|
+
wallet.balance(account_break_down: true)
|
198
|
+
wallet.pay(from: your_account_id, to: recipient_account_id, amount: 0.2, id: unique_id)
|
199
|
+
wallet.receive(into: account_id)
|
200
|
+
wallet.receive(pending_block_id, into: account_id)
|
201
|
+
|
202
|
+
wallet.account.create
|
203
|
+
wallet.accounts
|
204
|
+
wallet.contains?(account_id)
|
205
|
+
|
206
|
+
wallet.destroy
|
207
|
+
</code></pre>
|
208
|
+
|
209
|
+
<h3 id="label-Accounts">Accounts</h3>
|
210
|
+
|
211
|
+
<h4 id="label-Create+account-3A">Create account:</h4>
|
212
|
+
|
213
|
+
<pre><code>Nanook.new.wallet(wallet_id).account.create
|
214
|
+
</code></pre>
|
215
|
+
|
216
|
+
<h4 id="label-Working+with+a+single+account-3A">Working with a single account:</h4>
|
217
|
+
|
218
|
+
<pre><code>account = Nanook.new.wallet(wallet_id).account(account_id)
|
219
|
+
|
220
|
+
account.exists?
|
221
|
+
account.info
|
222
|
+
account.info(detailed: true)
|
223
|
+
account.ledger
|
224
|
+
account.ledger(limit: 10)
|
225
|
+
account.history
|
226
|
+
account.history(limit: 1)
|
227
|
+
account.public_key
|
228
|
+
account.delegators
|
229
|
+
account.representative
|
230
|
+
account.weight
|
231
|
+
|
232
|
+
account.balance
|
233
|
+
account.pay(to: recipient_account_id, amount: 0.2, id: unique_id)
|
234
|
+
account.pending
|
235
|
+
account.pending(limit: 1)
|
236
|
+
account.receive
|
237
|
+
account.receive(pending_block_id)
|
238
|
+
|
239
|
+
account.destroy
|
240
|
+
</code></pre>
|
241
|
+
|
242
|
+
<h4 id="label-Working+with+any+account+-28not+necessarily+in+your+wallet-29-3A">Working with any account (not necessarily in your wallet):</h4>
|
243
|
+
|
244
|
+
<p>See the <a
|
245
|
+
href="https://lukes.github.io/nanook/0.7.0/classes/Nanook/Account.html">full
|
246
|
+
documentation for Nanook::Account</a> for a detailed description of each
|
247
|
+
method and example responses.</p>
|
248
|
+
|
249
|
+
<pre><code>account = Nanook.new.account(account_id)
|
250
|
+
|
251
|
+
account.exists?
|
252
|
+
account.info
|
253
|
+
account.info(detailed: true)
|
254
|
+
account.ledger
|
255
|
+
account.ledger(limit: 10)
|
256
|
+
account.history
|
257
|
+
account.history(limit: 1)
|
258
|
+
account.public_key
|
259
|
+
account.delegators
|
260
|
+
account.representative
|
261
|
+
account.weight
|
262
|
+
|
263
|
+
account.balance
|
264
|
+
account.pending
|
265
|
+
account.pending(limit: 1)
|
266
|
+
</code></pre>
|
267
|
+
|
268
|
+
<h3 id="label-Blocks">Blocks</h3>
|
269
|
+
|
270
|
+
<pre><code>block = Nanook.new.block(block_id)
|
271
|
+
|
272
|
+
block.info # Verified blocks in the ledger
|
273
|
+
block.info(allow_unchecked: true) # Verified blocks AND unchecked synchronizing blocks
|
274
|
+
block.account
|
275
|
+
block.chain
|
276
|
+
block.chain(limit: 10)
|
277
|
+
block.history
|
278
|
+
block.history(limit: 10)
|
279
|
+
block.republish
|
280
|
+
block.republish(sources: 2)
|
281
|
+
block.republish(destinations: 2)
|
282
|
+
block.pending?
|
283
|
+
block.process
|
284
|
+
block.successors
|
285
|
+
block.successors(limit: 10)
|
286
|
+
|
287
|
+
block.generate_work
|
288
|
+
block.cancel_work
|
289
|
+
block.is_valid_work?(work_id)
|
290
|
+
</code></pre>
|
291
|
+
|
292
|
+
<h3 id="label-Managing+your+nano+node">Managing your nano node</h3>
|
293
|
+
|
294
|
+
<pre><code>node = Nanook.new.node
|
295
|
+
|
296
|
+
node.block_count
|
297
|
+
node.block_count_type
|
298
|
+
node.bootstrap_any
|
299
|
+
node.bootstrap(address: "::ffff:138.201.94.249", port: 7075)
|
300
|
+
node.frontier_count
|
301
|
+
node.peers
|
302
|
+
node.representatives
|
303
|
+
node.representatives
|
304
|
+
node.sync_progress
|
305
|
+
node.synced?
|
306
|
+
node.version
|
307
|
+
|
308
|
+
node.stop
|
309
|
+
</code></pre>
|
310
|
+
|
311
|
+
<h3 id="label-Work+peers">Work peers</h3>
|
312
|
+
|
313
|
+
<pre><code>work_peers = Nanook.new.work_peers
|
314
|
+
|
315
|
+
work_peers.add(address: "::ffff:172.17.0.1:7076", port: 7076)
|
316
|
+
work_peers.clear
|
317
|
+
work_peers.list
|
318
|
+
</code></pre>
|
319
|
+
|
320
|
+
<h3 id="label-Keys">Keys</h3>
|
321
|
+
|
322
|
+
<h4 id="label-Create+private+public+key+pair-3A">Create private public key pair:</h4>
|
323
|
+
|
324
|
+
<pre><code>Nanook.new.key.generate
|
325
|
+
Nanook.new.key.generate(seed: seed, index: 0)
|
326
|
+
</code></pre>
|
327
|
+
|
328
|
+
<h4 id="label-Working+with+a+single+key">Working with a single key</h4>
|
329
|
+
|
330
|
+
<pre><code>key = Nanook.new.key(private_key)
|
331
|
+
|
332
|
+
key.info
|
333
|
+
</code></pre>
|
334
|
+
|
335
|
+
<h2 id="label-Nanook+Metal"><a href="../classes/Nanook.html">Nanook</a> Metal</h2>
|
336
|
+
|
337
|
+
<p>You can do any call listed in the <a
|
338
|
+
href="https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol">Nano
|
339
|
+
RPC</a> directly through the <code>rpc</code> method. The first argument
|
340
|
+
should match the <code>action</code> of the RPC call, and then all
|
341
|
+
remaining parameters are passed in as arguments.</p>
|
342
|
+
|
343
|
+
<p>E.g., the <a
|
344
|
+
href="https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol#accounts-create">accounts_create
|
345
|
+
command</a> can be called like this:</p>
|
346
|
+
|
347
|
+
<pre><code>Nano.new.rpc(:accounts_create, wallet: wallet_id, count: 2)
|
348
|
+
</code></pre>
|
349
|
+
|
350
|
+
<h2 id="label-Contributing">Contributing</h2>
|
351
|
+
|
352
|
+
<p>Bug reports and pull requests are welcome. Pull requests with passing tests
|
353
|
+
are even better.</p>
|
354
|
+
|
355
|
+
<p>To run the test suite:</p>
|
356
|
+
|
357
|
+
<pre><code>bundle exec rspec spec
|
358
|
+
</code></pre>
|
359
|
+
|
360
|
+
<h2 id="label-License">License</h2>
|
361
|
+
|
362
|
+
<p>The gem is available as open source under the terms of the <a
|
363
|
+
href="https://opensource.org/licenses/MIT">MIT License</a>.</p>
|
364
|
+
|
365
|
+
<h2 id="label-Buy+me+a+nano+coffee">Buy me a nano coffee</h2>
|
366
|
+
|
367
|
+
<p>This library is totally free to use, but feel free to send some nano <a
|
368
|
+
href="https://www.nanode.co/account/xrb_3c3ek3k8135f6e8qtfy8eruk9q3yzmpebes7btzncccdest8ymzhjmnr196j">my
|
369
|
+
way</a> if you'd like to!</p>
|
370
|
+
|
371
|
+
<pre><code>xrb_3c3ek3k8135f6e8qtfy8eruk9q3yzmpebes7btzncccdest8ymzhjmnr196j
|
372
|
+
</code></pre>
|
373
|
+
|
374
|
+
<p><img
|
375
|
+
src="https://raw.githubusercontent.com/lukes/nanook/master/img/qr.png"></p>
|
376
|
+
|
377
|
+
</div>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
<!-- Methods -->
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
</div>
|
415
|
+
|
416
|
+
</div>
|
417
|
+
</body>
|
418
|
+
</html>
|