Skip to main content

Module mpc

Module mpc 

Source
Expand description

MPC (Multi-Protocol Commitment) Tree

An MPC tree allows multiple protocols to share a single on-chain witness transaction. Each leaf is (protocol_id || commitment_hash), and the root is what gets committed on-chain via Tapret/Opret.

This follows the same pattern as RGB’s MPC tree and Bitcoin’s BIP-341 merkle tree construction.

Structs§

MerkleBranchNode
A single node in a merkle branch (sibling hash + direction)
MpcLeaf
A leaf in the MPC tree
MpcProof
Merkle branch proof for a specific protocol’s inclusion
MpcTree
Multi-Protocol Commitment tree

Type Aliases§

ProtocolId
Protocol identifier (32 bytes)