Interface: OvercastStore
Defined in: packages/overcast-core/src/storage/index.ts:185
The permissioned write surface. Wired only into trusted processes:
- the OvercastIndexer, which streams on-chain events via insertEvents;
- the RFQ service, which persists validated off-chain RFQs / quotes.
Authorization is not modelled here — it is enforced at the transport boundary by never handing this port to untrusted callers. Public, read-only consumers (incl. the frontend) get an OvercastView instead.
Methods
getCheckpoint()
getCheckpoint(kind): Promise<Checkpoint | null>;
Defined in: packages/overcast-core/src/storage/index.ts:215
The indexer's resume cursor for the given loop (see CheckpointKind).
Parameters
| Parameter | Type |
|---|---|
kind | CheckpointKind |
Returns
Promise<Checkpoint | null>
insertEvents()
insertEvents(events): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:191
Insert a batch of indexed on-chain events, updating the derived offer / option / totals projections. Idempotent per event so re-indexing a range is safe.
Parameters
| Parameter | Type |
|---|---|
events | IndexedEvents[] |
Returns
Promise<void>
recordQuote()
recordQuote(quote): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:196
Persist (or update) an off-chain quote submitted against an RFQ.
Parameters
| Parameter | Type |
|---|---|
quote | StoredQuote |
Returns
Promise<void>
recordRfq()
recordRfq(rfq): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:194
Persist (or update) an off-chain RFQ so it is fetchable after the fact.
Parameters
| Parameter | Type |
|---|---|
rfq | StoredRfq |
Returns
Promise<void>
setCheckpoint()
setCheckpoint(kind, checkpoint): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:216
Parameters
| Parameter | Type |
|---|---|
kind | CheckpointKind |
checkpoint | Checkpoint | null |
Returns
Promise<void>
setQuoteStatus()
setQuoteStatus(
quoteId,
status,
optionId?): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:208
Transition a quote to a new status (and bind its optionId once accepted),
stamping updatedAt. No-op if the quote is unknown.
Parameters
| Parameter | Type |
|---|---|
quoteId | string |
status | QuoteStatus |
optionId? | string |
Returns
Promise<void>
setRfqStatus()
setRfqStatus(rfqId, status): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:203
Transition a persisted RFQ to a new lifecycle status, stamping updatedAt.
A cheaper alternative to reconstructing the whole StoredRfq for a
recordRfq upsert. No-op if the RFQ is unknown.
Parameters
| Parameter | Type |
|---|---|
rfqId | string |
status | RfqStatus |
Returns
Promise<void>