Class: SolanaFactory<N>
Defined in: solana-client/src/factory.ts:34
The Solana ProtocolFactory: a single SolanaConfig is all the SDK needs to build every per-layer piece — the SolanaChainSigner, the transaction-building SolanaWriter, the SolanaReader and the SolanaIndexerClient. Hand it to OvercastApp.create and the rest of the SDK stays chain-agnostic. (Protocol-payload signing is chain-agnostic and lives in core — see createProtocolSigner.)
The chain signer is built once and shared: the writer runs against the signer's
Anchor program, so the fee payer it bakes into each transaction
(provider.publicKey) and the key the signer signs with are guaranteed to
match, and the reader / indexer reuse the same RPC connection.
Extends
ProtocolFactory<N,SolanaLayer>
Type Parameters
| Type Parameter |
|---|
N extends ChainName |
Constructors
Constructor
new SolanaFactory<N>(config): SolanaFactory<N>;
Defined in: solana-client/src/factory.ts:45
Parameters
| Parameter | Type |
|---|---|
config | InputConfig<SolanaConfig<N>, N> |
Returns
SolanaFactory<N>
Overrides
ProtocolFactory<
N,
SolanaLayer
>.constructor
Properties
config
readonly config: SolanaConfig<string> & OvercastConfig<N>;
Defined in: overcast-core/dist/layer/factory.d.ts:47
The config this factory was built with, with its chainName narrowed to the
literal N — so factory.config.chainName is "base", not string.
Inherited from
ProtocolFactory.config
name
readonly name: N;
Defined in: overcast-core/dist/layer/factory.d.ts:35
The chain this factory builds for, at its literal type — the runtime value
of config's chainName, surfaced separately because this is the one
place N is inferrable from. A MultiOvercastApp keys its chains by
it, which is what makes multi.get("base") resolve to this factory's
layer rather than a union over every chain passed.
Inherited from
ProtocolFactory.name
protocol
readonly protocol: "svm" = SolanaFactory.protocol;
Defined in: solana-client/src/factory.ts:41
Which settlement-layer protocol this factory speaks — "evm", "svm".
Mirrored as a static on each implementation, so a host can key a table by
it before it has an instance to ask.
Overrides
ProtocolFactory.protocol
protocol
readonly static protocol: "svm" = "svm";
Defined in: solana-client/src/factory.ts:39
See ProtocolFactory.protocol.
Accessors
settlementLayers
Get Signature
get settlementLayers(): SettlementLayerRegistry<SolanaLayer>;
Defined in: solana-client/src/factory.ts:98
The settlement layers Solana implements. The exhaustive map over
keyof SolanaLayer["settlements"] makes the compiler enforce every declared
layer is registered — add "cash" to SolanaLayer and this won't
compile until it's wired up here.
Each layer is handed the shared Anchor Provider so its read() can
fetch and decode its on-chain config account through the layer program's
own IDL account coder.
Returns
SettlementLayerRegistry<SolanaLayer>
Overrides
ProtocolFactory.settlementLayers
utils
Get Signature
get utils(): OvercastUtils;
Defined in: solana-client/src/factory.ts:84
The Solana address helpers — stateless, so a shared instance is reused.
Returns
OvercastUtils
Overrides
ProtocolFactory.utils
Methods
createChainSigner()
createChainSigner(): Promise<
| OvercastChainSigner<SolanaLayer>
| undefined>;
Defined in: solana-client/src/factory.ts:57
The chain signer — or undefined when the config carries no key material
(no wallet, no privateKey), which makes the app read-only. Note the
SolanaChainSigner is still built internally in that case: it owns
the connection / provider / program the reader, writer and indexer run on,
and only its signing half is unusable. Withholding it here is what keeps
a keyless app from submitting through a wallet that cannot sign.
Returns
Promise<
| OvercastChainSigner<SolanaLayer>
| undefined>
Overrides
ProtocolFactory.createChainSigner
createIndexerClient()
createIndexerClient(): Promise<OvercastIndexerClient>;
Defined in: solana-client/src/factory.ts:74
Returns
Promise<OvercastIndexerClient>
Overrides
ProtocolFactory.createIndexerClient
createReader()
createReader(): Promise<OvercastReader>;
Defined in: solana-client/src/factory.ts:67
Returns
Promise<OvercastReader>
Overrides
ProtocolFactory.createReader
createWriter()
createWriter(): Promise<OvercastWriter<SolanaLayer, Transaction>>;
Defined in: solana-client/src/factory.ts:63
Returns
Promise<OvercastWriter<SolanaLayer, Transaction>>
Overrides
ProtocolFactory.createWriter
withConfig()
withConfig(config): ProtocolFactory<N, SolanaLayer>;
Defined in: solana-client/src/factory.ts:126
Returns a new factory based on the config that is passed
Parameters
| Parameter | Type | Description |
|---|---|---|
config | Partial<SolanaConfig<N>> | - |
Returns
ProtocolFactory<N, SolanaLayer>
Overrides
ProtocolFactory.withConfig