Skip to content

Class BSV::Transaction::MerklePath::PathElement

Inherits: Object

A single leaf in one level of the merkle path.

Attributes

duplicate [R]

  • @return [Boolean] whether this leaf duplicates its sibling

hash [R]

  • @return [String, nil] 32-byte hash (nil when duplicate)

offset [R]

  • @return [Integer] position index within the tree level

txid [R]

  • @return [Boolean] whether this leaf is a transaction ID

Public Instance Methods

initialize(offset:, hash: = nil, txid: = false, duplicate: = false)

  • @param offset [Integer] position index within the tree level
  • @param hash [String, nil] 32-byte hash (nil when duplicate)
  • @param txid [Boolean] whether this leaf is a transaction ID
  • @param duplicate [Boolean] whether this leaf duplicates its sibling
  • @return [PathElement] a new instance of PathElement