NativeStakingNearConfig
Defined in: protocol-staking-native-near/src/types.ts:46
Configuration of NativeStakingProtocolNear. Only pools is required.
Properties
Section titled “Properties”allowInactive?
Section titled “allowInactive?”
optionalallowInactive?:boolean
Defined in: protocol-staking-native-near/src/types.ts:54
Allow pools outside the current or next validator set (default false: their stake earns nothing).
codeHashes?
Section titled “codeHashes?”
optionalcodeHashes?: readonlystring[]
Defined in: protocol-staking-native-near/src/types.ts:72
More staking-pool code hashes to accept, on top of KNOWN_POOL_CODE_HASHES (the app vouches for them).
concurrency?
Section titled “concurrency?”
optionalconcurrency?:number
Defined in: protocol-staking-native-near/src/types.ts:85
Reads in flight at once (default 4).
defaultPool?
Section titled “defaultPool?”
optionaldefaultPool?:string
Defined in: protocol-staking-native-near/src/types.ts:50
Used when a call names no pool. A single-entry list is its own default.
discover?
Section titled “discover?”
optionaldiscover?:false|PoolDiscovery|"fastnear"
Defined in: protocol-staking-native-near/src/types.ts:81
How positions outside the configured pools are found: 'fastnear' (default) asks
api.fastnear.com (test.api.fastnear.com on testnet) which pools the account delegated to; a
function is the app’s own lookup; false reads only listed pools and the pools passed to a call.
Discovered ids that are not factory pools are dropped without a read.
enrich?
Section titled “enrich?”
optionalenrich?:PoolEnricher
Defined in: protocol-staking-native-near/src/types.ts:74
Adds data to pools (APR, names, logos).
optionalgas?:object
Defined in: protocol-staking-native-near/src/types.ts:70
Prepaid gas overrides (defaults: 50 Tgas each). All of it is bought upfront at min_gas_purchase_price: keep it small.
stake?
Section titled “stake?”
optionalstake?:bigint
unstake?
Section titled “unstake?”
optionalunstake?:bigint
withdraw?
Section titled “withdraw?”
optionalwithdraw?:bigint
history?
Section titled “history?”
optionalhistory?:HistorySource
Defined in: protocol-staking-native-near/src/types.ts:83
History of the account (e.g. wallet-near’s createNearHistory): dates the last unstake for exact unlock epochs.
maxFee?
Section titled “maxFee?”
optionalmaxFee?:number
Defined in: protocol-staking-native-near/src/types.ts:52
Refuse pools whose reward fee is above this, percent (default 10). Read fresh at every write.
minUptime?
Section titled “minUptime?”
optionalminUptime?:number
Defined in: protocol-staking-native-near/src/types.ts:56
Refuse pools whose uptime in the current epoch is below this, percent (default 0: off).
network?
Section titled “network?”
optionalnetwork?:NearNetwork
Defined in: protocol-staking-native-near/src/types.ts:58
Default: from the account’s chain (near:testnet → testnet, else mainnet).
pools:
PoolsOption
Defined in: protocol-staking-native-near/src/types.ts:48
Pool ids to stake into, or 'any'. Required.
provider?
Section titled “provider?”
optionalprovider?:NearProvider|NearProvider[]
Defined in: protocol-staking-native-near/src/types.ts:60
RPC url(s) or transport(s); a list fails over. Default: the wallet-near account’s own provider.
reserve?
Section titled “reserve?”
optionalreserve?:number|bigint
Defined in: protocol-staking-native-near/src/types.ts:68
yoctoNEAR stake leaves on the account (default 0.02 NEAR). Never less than the upfront gas of
the largest exit, [withdraw_all, unstake], at the current prices (see NearStakeQuote.reserve),
so a stake can always be left.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: protocol-staking-native-near/src/types.ts:62
Per-request timeout for url providers, ms (default 15 000).