Download the PHP package sultanov-solutions/tron-api without Composer
On this page you can find all versions of the php package sultanov-solutions/tron-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sultanov-solutions/tron-api
More information about sultanov-solutions/tron-api
Files in sultanov-solutions/tron-api
Package tron-api
Short Description A PHP API for interacting with Tron (Trx)
License MIT
Homepage https://github.com/sultanov-solutions/tron-api
Informations about the package tron-api
TRON API
A PHP API for interacting with the Tron Protocol
Fork & Credits
This project is a maintained fork of https://github.com/iexbase/tron-api. Full credit to the original authors and contributors of the upstream project. This fork focuses on PHP 8+ and Laravel 12 compatibility, dependency hygiene, CI/release tooling, and small fixes.
Installation
Requirements
- PHP: ^8.1
- Extensions: ext-json, ext-bcmath, ext-mbstring, ext-gmp
- Guzzle 7.x (installed transitively)
- web3p/web3.php ^0.1.6 (installed transitively)
This library is framework-agnostic and compatible with Laravel 12.
Features
- Standalone and Laravel integration without hard coupling
- Explicit instance creation (no hidden singletons)
- Network presets: mainnet, shasta, nile; custom endpoints support
- Rotating API keys in Laravel (round-robin, persisted via Cache)
- PSR-7 friendly HTTP with Guzzle (core) or Laravel Http client (adapter)
- PHP 8.1+, clean dependencies, CI and release workflows
Usage
Standalone
Configuration (Laravel)
config/tron-connection.php controls default connection and per-connection options:
default: connection name (e.g.,mainnet)connections.{name}.network:mainnet|shasta|nile|customconnections.{name}.endpoints:full_node,solidity_node,event_server,status_pagetimeout_ms,headers,auth(basic/bearer),api_key(s)- optional:
private_key,address
ENV examples:
Laravel 12
1) Publish config:
2) Create a fresh connection and use it explicitly:
This library deliberately does not expose a singleton Tron instance in Laravel — every make(...) returns a new, predictable instance configured from arguments and config.
Testing
Donations
If this library is useful for you, you may support the original project or this fork’s maintenance (TRON/TRX addresses):
- Original author (IEXBase): TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY
- Maintainer (Sultanov Solutions): TPgGPSJ37t4nFGyYa7TQxwLZFJMvK587QT
Changelog
See CHANGELOG.md for release notes.
API Key Rotation (Laravel)
-
Set multiple TronGrid/Tronscan API keys as a comma-separated list in
.env: - Each
Tron::make(...)picks the next key in a round-robin fashion and persists the index in Cache. - You can override rotation per instance by passing an explicit key:
All versions of tron-api with dependencies
guzzlehttp/guzzle Version ^7.2
web3p/web3.php Version ^0.1.6
kornrunner/secp256k1 Version ^0.3
simplito/elliptic-php Version ^1.0
ext-json Version *
ext-bcmath Version *
ext-mbstring Version *
ext-gmp Version *