Configuration
Configuration options and settings for @tetherto/wdk-wallet-ton-gasless
Wallet Configuration
import WalletManagerTonGasless from '@tetherto/wdk-wallet-ton-gasless'
const config = {
// Required parameters
tonClient: {
url: 'https://toncenter.com/api/v3',
secretKey: 'your-api-key' // Optional
},
gasFreeProvider: 'https://your-gasfree-provider.com',
gasFreeApiKey: 'your-gasfree-api-key',
gasFreeApiSecret: 'your-gasfree-api-secret',
serviceProvider: 'EQ...', // Service provider's TON address
verifyingContract: 'EQ...', // Verifying contract address
chainId: '1', // TON chain ID
// Optional parameters
transferMaxFee: 10000000 // Maximum fee in token base units
}
const wallet = new WalletManagerTonGasless(seedPhrase, config)Account Configuration
Configuration Options
tonClient
The tonClient option configures the TON Center API client for blockchain interactions.
Type:
gasFreeProvider
The gasFreeProvider option specifies the gas-free service endpoint.
Type: string
Required: Yes
Example:
gasFreeApiKey and gasFreeApiSecret
API credentials for the gas-free service.
Type: string
Required: Yes
Example:
serviceProvider
The TON address of the service provider that handles gas-free transactions.
Type: string
Required: Yes
Example:
verifyingContract
The TON address of the contract that verifies gas-free transactions.
Type: string
Required: Yes
Example:
chainId
The blockchain's identifier.
Type: string
Required: Yes
Example:
transferMaxFee
The transferMaxFee option sets the maximum allowed fee in token base units for transfer operations.
Type: number
Required: No
Example:
Complete Configuration Example
Here's a complete configuration example with all options:
Security Considerations
Keep API keys and secrets secure and never expose them in client-side code
Use environment variables for sensitive configuration values
Always use HTTPS URLs for API endpoints
Set appropriate
transferMaxFeelimits to prevent excessive feesValidate contract addresses before using them in configuration

