Skip to content

@armada/sdk / index / reconstructReceiveHistory

Function: reconstructReceiveHistory() ​

reconstructReceiveHistory(ownedTxos, spentNullifiers, nullifyingKey, resolveToken): HistoryEntry[]

Defined in: src/sync/history.ts:189

Reconstruct RECEIVE history (H1): shields the wallet deposited + transfers it received. Owned transact-origin notes created in a tx where the wallet ALSO spent an input are its own change, not incoming transfers, so they are excluded here — the corresponding send entry is produced by the spend-side reconstruction (H2). Requires the nullifying key to detect the wallet's own spends; a view-only wallet has it (derived from the viewing key), so this works for view-only too. Several notes of one kind in one tx (a split send, a batched shield) are ONE entry per (txid, token).

Parameters ​

ownedTxos ​

readonly TXO[]

spentNullifiers ​

readonly SpentNullifier[]

nullifyingKey ​

bigint

resolveToken ​

TokenAddressResolver

Returns ​

HistoryEntry[]