Interface: OvercastStore
Defined in: packages/overcast-core/src/storage/index.ts:295
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(domain, kind): Promise<Checkpoint | null>;
Defined in: packages/overcast-core/src/storage/index.ts:331
One deployment's resume cursor for the given loop (see
CheckpointKind). Cursors are keyed by (domain, kind): an indexer
runs per deployment and its cursor is a position in that chain's log, so
two deployments' loops must not share one.
Parameters
| Parameter | Type |
|---|---|
domain | number |
kind | CheckpointKind |
Returns
Promise<Checkpoint | null>
insertEvents()
insertEvents(events, commitment): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:302
Insert a batch of indexed on-chain events at the given commitment
(default live), updating the derived offer / option / totals
projections. Idempotent per event so re-indexing a range is safe; a
finalized insert upgrades an existing live row.
Parameters
| Parameter | Type |
|---|---|
events | IndexedEvents[] |
commitment | Commitment |
Returns
Promise<void>
recordQuote()
recordQuote(quote): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:307
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:305
Persist (or update) an off-chain RFQ so it is fetchable after the fact.
Parameters
| Parameter | Type |
|---|---|
rfq | StoredRfq |
Returns
Promise<void>
setCheckpoint()
setCheckpoint(
domain,
kind,
checkpoint): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:336
Write, or on null clear, one deployment's cursor for the given loop.
Parameters
| Parameter | Type |
|---|---|
domain | number |
kind | CheckpointKind |
checkpoint | Checkpoint | null |
Returns
Promise<void>
setQuoteStatus()
setQuoteStatus(
quoteId,
status,
optionId?): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:319
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? | Bytes32 |
Returns
Promise<void>
setRfqStatus()
setRfqStatus(rfqId, status): Promise<void>;
Defined in: packages/overcast-core/src/storage/index.ts:314
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>