bcoin-client 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6876db8d74297101f7ef5390d33e5cc767f3a08
4
- data.tar.gz: 2685d89a4404151f62da43c10a6122eb6c0cd726
3
+ metadata.gz: '0874bc839d11a8e45f618b76db621d59e16236d4'
4
+ data.tar.gz: eb68d34a7c59c0004c46449f48328ab4ef7f0784
5
5
  SHA512:
6
- metadata.gz: 88ade4d1a2930e92983f15d2a298f8cd6afce79fa2becfcfd97cf54222e01f2d4845d309534d4653e9132be32451d2a73aeec4bf970afbcec6fab006075bca07
7
- data.tar.gz: a051953e56260071fed081575398c0ff6b01831373bbfade5ed9fa13050240e1d23bb428ab8e35650b0c1d78ac84227be91466744e41ebb5769d47ed45696c05
6
+ metadata.gz: b03a1f7cfb7d296b7673bc20c61cc8b56c530a884f056868121b7e66d1e8eefcb28f499f913c614274147ca4e540772d638913c3828c67d2166282c529e6e691
7
+ data.tar.gz: 3f5fe64b084556b41f84d0a6b50a0eb07b2a5873492e9165c025509439c2b61e65955324912bc920e8287e08151c61faa37defe99c96759b3f7d8eacff893f9d
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Bcoin
2
2
  class Client
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcoin-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Knox