nano_rpc 0.6.0 → 0.7.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/README.md +1 -1
- data/lib/nano_rpc/helpers/wallet_helper.rb +8 -0
- data/lib/nano_rpc/proxies/account.rb +1 -1
- data/lib/nano_rpc/proxies/node.rb +8 -2
- data/lib/nano_rpc/proxies/wallet.rb +2 -0
- data/lib/nano_rpc/version.rb +1 -1
- data/nano_rpc-0.6.0.gem +0 -0
- data/nano_rpc.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd712a233701f4f20a81e5ee7a3ca4dc0a46397245249ea689ababe248ac2398
|
4
|
+
data.tar.gz: c597c84ee6131082a037321309cce96d71096b383a10ceba89b688c897a83823
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88b3da5e15549b039ecb9375809eeca41ed3bf51eed9a6e9bec05353ee230bae20b67b093ebc90f99892aa91a79986513c62df4fd9b9e3a0a4b7280af91b59e8
|
7
|
+
data.tar.gz: fb6bd619036ce0b27a33c1cad232a7e0f925a589777ec3f0f857d883ebf006a19d12410c3f3d5f82a1afc8cf3c64eb5a6c6b557cf441456cf28de0715b5762f5
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|

|
2
2
|
|
3
|
-
Nano RPC is a Ruby wrapper for making Remote Procedure Calls against Nano
|
3
|
+
Nano RPC is a Ruby wrapper for making Remote Procedure Calls against Nano digital currency nodes. Arbitrary RPC access is provided along with proxy objects that expose helper methods ([Wiki](https://github.com/jcraigk/ruby_nano_rpc/wiki)).
|
4
4
|
|
5
5
|
To run a Nano node locally, see [Nano Docker Docs](https://github.com/clemahieu/raiblocks/wiki/Docker-node).
|
6
6
|
|
@@ -15,6 +15,10 @@ module Nano::WalletHelper
|
|
15
15
|
wallet_add(key: key, work: work).account
|
16
16
|
end
|
17
17
|
|
18
|
+
def add_watch(accounts:)
|
19
|
+
wallet_add_watch(accounts: accounts).success == ''
|
20
|
+
end
|
21
|
+
|
18
22
|
def balance
|
19
23
|
wallet_balance_total.balance
|
20
24
|
end
|
@@ -74,6 +78,10 @@ module Nano::WalletHelper
|
|
74
78
|
payment_init.status == 'Ready'
|
75
79
|
end
|
76
80
|
|
81
|
+
def ledger
|
82
|
+
wallet_ledger
|
83
|
+
end
|
84
|
+
|
77
85
|
def locked?
|
78
86
|
wallet_locked.locked == 1
|
79
87
|
end
|
@@ -33,7 +33,7 @@ class Nano::Account
|
|
33
33
|
proxy_method :frontiers, required: %i[count]
|
34
34
|
proxy_method :ledger,
|
35
35
|
required: %i[count],
|
36
|
-
optional: %i[representative weight pending sorting]
|
36
|
+
optional: %i[representative weight pending modified_since sorting]
|
37
37
|
proxy_method :validate_account_number
|
38
38
|
proxy_method :pending, required: %i[count], optional: %i[threshold exists]
|
39
39
|
proxy_method :payment_wait, required: %i[amount timeout]
|
@@ -6,16 +6,20 @@ class Nano::Node
|
|
6
6
|
proxy_method :available_supply
|
7
7
|
proxy_method :block, required: %i[hash]
|
8
8
|
proxy_method :block_account, required: %i[hash]
|
9
|
+
proxy_method :block_confirm, required: %i[hash]
|
9
10
|
proxy_method :block_count
|
10
11
|
proxy_method :block_count_type
|
11
12
|
proxy_method :block_create,
|
12
|
-
required: %i[type key representative source],
|
13
|
+
required: %i[type key representative source],
|
14
|
+
optional: %i[work]
|
13
15
|
proxy_method :blocks, required: %i[hashes]
|
14
16
|
proxy_method :blocks_info,
|
15
|
-
required: %i[hashes],
|
17
|
+
required: %i[hashes],
|
18
|
+
optional: %i[pending source balance]
|
16
19
|
proxy_method :bootstrap, required: %i[address port]
|
17
20
|
proxy_method :bootstrap_any
|
18
21
|
proxy_method :chain, required: %i[block count]
|
22
|
+
proxy_method :confirmation_history
|
19
23
|
proxy_method :deterministic_key, required: %i[seed index]
|
20
24
|
proxy_method :frontier_count
|
21
25
|
proxy_method :history, required: %i[hash count]
|
@@ -35,11 +39,13 @@ class Nano::Node
|
|
35
39
|
proxy_method :receive_minimum
|
36
40
|
proxy_method :receive_minimum_set, required: %i[amount]
|
37
41
|
proxy_method :representatives
|
42
|
+
proxy_method :representatives_online
|
38
43
|
proxy_method :republish,
|
39
44
|
required: %i[hash],
|
40
45
|
optional: %i[count sources destinations]
|
41
46
|
proxy_method :search_pending, required: %i[wallet]
|
42
47
|
proxy_method :search_pending_all
|
48
|
+
proxy_method :stats, require: %i[type]
|
43
49
|
proxy_method :stop
|
44
50
|
proxy_method :successors, required: %i[block count]
|
45
51
|
proxy_method :unchecked, required: %i[count]
|
@@ -38,6 +38,7 @@ class Nano::Wallet
|
|
38
38
|
optional: %i[id work]
|
39
39
|
proxy_method :search_pending
|
40
40
|
proxy_method :wallet_add, required: %i[key], optional: %i[work]
|
41
|
+
proxy_method :wallet_add_watch, required: %i[accounts]
|
41
42
|
proxy_method :wallet_balance_total
|
42
43
|
proxy_method :wallet_balances, optional: %i[threshold]
|
43
44
|
proxy_method :wallet_change_seed, required: %i[seed]
|
@@ -45,6 +46,7 @@ class Nano::Wallet
|
|
45
46
|
proxy_method :wallet_destroy
|
46
47
|
proxy_method :wallet_export
|
47
48
|
proxy_method :wallet_frontiers
|
49
|
+
proxy_method :wallet_ledger
|
48
50
|
proxy_method :wallet_locked
|
49
51
|
proxy_method :wallet_pending,
|
50
52
|
required: %i[count], optional: %i[threshold source]
|
data/lib/nano_rpc/version.rb
CHANGED
data/nano_rpc-0.6.0.gem
ADDED
Binary file
|
data/nano_rpc.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
lib = File.expand_path('
|
2
|
+
lib = File.expand_path('lib', __dir__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'nano_rpc/version'
|
5
5
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ['jcraigk@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = 'RPC wrapper for Nano digital nodes written in Ruby'
|
13
|
-
spec.description = 'An RPC wrapper for Nano
|
13
|
+
spec.description = 'An RPC wrapper for Nano digital currency nodes. ' \
|
14
14
|
'Arbitrary RPC access is provided along with proxy ' \
|
15
15
|
'objects that expose helper methods.'
|
16
16
|
spec.homepage = 'https://github.com/jcraigk/ruby_nano_rpc'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nano_rpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Craig-Kuhn (JCK)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -134,7 +134,7 @@ dependencies:
|
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: 2.0.2
|
137
|
-
description: An RPC wrapper for Nano
|
137
|
+
description: An RPC wrapper for Nano digital currency nodes. Arbitrary RPC access
|
138
138
|
is provided along with proxy objects that expose helper methods.
|
139
139
|
email:
|
140
140
|
- jcraigk@gmail.com
|
@@ -166,6 +166,7 @@ files:
|
|
166
166
|
- lib/nano_rpc/proxy.rb
|
167
167
|
- lib/nano_rpc/response.rb
|
168
168
|
- lib/nano_rpc/version.rb
|
169
|
+
- nano_rpc-0.6.0.gem
|
169
170
|
- nano_rpc.gemspec
|
170
171
|
homepage: https://github.com/jcraigk/ruby_nano_rpc
|
171
172
|
licenses:
|