> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kuru.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Indexing KuruTradingWallet

> Track signed intents and trigger lifecycle per delegated trading-wallet EOA.

EIP-7702 executes wallet logic and storage in the delegated EOA's context. The event `address` is therefore the wallet EOA; never aggregate trigger storage under the shared implementation address.

| Event | Reducer action |
| - | - |
| `IntentExecuted(intentHash, wallet, accountId, market, clientOrderId, nonce)` | Record successful immediate action and advance observed nonce |
| `TriggerCreated(triggerId, wallet, accountId, market, clientOrderId, nonce, expiry, conditionHash, action)` | Insert `ACTIVE` trigger |
| `TriggerCanceled(triggerId, wallet, accountId)` | Set `CANCELED` |
| `TriggerFired(triggerId, keeper, executionReportHash)` | Set `FIRED` and retain keeper report hash |
| `TriggerExpired(triggerId)` | Set `EXPIRED` |

Key triggers by `(chainId, wallet, triggerId)`. A trigger ID is the EIP-712 creation digest. Join the resulting OrderBook action by transaction and `clientOrderId`, but treat the digest and orderbook-generated trade IDs as canonical identities.

Expiry and AccountCore permission expiry can make an `ACTIVE` record non-executable without emitting an event. Present stored status separately from derived executability. Authorization changes invalidate old triggers through the AccountCore authorization epoch.

Index `lastSeenOrderNonce`, `usedTriggerNonce`, and `getTrigger` from the delegated wallet address when reconciling state.

## TWAP schedules

Key schedules by `(chainId, wallet, twapId)`. `TwapCreated` contains the signed header and config. `TwapSliceExecuted` identifies the slice, requested quantity, child client ID, keeper and report hash; reconcile actual fills from the market logs rather than treating requested quantity as settled quantity.

`TwapSlicesSkipped` records skipped interval ranges. `TwapCanceled` stops the schedule; `TwapFinished` records successful and skipped counts. Failed transactions do not persist slice progress. No catch-up or quantity rollover occurs.

## Wallet-authored data

`SignedDataEmitted(wallet, nonce, data)` publishes opaque public bytes. Use the emitting delegated EOA, chain, and sequential data nonce as provenance. A wallet-authored label is not proof of account permission; join AccountCore signer state separately.

## Version and state

Wallet v2 stores nonce, trigger and TWAP state separately per chain. Trigger creation nonce, deadline and condition commitment are available from calldata/events rather than all being retained by `getTrigger`. Do not infer them from nonexistent getter fields. The creation signature is verified once; live authority and epoch checks still apply when a keeper fires.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.