Skip to main content

Class: SolanaChainSigner

Defined in: solana-client/src/chain-signer.ts:36

Solana implementation of OvercastChainSigner. From a SolanaConfig it resolves the signing keypair and builds the shared connection / provider / Anchor program, then signs and confirms the transactions an SolanaWriter builder produces.

The program it holds is the same one the builder should run against, so the fee payer the builder bakes into each transaction (provider.publicKey) and the key this signer signs with are guaranteed to match.

A config with neither a wallet nor a privateKey still builds fully — the connection / provider / program are what the SolanaReader, SolanaWriter and SolanaIndexerClient all run on — but its wallet cannot sign, so submit throws. SolanaFactory does not hand such a signer to the app at all (createChainSigner returns undefined), which is what makes the app read-only; this class is then only a holder for the connection.

Extends

Constructors

Constructor

new SolanaChainSigner(config): SolanaChainSigner;

Defined in: solana-client/src/chain-signer.ts:41

Parameters

ParameterType
configSolanaConfig<string>

Returns

SolanaChainSigner

Overrides

OvercastChainSigner<SolanaLayer>.constructor

Properties

config

config: SolanaConfig<string>;

Defined in: overcast-core/dist/layer/chain-signer.d.ts:25

Inherited from

OvercastChainSigner.config

connection

readonly connection: Connection;

Defined in: solana-client/src/chain-signer.ts:37


program

readonly program: Program<OvercastCore>;

Defined in: solana-client/src/chain-signer.ts:39


provider

readonly provider: AnchorProvider;

Defined in: solana-client/src/chain-signer.ts:38

Accessors

address

Get Signature

get address(): Address;

Defined in: solana-client/src/chain-signer.ts:68

The signer's public key (fee payer / signer for everything).

Returns

Address

Overrides

OvercastChainSigner.address

Methods

submit()

submit(tx): Promise<TxInfo>;

Defined in: solana-client/src/chain-signer.ts:73

Sign, send and confirm a built transaction; returns its TxInfo.

Parameters

ParameterType
txTransaction

Returns

Promise<TxInfo>

Overrides

OvercastChainSigner.submit

submitAll()

submitAll(txs): Promise<TxInfo[]>;

Defined in: solana-client/src/chain-signer.ts:78

Parameters

ParameterType
txsTransaction[]

Returns

Promise<TxInfo[]>

Overrides

OvercastChainSigner.submitAll