Class: Bitcoin::Message::GetCFCheckpt
- Defined in:
- lib/bitcoin/message/get_cfcheckpt.rb
Overview
getcfcheckpt message for BIP-157 github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#getcfcheckpt
Constant Summary collapse
- COMMAND =
'getcfcheckpt'
Instance Attribute Summary collapse
-
#filter_type ⇒ Object
Returns the value of attribute filter_type.
-
#stop_hash ⇒ Object
little endian.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filter_type, stop_hash) ⇒ GetCFCheckpt
constructor
A new instance of GetCFCheckpt.
- #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(filter_type, stop_hash) ⇒ GetCFCheckpt
Returns a new instance of GetCFCheckpt.
13 14 15 16 |
# File 'lib/bitcoin/message/get_cfcheckpt.rb', line 13 def initialize(filter_type, stop_hash) @filter_type = filter_type @stop_hash = stop_hash end |
Instance Attribute Details
#filter_type ⇒ Object
Returns the value of attribute filter_type.
10 11 12 |
# File 'lib/bitcoin/message/get_cfcheckpt.rb', line 10 def filter_type @filter_type end |
#stop_hash ⇒ Object
little endian
11 12 13 |
# File 'lib/bitcoin/message/get_cfcheckpt.rb', line 11 def stop_hash @stop_hash end |
Class Method Details
.parse_from_payload(payload) ⇒ Object
18 19 20 21 |
# File 'lib/bitcoin/message/get_cfcheckpt.rb', line 18 def self.parse_from_payload(payload) type, hash = payload.unpack('CH*') self.new(type, hash) end |
Instance Method Details
#to_payload ⇒ Object
23 24 25 |
# File 'lib/bitcoin/message/get_cfcheckpt.rb', line 23 def to_payload [filter_type, stop_hash].pack('CH*') end |