Download the PHP package mollsoft/laravel-tron-module without Composer
On this page you can find all versions of the php package mollsoft/laravel-tron-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mollsoft/laravel-tron-module
More information about mollsoft/laravel-tron-module
Files in mollsoft/laravel-tron-module
Package laravel-tron-module
Short Description Laravel Tron Module
License MIT
Homepage https://github.com/mollsoft/laravel-tron-module
Informations about the package laravel-tron-module
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
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
You can install the package via composer:
After you can run installer using command:
And run migrations:
Register Service Provider and Facade in app, edit config/app.php
:
For Laravel 10 you edit file app/Console/Kernel
in method schedule(Schedule $schedule)
add:
or for Laravel 11+ add this content to routes/console.php
:
How use?
- Firstly register an account on the TronGrid website and get an API key.
-
Using the following code, create a node through which the library will work:
-
Now you can create Tron Wallet using code:
-
Create primary Tron Address in your Wallet using code:
- Now you can send TRX using this code:
If you want work with TRC-20
For example: Tether USDT
-
You must create TronTRC20 model using this code:
- For transfer Tether USDT TRC-20 for another address you can use this code:
Commands
Synchronizing everything
Node synchronization
Wallet synchronization
Address synchronization
Create Tron Node. Before you need register account in https://trongrid.io and generate API Key.
Create Tron Wallet.
Generate Tron Address.
Import watch only address.
Create TRC-20 Token
All versions of laravel-tron-module with dependencies
ext-gmp Version *
ext-decimal Version *
ext-ctype Version *
illuminate/contracts Version ^10.0|^11.0
spatie/laravel-package-tools Version ^1.15
furqansiddiqui/bip39-mnemonic-php Version ^0.1.7
minter/minter-php-bip-44 Version ^1.2
web3p/web3.php Version ^0.1.6
kornrunner/secp256k1 Version ^0.2.0
simplito/elliptic-php Version ^1.0