TonConfig
Defined in: wallet-ton/src/types.ts:18
Options for a TON wallet manager or account: toncenter endpoints, network, fee caps and emulation before signing.
Properties
Section titled “Properties”allowDrainingTransactions?
Section titled “allowDrainingTransactions?”
optionalallowDrainingTransactions?:boolean
Defined in: wallet-ton/src/types.ts:55
Allow a body whose emulated risk.transfer_all_remaining_balance is true
(send mode 128 / CARRY_ALL_BALANCE). Refused by default — nothing this
wallet builds does that, so it only ever comes from a foreign bodyBoc.
emulate?
Section titled “emulate?”
optionalemulate?:TonEmulateConfig
Defined in: wallet-ton/src/types.ts:47
Preflight emulation of every send (zero-signed external). Default
{kind: 'tonapi'}: POST {tonApiUrl}/wallet/emulate (verdict + risk),
falling back to /traces/emulate. {kind: 'toncenter-v3', url} posts to a
toncenter emulateTrace endpoint instead. false = estimateFee only.
A non-zero compute exit, an aborted transaction, a failed action phase or a
failed FIRST-HOP internal message throws SimulationError before signing.
emulateUrl?
Section titled “emulateUrl?”
optionalemulateUrl?:string
Defined in: wallet-ton/src/types.ts:49
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Defined in: wallet-ton/src/types.ts:28
Injectable fetch (tests, custom agents). Defaults to globalThis.fetch.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
indexerUrl?
Section titled “indexerUrl?”
optionalindexerUrl?:string
Defined in: wallet-ton/src/types.ts:34
toncenter v3 base used for receipts (default https://toncenter.com/api/v3).
jettonAttachedValue?
Section titled “jettonAttachedValue?”
optionaljettonAttachedValue?:string|number|bigint
Defined in: wallet-ton/src/types.ts:61
Nanotons attached to a jetton transfer on top of forwardTonAmount (default 0.05 TON).
maxJettonAttachedValue?
Section titled “maxJettonAttachedValue?”
optionalmaxJettonAttachedValue?:string|number|bigint
Defined in: wallet-ton/src/types.ts:67
Most nanotons a jetton transfer() may attach to the jetton-wallet call, forwardTonAmount
included (default 1 TON). The contract that receives them is the one the jetton master names,
so a fake master gets all of it: the cap bounds what such a call can cost.
network?
Section titled “network?”
optionalnetwork?:"mainnet"|"testnet"
Defined in: wallet-ton/src/types.ts:73
‘mainnet’ (ton:-239, default) or ‘testnet’ (ton:-3). Sets the CAIP-2 id, the address flags and the wallet_id network (-239 / -3), so a testnet wallet has its own address and its signed messages are not valid on mainnet (as in Tonkeeper and @ton/ton).
provider?
Section titled “provider?”
optionalprovider?:TonProvider|TonProvider[]
Defined in: wallet-ton/src/types.ts:22
Alias of tonClient.
retries?
Section titled “retries?”
optionalretries?:number
Defined in: wallet-ton/src/types.ts:24
Extra rounds across the endpoint list after the first full pass (default 3).
simulate?
Section titled “simulate?”
optionalsimulate?:boolean
Defined in: wallet-ton/src/types.ts:57
Run the preflight (estimateFee + emulation when configured) before signing. Default true.
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Defined in: wallet-ton/src/types.ts:26
Per-request timeout in ms (default 15 000).
tonApiKey?
Section titled “tonApiKey?”
optionaltonApiKey?:string
Defined in: wallet-ton/src/types.ts:38
tonapi bearer key (sent as Authorization: Bearer …); also sent as X-API-Key to a toncenter-v3 emulator.
tonApiUrl?
Section titled “tonApiUrl?”
optionaltonApiUrl?:string
Defined in: wallet-ton/src/types.ts:36
tonapi base used for fee rates and (by default) emulation (default https://tonapi.io/v2).
tonClient?
Section titled “tonClient?”
optionaltonClient?:TonProvider|TonProvider[]
Defined in: wallet-ton/src/types.ts:20
toncenter endpoint(s) or TonRpc(s). A list fails over in order. Omit for an offline (sign-only) wallet.
transactionMaxFee?
Section titled “transactionMaxFee?”
optionaltransactionMaxFee?:number|bigint
Defined in: wallet-ton/src/types.ts:32
Max fee (nanotons) for sendTransaction / signTransaction.
transferMaxFee?
Section titled “transferMaxFee?”
optionaltransferMaxFee?:number|bigint
Defined in: wallet-ton/src/types.ts:30
Max fee (nanotons) for transfer.
validUntilSeconds?
Section titled “validUntilSeconds?”
optionalvalidUntilSeconds?:number
Defined in: wallet-ton/src/types.ts:59
Seconds a signed external stays valid (default 60, max 600).
walletId?
Section titled “walletId?”
optionalwalletId?:object
Defined in: wallet-ton/src/types.ts:80
V5R1 wallet_id parts. Defaults (network id from network, subwallet 0) give the
addresses Tonkeeper and Tonhub derive for a key; change the subwallet only to
reach a wallet that was created with a different one. A networkGlobalId that
contradicts network is refused.
networkGlobalId?
Section titled “networkGlobalId?”
optionalnetworkGlobalId?:number
subwalletNumber?
Section titled “subwalletNumber?”
optionalsubwalletNumber?:number