Skip to content
docs

NativeStakingConfig

Defined in: protocol-staking-native-solana/src/protocol.ts:40

Configuration of NativeStakingProtocolSolana. Only validators is required.

optional allowDelinquent?: boolean

Defined in: protocol-staking-native-solana/src/protocol.ts:48

Allow delegating to a delinquent validator (default false: its stake earns nothing).


optional commitment?: "processed" | "confirmed" | "finalized"

Defined in: protocol-staking-native-solana/src/protocol.ts:52

Read commitment (default confirmed).


optional computeUnitLimit?: number

Defined in: protocol-staking-native-solana/src/protocol.ts:66

Explicit compute-unit limit. Without it the wallet sets one from simulation.


optional computeUnitPrice?: number | bigint

Defined in: protocol-staking-native-solana/src/protocol.ts:68

Explicit priority fee, micro-lamports per unit. Without it the wallet picks one from recent fees.


optional defaultValidator?: string

Defined in: protocol-staking-native-solana/src/protocol.ts:44

Vote account stake uses when the call names none. Without it: the first eligible validator of the list (no default in 'any' mode).


optional discover?: boolean

Defined in: protocol-staking-native-solana/src/protocol.ts:62

Also find stake accounts other wallets created for this address (getProgramAccounts by staker and withdrawer). Needs an RPC that serves it. Default false.


optional enrich?: ValidatorEnricher

Defined in: protocol-staking-native-solana/src/protocol.ts:70

Adds data to validators (APR with MEV, names, scores) from an explorer or the app’s backend.


optional feeReserve?: number | bigint

Defined in: protocol-staking-native-solana/src/protocol.ts:64

Lamports stake leaves on the wallet for later fees (default 0.005 SOL).


optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Defined in: protocol-staking-native-solana/src/protocol.ts:56

fetch for URL providers (default the global one).

(input, init?): Promise<Response>

MDN Reference

URL | RequestInfo

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | URL | Request

RequestInit

Promise<Response>


optional maxAccounts?: number

Defined in: protocol-staking-native-solana/src/protocol.ts:60

Seed slots scanned (default 32, at most 100).


optional maxCommission?: number

Defined in: protocol-staking-native-solana/src/protocol.ts:46

Refuse to delegate to a validator whose commission is above this, percent (default 10). Checked live at every delegation.


optional provider?: SolanaRpcSource | SolanaRpcSource[]

Defined in: protocol-staking-native-solana/src/protocol.ts:50

Where reads go: a URL, a list (tried in order), a @solana/rpc client or { request(method, params) }. Defaults to the account’s own RPC.


optional seedPrefix?: string

Defined in: protocol-staking-native-solana/src/protocol.ts:58

Seed prefix of the wallet’s stake accounts (default stake:). Changing it hides accounts made under the old prefix unless discover is on.


optional timeoutMs?: number

Defined in: protocol-staking-native-solana/src/protocol.ts:54

Per-request timeout for reads through a URL or a @solana/rpc client, ms (default 15 000). A { request } provider keeps its own.


validators: ValidatorsOption

Defined in: protocol-staking-native-solana/src/protocol.ts:42

The validators to delegate to (vote accounts), or 'any'. Required: there is no default list.