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 the current HEAD of the chain.
If the chain experiences a re-org and the referenced HEAD moves to a fork, this witness will no longer be usable in a transaction.
Request
{
index: number;
}
Response
{
treeSize: number
rootHash: string
authPath: Array<{
side: 'Left' | 'Right'
hashOfSibling: string
}>
}