From aa14a2dface5f24b0571398f892dfa36e58547a0 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:08:40 +0300 Subject: [PATCH 01/13] Create README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d0478b7 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# TronAPI PHP + +## Install + +```bash +> composer require iexbase/tron-api +``` + +## Example Usage + +```php +use IEXBase\TronAPI\Tron; + +$tron = new Tron('address', 'private_key'); +$tron->setPrivateKey('private_key'); + + +//Example 1 +var_dump($tron->getBalance()); +//Example 2 +var_dump($tron->getBalance('address')) + +``` + +## Donations +Tron: TGtVSXjrk9RByP6ddEEBMg5ttjFMqKYtTP From 7bc3d431ae2ef668f0d59afc50361ec2af5faed6 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:09:31 +0300 Subject: [PATCH 02/13] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d0478b7..514df16 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# TronAPI PHP +# TronAPI +A PHP API for interacting with the Tron (TRX) ## Install From bd58f17c9d29a3873073817dd5e8010a87b140a0 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:12:07 +0300 Subject: [PATCH 03/13] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 514df16..5befc77 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,17 @@ var_dump($tron->getBalance()); //Example 2 var_dump($tron->getBalance('address')) +// Transfer Trx +$transfer = $tron->sendTransaction('from', 'to', 'amount'); +var_dump($transfer); + +//Generate Address +var_dump($tron->generateAddress()); + + +//Get Last Blocks +var_dump($tron->getLatestBlocks(2)); + ``` ## Donations From 0da9d10d4fd63f978f466725c0b2681f57ec2612 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:12:16 +0300 Subject: [PATCH 04/13] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 5befc77..c9eb450 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ var_dump($transfer); //Generate Address var_dump($tron->generateAddress()); - //Get Last Blocks var_dump($tron->getLatestBlocks(2)); From 00673f2464d12494396b30958d752fe32fda5887 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:13:10 +0300 Subject: [PATCH 05/13] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c9eb450..7e188bb 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A PHP API for interacting with the Tron (TRX) use IEXBase\TronAPI\Tron; $tron = new Tron('address', 'private_key'); +//alternative way to enter a private key $tron->setPrivateKey('private_key'); From e745f3f4df93cad02060fa785d17bad5960f4cbb Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:17:21 +0300 Subject: [PATCH 06/13] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7e188bb..ee91959 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,9 @@ $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'); + //Example 1 var_dump($tron->getBalance()); From 351d57eb3169d8c9a08acc5fd6bd1705c0d81652 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:17:55 +0300 Subject: [PATCH 07/13] Update README.md --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee91959..8464542 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ -# TronAPI -A PHP API for interacting with the Tron (TRX) +

+ Tron API +
+

+

+ A PHP API for interacting with the Tron (TRX) +

## Install From d7a928ae3929a16c302c0569ef98041173497e3e Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:18:08 +0300 Subject: [PATCH 08/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8464542..2d30591 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- Tron API + TRON API

From 0162946656c46479647294bdeb08666149be7992 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 18:39:55 +0300 Subject: [PATCH 09/13] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2d30591..99526f6 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,11 @@ $tron->setPrivateKey('private_key'); $tron->setFullNodeServer('url new node'); -//Example 1 +//Balance var_dump($tron->getBalance()); -//Example 2 -var_dump($tron->getBalance('address')) // Transfer Trx -$transfer = $tron->sendTransaction('from', 'to', 'amount'); -var_dump($transfer); +var_dump($tron->sendTransaction('from', 'to', 'amount')); //Generate Address var_dump($tron->generateAddress()); @@ -40,6 +37,9 @@ var_dump($tron->generateAddress()); //Get Last Blocks var_dump($tron->getLatestBlocks(2)); +//Change account name (only once) +var_dump($tron->changeAccountName('address', 'NewName')); + ``` ## Donations From d07ca8aa3507f37899e49102acd5e6a137f76a9f Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 19:01:43 +0300 Subject: [PATCH 10/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 99526f6..3563bb6 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,4 @@ var_dump($tron->changeAccountName('address', 'NewName')); ``` ## Donations -Tron: TGtVSXjrk9RByP6ddEEBMg5ttjFMqKYtTP +Tron: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY From cf325c91bbd29956b5160b59009d854a73b6ecf2 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 19:01:56 +0300 Subject: [PATCH 11/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3563bb6..d926a2a 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,4 @@ var_dump($tron->changeAccountName('address', 'NewName')); ``` ## Donations -Tron: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY +Tron(TRX): TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY From 708a3063c5bc6cfadd99fd01a9d5998e80db7fd3 Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 19:02:18 +0300 Subject: [PATCH 12/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d926a2a..d0b3b25 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,4 @@ var_dump($tron->changeAccountName('address', 'NewName')); ``` ## Donations -Tron(TRX): TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY +*Tron(TRX)*: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY From 4bbe897e0e931efc6ad485eda39e7a3fcbd8ee6c Mon Sep 17 00:00:00 2001 From: Shamsudin Date: Wed, 12 Sep 2018 19:02:30 +0300 Subject: [PATCH 13/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0b3b25..83c27dc 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,4 @@ var_dump($tron->changeAccountName('address', 'NewName')); ``` ## Donations -*Tron(TRX)*: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY +**Tron(TRX)**: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY