PHPackages                             iroge/laravel-tron-module - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iroge/laravel-tron-module

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

iroge/laravel-tron-module
=========================

Laravel Tron Module

1.0.1(1mo ago)088MITPHPPHP &gt;=8.3

Since Mar 25Pushed 1mo agoCompare

[ Source](https://github.com/iRoge/laravel-tron-module)[ Packagist](https://packagist.org/packages/iroge/laravel-tron-module)[ Docs](https://github.com/iroge/laravel-tron-module)[ RSS](/packages/iroge-laravel-tron-module/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

[![Pest Laravel Expectations](https://camo.githubusercontent.com/d82ca8716c74fdaa2ba13adf7e0ec2525fa0e0f32fd1c66786c1607c18c13ae0/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f54726f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d49726f67652532466c61726176656c2d74726f6e2d6d6f64756c65267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d576f726b696e672b776974682b63727970746f63757272656e63792b54726f6e2532432b737570706f727465642b5452432d32302b746f6b656e73266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/d82ca8716c74fdaa2ba13adf7e0ec2525fa0e0f32fd1c66786c1607c18c13ae0/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f54726f6e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d49726f67652532466c61726176656c2d74726f6e2d6d6f64756c65267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d576f726b696e672b776974682b63727970746f63757272656e63792b54726f6e2532432b737570706f727465642b5452432d32302b746f6b656e73266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

[ ![Latest Version on Packagist](https://camo.githubusercontent.com/3edd10ccbbb7ac1384ffc8e2cf003d2687fba05b747689613bed89f20061eff4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f49726f67652f6c61726176656c2d74726f6e2d6d6f64756c652e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/Iroge/laravel-tron-module)[ ![Php Version](https://camo.githubusercontent.com/c3a80c86d7355ce233d937cc6ce506d4f9b1f34a91fb4b52d2d725a3bef932d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e312d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://www.php.net)[ ![Php Version](https://camo.githubusercontent.com/c052236cf00f5483f3811fcb9822473314014aabe3edab756a1bc55270897fdc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d2533453d31302d7265642e7376673f6d61784167653d32353932303030)](https://laravel.com/)--- **Laravel Tron Module** is a Laravel package for work with cryptocurrency Tron, with the support TRC-20 tokens.It allows you to generate HD wallets using mnemonic phrase, validate addresses, get addresses balances and resources, preview and send TRX/TRC-20 tokens. You can automate the acceptance and withdrawal of cryptocurrency in your application.

You can contact me for help in integrating payment acceptance into your project.

Requirements
------------

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 8.1 and older
- Laravel 10 or older
- PHP Extensions: Decimal, GMP, BCMath, CType.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require Iroge/laravel-tron-module
```

After you can run installer using command:

```
php artisan tron:install
```

And run migrations:

```
php artisan migrate
```

Register Service Provider and Facade in app, edit `config/app.php`:

```
'providers' => ServiceProvider::defaultProviders()->merge([
    ...,
    \Iroge\LaravelTronModule\TronServiceProvider::class,
])->toArray(),

'aliases' => Facade::defaultAliases()->merge([
    ...,
    'Tron' => \Iroge\LaravelTronModule\Facades\Tron::class,
])->toArray(),
```

For Laravel 10 you edit file `app/Console/Kernel` in method `schedule(Schedule $schedule)` add:

```
$schedule->command('tron:sync')
    ->everyMinute()
    ->runInBackground();
```

or for Laravel 11+ add this content to `routes/console.php`:

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('tron:sync')
    ->everyMinute()
    ->runInBackground();
```

How use?
--------

[](#how-use)

1. Firstly register an account on the [TronGrid](https://www.trongrid.io/register) website and get an [API key](https://www.trongrid.io/dashboard/keys).
2. Using the following code, create a node through which the library will work:

```
$apiKey = "..."; // API Key from TronGrid.io
Tron::createTronGridNode($apiKey, 'node_name');
```

3. Now you can create Tron Wallet using code:

```
$mnemonic = Tron::mnemonicGenerate();
echo 'Mnemonic: '.implode(' ', $mnemonic);

$wallet = Tron::createWallet('wallet_name', $mnemonic);
```

4. Create primary Tron Address in your Wallet using code:

```
$address = Tron::createAddress($wallet, 'primary_address_name');

echo 'Primary Address: '.$address->address;
```

5. Now you can send TRX using this code:

```
$to = 'receiver tron address';
$amount = 1;

$transfer = Tron::transfer($address, $to, $amount);

echo 'TXID: '.$transfer->txid;
```

### If you want work with TRC-20

[](#if-you-want-work-with-trc-20)

#### For example: Tether USDT

[](#for-example-tether-usdt)

1. You must create TronTRC20 model using this code:

```
$contractAddress = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t';

$trc20Token = TronTRC20::create($contractAddress);
```

2. For transfer Tether USDT TRC-20 for another address you can use this code:

```
$to = 'receiver tron address';
$amount = 1;

$transferTRC20 = Tron::transferTRC20($address, $to, $amount);

echo 'TXID: '.$transferTRC20->txid;
```

Commands
--------

[](#commands)

Synchronizing everything

```
php artisan tron:sync
```

Node synchronization

```
php artisan tron:sync-node NODE_ID
```

Wallet synchronization

```
php artisan tron:sync-wallet WALLET_ID
```

Address synchronization

```
php artisan tron:sync-address ADDRESS_ID
```

Create Tron Node. Before you need register account in  and generate API Key.

```
php artisan tron:new-node
```

Create Tron Wallet.

```
php artisan tron:new-wallet
```

Generate Tron Address.

```
php artisan tron:new-address
```

Import watch only address.

```
php artisan tron:import-address
```

Create TRC-20 Token

```
php artisan tron:new-trc20
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.1% 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 ~0 days

Total

2

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3131cf5a39fa2033eb5d6c4d7a3892390b439839ecd67cd0812fcd387aef9748?d=identicon)[iRoge](/maintainers/iRoge)

---

Top Contributors

[![iRoge](https://avatars.githubusercontent.com/u/45058118?v=4)](https://github.com/iRoge "iRoge (64 commits)")[![mollsoft](https://avatars.githubusercontent.com/u/151442118?v=4)](https://github.com/mollsoft "mollsoft (39 commits)")

---

Tags

laraveltroniRoge

### Embed Badge

![Health badge](/badges/iroge-laravel-tron-module/health.svg)

```
[![Health](https://phpackages.com/badges/iroge-laravel-tron-module/health.svg)](https://phpackages.com/packages/iroge-laravel-tron-module)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M626](/packages/spatie-laravel-data)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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