Skip to content
docs

NearConfig

Defined in: wallet-near/src/types.ts:11

Options for a NEAR wallet manager or account: RPC endpoints, network, fee caps and the pre-sign checks.

optional allowDangerousActions?: boolean

Defined in: wallet-near/src/types.ts:33

Allow actions that change the account itself or deploy code (AddKey, DeleteKey, DeleteAccount, DeployContract, Stake, CreateAccount, global-contract actions, SignedDelegate). Default false: they are refused with dangerous-action.


optional headers?: Record<string, string>

Defined in: wallet-near/src/types.ts:17

Optional headers for every request (e.g. an API key).


optional maxStorageDeposit?: number | bigint

Defined in: wallet-near/src/types.ts:39

Most yoctoNEAR a token transfer may attach as storage_deposit to register the recipient (the amount comes from the token contract itself). Default 0.0125 NEAR, ten times the usual NEP-145 minimum.


optional network?: string

Defined in: wallet-near/src/types.ts:21

“mainnet” (default) | “testnet” | any CAIP-2 suffix.


optional provider?: NearProvider | NearProvider[]

Defined in: wallet-near/src/types.ts:13

RPC url(s) / transport(s). A list fails over in order. Omit for an offline (sign-only) wallet.


optional retries?: number

Defined in: wallet-near/src/types.ts:15

Extra attempts across the provider list after the first failure (default 3).


optional simulate?: boolean

Defined in: wallet-near/src/types.ts:27

Run the balance / account / access-key preflight before signing (default true).


optional timeoutMs?: number

Defined in: wallet-near/src/types.ts:19

Per-request timeout for url providers, in ms (default 15 000): a node that never answers fails over (reads) or ends as “maybe sent” (send_tx).


optional transactionMaxFee?: number | bigint

Defined in: wallet-near/src/types.ts:25

Max fee (yoctoNEAR) for sendTransaction / signTransaction.


optional transferMaxFee?: number | bigint

Defined in: wallet-near/src/types.ts:23

Max fee (yoctoNEAR) for transfer.