nanook 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d14b10331b3dab85b1375935f14fdcaf55a0b88
|
|
4
|
+
data.tar.gz: e61770ece8ad4e6e7026fbfe8dea6e037dcb01c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c146f1f0e070da7e3c36bb76d9b2a312f9b8a9dc857bb786ed4425739bcc5bc59a5db6c81d7c7c6601c861039d758b254351ba82cc165f844de27c2b8822b31
|
|
7
|
+
data.tar.gz: 07d753729b387fec8974c9dc9014acea9966945aa00638346391e65fff1feb640e746d01f23450b34db8c7b8c22af2f5efab86c3dd7c0a3c25d277100918aeef
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added this CHANGELOG.md
|
|
12
|
+
- All classes have an `inspect` method
|
|
13
|
+
- New `id` method for `Nanook::Account`, `Nanook::Block`, `Nanook::Key` and `Nanook::Wallet` classes
|
|
14
|
+
- `Nanook::WalletAccount` class has an `account_id` and `wallet_id` method
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Balance checking methods will now return the balance in NANO by default.
|
|
19
|
+
They take an argument `unit:` which can be set to `:raw` to have the
|
|
20
|
+
balance return in raw units.
|
|
21
|
+
- All pay methods continue to take NANO as the default unit, but can now
|
|
22
|
+
also take an argument `unit:` which can be set to `:raw` to have the
|
|
23
|
+
`amount` argument be treated as being in raw instead of NANO.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Removed
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Nanook
|
|
2
2
|
|
|
3
|
-
This is a Ruby library for managing a [nano currency](https://nano.org/) node, including making and receiving payments, using the [nano RPC protocol](https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol). Nano is a fee-less, fast, environmentally-friendly cryptocurrency. It's awesome. See [https://nano.org
|
|
3
|
+
This is a Ruby library for managing a [nano currency](https://nano.org/) node, including making and receiving payments, using the [nano RPC protocol](https://github.com/nanocurrency/raiblocks/wiki/RPC-protocol). Nano is a fee-less, fast, environmentally-friendly cryptocurrency. It's awesome. See [https://nano.org](https://nano.org/).
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/rb/nanook)
|
|
6
6
|
[](https://circleci.com/gh/lukes/nanook/tree/master)
|
|
@@ -11,7 +11,7 @@ This is a Ruby library for managing a [nano currency](https://nano.org/) node, i
|
|
|
11
11
|
Add this line to your application's Gemfile:
|
|
12
12
|
|
|
13
13
|
```ruby
|
|
14
|
-
gem 'nanook'
|
|
14
|
+
gem 'nanook', "~> 1.0"
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
And then execute:
|
|
@@ -26,7 +26,7 @@ Or install it yourself as:
|
|
|
26
26
|
|
|
27
27
|
## Initializing
|
|
28
28
|
|
|
29
|
-
Nanook will by default connect to `http://localhost:7076`.
|
|
29
|
+
Nanook will by default connect to `http://localhost:7076`.
|
|
30
30
|
|
|
31
31
|
```ruby
|
|
32
32
|
nanook = Nanook.new
|
|
@@ -35,7 +35,7 @@ nanook = Nanook.new
|
|
|
35
35
|
To connect to another host instead:
|
|
36
36
|
|
|
37
37
|
```ruby
|
|
38
|
-
nanook = Nanook.new("http://
|
|
38
|
+
nanook = Nanook.new("http://ip6-localhost:7076")
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Basics
|
|
@@ -100,7 +100,7 @@ wallet = Nanook.new.wallet(wallet_id)
|
|
|
100
100
|
wallet.receive(into: account_id)
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
The `receive` method when called as above will receive the latest pending payment for an account in a wallet. It will either return a
|
|
103
|
+
The `receive` method when called as above will receive the latest pending payment for an account in a wallet. It will either return a block hash if a payment was received, or `false` if there were no pending payments to receive.
|
|
104
104
|
|
|
105
105
|
You can also receive a specific pending block if you know it (you may have discovered it through calling `account.pending` for example):
|
|
106
106
|
|
|
@@ -118,6 +118,8 @@ wallet.receive(block_id, into: account_id)
|
|
|
118
118
|
|
|
119
119
|
### Wallets
|
|
120
120
|
|
|
121
|
+
See the [full documentation for Nanook::Wallet](https://lukes.github.io/nanook/1.0.0/classes/Nanook/Wallet.html) for a detailed description of each method and example responses.
|
|
122
|
+
|
|
121
123
|
#### Create wallet:
|
|
122
124
|
|
|
123
125
|
```ruby
|
|
@@ -136,7 +138,9 @@ wallet.change_password(password)
|
|
|
136
138
|
|
|
137
139
|
wallet.balance
|
|
138
140
|
wallet.balance(account_break_down: true)
|
|
139
|
-
wallet.
|
|
141
|
+
wallet.balance(unit: :raw)
|
|
142
|
+
wallet.pay(from: your_account_id, to: recipient_account_id, amount: 2, id: unique_id)
|
|
143
|
+
wallet.pay(from: your_account_id, to: recipient_account_id, amount: 2, unit: :raw, id: unique_id)
|
|
140
144
|
wallet.receive(into: account_id)
|
|
141
145
|
wallet.receive(pending_block_id, into: account_id)
|
|
142
146
|
|
|
@@ -161,6 +165,7 @@ account = Nanook.new.wallet(wallet_id).account(account_id)
|
|
|
161
165
|
|
|
162
166
|
account.exists?
|
|
163
167
|
account.info
|
|
168
|
+
account.info(detailed: true)
|
|
164
169
|
account.ledger
|
|
165
170
|
account.ledger(limit: 10)
|
|
166
171
|
account.history
|
|
@@ -171,7 +176,9 @@ account.representative
|
|
|
171
176
|
account.weight
|
|
172
177
|
|
|
173
178
|
account.balance
|
|
174
|
-
account.
|
|
179
|
+
account.balance(unit: :raw)
|
|
180
|
+
account.pay(to: recipient_account_id, amount: 2, id: unique_id)
|
|
181
|
+
account.pay(to: recipient_account_id, amount: 2, unit: :raw, id: unique_id)
|
|
175
182
|
account.pending
|
|
176
183
|
account.pending(limit: 1)
|
|
177
184
|
account.receive
|
|
@@ -182,11 +189,14 @@ account.destroy
|
|
|
182
189
|
|
|
183
190
|
#### Working with any account (not necessarily in your wallet):
|
|
184
191
|
|
|
192
|
+
See the [full documentation for Nanook::Account](https://lukes.github.io/nanook/1.0.0/classes/Nanook/Account.html) for a detailed description of each method and example responses.
|
|
193
|
+
|
|
185
194
|
```ruby
|
|
186
195
|
account = Nanook.new.account(account_id)
|
|
187
196
|
|
|
188
197
|
account.exists?
|
|
189
198
|
account.info
|
|
199
|
+
account.info(detailed: true)
|
|
190
200
|
account.ledger
|
|
191
201
|
account.ledger(limit: 10)
|
|
192
202
|
account.history
|
|
@@ -197,6 +207,7 @@ account.representative
|
|
|
197
207
|
account.weight
|
|
198
208
|
|
|
199
209
|
account.balance
|
|
210
|
+
account.balance(unit: :raw)
|
|
200
211
|
account.pending
|
|
201
212
|
account.pending(limit: 1)
|
|
202
213
|
```
|
data/Rakefile
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
2
|
task :default => :spec
|
|
3
|
+
|
|
4
|
+
require 'sdoc' # sdoc https://github.com/zzak/sdoc
|
|
5
|
+
require 'rdoc/task'
|
|
6
|
+
require 'nanook/version'
|
|
7
|
+
|
|
8
|
+
#
|
|
9
|
+
# Note: `rake rerdoc`` forces a fresh generation of docs
|
|
10
|
+
#
|
|
11
|
+
|
|
12
|
+
RDoc::Task.new do |rdoc|
|
|
13
|
+
rdoc.main = 'README.md' # index page
|
|
14
|
+
rdoc.title = "Nanook #{Nanook::VERSION} Documentation"
|
|
15
|
+
rdoc.rdoc_files.include("README.md")
|
|
16
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
17
|
+
rdoc.rdoc_dir = "docs/#{Nanook::VERSION}" # name of output directory
|
|
18
|
+
rdoc.generator = 'sdoc' # explictly set the sdoc generator
|
|
19
|
+
rdoc.template = 'rails' # template used on api.rubyonrails.org
|
|
20
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Nanook</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">
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<meta name="description" content="Initializing Connect to the default RPC host at localhost:7076 and with a timeout of 500 seconds: nanook = Nanook.new To connect to another host instead: nanook = Nanook.">
|
|
19
|
+
<meta property="og:description" content="Initializing Connect to the default RPC host at localhost:7076 and with a timeout of 500 seconds: nanook = Nanook.new To connect to another host instead: nanook = Nanook.">
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<meta name="keywords" content="Nanook class">
|
|
23
|
+
|
|
24
|
+
<meta name="keywords" content="new, account, block, key, node, wallet, work_peers">
|
|
25
|
+
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body>
|
|
29
|
+
<div class="banner">
|
|
30
|
+
|
|
31
|
+
<h1>
|
|
32
|
+
<span class="type">Class</span>
|
|
33
|
+
Nanook
|
|
34
|
+
|
|
35
|
+
<span class="parent"><
|
|
36
|
+
|
|
37
|
+
Object
|
|
38
|
+
|
|
39
|
+
</span>
|
|
40
|
+
|
|
41
|
+
</h1>
|
|
42
|
+
<ul class="files">
|
|
43
|
+
|
|
44
|
+
<li><a href="../files/lib/nanook_rb.html">lib/nanook.rb</a></li>
|
|
45
|
+
|
|
46
|
+
<li><a href="../files/lib/nanook/account_rb.html">lib/nanook/account.rb</a></li>
|
|
47
|
+
|
|
48
|
+
<li><a href="../files/lib/nanook/block_rb.html">lib/nanook/block.rb</a></li>
|
|
49
|
+
|
|
50
|
+
<li><a href="../files/lib/nanook/error_rb.html">lib/nanook/error.rb</a></li>
|
|
51
|
+
|
|
52
|
+
<li><a href="../files/lib/nanook/key_rb.html">lib/nanook/key.rb</a></li>
|
|
53
|
+
|
|
54
|
+
<li><a href="../files/lib/nanook/node_rb.html">lib/nanook/node.rb</a></li>
|
|
55
|
+
|
|
56
|
+
<li><a href="../files/lib/nanook/rpc_rb.html">lib/nanook/rpc.rb</a></li>
|
|
57
|
+
|
|
58
|
+
<li><a href="../files/lib/nanook/util_rb.html">lib/nanook/util.rb</a></li>
|
|
59
|
+
|
|
60
|
+
<li><a href="../files/lib/nanook/version_rb.html">lib/nanook/version.rb</a></li>
|
|
61
|
+
|
|
62
|
+
<li><a href="../files/lib/nanook/wallet_rb.html">lib/nanook/wallet.rb</a></li>
|
|
63
|
+
|
|
64
|
+
<li><a href="../files/lib/nanook/wallet_account_rb.html">lib/nanook/wallet_account.rb</a></li>
|
|
65
|
+
|
|
66
|
+
<li><a href="../files/lib/nanook/work_peer_rb.html">lib/nanook/work_peer.rb</a></li>
|
|
67
|
+
|
|
68
|
+
</ul>
|
|
69
|
+
</div>
|
|
70
|
+
<div id="bodyContent">
|
|
71
|
+
<div id="content">
|
|
72
|
+
|
|
73
|
+
<div class="description">
|
|
74
|
+
|
|
75
|
+
<h4 id="class-Nanook-label-Initializing">Initializing</h4>
|
|
76
|
+
|
|
77
|
+
<p>Connect to the default RPC host at <a
|
|
78
|
+
href="http://localhost:7076">localhost:7076</a> and with a timeout of 500
|
|
79
|
+
seconds:</p>
|
|
80
|
+
|
|
81
|
+
<pre><code>nanook = Nanook.new
|
|
82
|
+
</code></pre>
|
|
83
|
+
|
|
84
|
+
<p>To connect to another host instead:</p>
|
|
85
|
+
|
|
86
|
+
<pre><code>nanook = Nanook.new("http://ip6-localhost.com:7076")
|
|
87
|
+
</code></pre>
|
|
88
|
+
|
|
89
|
+
<p>To give a specific timeout value:</p>
|
|
90
|
+
|
|
91
|
+
<pre><code>Nanook.new(timeout: 600)
|
|
92
|
+
Nanook.new("http://ip6-localhost.com:7076", timeout: 600)
|
|
93
|
+
</code></pre>
|
|
94
|
+
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<!-- Namespace -->
|
|
108
|
+
<div class="sectiontitle">Namespace</div>
|
|
109
|
+
<ul>
|
|
110
|
+
|
|
111
|
+
<li>
|
|
112
|
+
<span class="type">CLASS</span>
|
|
113
|
+
<a href="Nanook/Account.html">Nanook::Account</a>
|
|
114
|
+
</li>
|
|
115
|
+
|
|
116
|
+
<li>
|
|
117
|
+
<span class="type">CLASS</span>
|
|
118
|
+
<a href="Nanook/Block.html">Nanook::Block</a>
|
|
119
|
+
</li>
|
|
120
|
+
|
|
121
|
+
<li>
|
|
122
|
+
<span class="type">CLASS</span>
|
|
123
|
+
<a href="Nanook/Error.html">Nanook::Error</a>
|
|
124
|
+
</li>
|
|
125
|
+
|
|
126
|
+
<li>
|
|
127
|
+
<span class="type">CLASS</span>
|
|
128
|
+
<a href="Nanook/Key.html">Nanook::Key</a>
|
|
129
|
+
</li>
|
|
130
|
+
|
|
131
|
+
<li>
|
|
132
|
+
<span class="type">CLASS</span>
|
|
133
|
+
<a href="Nanook/Node.html">Nanook::Node</a>
|
|
134
|
+
</li>
|
|
135
|
+
|
|
136
|
+
<li>
|
|
137
|
+
<span class="type">CLASS</span>
|
|
138
|
+
<a href="Nanook/Rpc.html">Nanook::Rpc</a>
|
|
139
|
+
</li>
|
|
140
|
+
|
|
141
|
+
<li>
|
|
142
|
+
<span class="type">CLASS</span>
|
|
143
|
+
<a href="Nanook/Util.html">Nanook::Util</a>
|
|
144
|
+
</li>
|
|
145
|
+
|
|
146
|
+
<li>
|
|
147
|
+
<span class="type">CLASS</span>
|
|
148
|
+
<a href="Nanook/Wallet.html">Nanook::Wallet</a>
|
|
149
|
+
</li>
|
|
150
|
+
|
|
151
|
+
<li>
|
|
152
|
+
<span class="type">CLASS</span>
|
|
153
|
+
<a href="Nanook/WalletAccount.html">Nanook::WalletAccount</a>
|
|
154
|
+
</li>
|
|
155
|
+
|
|
156
|
+
<li>
|
|
157
|
+
<span class="type">CLASS</span>
|
|
158
|
+
<a href="Nanook/WorkPeer.html">Nanook::WorkPeer</a>
|
|
159
|
+
</li>
|
|
160
|
+
|
|
161
|
+
</ul>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
<!-- Method ref -->
|
|
167
|
+
<div class="sectiontitle">Methods</div>
|
|
168
|
+
<dl class="methods">
|
|
169
|
+
|
|
170
|
+
<dt>A</dt>
|
|
171
|
+
<dd>
|
|
172
|
+
<ul>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<li>
|
|
176
|
+
<a href="#method-i-account">account</a>
|
|
177
|
+
</li>
|
|
178
|
+
|
|
179
|
+
</ul>
|
|
180
|
+
</dd>
|
|
181
|
+
|
|
182
|
+
<dt>B</dt>
|
|
183
|
+
<dd>
|
|
184
|
+
<ul>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<li>
|
|
188
|
+
<a href="#method-i-block">block</a>
|
|
189
|
+
</li>
|
|
190
|
+
|
|
191
|
+
</ul>
|
|
192
|
+
</dd>
|
|
193
|
+
|
|
194
|
+
<dt>K</dt>
|
|
195
|
+
<dd>
|
|
196
|
+
<ul>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
<li>
|
|
200
|
+
<a href="#method-i-key">key</a>
|
|
201
|
+
</li>
|
|
202
|
+
|
|
203
|
+
</ul>
|
|
204
|
+
</dd>
|
|
205
|
+
|
|
206
|
+
<dt>N</dt>
|
|
207
|
+
<dd>
|
|
208
|
+
<ul>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<li>
|
|
212
|
+
<a href="#method-c-new">new</a>,
|
|
213
|
+
</li>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
<li>
|
|
217
|
+
<a href="#method-i-node">node</a>
|
|
218
|
+
</li>
|
|
219
|
+
|
|
220
|
+
</ul>
|
|
221
|
+
</dd>
|
|
222
|
+
|
|
223
|
+
<dt>W</dt>
|
|
224
|
+
<dd>
|
|
225
|
+
<ul>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<li>
|
|
229
|
+
<a href="#method-i-wallet">wallet</a>,
|
|
230
|
+
</li>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<li>
|
|
234
|
+
<a href="#method-i-work_peers">work_peers</a>
|
|
235
|
+
</li>
|
|
236
|
+
|
|
237
|
+
</ul>
|
|
238
|
+
</dd>
|
|
239
|
+
|
|
240
|
+
</dl>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
<!-- Section constants -->
|
|
255
|
+
<div class="sectiontitle">Constants</div>
|
|
256
|
+
<table border='0' cellpadding='5'>
|
|
257
|
+
|
|
258
|
+
<tr valign='top'>
|
|
259
|
+
<td class="attr-name">VERSION</td>
|
|
260
|
+
<td>=</td>
|
|
261
|
+
<td class="attr-value">"0.7.0"</td>
|
|
262
|
+
</tr>
|
|
263
|
+
|
|
264
|
+
<tr valign='top'>
|
|
265
|
+
<td> </td>
|
|
266
|
+
<td colspan="2" class="attr-desc"></td>
|
|
267
|
+
</tr>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
</table>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<!-- Methods -->
|
|
278
|
+
|
|
279
|
+
<div class="sectiontitle">Class Public methods</div>
|
|
280
|
+
|
|
281
|
+
<div class="method">
|
|
282
|
+
<div class="title method-title" id="method-c-new">
|
|
283
|
+
|
|
284
|
+
<b>new</b>(uri=Nanook::Rpc::DEFAULT_URI, timeout:Nanook::Rpc::DEFAULT_TIMEOUT)
|
|
285
|
+
|
|
286
|
+
<a href="../classes/Nanook.html#method-c-new" name="method-c-new" class="permalink">Link</a>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<div class="description">
|
|
291
|
+
<h4 id="method-c-new-label-Arguments">Arguments</h4>
|
|
292
|
+
<ul><li>
|
|
293
|
+
<p><code>uri</code> - RPC host to connect to (default is “<a
|
|
294
|
+
href="http://localhost:7076">localhost:7076</a>”)</p>
|
|
295
|
+
</li><li>
|
|
296
|
+
<p><code>timeout:</code> - Connection timeout in number of seconds (default is
|
|
297
|
+
500)</p>
|
|
298
|
+
</li></ul>
|
|
299
|
+
|
|
300
|
+
<h4 id="method-c-new-label-Examples">Examples</h4>
|
|
301
|
+
|
|
302
|
+
<pre><code>Nanook.new # Connect to http://localhost:7076 with 500s timeout
|
|
303
|
+
|
|
304
|
+
Nanook.new(timeout: 600)
|
|
305
|
+
Nanook.new("http://ip6-localhost.com:7076", timeout: 600)
|
|
306
|
+
</code></pre>
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
<div class="sourcecode">
|
|
317
|
+
|
|
318
|
+
<p class="source-link">
|
|
319
|
+
Source:
|
|
320
|
+
<a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
|
|
321
|
+
|
|
322
|
+
</p>
|
|
323
|
+
<div id="method-c-new_source" class="dyn-source">
|
|
324
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 33</span>
|
|
325
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">uri</span>=<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Rpc</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_URI</span>, <span class="ruby-value">timeout:</span><span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Rpc</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_TIMEOUT</span>)
|
|
326
|
+
<span class="ruby-ivar">@rpc</span> = <span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Rpc</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-value">timeout:</span> <span class="ruby-identifier">timeout</span>)
|
|
327
|
+
<span class="ruby-keyword">end</span></pre>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
<div class="sectiontitle">Instance Public methods</div>
|
|
336
|
+
|
|
337
|
+
<div class="method">
|
|
338
|
+
<div class="title method-title" id="method-i-account">
|
|
339
|
+
|
|
340
|
+
<b>account</b>(account=nil)
|
|
341
|
+
|
|
342
|
+
<a href="../classes/Nanook.html#method-i-account" name="method-i-account" class="permalink">Link</a>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
<div class="description">
|
|
347
|
+
<p>Returns a <a href="Nanook/Account.html">Nanook::Account</a> instance.</p>
|
|
348
|
+
|
|
349
|
+
<pre><code>nanook = Nanook.new
|
|
350
|
+
|
|
351
|
+
account = nanook.account
|
|
352
|
+
account = nanook.account("xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000")
|
|
353
|
+
</code></pre>
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
<div class="sourcecode">
|
|
364
|
+
|
|
365
|
+
<p class="source-link">
|
|
366
|
+
Source:
|
|
367
|
+
<a href="javascript:toggleSource('method-i-account_source')" id="l_method-i-account_source">show</a>
|
|
368
|
+
|
|
369
|
+
</p>
|
|
370
|
+
<div id="method-i-account_source" class="dyn-source">
|
|
371
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 44</span>
|
|
372
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">account</span>(<span class="ruby-identifier">account</span>=<span class="ruby-keyword">nil</span>)
|
|
373
|
+
<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">account</span>)
|
|
374
|
+
<span class="ruby-keyword">end</span></pre>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<div class="method">
|
|
381
|
+
<div class="title method-title" id="method-i-block">
|
|
382
|
+
|
|
383
|
+
<b>block</b>(block=nil)
|
|
384
|
+
|
|
385
|
+
<a href="../classes/Nanook.html#method-i-block" name="method-i-block" class="permalink">Link</a>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
<div class="description">
|
|
390
|
+
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
<div class="sourcecode">
|
|
401
|
+
|
|
402
|
+
<p class="source-link">
|
|
403
|
+
Source:
|
|
404
|
+
<a href="javascript:toggleSource('method-i-block_source')" id="l_method-i-block_source">show</a>
|
|
405
|
+
|
|
406
|
+
</p>
|
|
407
|
+
<div id="method-i-block_source" class="dyn-source">
|
|
408
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 48</span>
|
|
409
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">block</span>(<span class="ruby-identifier">block</span>=<span class="ruby-keyword">nil</span>)
|
|
410
|
+
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Block</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">block</span>)
|
|
411
|
+
<span class="ruby-keyword">end</span></pre>
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<div class="method">
|
|
418
|
+
<div class="title method-title" id="method-i-key">
|
|
419
|
+
|
|
420
|
+
<b>key</b>(key=nil)
|
|
421
|
+
|
|
422
|
+
<a href="../classes/Nanook.html#method-i-key" name="method-i-key" class="permalink">Link</a>
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
<div class="description">
|
|
427
|
+
|
|
428
|
+
</div>
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
<div class="sourcecode">
|
|
438
|
+
|
|
439
|
+
<p class="source-link">
|
|
440
|
+
Source:
|
|
441
|
+
<a href="javascript:toggleSource('method-i-key_source')" id="l_method-i-key_source">show</a>
|
|
442
|
+
|
|
443
|
+
</p>
|
|
444
|
+
<div id="method-i-key_source" class="dyn-source">
|
|
445
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 52</span>
|
|
446
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">key</span>(<span class="ruby-identifier">key</span>=<span class="ruby-keyword">nil</span>)
|
|
447
|
+
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Key</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>, <span class="ruby-identifier">key</span>)
|
|
448
|
+
<span class="ruby-keyword">end</span></pre>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
</div>
|
|
453
|
+
|
|
454
|
+
<div class="method">
|
|
455
|
+
<div class="title method-title" id="method-i-node">
|
|
456
|
+
|
|
457
|
+
<b>node</b>()
|
|
458
|
+
|
|
459
|
+
<a href="../classes/Nanook.html#method-i-node" name="method-i-node" class="permalink">Link</a>
|
|
460
|
+
</div>
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
<div class="description">
|
|
464
|
+
|
|
465
|
+
</div>
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
<div class="sourcecode">
|
|
475
|
+
|
|
476
|
+
<p class="source-link">
|
|
477
|
+
Source:
|
|
478
|
+
<a href="javascript:toggleSource('method-i-node_source')" id="l_method-i-node_source">show</a>
|
|
479
|
+
|
|
480
|
+
</p>
|
|
481
|
+
<div id="method-i-node_source" class="dyn-source">
|
|
482
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 56</span>
|
|
483
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">node</span>
|
|
484
|
+
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>)
|
|
485
|
+
<span class="ruby-keyword">end</span></pre>
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
|
|
489
|
+
</div>
|
|
490
|
+
|
|
491
|
+
<div class="method">
|
|
492
|
+
<div class="title method-title" id="method-i-wallet">
|
|
493
|
+
|
|
494
|
+
<b>wallet</b>(wallet=nil)
|
|
495
|
+
|
|
496
|
+
<a href="../classes/Nanook.html#method-i-wallet" name="method-i-wallet" class="permalink">Link</a>
|
|
497
|
+
</div>
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
<div class="description">
|
|
501
|
+
|
|
502
|
+
</div>
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
<div class="sourcecode">
|
|
512
|
+
|
|
513
|
+
<p class="source-link">
|
|
514
|
+
Source:
|
|
515
|
+
<a href="javascript:toggleSource('method-i-wallet_source')" id="l_method-i-wallet_source">show</a>
|
|
516
|
+
|
|
517
|
+
</p>
|
|
518
|
+
<div id="method-i-wallet_source" class="dyn-source">
|
|
519
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 60</span>
|
|
520
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">wallet</span>(<span class="ruby-identifier">wallet</span>=<span class="ruby-keyword">nil</span>)
|
|
521
|
+
<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-identifier">wallet</span>)
|
|
522
|
+
<span class="ruby-keyword">end</span></pre>
|
|
523
|
+
</div>
|
|
524
|
+
</div>
|
|
525
|
+
|
|
526
|
+
</div>
|
|
527
|
+
|
|
528
|
+
<div class="method">
|
|
529
|
+
<div class="title method-title" id="method-i-work_peers">
|
|
530
|
+
|
|
531
|
+
<b>work_peers</b>()
|
|
532
|
+
|
|
533
|
+
<a href="../classes/Nanook.html#method-i-work_peers" name="method-i-work_peers" class="permalink">Link</a>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
<div class="description">
|
|
538
|
+
|
|
539
|
+
</div>
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
<div class="sourcecode">
|
|
549
|
+
|
|
550
|
+
<p class="source-link">
|
|
551
|
+
Source:
|
|
552
|
+
<a href="javascript:toggleSource('method-i-work_peers_source')" id="l_method-i-work_peers_source">show</a>
|
|
553
|
+
|
|
554
|
+
</p>
|
|
555
|
+
<div id="method-i-work_peers_source" class="dyn-source">
|
|
556
|
+
<pre><span class="ruby-comment"># File lib/nanook.rb, line 64</span>
|
|
557
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">work_peers</span>
|
|
558
|
+
<span class="ruby-constant">Nanook</span><span class="ruby-operator">::</span><span class="ruby-constant">WorkPeer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@rpc</span>)
|
|
559
|
+
<span class="ruby-keyword">end</span></pre>
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
|
|
563
|
+
</div>
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
</div>
|
|
569
|
+
|
|
570
|
+
</div>
|
|
571
|
+
</body>
|
|
572
|
+
</html>
|