Skip to main content

Class: OvercastApp<L>

Defined in: packages/overcast-core/src/app.ts:33

The full Overcast SDK surface for a settlement layer, organised by where each operation lands so the effect of a call is clear from how you reach it:

  • chain — authoritative on-chain reads + signed writes (costs gas, needs the signer, chain-specific);
  • api — cheap, curated reads over the backend's REST API;
  • rfq — the realtime RFQ channel;
  • utils — pure, chain-specific helpers (address validation, …).

Everything is composed from a single ProtocolFactory; the app itself is a thin facade holding these namespaces.

Type Parameters

Type Parameter
L extends OvercastLayer

Properties

api

readonly api: OvercastView;

Defined in: packages/overcast-core/src/app.ts:46

Off-chain reads over the backend's REST API (curated options, offers, RFQs and quotes). Always built from the app's OvercastConfig — pointed at config.backend — so consumers can query the indexed/persisted state without touching the chain.


chain

readonly chain: OvercastChain<L>;

Defined in: packages/overcast-core/src/app.ts:38

On-chain reads + signed writes, merged behind one object. These hit the settlement layer directly — as opposed to the off-chain reads on api.


protocolSigner?

readonly optional protocolSigner?: OvercastProtocolSigner;

Defined in: packages/overcast-core/src/app.ts:68

Signs arbitrary protocol payloads (ed25519), or undefined for a read-only app. Built in core from the OvercastConfig — its explicit protocolSigner override if set, otherwise one derived from privateKey.


publicKey

readonly publicKey: string;

Defined in: packages/overcast-core/src/app.ts:61

The wallet's public key (fee payer / signer for everything on chain).


settlement

readonly settlement: SettlementLayerRegistry<L>;

Defined in: packages/overcast-core/src/app.ts:58

The settlement layers this chain implements. A caller-side helper for picking the config an offer commits to — call settlement.select(...) and pin the returned Id into details.settlementLayer before signing. The chain writer commits whatever the offer carries verbatim; it never consults this.


utils

readonly utils: OvercastUtils;

Defined in: packages/overcast-core/src/app.ts:49

Pure, chain-specific helpers (address validation, normalization, …).

Accessors

rfq

Get Signature

get rfq(): RfqClient;

Defined in: packages/overcast-core/src/app.ts:140

The realtime RFQ channel (register, create/quote/accept, broadcasts), built lazily on first access. The underlying socket only connects once a caller actually reaches for RFQ, so write / read-only flows (deposit, withdraw, balances) never open one.

Requires a protocolSigner — the channel authorizes quotes and accepts by signing offers — so a read-only app (no privateKey / protocolSigner in the config) throws here.

Returns

RfqClient

Methods

create()

static create<L>(__namedParameters): Promise<OvercastApp<L>>;

Defined in: packages/overcast-core/src/app.ts:106

Builds an OvercastApp from a factory. Resolves the layer's signer, transaction writer and reader (all produced asynchronously), composes them into the on-chain OvercastChain, and grabs the layer's synchronous OvercastUtils — so the returned app is fully wired and ready to use.

Everything is derived from the factory's OvercastConfig; pass an explicit config only to override what the factory was built with.

Type Parameters

Type Parameter
L extends OvercastLayer

Parameters

ParameterType
__namedParametersAppOptions<L>

Returns

Promise<OvercastApp<L>>