# Class BSV::Transaction::MerklePath::PathElement <a id="class-BSV-Transaction-MerklePath-PathElement"></a>

**Inherits:** `Object`

A single leaf in one level of the merkle path.

## Attributes
### `duplicate` [R] <a id="attribute-i-duplicate"></a> <a id="duplicate-instance_method"></a>
- **@return** [Boolean] whether this leaf duplicates its sibling

### `hash` [R] <a id="attribute-i-hash"></a> <a id="hash-instance_method"></a>
- **@return** [String, nil] 32-byte hash (nil when duplicate)

### `offset` [R] <a id="attribute-i-offset"></a> <a id="offset-instance_method"></a>
- **@return** [Integer] position index within the tree level

### `txid` [R] <a id="attribute-i-txid"></a> <a id="txid-instance_method"></a>
- **@return** [Boolean] BRC-74 flag — whether this leaf represents a transaction in
the merkle tree (the 0x02 bit in the BRC-74 serialisation). Not a txid value.

## Public Instance Methods
### `initialize(offset:, hash: = nil, txid: = false, duplicate: = false)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
- **@param** `offset` [Integer] position index within the tree level
- **@param** `hash` [String, nil] 32-byte hash (nil when duplicate)
- **@param** `txid` [Boolean] BRC-74 flag — true when this leaf represents a transaction
in the tree (the 0x02 bit in the BRC-74 serialisation). This is NOT a txid
value; it is a boolean presence flag mandated by the BRC-74 specification.
- **@param** `duplicate` [Boolean] whether this leaf duplicates its sibling
- **@return** [PathElement] a new instance of PathElement
