Practical overview
When it fits
Use it when a Go project needs programmatic TRON key, address, or transaction operations and can connect to a TRON node.
Who it is for
- Go developers integrating TRON wallet and transaction functions into an application.
- Developers building command-line utilities for TRON balance or transaction workflows.
Documented uses
- Generate and convert private keys, then derive TRON addresses.
- Create, sign, and broadcast TRX or TRC20 transfers.
- Connect to a TRON node through gRPC.
- Build tools for balance lookup or extracting wallet transactions from blockchain blocks, as described by the repository.
Requirements & limits
The repository is public and specifies an MIT license. The README documents installation through Go modules.
- Version 2 uses the
/v2module path; the README says the v1 series remains available at the earlier module path. - The gRPC client accepts a node address, timeout, and optional TronGrid API token, and the README instructs users to stop the client when finished.
- Transfer and staking amounts use the asset’s smallest unit; the README describes TRX and staking values as int64-bounded and TRC20 values as arbitrary precision.
- The README documents Stake 2.0 freeze and unfreeze helpers and notes that legacy Stake 1.0 freezing is closed on mainnet.
- The README’s test guidance distinguishes offline unit tests from integration tests that connect to the live Nile testnet.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the Go package and import version 2
Add the documented Tron Wallet v2 module to a Go project.
Before you start
- A Go project that can use Go modules.
Steps
Run the command below.
go get github.com/ranjbar-dev/tron-wallet/v2@latestImport the package as
tronwallet "github.com/ranjbar-dev/tron-wallet/v2".
Expected outcome
The project has the documented v2 module path available for use.
Guide limitations
- This covers installation and import only, not application behavior or successful network operations.
Create, sign, and broadcast a Nile testnet TRX transfer
Follow the README’s example flow for sending TRX on the Nile testnet.
Before you start
- A Go project using Tron Wallet v2.
- A sender private key in hex form.
- Sender and recipient TRON addresses.
- A Nile testnet gRPC connection; the example passes an empty optional API token.
Steps
Create a gRPC client for
grpc.nile.trongrid.io:50051and deferclient.Stop().Load the sender key with
PrivateKeyFromHex.Create a transfer with
CreateTransferTransaction, specifying the amount in sun.Sign the transaction with
SignTransactionand submit it withBroadcastTransaction.
Expected outcome
The documented code flow submits a signed TRX transfer to the Nile testnet.
Guide limitations
- The example does not establish that a transfer will succeed; it requires valid keys, addresses, a reachable node, and applicable network resources.
- The README says TRX transfer fees depend on available bandwidth and may be charged in TRX.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 7 October 2026
- Original website title
- ranjbar-dev/tron-wallet · Official homepage title · retained in its source language

