https://github.com/tak-pesar/tron
Tron ( TRX ) crypto currency API
https://github.com/tak-pesar/tron
api phar php tron tron-api tron-rest tron-web trx
Last synced: 10 months ago
JSON representation
Tron ( TRX ) crypto currency API
- Host: GitHub
- URL: https://github.com/tak-pesar/tron
- Owner: Tak-Pesar
- License: mit
- Created: 2023-09-26T18:23:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-02T18:42:59.000Z (almost 2 years ago)
- Last Synced: 2024-12-01T00:31:34.083Z (over 1 year ago)
- Topics: api, phar, php, tron, tron-api, tron-rest, tron-web, trx
- Language: PHP
- Homepage:
- Size: 1.02 MB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tak-Pesar/Tron
Tron ( TRX ) crypto currency API !
This library facilitates connectivity to the Tron network, enabling you to generate a personalized wallet address. This is achieved through utilization of the Tron API.
## Installation
```bash
composer require takpesar/tron
```
## Requirements
This package requires PHP 8 or later. BCMath and Curl extensions require this package
## Usage
```php
generateAddress();
var_dump($address);
$tron = new API(privatekey : $address->privatekey,wallet : $address->wallet);
$balance = $tron->getBalance();
print 'your balance : '.$balance;
print PHP_EOL;
try {
$send = $tron->sendTron(to : 'TJZfm2PSQ38WNwzPqSBpTbVAynZpMEmfKR',amount : 10.5);
print 'transaction : '.var_export($send,true);
} catch(Throwable $e){
print 'transaction error : '.$e->getMessage();
}
```
## Use Phar _( Faster and easier ! )_
```php
generateAddress();
var_dump($address);
```
> **Note**
> Please see [`examples`](./example) for more examples
## Issues
Should you encounter any issues, please do not hesitate to reach out to us via email at [`loser.man.2007@gmail.com`](mailto:loser.man.2007@gmail.com).
## License
The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.