@armada/sdk / index / reconstructHistory
Function: reconstructHistory()
reconstructHistory(
input):HistoryEntry[]
Defined in: src/sync/history.ts:185
Full history reconstruction (H1 receives + H2 sends/unshields/yield). Each transaction the wallet participated in is classified once, per token, from owned notes + spent nullifiers + Unshield events:
- receive tx (no own spend):
shield/transfer-receivedper created note — unless the tx also carries an Unshield to the yield adapter, i.e. the USDC leg of a yield withdrawal →yield-withdraw. - spend tx (own inputs nullified): net delta = change − inputs (negative). Category by Unshield: to the adapter →
yield-deposit; to any other address →unshield(+ recipient + protocol fee); none →transfer-sent.
The broadcaster (relayer) fee inside a send is a non-owned output not recoverable here — H3 adds it via sender-side decryption. value is the signed wallet delta for the token. USDC-scoped like the rest of the SDK: aUSDC legs of yield ops aren't tracked, so a withdrawal is seen via its USDC return.