PHPackages                             birzha76/tron-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. birzha76/tron-php

ActiveLibrary[API Development](/categories/api)

birzha76/tron-php
=================

Support TRON's TRX and TRC20, which include functions such as address creation, balance query, transaction transfer, query the latest blockchain, query information based on the blockchain, and query information based on the transaction hash

v1.0.2(2y ago)016MITPHPPHP &gt;=8.0

Since Sep 8Pushed 2y agoCompare

[ Source](https://github.com/Birzha76/tron-php)[ Packagist](https://packagist.org/packages/birzha76/tron-php)[ Docs](https://github.com/Birzha76/tron-php)[ RSS](/packages/birzha76-tron-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

TRON-PHP
========

[](#tron-php)

Introduction
------------

[](#introduction)

Support TRON's TRX and TRC20, which include functions such as address creation, balance query, transaction transfer, query the latest blockchain, query information based on the blockchain, and query information based on the transaction hash

Advantage
---------

[](#advantage)

1. One set of scripts is compatible with all TRX currencies and TRC20 certifications in the TRON network
2. Interface methods can be added or subtracted flexibly

Support Method
--------------

[](#support-method)

- Generate address `generateAddress()`
- Verify address `validateAddress(Address $address)`
- Get the address according to the private key `privateKeyToAddress(string $privateKeyHex)`
- Check balances `balance(Address $address)`
- Transaction transfer (offline signature) `transfer(string $from, string $to, float $amount)`
- Query the latest block `blockNumber()`
- Query information according to the blockchain `blockByNumber(int $blockID)`
- \*Query information based on transaction hash `transactionReceipt(string $txHash)`

Quick Start
-----------

[](#quick-start)

### Install

[](#install)

PHP8

```
composer require fenguoz/tron-php
```

or PHP7

```
composer require fenguoz/tron-php ~1.3
```

### Interface

[](#interface)

```
use GuzzleHttp\Client;

$uri = 'https://api.trongrid.io';// mainnet
// $uri = 'https://api.shasta.trongrid.io';// shasta testnet

$apiKey = 'YOUR_TRON_API_KEY'

$api = new \Tron\Api(new Client(['base_uri' => $uri]), $apiKey); // The API key may not be used

$trxWallet = new \Tron\TRX($api);
$addressData = $trxWallet->generateAddress();
// $addressData->privateKey
// $addressData->address

$config = [
    'contract_address' => 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',// USDT TRC20
    'decimals' => 6,
];
$trc20Wallet = new \Tron\TRC20($api, $config);
$addressData = $trc20Wallet->generateAddress();
```

Plan
----

[](#plan)

- Support TRC10
- Smart Contract

Package
-------

[](#package)

NamedescriptionScenes[Fenguoz/tron-api](https://github.com/Fenguoz/tron-api)TRON official document recommends PHP extension packageTRON basic API

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~92 days

Total

3

Last Release

789d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fc4fb762ef6a7cd7a308d5e4d8b42cff4c74f2328f58bb9d88b040eb1d51c1dc?d=identicon)[Birzha76](/maintainers/Birzha76)

---

Top Contributors

[![Fenguoz](https://avatars.githubusercontent.com/u/28383092?v=4)](https://github.com/Fenguoz "Fenguoz (33 commits)")[![Birzha76](https://avatars.githubusercontent.com/u/61161189?v=4)](https://github.com/Birzha76 "Birzha76 (4 commits)")

---

Tags

phptrontrxtrc20

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/birzha76-tron-php/health.svg)

```
[![Health](https://phpackages.com/badges/birzha76-tron-php/health.svg)](https://phpackages.com/packages/birzha76-tron-php)
```

###  Alternatives

[fenguoz/tron-php

Support TRON's TRX and TRC20, which include functions such as address creation, balance query, transaction transfer, query the latest blockchain, query information based on the blockchain, and query information based on the transaction hash

21436.6k1](/packages/fenguoz-tron-php)[takpesar/tron

A PHP library to create Tron wallet addresses and manage wallets using the Tron API

183.2k](/packages/takpesar-tron)[fenguoz/bsc-php

Support Binance's BNB and BEP20, which include functions such as address creation, balance query, transaction transfer, query the latest blockchain, query information based on the blockchain, and query information based on the transaction hash

4720.9k](/packages/fenguoz-bsc-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
