Indexing
Validated account records and durable settlement history.
Identify account records
An account record contains its address, owning program, and data. Validate the owner, generated discriminator, decoded state, and applicable PDA before using it. State types define Market, Model, ModelGroup, Provider, metadata, users, bookings, and slab headers.
Preserve observation ordering and account deletion. A slot alone cannot distinguish several writes within that slot. Unknown or malformed data is unsupported state, not an empty book.
Build a catalog
Bind each model to its canonical list terms. Read the full populated offer count and apply selected-list membership. Offer positions can move; provider identity and stable provider limit ID establish the relationship.
In provider-limit mode, join each offer to its canonical provider index and counter page. Expose providerLimits.global and providerLimits.wallet, each with concurrency, quota, and quota-window seconds. Include global active bookings, quota usage, and window end. Keep provider-enforced HTTP declarations separate.
Do not cache quota exhaustion as permanent unavailability. Compare its window end with current time when selecting; a quota window can expire without an account write. Changes to provider indices or counter pages invalidate dependent catalog data. A ready catalog must contain every referenced book and counter row. Missing state must not produce a smaller claimed-complete selection set.
Verify committed provider, model, and list documents against the metadata schemas. Preserve group assignments separately from categories and read backing from its pinned vault and mint supply.
Retain settled receipts
Retain successful top-level claim_booking and claim_list_booking instructions with their signed transaction, resolved account keys, and execution result. Decode the generated instruction discriminator and Claim. Resolve address-table keys for versioned transactions before interpreting account indices.
Validate the expected router and market. Bind model, provider, user, booking, and receipt fields to their instruction roles and the reservation they settle. The receipt’s charge includes the list surcharge. Store usage counts and token units separately.
Signature plus instruction position identifies a claim within a transaction. Booking plus generation identifies a reusable reservation. A submitted or decoded transaction without successful execution is not settled evidence. Failed transactions contribute no settled usage.
Preserve historical meaning
A booking account can be reused. Its current provider, list, fee terms, or generation may describe a later request. Preserve the settled generation’s original bindings rather than assigning history from current state.
Receipt fields alone do not include the selected list or fee split. Retain the settled generation’s booking terms to preserve its list and fee split. The reservation transaction identifies the selected list; recovering its fee terms also requires historical state. If the original terms cannot be established, leave attribution unknown.
Transaction history can be incomplete. Missing transactions, unavailable records, and truncated logs must remain visible as coverage gaps. An observed payment proves execution of the accounting rules, not truthful inference usage.