Configuration
Configuration options and settings for @tetherto/wdk-wallet-tron-gasfree
Network & Service Providers
Service
Provider
URL (Mainnet)
URL (Testnet)
Wallet Configuration
import WalletManagerTronGasfree from '@tetherto/wdk-wallet-tron-gasfree'
import TronWeb from 'tronweb'
// Option 1: Using RPC URL
const config = {
// Required parameters
chainId: '728126428', // Blockchain ID
provider: 'https://api.trongrid.io', // Tron RPC endpoint
gasFreeProvider: 'https://open.gasfree.io/tron/', // Gas-free service URL
gasFreeApiKey: 'your-api-key', // Gas-free API key
gasFreeApiSecret: 'your-api-secret', // Gas-free API secret
serviceProvider: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH', // Service provider address
verifyingContract: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH', // Verifying contract address
// Optional parameter
transferMaxFee: 10000000 // Maximum fee in token base units
}
const wallet = new WalletManagerTronGasfree(seedPhrase, config)
// Option 2: Using TronWeb instance
const tronWeb = new TronWeb({ fullHost: 'https://api.trongrid.io' })
const config2 = {
chainId: '728126428',
provider: tronWeb,
gasFreeProvider: 'https://open.gasfree.io/tron/',
gasFreeApiKey: 'your-api-key',
gasFreeApiSecret: 'your-api-secret',
serviceProvider: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH',
verifyingContract: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH'
}
