PHPackages                             kfvikuu1vpak7mmt/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. kfvikuu1vpak7mmt/tron-php

ActiveLibrary[API Development](/categories/api)

kfvikuu1vpak7mmt/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

1.0.7(1y ago)022MITPHPPHP ^7.3|^8.0

Since Aug 30Pushed 1y agoCompare

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

READMEChangelog (6)Dependencies (5)Versions (7)Used By (0)

English | [中文](./README-CN.md)

TRON-PHP
========

[](#tron-php)

 [![Stable Version](https://camo.githubusercontent.com/114e33f87e857c23c918d7e6753ff8fcc277c1ad26486b2cb178c0ad34200f49/68747470733a2f2f706f7365722e707567782e6f72672f46656e67756f7a2f74726f6e2d7068702f762f737461626c65)](https://github.com/Fenguoz/tron-php/releases) [![Php Version](https://camo.githubusercontent.com/b89e839d5d52995202e3f77713d3272afdfffacf314e3562e9a20a1d070b6ff7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e322d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://www.php.net) [![tron-php License](https://camo.githubusercontent.com/f373bee380205f47653283976b47db06ef0a5013684d6607d02e0c62d593466c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66656e67756f7a2f74726f6e2d7068702e7376673f6d61784167653d32353932303030)](https://github.com/Fenguoz/tron-php/blob/master/LICENSE) [![Total Downloads](https://camo.githubusercontent.com/f9e231e9a1aee50da7ce0fff4f3244e2b27e67e02686b9ecd3418a270ccc61d4/68747470733a2f2f706f7365722e707567782e6f72672f46656e67756f7a2f74726f6e2d7068702f646f776e6c6f616473)](https://packagist.org/packages/Fenguoz/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
$api = new \Tron\Api(new Client(['base_uri' => $uri]));

$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🌟🌟
--

[](#)

[![Stargazers over time](https://camo.githubusercontent.com/1a2184439be9c2a77da503058f317e166c7aba316d2c1321806ed79c8211e6bc/68747470733a2f2f7374617263686172742e63632f46656e67756f7a2f74726f6e2d7068702e737667)](https://starchart.cc/Fenguoz/tron-php)

Cooperate
---------

[](#cooperate)

Contact

- WX：zgf243944672
- QQ：243944672

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance40

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.5% 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 ~95 days

Recently: every ~119 days

Total

6

Last Release

508d ago

PHP version history (2 changes)1.0.1PHP &gt;=8.0

1.0.2PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d21404055f4aafc084fe68e53129a827ece5e0511f2b2670cf81099f39b9b17?d=identicon)[KfViKuU1VPAk7MMT](/maintainers/KfViKuU1VPAk7MMT)

---

Top Contributors

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

---

Tags

phptrontrxtrc20

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/kfvikuu1vpak7mmt-tron-php/health.svg)](https://phpackages.com/packages/kfvikuu1vpak7mmt-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)
