Skip to main content

Abstract Class: OracleSettlementLayer<L>

Defined in: packages/overcast-core/src/protocol/settlement-layer.ts:155

The logic for one settlement layer on a given chain (L): the config (Id) an offer commits to, and — for layers that have one — a convenience helper for the exercise/redeem metadata.

A layer defines this once per chain (e.g. a Solana physical layer) and is registered by its type key in the chain's SettlementLayerRegistry. The registry is a caller-side helper: it produces the config a caller pins into details.settlementLayer before signing. The writer never consults it — it commits whatever the offer already carries, verbatim.

Type Parameters

Type ParameterDescription
L extends OvercastLayerthe OvercastLayer describing this settlement layer.

Implements

Constructors

Constructor

new OracleSettlementLayer<L>(): OracleSettlementLayer<L>;

Returns

OracleSettlementLayer<L>

Properties

type

readonly type: L["settlement"] = "oracle";

Defined in: packages/overcast-core/src/protocol/settlement-layer.ts:158

This layer's type key — matches the on-chain discriminator and the registry key.

Implementation of

OvercastSettlementLayer.type

Methods

buildMetadata()

buildMetadata(_option): Promise<Metadata>;

Defined in: packages/overcast-core/src/protocol/settlement-layer.ts:160

Optional helper producing this layer's conventional exercise/redeem metadata. Purely a convenience: the writer forwards whatever bytes the caller passes verbatim, so a caller with an intent the SDK has no model for can ignore this and supply its own bytes.

Parameters

ParameterType
_optionMarketOption

Returns

Promise<Metadata>

Implementation of

OvercastSettlementLayer.buildMetadata


defaultConfig()

abstract defaultConfig(details): string;

Defined in: packages/overcast-core/src/protocol/settlement-layer.ts:164

The default config (Id) for this layer, used when a caller selects the layer without naming a specific config.

Parameters

ParameterType
detailsPartial<OptionDetails>

Returns

string

Implementation of

OvercastSettlementLayer.defaultConfig