bcoin-client 0.1.0 → 0.2.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/lib/bcoin/client.rb +10 -0
- data/lib/bcoin/client/version.rb +1 -1
- data/lib/bcoin/client/wallet.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0874bc839d11a8e45f618b76db621d59e16236d4'
|
4
|
+
data.tar.gz: eb68d34a7c59c0004c46449f48328ab4ef7f0784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b03a1f7cfb7d296b7673bc20c61cc8b56c530a884f056868121b7e66d1e8eefcb28f499f913c614274147ca4e540772d638913c3828c67d2166282c529e6e691
|
7
|
+
data.tar.gz: 3f5fe64b084556b41f84d0a6b50a0eb07b2a5873492e9165c025509439c2b61e65955324912bc920e8287e08151c61faa37defe99c96759b3f7d8eacff893f9d
|
data/lib/bcoin/client.rb
CHANGED
@@ -77,5 +77,15 @@ module Bcoin
|
|
77
77
|
def wallets
|
78
78
|
@wallets ||= Wallets.new(self)
|
79
79
|
end
|
80
|
+
|
81
|
+
# Check the current rate for processing a transaction
|
82
|
+
# within x number of blocks.
|
83
|
+
# @params [Integer] Blocks Number of blocks the transaction
|
84
|
+
# will be processed within if paying the returned rate.
|
85
|
+
# @return [Float] Rate
|
86
|
+
def fee blocks = 1
|
87
|
+
response = get '/fee', blocks: blocks
|
88
|
+
response['rate']
|
89
|
+
end
|
80
90
|
end
|
81
91
|
end
|
data/lib/bcoin/client/version.rb
CHANGED
data/lib/bcoin/client/wallet.rb
CHANGED
@@ -89,6 +89,15 @@ module Bcoin
|
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
92
|
+
# Check the current fee for processing a transaction
|
93
|
+
# within x number of blocks.
|
94
|
+
# @params [Integer] Blocks Number of blocks the transaction
|
95
|
+
# will be processed within if paying the returned rate.
|
96
|
+
# @return [Float] Rate
|
97
|
+
def fee blocks = 1
|
98
|
+
client.fee blocks
|
99
|
+
end
|
100
|
+
|
92
101
|
# Create, sign, and send a new transaction.
|
93
102
|
# @params [Hash] opts Options for the new transaction.
|
94
103
|
# @option opts :rate Rate for the bitcoin network.
|