@@ -9,6 +9,11 @@ A PHP API for interacting with the Tron Protocol
9
9
10
10
## Install
11
11
12
+ ``` bash
13
+ > composer require wawilow/tron-api --ignore-platform-reqs
14
+ ```
15
+
16
+ PS: To use Original library
12
17
``` bash
13
18
> composer require iexbase/tron-api --ignore-platform-reqs
14
19
```
@@ -18,51 +23,12 @@ The following versions of PHP are supported by this version.
18
23
19
24
* PHP 7.4
20
25
21
- ## Example Usage
22
-
23
- ``` php
24
- use IEXBase\TronAPI\Tron;
25
-
26
- $fullNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
27
- $solidityNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
28
- $eventServer = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
29
-
30
- try {
31
- $tron = new \IEXBase\TronAPI\Tron($fullNode, $solidityNode, $eventServer);
32
- } catch (\IEXBase\TronAPI\Exception\TronException $e) {
33
- exit($e->getMessage());
34
- }
35
-
36
-
37
- $this->setAddress('..');
38
- //Balance
39
- $tron->getBalance(null, true);
40
-
41
- // Transfer Trx
42
- var_dump($tron->send('to', 1.5));
43
-
44
- //Generate Address
45
- var_dump($tron->createAccount());
46
-
47
- //Get Last Blocks
48
- var_dump($tron->getLatestBlocks(2));
49
-
50
- //Change account name (only once)
51
- var_dump($tron->changeAccountName('address', 'NewName'));
52
-
53
-
54
- // Contract
55
- $tron->contract('Contract Address');
56
-
57
-
58
-
59
- ```
60
-
61
26
## Testing
62
27
63
28
``` bash
64
- $ vendor/bin/phpunit
29
+ > composer install --ignore-platform-reqs
65
30
```
66
31
67
32
## Donations
68
- ** Tron(TRX)** : TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY
33
+ ** Author - Tron(TRX)** : TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY
34
+ ** Editor - Tron(TRX)** : TBKjxAsFPk9EMFu18WK6mT6bADyb6NgnkN
0 commit comments