Skip to main content

Interface: OvercastLayer

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

Describes a single settlement layer by bundling the three types that vary between implementations, so the rest of the SDK threads one generic (L) instead of repeating <T, R, C> everywhere. Each consumer derives what it needs via indexed access (L["tx"], L["receipt"], L["config"]).

A layer defines this once (e.g. SolanaLayer) and passes it as the single generic argument to ProtocolFactory, OvercastChainSigner, SigningWriter and OvercastApp.

Type Param

tx

the built-but-unsubmitted transaction the writer produces.

Type Param

receipt

the signer's submission receipt (e.g. TxInfo).

Type Param

config

the layer's OvercastConfig (connection + key material) as a shape, with its chainName left at the open ChainName. The name a deployment is filed under is deliberately not part of a layer: nothing a layer describes varies by it, and the two places that do need it as a literal — ProtocolFactory and OvercastApp — carry their own N and intersect it back in (L["config"] & OvercastConfig<N>). Baking it in here instead would make SolanaLayer<"base"> and SolanaLayer<string> incompatible layers, so a name-agnostic piece like a chain signer could no longer be handed to a name-parameterized factory without threading a generic it never reads.

Type Param

settlements

the SettlementConfigMap: the settlement-layer type keys this chain implements, each mapped to the config shape its read() returns. keyof settlements is the union of layer keys — it keys the chain's SettlementLayerRegistry and every SettlementSelection, so selecting an unsupported layer is a compile error — while the mapped values give each layer a precise config type. The map always includes the KnownSettlementLayer subset every chain must support, so the registry can't be built without it.

Type Param

settlementContext

the chain-specific extra inputs a settlement layer needs to resolve a decision, forwarded to it uninterpreted. Opaque to core, which only threads it from caller to writer, so each chain models it in its own terms (Solana: the read-only accounts the layer's can_exercise CPI reads; elsewhere it might be a proof or a signed price payload). Unlike metadata it is never part of what a SignedOperation signs over — it names what the layer reads, not terms a party agrees to.

Properties

config

config: OvercastConfig<string>;

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


receipt

receipt: TxInfo;

Defined in: packages/overcast-core/src/layer/layer.ts:60


settlementContext

settlementContext: unknown;

Defined in: packages/overcast-core/src/layer/layer.ts:63


settlements

settlements: SettlementConfigMap;

Defined in: packages/overcast-core/src/layer/layer.ts:62


tx

tx: UnsignedTransaction;

Defined in: packages/overcast-core/src/layer/layer.ts:59