Skip to main content
Retrieve merkle tree voucher information client‑side. Public TRON nodes generally do not expose an RPC for wallet/getmerkletreevoucherinfo; attempting to POST to that route returns HTTP 405. Build voucher data locally from shielded commitments and anchors.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Inputs

  • output_point — the output commitment/point for which you need a Merkle path.
  • ak — authentication key (64‑hex) used in verification.
  • nk — nullifier key (64‑hex) used in verification.
  • position — leaf index in the commitment tree.

Outputs

  • voucher_info — voucher data structure used in verification circuits.
  • paths[] — Merkle path elements (sibling hashes) from leaf to root.
  • anchors[] — accepted anchor(s) (tree roots) for the proof context.
  • rt — Merkle root.
  • output_point_info — metadata about the output commitment.

How to build it locally

  1. Maintain or query a local view of the shielded commitment tree (from blocks and shielded notes).
  2. Locate the position (leaf index) for output_point.
  3. Ascend the tree computing sibling hashes to assemble paths[] and the root rt.
  4. Package voucher_info with ak, nk, position, paths[], and rt according to your proof/verifier requirements.
Consider using or extending an existing Sapling tree implementation. The derivation follows other Sapling‑based systems: compute diversifyHash where applicable, hash pairs per level, and collect siblings up to the root.

Pseudocode sketch

# Given: output_point (leaf), position, and a commitment tree abstraction
def merkle_path(tree, position):
    path = []
    node = tree.leaf(position)
    while node.parent is not None:
        path.append(node.sibling.hash)
        node = node.parent
    return path, node.hash  # path elements, root

paths, rt = merkle_path(commitment_tree, position)
voucher = {
  'voucher_info': { 'output_point': output_point },
  'paths': paths,
  'anchors': [rt],
  'rt': rt,
  'output_point_info': { 'position': position }
}
Public nodes typically return HTTP 405 for this route. Build voucher data client‑side using a local tree or a dedicated indexer, then submit proofs with your transaction flows.