Skip to main content

Class: SolanaOracleLayer

Defined in: solana-client/src/settlement-layer.ts:71

Solana's oracle-gated settlement layer: settlement is priced off an oracle feed per asset, so its config PDA binds the collateral and settlement mints together with each mint's oracle OracleKindByte kind and 32-byte feed id. That full binding is baked into the config address (see getOracleSettlementConfigPda), so the derived pubkey alone identifies exactly which (mints, oracles) the option settles against.

The feedIds map resolves each asset Id (mint) to its oracle feed id; oracleKind applies to both sides (all mainnet feeds are ORACLE_KIND.Pyth today). Exercise/redeem carry no metadata (inherited from OracleSettlementLayer) — the layer program is recovered from the config account's on-chain owner by the writer.

Extends

Constructors

Constructor

new SolanaOracleLayer(feedIds?, oracleKind?): SolanaOracleLayer;

Defined in: solana-client/src/settlement-layer.ts:72

Parameters

ParameterTypeDefault value
feedIdsMap<string, Uint8Array<ArrayBufferLike>>DEFAULT_MAINNET_ORACLE_IDS
oracleKind0ORACLE_KIND.Pyth

Returns

SolanaOracleLayer

Overrides

OracleSettlementLayer<SolanaLayer>.constructor

Properties

type

readonly type: KnownSettlementLayer | string & object;

Defined in: overcast-core/dist/protocol/settlement-layer.d.ts:99

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

Inherited from

OracleSettlementLayer.type

Methods

buildMetadata()

buildMetadata(_option): Promise<Metadata>;

Defined in: overcast-core/dist/protocol/settlement-layer.d.ts:100

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>

Inherited from

OracleSettlementLayer.buildMetadata

defaultConfig()

defaultConfig(details): string;

Defined in: solana-client/src/settlement-layer.ts:85

Derive the oracle-gated config PDA the option commits to from the pair's collateral and settlement mints and their registered oracle feed ids. Both mints must be present and both must have a feed id in feedIds; anything missing is a caller error (the option can't be priced without it).

Parameters

ParameterType
detailsPartial<OptionDetails>

Returns

string

Overrides

OracleSettlementLayer.defaultConfig