npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@tetherto/wdk-wallet-tron

1.0.0-beta.7

@GitHub Actions

npmHomeRepoSnykSocket
Downloads:36903
$ npm install @tetherto/wdk-wallet-tron
DailyWeeklyMonthlyYearly

@tetherto/wdk-wallet-tron

npm version npm downloads license docs

Note: This package is currently in beta. Please test thoroughly in development environments before using in production.

A simple and secure package to manage BIP-44 wallets for the TRON blockchain. This package provides a clean API for creating, managing, and interacting with TRON wallets using BIP-39 seed phrases and TRON-specific derivation paths.

About WDK

This module is part of the WDK (Wallet Development Kit) project, which empowers developers to build secure, non-custodial wallets with unified blockchain access, stateless architecture, and complete user control.

For detailed documentation about the complete WDK ecosystem, visit docs.wdk.tether.io.

Installation

npm install @tetherto/wdk-wallet-tron

Quick Start

import WalletManagerTron from '@tetherto/wdk-wallet-tron'

const seedPhrase = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'

const wallet = new WalletManagerTron(seedPhrase, {
  provider: 'https://api.shasta.trongrid.io',
  transferMaxFee: 10_000_000n,
})

const account = await wallet.getAccount(0)
const address = await account.getAddress()
console.log('Address:', address)

wallet.dispose()

Key Capabilities

  • BIP-44 Derivation Paths: Standard TRON derivation support (m/44'/195')
  • Multi-Account Management: Derive multiple accounts from a single seed phrase
  • Native TRX Transactions: Quote and send TRX transfers through a unified wallet API
  • TRC20 Support: Query balances and transfer TRC20 tokens
  • Message Signing: Sign messages and verify signatures with TRON accounts
  • Fee Estimation: Retrieve current network fee rates and quote transaction costs
  • Read-Only Accounts: Monitor any TRON address without a private key
  • Failover Providers: Pass an array of provider URLs to enable automatic round-robin failover
  • Secure Memory Disposal: Clear private keys from memory when done

Compatibility

  • TRON Mainnet
  • TRON Shasta Testnet
  • TronWeb-compatible providers for balance, transaction, and fee queries

Documentation

TopicDescriptionLink
OverviewModule overview and feature summaryWallet TRON Overview
UsageEnd-to-end integration walkthroughWallet TRON Usage
ConfigurationProvider and transfer configurationWallet TRON Configuration
API ReferenceComplete class and type referenceWallet TRON API Reference

Examples

ExampleDescription
Create WalletInitialize a wallet manager and derive TRON accounts from a seed phrase
Manage AccountsWork with multiple accounts and custom BIP-44 derivation paths
Check BalancesQuery native TRX and TRC20 token balances for owned accounts
Read-Only AccountMonitor balances for any TRON address without a private key
Send TransactionEstimate fees and send native TRX transactions
Token TransferTransfer TRC20 tokens and estimate transfer fees
Sign & Verify MessageSign messages and verify signatures
Fee ManagementRetrieve current network fee rates
Memory ManagementSecurely dispose wallets and clear private keys from memory

For detailed walkthroughs, see the Usage Guide. See all runnable examples in the wdk-examples repository.

Community

Join the WDK Discord to connect with other developers.

Support

For support, please open an issue on GitHub or reach out via email.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.