PHPackages                             manojx/tron-bundle - 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. manojx/tron-bundle

ActiveSymfony-bundle[API Development](/categories/api)

manojx/tron-bundle
==================

A Symfony bundle to interact with Tron Blockchain and Wallets.

176PHP

Since Oct 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ManojBitx/tron-bundle)[ Packagist](https://packagist.org/packages/manojx/tron-bundle)[ RSS](/packages/manojx-tron-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

A Symfony bundle that makes it easy to interact with the Tron Blockchain. It allows you to manage wallets, create and sign transactions, broadcast them to the network, and handle tasks like generating and validating addresses. This bundle simplifies working with Tron in Symfony applications.

Features
--------

[](#features)

- Create and manage Tron wallets
- Sign transactions and broadcast them to the Tron network
- Create new Tron addresses and validate them
- Easy integration with Symfony applications

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

[](#installation)

To install the Tron bundle, use Composer:

```
composer require manojx/tron-bundle
```

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

[](#requirements)

- PHP `^7.4 || ^8.0`
- Symfony `^5.4 || ^6.1 || ^7.0`
- simplito/elliptic-php `^1.0`
- kornrunner/keccak `^1.1`

Configuration
-------------

[](#configuration)

You can configure the Tron node endpoint in your Symfony configuration:

```
# config/packages/tron.yaml
tron:
    default_network: shasta
    networks:
        mainnet:
            fullNode:
                host: 'https://api.trongrid.io'
                api_key: 'api-key'
            solidityNode:
                host: 'https://api.trongrid.io'
                api_key: 'api-key'
            explorer:
                host: 'https://tronscan.org'
                api_key: 'api-key'
        shasta:
            fullNode:
                host: 'https://api.shasta.trongrid.io'
                api_key: 'api-key'
            explorer:
                host: 'https://shastapi.tronscan.org'

        nile:
            fullNode:
                host: 'https://api.nileex.io'
                api_key: 'api-key'
            explorer:
                host: 'https://nile.tronscan.org'
```

Usage
-----

[](#usage)

Creating a Tron Wallet

You can use the Tron service to create a new wallet or access an existing wallet.

```
use ManojX\TronBundle\TronInterface;

class WalletService
{
    private TronInterface $tron;

    public function __construct(TronInterface $tron)
    {
        $this->tron = $tron;
    }

    public function createWallet()
    {
        $wallet = $this->tron->getWallet();

        $address = $wallet->createNewAddress();
        echo 'Address: ' . $address->getAddress();
        echo 'Private Key: ' . $address->getPrivateKey();
    }
}
```

Sending TRX
-----------

[](#sending-trx)

You can initialize a transaction and send TRX using the wallet's private key.

```
use ManojX\TronBundle\TronInterface;

class TransactionService
{
    private TronInterface $tron;

    public function __construct(TronInterface $tron)
    {
        $this->tron = $tron;
    }

    public function sendTrx()
    {
        $wallet = $this->tron->getWallet('your-private-key');

        $transaction = $wallet->initTransaction();
        $transaction->setTo('receiver-tron-address');
        $transaction->setAmount(1); // Amount in TRX
        $signedTransaction = $transaction->createAndSign();

        $node = $this->tron->getNode();
        $response = $node->broadcastTransaction($signedTransaction);

        return $response;
    }
}
```

USDT &amp; Contract Interaction
-------------------------------

[](#usdt--contract-interaction)

You can interact with USDT and other smart contracts on the Tron network.

USDT Contract Address: [TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs](https://shasta.tronscan.org/#/token20/TG3XXyExBkPp9nzdajDZsozEu4BkaSJozs) (Shasta Testnet)

```
use ManojX\TronBundle\TronInterface;

class TransactionService
{
    private TronInterface $tron;

    public function __construct(TronInterface $tron)
    {
        $this->tron = $tron;
    }

    public function sendUsdt()
    {
        $wallet = $this->tron->getWallet('your-private-key');

        $usdt = $wallet->getUsdt();
        $transaction = $usdt->transfer('to-address', 1);

        $signedTransaction = $wallet->signTransaction($transaction['data']);

        $response = $node->broadcastTransaction($signedTransaction);

        return $response;
    }
}
```

For additional usage examples, please refer to the `examples` directory.

License
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/377edf5fb11ab11c47cd9c3dbd7026e2325caca58a0048073f5ca03d76d8e0f7?d=identicon)[manojx](/maintainers/manojx)

---

Top Contributors

[![manojxio](https://avatars.githubusercontent.com/u/7418454?v=4)](https://github.com/manojxio "manojxio (14 commits)")

### Embed Badge

![Health badge](/badges/manojx-tron-bundle/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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