nanook 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nanook/version.rb +1 -1
- data/nanook.gemspec +1 -1
- metadata +1 -185
- data/docs/0.7.0/apple-touch-icon.png +0 -0
- data/docs/0.7.0/classes/Nanook.html +0 -572
- data/docs/0.7.0/classes/Nanook/Account.html +0 -909
- data/docs/0.7.0/classes/Nanook/Block.html +0 -717
- data/docs/0.7.0/classes/Nanook/Error.html +0 -84
- data/docs/0.7.0/classes/Nanook/Key.html +0 -253
- data/docs/0.7.0/classes/Nanook/Node.html +0 -657
- data/docs/0.7.0/classes/Nanook/Rpc.html +0 -247
- data/docs/0.7.0/classes/Nanook/Util.html +0 -197
- data/docs/0.7.0/classes/Nanook/Wallet.html +0 -986
- data/docs/0.7.0/classes/Nanook/WalletAccount.html +0 -446
- data/docs/0.7.0/classes/Nanook/WorkPeer.html +0 -294
- data/docs/0.7.0/created.rid +0 -14
- data/docs/0.7.0/css/github.css +0 -123
- data/docs/0.7.0/css/main.css +0 -374
- data/docs/0.7.0/css/panel.css +0 -360
- data/docs/0.7.0/css/reset.css +0 -48
- data/docs/0.7.0/favicon.ico +0 -0
- data/docs/0.7.0/files/README_md.html +0 -418
- data/docs/0.7.0/files/lib/nanook/account_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/block_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/error_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/key_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/node_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/rpc_rb.html +0 -99
- data/docs/0.7.0/files/lib/nanook/util_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/version_rb.html +0 -84
- data/docs/0.7.0/files/lib/nanook/wallet_account_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/wallet_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook/work_peer_rb.html +0 -89
- data/docs/0.7.0/files/lib/nanook_rb.html +0 -94
- data/docs/0.7.0/i/arrow-down.svg +0 -8
- data/docs/0.7.0/i/arrow-right.svg +0 -8
- data/docs/0.7.0/i/search.svg +0 -12
- data/docs/0.7.0/i/tree_bg.svg +0 -8
- data/docs/0.7.0/index.html +0 -11
- data/docs/0.7.0/js/highlight.pack.js +0 -1
- data/docs/0.7.0/js/jquery-1.3.2.min.js +0 -19
- data/docs/0.7.0/js/main.js +0 -25
- data/docs/0.7.0/js/navigation.js +0 -142
- data/docs/0.7.0/js/search_index.js +0 -1
- data/docs/0.7.0/js/searchdoc.js +0 -465
- data/docs/0.7.0/js/searcher.js +0 -229
- data/docs/0.7.0/panel/index.html +0 -47
- data/docs/0.7.0/panel/links.html +0 -32
- data/docs/0.7.0/panel/tree.js +0 -1
- data/docs/0.8.0/apple-touch-icon.png +0 -0
- data/docs/0.8.0/classes/Nanook.html +0 -621
- data/docs/0.8.0/classes/Nanook/Account.html +0 -971
- data/docs/0.8.0/classes/Nanook/Block.html +0 -759
- data/docs/0.8.0/classes/Nanook/Error.html +0 -84
- data/docs/0.8.0/classes/Nanook/Key.html +0 -295
- data/docs/0.8.0/classes/Nanook/Node.html +0 -657
- data/docs/0.8.0/classes/Nanook/Rpc.html +0 -247
- data/docs/0.8.0/classes/Nanook/Util.html +0 -264
- data/docs/0.8.0/classes/Nanook/Wallet.html +0 -1056
- data/docs/0.8.0/classes/Nanook/WalletAccount.html +0 -582
- data/docs/0.8.0/classes/Nanook/WorkPeer.html +0 -294
- data/docs/0.8.0/created.rid +0 -14
- data/docs/0.8.0/css/github.css +0 -123
- data/docs/0.8.0/css/main.css +0 -374
- data/docs/0.8.0/css/panel.css +0 -360
- data/docs/0.8.0/css/reset.css +0 -48
- data/docs/0.8.0/favicon.ico +0 -0
- data/docs/0.8.0/files/README_md.html +0 -423
- data/docs/0.8.0/files/lib/nanook/account_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/block_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/error_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/key_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/node_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/rpc_rb.html +0 -99
- data/docs/0.8.0/files/lib/nanook/util_rb.html +0 -97
- data/docs/0.8.0/files/lib/nanook/version_rb.html +0 -84
- data/docs/0.8.0/files/lib/nanook/wallet_account_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/wallet_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook/work_peer_rb.html +0 -89
- data/docs/0.8.0/files/lib/nanook_rb.html +0 -94
- data/docs/0.8.0/i/arrow-down.svg +0 -8
- data/docs/0.8.0/i/arrow-right.svg +0 -8
- data/docs/0.8.0/i/search.svg +0 -12
- data/docs/0.8.0/i/tree_bg.svg +0 -8
- data/docs/0.8.0/index.html +0 -11
- data/docs/0.8.0/js/highlight.pack.js +0 -1
- data/docs/0.8.0/js/jquery-1.3.2.min.js +0 -19
- data/docs/0.8.0/js/main.js +0 -25
- data/docs/0.8.0/js/navigation.js +0 -142
- data/docs/0.8.0/js/search_index.js +0 -1
- data/docs/0.8.0/js/searchdoc.js +0 -465
- data/docs/0.8.0/js/searcher.js +0 -229
- data/docs/0.8.0/panel/index.html +0 -47
- data/docs/0.8.0/panel/links.html +0 -32
- data/docs/0.8.0/panel/tree.js +0 -1
- data/docs/1.0.0/apple-touch-icon.png +0 -0
- data/docs/1.0.0/classes/Nanook.html +0 -621
- data/docs/1.0.0/classes/Nanook/Account.html +0 -989
- data/docs/1.0.0/classes/Nanook/Block.html +0 -929
- data/docs/1.0.0/classes/Nanook/Error.html +0 -84
- data/docs/1.0.0/classes/Nanook/Key.html +0 -295
- data/docs/1.0.0/classes/Nanook/Node.html +0 -657
- data/docs/1.0.0/classes/Nanook/Rpc.html +0 -247
- data/docs/1.0.0/classes/Nanook/Util.html +0 -264
- data/docs/1.0.0/classes/Nanook/Wallet.html +0 -1084
- data/docs/1.0.0/classes/Nanook/WalletAccount.html +0 -582
- data/docs/1.0.0/classes/Nanook/WorkPeer.html +0 -294
- data/docs/1.0.0/created.rid +0 -14
- data/docs/1.0.0/css/github.css +0 -123
- data/docs/1.0.0/css/main.css +0 -374
- data/docs/1.0.0/css/panel.css +0 -360
- data/docs/1.0.0/css/reset.css +0 -48
- data/docs/1.0.0/favicon.ico +0 -0
- data/docs/1.0.0/files/README_md.html +0 -443
- data/docs/1.0.0/files/lib/nanook/account_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/block_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/error_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/key_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/node_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/rpc_rb.html +0 -99
- data/docs/1.0.0/files/lib/nanook/util_rb.html +0 -97
- data/docs/1.0.0/files/lib/nanook/version_rb.html +0 -84
- data/docs/1.0.0/files/lib/nanook/wallet_account_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/wallet_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook/work_peer_rb.html +0 -89
- data/docs/1.0.0/files/lib/nanook_rb.html +0 -94
- data/docs/1.0.0/i/arrow-down.svg +0 -8
- data/docs/1.0.0/i/arrow-right.svg +0 -8
- data/docs/1.0.0/i/search.svg +0 -12
- data/docs/1.0.0/i/tree_bg.svg +0 -8
- data/docs/1.0.0/index.html +0 -11
- data/docs/1.0.0/js/highlight.pack.js +0 -1
- data/docs/1.0.0/js/jquery-1.3.2.min.js +0 -19
- data/docs/1.0.0/js/main.js +0 -25
- data/docs/1.0.0/js/navigation.js +0 -142
- data/docs/1.0.0/js/search_index.js +0 -1
- data/docs/1.0.0/js/searchdoc.js +0 -465
- data/docs/1.0.0/js/searcher.js +0 -229
- data/docs/1.0.0/panel/index.html +0 -47
- data/docs/1.0.0/panel/links.html +0 -32
- data/docs/1.0.0/panel/tree.js +0 -1
- data/docs/apple-touch-icon.png +0 -0
- data/docs/classes/Nanook.html +0 -572
- data/docs/classes/Nanook/Account.html +0 -907
- data/docs/classes/Nanook/Block.html +0 -717
- data/docs/classes/Nanook/Error.html +0 -84
- data/docs/classes/Nanook/Key.html +0 -253
- data/docs/classes/Nanook/Node.html +0 -657
- data/docs/classes/Nanook/Rpc.html +0 -247
- data/docs/classes/Nanook/Util.html +0 -197
- data/docs/classes/Nanook/Wallet.html +0 -778
- data/docs/classes/Nanook/WalletAccount.html +0 -447
- data/docs/classes/Nanook/WorkPeer.html +0 -294
- data/docs/created.rid +0 -14
- data/docs/css/github.css +0 -123
- data/docs/css/main.css +0 -374
- data/docs/css/panel.css +0 -360
- data/docs/css/reset.css +0 -48
- data/docs/favicon.ico +0 -0
- data/docs/files/README_md.html +0 -408
- data/docs/files/lib/nanook/account_rb.html +0 -89
- data/docs/files/lib/nanook/block_rb.html +0 -89
- data/docs/files/lib/nanook/error_rb.html +0 -89
- data/docs/files/lib/nanook/key_rb.html +0 -89
- data/docs/files/lib/nanook/node_rb.html +0 -89
- data/docs/files/lib/nanook/rpc_rb.html +0 -99
- data/docs/files/lib/nanook/util_rb.html +0 -89
- data/docs/files/lib/nanook/version_rb.html +0 -84
- data/docs/files/lib/nanook/wallet_account_rb.html +0 -89
- data/docs/files/lib/nanook/wallet_rb.html +0 -89
- data/docs/files/lib/nanook/work_peer_rb.html +0 -89
- data/docs/files/lib/nanook_rb.html +0 -94
- data/docs/i/arrow-down.svg +0 -8
- data/docs/i/arrow-right.svg +0 -8
- data/docs/i/search.svg +0 -12
- data/docs/i/tree_bg.svg +0 -8
- data/docs/index.html +0 -11
- data/docs/js/highlight.pack.js +0 -1
- data/docs/js/jquery-1.3.2.min.js +0 -19
- data/docs/js/main.js +0 -25
- data/docs/js/navigation.js +0 -142
- data/docs/js/search_index.js +0 -1
- data/docs/js/searchdoc.js +0 -465
- data/docs/js/searcher.js +0 -229
- data/docs/panel/index.html +0 -47
- data/docs/panel/links.html +0 -32
- data/docs/panel/tree.js +0 -1
@@ -1,582 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<title>Nanook::WalletAccount</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::WalletAccount">
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<meta name="keywords" content="Nanook::WalletAccount class">
|
19
|
-
|
20
|
-
<meta name="keywords" content="new, account_id, create, destroy, pay, receive, wallet_id, method_missing">
|
21
|
-
|
22
|
-
</head>
|
23
|
-
|
24
|
-
<body>
|
25
|
-
<div class="banner">
|
26
|
-
|
27
|
-
<h1>
|
28
|
-
<span class="type">Class</span>
|
29
|
-
Nanook::WalletAccount
|
30
|
-
|
31
|
-
<span class="parent"><
|
32
|
-
|
33
|
-
Object
|
34
|
-
|
35
|
-
</span>
|
36
|
-
|
37
|
-
</h1>
|
38
|
-
<ul class="files">
|
39
|
-
|
40
|
-
<li><a href="../../files/lib/nanook/wallet_account_rb.html">lib/nanook/wallet_account.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>A</dt>
|
65
|
-
<dd>
|
66
|
-
<ul>
|
67
|
-
|
68
|
-
|
69
|
-
<li>
|
70
|
-
<a href="#method-i-account_id">account_id</a>
|
71
|
-
</li>
|
72
|
-
|
73
|
-
</ul>
|
74
|
-
</dd>
|
75
|
-
|
76
|
-
<dt>C</dt>
|
77
|
-
<dd>
|
78
|
-
<ul>
|
79
|
-
|
80
|
-
|
81
|
-
<li>
|
82
|
-
<a href="#method-i-create">create</a>
|
83
|
-
</li>
|
84
|
-
|
85
|
-
</ul>
|
86
|
-
</dd>
|
87
|
-
|
88
|
-
<dt>D</dt>
|
89
|
-
<dd>
|
90
|
-
<ul>
|
91
|
-
|
92
|
-
|
93
|
-
<li>
|
94
|
-
<a href="#method-i-destroy">destroy</a>
|
95
|
-
</li>
|
96
|
-
|
97
|
-
</ul>
|
98
|
-
</dd>
|
99
|
-
|
100
|
-
<dt>M</dt>
|
101
|
-
<dd>
|
102
|
-
<ul>
|
103
|
-
|
104
|
-
|
105
|
-
<li>
|
106
|
-
<a href="#method-i-method_missing">method_missing</a>
|
107
|
-
</li>
|
108
|
-
|
109
|
-
</ul>
|
110
|
-
</dd>
|
111
|
-
|
112
|
-
<dt>N</dt>
|
113
|
-
<dd>
|
114
|
-
<ul>
|
115
|
-
|
116
|
-
|
117
|
-
<li>
|
118
|
-
<a href="#method-c-new">new</a>
|
119
|
-
</li>
|
120
|
-
|
121
|
-
</ul>
|
122
|
-
</dd>
|
123
|
-
|
124
|
-
<dt>P</dt>
|
125
|
-
<dd>
|
126
|
-
<ul>
|
127
|
-
|
128
|
-
|
129
|
-
<li>
|
130
|
-
<a href="#method-i-pay">pay</a>
|
131
|
-
</li>
|
132
|
-
|
133
|
-
</ul>
|
134
|
-
</dd>
|
135
|
-
|
136
|
-
<dt>R</dt>
|
137
|
-
<dd>
|
138
|
-
<ul>
|
139
|
-
|
140
|
-
|
141
|
-
<li>
|
142
|
-
<a href="#method-i-receive">receive</a>
|
143
|
-
</li>
|
144
|
-
|
145
|
-
</ul>
|
146
|
-
</dd>
|
147
|
-
|
148
|
-
<dt>W</dt>
|
149
|
-
<dd>
|
150
|
-
<ul>
|
151
|
-
|
152
|
-
|
153
|
-
<li>
|
154
|
-
<a href="#method-i-wallet_id">wallet_id</a>
|
155
|
-
</li>
|
156
|
-
|
157
|
-
</ul>
|
158
|
-
</dd>
|
159
|
-
|
160
|
-
</dl>
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<!-- Section constants -->
|
175
|
-
<div class="sectiontitle">Constants</div>
|
176
|
-
<table border='0' cellpadding='5'>
|
177
|
-
|
178
|
-
<tr valign='top'>
|
179
|
-
<td class="attr-name">DEFAULT_UNIT</td>
|
180
|
-
<td>=</td>
|
181
|
-
<td class="attr-value">:nano</td>
|
182
|
-
</tr>
|
183
|
-
|
184
|
-
<tr valign='top'>
|
185
|
-
<td> </td>
|
186
|
-
<td colspan="2" class="attr-desc"></td>
|
187
|
-
</tr>
|
188
|
-
|
189
|
-
|
190
|
-
<tr valign='top'>
|
191
|
-
<td class="attr-name">UNITS</td>
|
192
|
-
<td>=</td>
|
193
|
-
<td class="attr-value">[:raw, :nano]</td>
|
194
|
-
</tr>
|
195
|
-
|
196
|
-
<tr valign='top'>
|
197
|
-
<td> </td>
|
198
|
-
<td colspan="2" class="attr-desc"></td>
|
199
|
-
</tr>
|
200
|
-
|
201
|
-
|
202
|
-
</table>
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
<!-- Methods -->
|
210
|
-
|
211
|
-
<div class="sectiontitle">Class Public methods</div>
|
212
|
-
|
213
|
-
<div class="method">
|
214
|
-
<div class="title method-title" id="method-c-new">
|
215
|
-
|
216
|
-
<b>new</b>(rpc, wallet, account)
|
217
|
-
|
218
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-c-new" name="method-c-new" 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-c-new_source')" id="l_method-c-new_source">show</a>
|
238
|
-
|
239
|
-
</p>
|
240
|
-
<div id="method-c-new_source" class="dyn-source">
|
241
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 7</span>
|
242
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">rpc</span>, <span class="ruby-identifier">wallet</span>, <span class="ruby-identifier">account</span>)
|
243
|
-
<span class="ruby-ivar">@rpc</span> = <span class="ruby-identifier">rpc</span>
|
244
|
-
<span class="ruby-ivar">@wallet</span> = <span class="ruby-identifier">wallet</span>
|
245
|
-
<span class="ruby-ivar">@account</span> = <span class="ruby-identifier">account</span>
|
246
|
-
|
247
|
-
<span class="ruby-comment"># An object to delegate account methods that don't</span>
|
248
|
-
<span class="ruby-comment"># expect a wallet param in the RPC call, to allow this</span>
|
249
|
-
<span class="ruby-comment"># class to support all methods that can be called on Nanook::Account</span>
|
250
|
-
<span class="ruby-ivar">@nanook_account_instance</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Account</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-ivar">@account</span>)
|
251
|
-
|
252
|
-
<span class="ruby-comment"># Wallet instance to call contains? on to check account</span>
|
253
|
-
<span class="ruby-comment"># is in wallet</span>
|
254
|
-
<span class="ruby-ivar">@nanook_wallet_instance</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Wallet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-ivar">@wallet</span>)
|
255
|
-
|
256
|
-
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@account</span>
|
257
|
-
<span class="ruby-identifier">account_must_belong_to_wallet!</span>
|
258
|
-
<span class="ruby-keyword">end</span>
|
259
|
-
<span class="ruby-keyword">end</span></pre>
|
260
|
-
</div>
|
261
|
-
</div>
|
262
|
-
|
263
|
-
</div>
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
<div class="sectiontitle">Instance Public methods</div>
|
268
|
-
|
269
|
-
<div class="method">
|
270
|
-
<div class="title method-title" id="method-i-account_id">
|
271
|
-
|
272
|
-
<b>account_id</b>()
|
273
|
-
|
274
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-account_id" name="method-i-account_id" class="permalink">Link</a>
|
275
|
-
</div>
|
276
|
-
|
277
|
-
|
278
|
-
<div class="description">
|
279
|
-
|
280
|
-
</div>
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
<div class="sourcecode">
|
290
|
-
|
291
|
-
<p class="source-link">
|
292
|
-
Source:
|
293
|
-
<a href="javascript:toggleSource('method-i-account_id_source')" id="l_method-i-account_id_source">show</a>
|
294
|
-
|
295
|
-
</p>
|
296
|
-
<div id="method-i-account_id_source" class="dyn-source">
|
297
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 26</span>
|
298
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">account_id</span>
|
299
|
-
<span class="ruby-ivar">@account</span>
|
300
|
-
<span class="ruby-keyword">end</span></pre>
|
301
|
-
</div>
|
302
|
-
</div>
|
303
|
-
|
304
|
-
</div>
|
305
|
-
|
306
|
-
<div class="method">
|
307
|
-
<div class="title method-title" id="method-i-create">
|
308
|
-
|
309
|
-
<b>create</b>()
|
310
|
-
|
311
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-create" name="method-i-create" class="permalink">Link</a>
|
312
|
-
</div>
|
313
|
-
|
314
|
-
|
315
|
-
<div class="description">
|
316
|
-
|
317
|
-
</div>
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
<div class="sourcecode">
|
327
|
-
|
328
|
-
<p class="source-link">
|
329
|
-
Source:
|
330
|
-
<a href="javascript:toggleSource('method-i-create_source')" id="l_method-i-create_source">show</a>
|
331
|
-
|
332
|
-
</p>
|
333
|
-
<div id="method-i-create_source" class="dyn-source">
|
334
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 30</span>
|
335
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create</span>
|
336
|
-
<span class="ruby-identifier">wallet_required!</span>
|
337
|
-
<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_create</span>)[<span class="ruby-value">:account</span>]
|
338
|
-
<span class="ruby-keyword">end</span></pre>
|
339
|
-
</div>
|
340
|
-
</div>
|
341
|
-
|
342
|
-
</div>
|
343
|
-
|
344
|
-
<div class="method">
|
345
|
-
<div class="title method-title" id="method-i-destroy">
|
346
|
-
|
347
|
-
<b>destroy</b>()
|
348
|
-
|
349
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-destroy" name="method-i-destroy" class="permalink">Link</a>
|
350
|
-
</div>
|
351
|
-
|
352
|
-
|
353
|
-
<div class="description">
|
354
|
-
|
355
|
-
</div>
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
<div class="sourcecode">
|
365
|
-
|
366
|
-
<p class="source-link">
|
367
|
-
Source:
|
368
|
-
<a href="javascript:toggleSource('method-i-destroy_source')" id="l_method-i-destroy_source">show</a>
|
369
|
-
|
370
|
-
</p>
|
371
|
-
<div id="method-i-destroy_source" class="dyn-source">
|
372
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 35</span>
|
373
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">destroy</span>
|
374
|
-
<span class="ruby-identifier">wallet_required!</span>
|
375
|
-
(<span class="ruby-identifier">rpc</span>(<span class="ruby-value">:account_remove</span>)[<span class="ruby-value">:removed</span>] <span class="ruby-operator">==</span> <span class="ruby-value">1</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">success</span><span class="ruby-operator">|</span>
|
376
|
-
<span class="ruby-ivar">@known_valid_accounts</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@account</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">success</span>
|
377
|
-
<span class="ruby-keyword">end</span>
|
378
|
-
<span class="ruby-keyword">end</span></pre>
|
379
|
-
</div>
|
380
|
-
</div>
|
381
|
-
|
382
|
-
</div>
|
383
|
-
|
384
|
-
<div class="method">
|
385
|
-
<div class="title method-title" id="method-i-method_missing">
|
386
|
-
|
387
|
-
<b>method_missing</b>(m, *args, &block)
|
388
|
-
|
389
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-method_missing" name="method-i-method_missing" class="permalink">Link</a>
|
390
|
-
</div>
|
391
|
-
|
392
|
-
|
393
|
-
<div class="description">
|
394
|
-
<p>Any method of <a href="Account.html">Nanook::Account</a> can be called on
|
395
|
-
this class too</p>
|
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-method_missing_source')" id="l_method-i-method_missing_source">show</a>
|
410
|
-
|
411
|
-
</p>
|
412
|
-
<div id="method-i-method_missing_source" class="dyn-source">
|
413
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 98</span>
|
414
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">method_missing</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
415
|
-
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@nanook_account_instance</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">m</span>)
|
416
|
-
<span class="ruby-ivar">@nanook_account_instance</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
417
|
-
<span class="ruby-keyword">else</span>
|
418
|
-
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
419
|
-
<span class="ruby-keyword">end</span>
|
420
|
-
<span class="ruby-keyword">end</span></pre>
|
421
|
-
</div>
|
422
|
-
</div>
|
423
|
-
|
424
|
-
</div>
|
425
|
-
|
426
|
-
<div class="method">
|
427
|
-
<div class="title method-title" id="method-i-pay">
|
428
|
-
|
429
|
-
<b>pay</b>(to:, amount:, unit: DEFAULT_UNIT, id:)
|
430
|
-
|
431
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-pay" name="method-i-pay" class="permalink">Link</a>
|
432
|
-
</div>
|
433
|
-
|
434
|
-
|
435
|
-
<div class="description">
|
436
|
-
|
437
|
-
</div>
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
<div class="sourcecode">
|
447
|
-
|
448
|
-
<p class="source-link">
|
449
|
-
Source:
|
450
|
-
<a href="javascript:toggleSource('method-i-pay_source')" id="l_method-i-pay_source">show</a>
|
451
|
-
|
452
|
-
</p>
|
453
|
-
<div id="method-i-pay_source" class="dyn-source">
|
454
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 46</span>
|
455
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">pay</span>(<span class="ruby-value">to:</span>, <span class="ruby-value">amount:</span>, <span class="ruby-value">unit:</span> <span class="ruby-constant">DEFAULT_UNIT</span>, <span class="ruby-value">id:</span>)
|
456
|
-
<span class="ruby-identifier">wallet_required!</span>
|
457
|
-
|
458
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-constant">UNITS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">unit</span>)
|
459
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"Unsupported unit: #{unit}"</span>)
|
460
|
-
<span class="ruby-keyword">end</span>
|
461
|
-
|
462
|
-
<span class="ruby-comment"># Check that to: account is valid</span>
|
463
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Account</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">to</span>).<span class="ruby-identifier">exists?</span>
|
464
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"To account does not exist (#{to})"</span>)
|
465
|
-
<span class="ruby-keyword">end</span>
|
466
|
-
|
467
|
-
<span class="ruby-identifier">raw</span> = <span class="ruby-keyword">if</span> <span class="ruby-identifier">unit</span>.<span class="ruby-identifier">to_sym</span>.<span class="ruby-identifier">eql?</span>(<span class="ruby-value">:nano</span>)
|
468
|
-
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span>.<span class="ruby-constant">NANO_to_raw</span>(<span class="ruby-identifier">amount</span>)
|
469
|
-
<span class="ruby-keyword">else</span>
|
470
|
-
<span class="ruby-identifier">amount</span>
|
471
|
-
<span class="ruby-keyword">end</span>
|
472
|
-
|
473
|
-
<span class="ruby-comment"># account is called source, so don't use the normal rpc method</span>
|
474
|
-
<span class="ruby-identifier">p</span> = {
|
475
|
-
<span class="ruby-value">wallet:</span> <span class="ruby-ivar">@wallet</span>,
|
476
|
-
<span class="ruby-value">source:</span> <span class="ruby-ivar">@account</span>,
|
477
|
-
<span class="ruby-value">destination:</span> <span class="ruby-identifier">to</span>,
|
478
|
-
<span class="ruby-value">amount:</span> <span class="ruby-identifier">raw</span>,
|
479
|
-
<span class="ruby-value">id:</span> <span class="ruby-identifier">id</span>
|
480
|
-
}
|
481
|
-
|
482
|
-
<span class="ruby-identifier">response</span> = <span class="ruby-ivar">@rpc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-value">:send</span>, <span class="ruby-identifier">p</span>)
|
483
|
-
|
484
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">response</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:error</span>)
|
485
|
-
<span class="ruby-keyword">return</span> <span class="ruby-identifier">response</span>[<span class="ruby-value">:error</span>]
|
486
|
-
<span class="ruby-keyword">end</span>
|
487
|
-
|
488
|
-
<span class="ruby-identifier">response</span>[<span class="ruby-value">:block</span>]
|
489
|
-
<span class="ruby-keyword">end</span></pre>
|
490
|
-
</div>
|
491
|
-
</div>
|
492
|
-
|
493
|
-
</div>
|
494
|
-
|
495
|
-
<div class="method">
|
496
|
-
<div class="title method-title" id="method-i-receive">
|
497
|
-
|
498
|
-
<b>receive</b>(block=nil)
|
499
|
-
|
500
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-receive" name="method-i-receive" class="permalink">Link</a>
|
501
|
-
</div>
|
502
|
-
|
503
|
-
|
504
|
-
<div class="description">
|
505
|
-
<p>Returns false if no block to receive</p>
|
506
|
-
</div>
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
<div class="sourcecode">
|
516
|
-
|
517
|
-
<p class="source-link">
|
518
|
-
Source:
|
519
|
-
<a href="javascript:toggleSource('method-i-receive_source')" id="l_method-i-receive_source">show</a>
|
520
|
-
|
521
|
-
</p>
|
522
|
-
<div id="method-i-receive_source" class="dyn-source">
|
523
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 83</span>
|
524
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">receive</span>(<span class="ruby-identifier">block</span>=<span class="ruby-keyword">nil</span>)
|
525
|
-
<span class="ruby-identifier">wallet_required!</span>
|
526
|
-
|
527
|
-
<span class="ruby-keyword">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
|
528
|
-
<span class="ruby-identifier">_receive_without_block</span>
|
529
|
-
<span class="ruby-keyword">else</span>
|
530
|
-
<span class="ruby-identifier">_receive_with_block</span>(<span class="ruby-identifier">block</span>)
|
531
|
-
<span class="ruby-keyword">end</span>
|
532
|
-
<span class="ruby-keyword">end</span></pre>
|
533
|
-
</div>
|
534
|
-
</div>
|
535
|
-
|
536
|
-
</div>
|
537
|
-
|
538
|
-
<div class="method">
|
539
|
-
<div class="title method-title" id="method-i-wallet_id">
|
540
|
-
|
541
|
-
<b>wallet_id</b>()
|
542
|
-
|
543
|
-
<a href="../../classes/Nanook/WalletAccount.html#method-i-wallet_id" name="method-i-wallet_id" class="permalink">Link</a>
|
544
|
-
</div>
|
545
|
-
|
546
|
-
|
547
|
-
<div class="description">
|
548
|
-
|
549
|
-
</div>
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
<div class="sourcecode">
|
559
|
-
|
560
|
-
<p class="source-link">
|
561
|
-
Source:
|
562
|
-
<a href="javascript:toggleSource('method-i-wallet_id_source')" id="l_method-i-wallet_id_source">show</a>
|
563
|
-
|
564
|
-
</p>
|
565
|
-
<div id="method-i-wallet_id_source" class="dyn-source">
|
566
|
-
<pre><span class="ruby-comment"># File lib/nanook/wallet_account.rb, line 93</span>
|
567
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">wallet_id</span>
|
568
|
-
<span class="ruby-ivar">@wallet</span>
|
569
|
-
<span class="ruby-keyword">end</span></pre>
|
570
|
-
</div>
|
571
|
-
</div>
|
572
|
-
|
573
|
-
</div>
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
</div>
|
579
|
-
|
580
|
-
</div>
|
581
|
-
</body>
|
582
|
-
</html>
|