5acb8ff993
Thread isReturn/returnOriginKey from CARROT scan pipeline into
WalletOutput storage, then use it to link incoming PROTOCOL payouts
back to their originating STAKE transactions.
- Add StakeRecord class (stakeTxHash → return info lifecycle)
- Add stake storage to MemoryStorage + IndexedDBStorage (v2 schema)
- Create StakeRecords on outgoing STAKE txs, match returns on
PROTOCOL txs via CARROT _returnOutputMap → changeOutputKey lookup
- stakedBalance now reflects only currently locked stakes (not
total ever staked) in getBalance() and getStorageBalance()
- getStakeHistory() returns full lifecycle with status, returnAmount,
yieldEarned
- Handle reorg rollback for stakes (deleteStakesAbove)
- Fix stake-tracker.js tx hash display, add --tx lookup mode