class

Bitcoin::Messages::Block

Inherits Bitcoin::Message < Bitcoin::Structure < Reference < Object

Constructors

new(version : Int32 = Bitcoin::Protocol::BLOCK_VERSION, previous_block_header_hash : Bytes = Bytes.new(32), merkle_root_hash : Bytes = Bytes.new(32), time : UInt32 = 0_u32, bits : UInt32 = 0_u32, nonce : UInt32 = 0_u32, txns : Array(Messages::Tx) = Array(Messages::Tx).new)

Class methods

from_payload(io : IO)

Instance methods

bits
header_bytes
id
inspect

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.

merkle_root_hash
nonce
previous_block_header_hash
time
to_payload

overloaded by payload macro

txns
version