Unified multi-chain USDT transfer SDK for Ethereum, BNB Chain, and TRON
npm install flash-usdt-sender> Unified multi-chain USDT transfer SDK for Ethereum, BNB Chain, and TRON


flash-usdt-sender is a production-grade TypeScript SDK that unifies USDT transfers across Ethereum, BNB Smart Chain, and TRON networks. One interface, three chains, zero complexity.
- Unified API: Same interface for ETH, BSC, and TRON
- Type-Safe: Full TypeScript support with comprehensive types
- Battle-Tested: Production-ready error handling and validation
- Gas Optimized: Automatic gas estimation and fee management
- Zero KYC: Pure crypto, wallet-level operations
- Optional Relayer: Gas sponsorship and advanced features
``bash`
npm install flash-usdt-sender
Or with yarn:
`bash`
yarn add flash-usdt-sender
`typescript
import FlashUSDT from 'flash-usdt-sender';
// Initialize SDK
const flash = new FlashUSDT();
// Send USDT on Ethereum
const result = await flash.send({
chain: 'ethereum',
fromPrivateKey: 'YOUR_PRIVATE_KEY',
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
amount: '100.5',
});
console.log(Transaction: ${result.explorerUrl});`
#### Ethereum
`typescript`
const result = await flash.send({
chain: 'ethereum',
fromPrivateKey: process.env.PRIVATE_KEY,
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
amount: '50.0',
});
#### BNB Smart Chain
`typescript`
const result = await flash.send({
chain: 'bsc',
fromPrivateKey: process.env.PRIVATE_KEY,
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
amount: '50.0',
});
#### TRON
`typescript`
const result = await flash.send({
chain: 'tron',
fromPrivateKey: process.env.PRIVATE_KEY,
to: 'TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb3m9',
amount: '50.0',
});
`typescript
const balance = await flash.getBalance({
chain: 'ethereum',
address: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
});
console.log(USDT Balance: ${balance.balance});`
`typescript
const estimate = await flash.estimateGas(
'ethereum',
'0xYourAddress',
'0xRecipientAddress',
'100.0'
);
console.log(Estimated gas: ${estimate.estimatedCost} ETH);`
`typescript`
const flash = new FlashUSDT({
rpcUrls: {
ethereum: 'https://your-eth-rpc.com',
bsc: 'https://your-bsc-rpc.com',
tron: 'https://your-tron-rpc.com',
},
});
`typescript`
const flash = new FlashUSDT({
debug: true, // Enable console logging
});
`typescript
const flash = new FlashUSDT({
apiKey: 'your-api-key',
relayerUrl: 'https://api.flashusdtsender.xyz',
});
// Gas-sponsored transfer
const result = await flash.send({
chain: 'ethereum',
to: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
amount: '100.0',
useRelayer: true, // No private key needed with relayer
});
`
`typescript`
new FlashUSDT(config?: FlashUSDTConfig)
Config Options:
| Option | Type | Description |
|--------|------|-------------|
| apiKey | string | Optional API key for relayer service |relayerUrl
| | string | Optional relayer endpoint URL |rpcUrls
| | object | Custom RPC endpoints for chains |debug
| | boolean | Enable debug logging |
#### send(request: TransferRequest): Promise
Send USDT on specified chain.
Parameters:
`typescript`
{
chain: 'ethereum' | 'bsc' | 'tron',
fromPrivateKey: string, // Sender's private key
to: string, // Recipient address
amount: string, // Amount in USDT (e.g., "100.5")
gasPrice?: string, // Optional gas price override (Gwei)
useRelayer?: boolean, // Use relayer for gas sponsorship
}
Returns:
`typescript`
{
txHash: string, // Transaction hash
chain: ChainType, // Chain name
status: 'pending' | 'confirmed' | 'failed',
explorerUrl: string, // Block explorer URL
gasUsed?: string, // Gas used (if available)
blockNumber?: number, // Block number (if confirmed)
}
#### getBalance(request: BalanceRequest): Promise
Get USDT balance on specified chain.
Parameters:
`typescript`
{
chain: 'ethereum' | 'bsc' | 'tron',
address: string, // Address to check
}
Returns:
`typescript`
{
chain: ChainType,
address: string,
balance: string, // Human-readable balance
rawBalance: string, // Raw balance in smallest unit
}
#### estimateGas(chain, fromAddress, toAddress, amount): Promise
Estimate gas for transfer (EVM chains only).
NEVER hardcode private keys in your source code. Always use environment variables:
`typescript
// ✅ GOOD
const result = await flash.send({
chain: 'ethereum',
fromPrivateKey: process.env.PRIVATE_KEY,
to: recipientAddress,
amount: '100',
});
// ❌ BAD - Never do this!
const result = await flash.send({
chain: 'ethereum',
fromPrivateKey: '0x1234567890abcdef...', // Exposed!
to: recipientAddress,
amount: '100',
});
`
1. Environment Variables (Development)
`bash`.env file
PRIVATE_KEY=your_private_key_here
2. Secure Vaults (Production)
- AWS Secrets Manager
- HashiCorp Vault
- Azure Key Vault
3. Hardware Wallets (Coming Soon)
- Ledger integration
- Trezor support
The SDK provides typed errors for precise error handling:
`typescript
import FlashUSDT, {
InsufficientBalanceError,
NetworkError,
ValidationError,
TransactionFailedError,
} from 'flash-usdt-sender';
try {
const result = await flash.send({...});
} catch (error) {
if (error instanceof InsufficientBalanceError) {
console.error('Insufficient balance:', error.details);
} else if (error instanceof NetworkError) {
console.error('Network issue:', error.message);
} else if (error instanceof ValidationError) {
console.error('Invalid input:', error.message);
}
}
`
| Chain | USDT Contract | Decimals | Native Token |
|-------|---------------|----------|--------------|
| Ethereum | 0xdAC17F958D2ee523a2206206994597C13D831ec7 | 6 | ETH |0x55d398326f99059fF775485246999027B3197955
| BNB Chain | | 18 | BNB |TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
| TRON | | 6 | TRX |
| Feature | Ethereum | BSC | TRON |
|---------|----------|-----|------|
| Avg. Confirmation | 15s | 3s | 3s |
| Typical Gas Cost | ~$5-20 | ~$0.20 | ~$1-3 |
| Transaction Speed | Medium | Fast | Fast |
| Gas Model | Gas (Gwei) | Gas (Gwei) | Energy/Bandwidth |
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature'
3. Commit your changes ()git push origin feature/amazing-feature`)
4. Push to the branch (
5. Open a Pull Request
MIT © Likhon Sheikh
- NPM Package: https://www.npmjs.com/package/flash-usdt-sender
- Website: https://flashusdtsender.xyz
- GitHub: https://github.com/likhonsdev/flash-usdt-sender
- Documentation: https://flashusdtsender.xyz/docs
- Credits: CREDITS.md
- GitHub Issues: Report a bug
- Twitter: @likhonsdev
This SDK handles cryptocurrency transactions. Always test thoroughly on testnets before using in production. The authors are not responsible for any losses incurred through the use of this software.
---
Developed by Likhon Sheikh 🔥
Community & Support:
- 💬 RecentCoders - Developer Community
- 🛠️ ScriptersShop - Development Services
Join our Telegram communities for updates, support, and collaboration!