chain/getNoteWitness
Gets a witness (merkle path) to a specified note in the note merkle tree. This witness is necessary for creating a transaction that spends the note.
This endpoint would primarily be used to construct transactions without using the Iron Fish wallet.
The returned treeSize
and rootHash
values will always reference the note
merkle tree state at confirmations
blocks behind current HEAD of the chain. If
no value is provided for confirmations
, then the value from the node's
configuration will be used. If the chain experiences a re-org and that block
moves to a fork, this witness will no longer be usable in a transaction.
Request
{
index: number;
confirmations?: number;
}
Response
{
treeSize: number
rootHash: string
authPath: Array<{
side: 'Left' | 'Right'
hashOfSibling: string
}>
}