Class: Bitcoin::Message::FeeFilter
- Defined in:
- lib/bitcoin/message/fee_filter.rb
Overview
feefilter message bitcoin.org/en/developer-reference#feefilter
Constant Summary collapse
- COMMAND =
'feefilter'
Instance Attribute Summary collapse
-
#fee_rate ⇒ Object
The fee rate (in satoshis per kilobyte).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fee_rate) ⇒ FeeFilter
constructor
A new instance of FeeFilter.
- #to_payload ⇒ Object
Methods inherited from Base
Methods included from Util
#byte_to_bit, #calc_checksum, #decode_base58_address, #double_sha256, #encode_base58_address, #hash160, #hkdf_sha256, #hmac_sha256, #pack_boolean, #pack_var_int, #pack_var_string, #padding_zero, #sha256, #tagged_hash, #unpack_boolean, #unpack_var_int, #unpack_var_int_from_io, #unpack_var_string, #valid_address?
Methods included from HexConverter
Constructor Details
#initialize(fee_rate) ⇒ FeeFilter
Returns a new instance of FeeFilter.
13 14 15 |
# File 'lib/bitcoin/message/fee_filter.rb', line 13 def initialize(fee_rate) @fee_rate = fee_rate end |
Instance Attribute Details
#fee_rate ⇒ Object
The fee rate (in satoshis per kilobyte)
11 12 13 |
# File 'lib/bitcoin/message/fee_filter.rb', line 11 def fee_rate @fee_rate end |
Class Method Details
.parse_from_payload(payload) ⇒ Object
17 18 19 |
# File 'lib/bitcoin/message/fee_filter.rb', line 17 def self.parse_from_payload(payload) new(payload.unpack1('Q')) end |
Instance Method Details
#to_payload ⇒ Object
21 22 23 |
# File 'lib/bitcoin/message/fee_filter.rb', line 21 def to_payload [fee_rate].pack('Q') end |