Class: SolanaPhysicalLayer
Defined in: solana-client/src/settlement-layer.ts:141
Solana's physical settlement layer: settlement happens in the underlying
asset, so it carries no metadata and commits to the Full-exercise-mode
physical config by default. read() decodes a config account through the
physical layer's own SETTLEMENT_PHYSICAL_IDL account coder.
Implements
OvercastSettlementLayer<SolanaLayer,PhysicalSettlementConfig>
Constructors
Constructor
new SolanaPhysicalLayer(provider, programId?): SolanaPhysicalLayer;
Defined in: solana-client/src/settlement-layer.ts:147
Parameters
| Parameter | Type | Default value |
|---|---|---|
provider | Provider | undefined |
programId | string | SETTLEMENT_PHYSICAL_PROGRAM_ID |
Returns
SolanaPhysicalLayer
Properties
type
type: SettlementKey<SolanaLayer> = "physical";
Defined in: solana-client/src/settlement-layer.ts:145
This layer's type key — matches the on-chain discriminator and the registry key.
Implementation of
OvercastSettlementLayer.type
Methods
buildMetadata()?
optional buildMetadata(_option): Promise<Metadata>;
Defined in: solana-client/src/settlement-layer.ts:179
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
| Parameter | Type |
|---|---|
_option | MarketOption |
Returns
Promise<Metadata>
Implementation of
OvercastSettlementLayer.buildMetadata
configId()
configId(config): Promise<Bytes32>;
Defined in: solana-client/src/settlement-layer.ts:193
The config PDA config lives at — derived from the exercise mode alone (see
getSettlementConfigPda), so it can be pinned into an offer's
details.settlementLayer before (or without) the account existing.
Parameters
| Parameter | Type |
|---|---|
config | PhysicalSettlementConfig |
Returns
Promise<Bytes32>
Implementation of
OvercastSettlementLayer.configId
createConfig()
createConfig(config): Promise<Transaction>;
Defined in: solana-client/src/settlement-layer.ts:168
Deploy the physical config for exerciseMode. Its address is fully
determined by that one byte (see getSettlementConfigPda), so this is
a one-time-per-mode deployment: a second call for a mode that already
exists fails on chain with Anchor's account-already-in-use error rather
than overwriting anything.
Parameters
| Parameter | Type |
|---|---|
config | PhysicalSettlementConfig |
Returns
Promise<Transaction>
Implementation of
OvercastSettlementLayer.createConfig
defaultConfig()
defaultConfig(): Promise<PhysicalSettlementConfig>;
Defined in: solana-client/src/settlement-layer.ts:184
Full exercise (see DEFAULT_PHYSICAL_CONFIG).
Returns
Promise<PhysicalSettlementConfig>
Implementation of
OvercastSettlementLayer.defaultConfig
read()
read(id): Promise<PhysicalSettlementConfig>;
Defined in: solana-client/src/settlement-layer.ts:201
Read the on-chain config account this layer owns at id and decode it into
this layer's typed config C. Because SettlementLayerRegistry.resolve
is generic over the layer key, a caller who selects a concrete layer
(resolve("oracle")) gets a precisely-typed result here with no casts.
Throws if the account doesn't exist or isn't a config this layer owns.
Parameters
| Parameter | Type |
|---|---|
id | Bytes32 |
Returns
Promise<PhysicalSettlementConfig>
Implementation of
OvercastSettlementLayer.read