Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
serderovsh committed Sep 12, 2018
2 parents a940b9a + 4bbe897 commit 4426922
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<h1 align="center">
TRON API
<br>
</h1>
<h4 align="center">
A PHP API for interacting with the Tron (TRX)
</h4>

## Install

```bash
> composer require iexbase/tron-api
```

## Example Usage

```php
use IEXBase\TronAPI\Tron;

$tron = new Tron('address', 'private_key');
//alternative way to enter a private key
$tron->setPrivateKey('private_key');

//Change node address
$tron->setFullNodeServer('url new node');


//Balance
var_dump($tron->getBalance());

// Transfer Trx
var_dump($tron->sendTransaction('from', 'to', 'amount'));

//Generate Address
var_dump($tron->generateAddress());

//Get Last Blocks
var_dump($tron->getLatestBlocks(2));

//Change account name (only once)
var_dump($tron->changeAccountName('address', 'NewName'));

```

## Donations
**Tron(TRX)**: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY

0 comments on commit 4426922

Please sign in to comment.