Class: SolanaChainSigner
Defined in: solana-client/src/chain-signer.ts:27
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 without a privateKey yields a read-only signer: the
connection / provider / program are still built (so the SolanaReader
and any other read path work), but publicKey and submit throw — there is
no key to identify a wallet or sign a transaction with.
Extends
OvercastChainSigner<SolanaLayer>
Constructors
Constructor
new SolanaChainSigner(config): SolanaChainSigner;
Defined in: solana-client/src/chain-signer.ts:34
Parameters
| Parameter | Type |
|---|---|
config | SolanaConfig |
Returns
SolanaChainSigner
Overrides
OvercastChainSigner<SolanaLayer>.constructor
Properties
config
config: SolanaConfig;
Defined in: overcast-core/dist/layer/chain-signer.d.ts:12
Inherited from
OvercastChainSigner.config
connection
readonly connection: Connection;
Defined in: solana-client/src/chain-signer.ts:30
keypair
readonly keypair: Keypair | null;
Defined in: solana-client/src/chain-signer.ts:29
null for a read-only signer (no privateKey was supplied).
program
readonly program: Program<OvercastCore>;
Defined in: solana-client/src/chain-signer.ts:32
provider
readonly provider: AnchorProvider;
Defined in: solana-client/src/chain-signer.ts:31
Accessors
canSign
Get Signature
get canSign(): boolean;
Defined in: solana-client/src/chain-signer.ts:48
Whether this signer holds a key and can sign / identify a wallet.
Returns
boolean
publicKey
Get Signature
get publicKey(): string;
Defined in: solana-client/src/chain-signer.ts:53
The signer's public key (fee payer / signer for everything).
Returns
string
Overrides
OvercastChainSigner.publicKey
Methods
submit()
submit(tx): Promise<TxInfo>;
Defined in: solana-client/src/chain-signer.ts:63
Sign, send and confirm a built transaction; returns its TxInfo.
Parameters
| Parameter | Type |
|---|---|
tx | Transaction |
Returns
Promise<TxInfo>
Overrides
OvercastChainSigner.submit