{"id":21376065,"url":"https://github.com/lessmore92/tron-api","last_synced_at":"2025-03-16T09:42:33.726Z","repository":{"id":57014145,"uuid":"346179370","full_name":"lessmore92/tron-api","owner":"lessmore92","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-11T22:10:00.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T21:42:43.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lessmore92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-10T00:04:18.000Z","updated_at":"2023-06-11T22:03:55.000Z","dependencies_parsed_at":"2022-08-21T14:50:32.467Z","dependency_job_id":null,"html_url":"https://github.com/lessmore92/tron-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessmore92%2Ftron-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessmore92%2Ftron-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessmore92%2Ftron-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lessmore92%2Ftron-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lessmore92","download_url":"https://codeload.github.com/lessmore92/tron-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852437,"owners_count":20358270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T09:13:38.844Z","updated_at":"2025-03-16T09:42:33.690Z","avatar_url":"https://github.com/lessmore92.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TRON API\nA PHP API for interacting with the Tron Protocol\n\n[![Latest Stable Version](https://poser.pugx.org/iexbase/tron-api/version)](https://packagist.org/packages/iexbase/tron-api)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![Build Status](https://api.travis-ci.com/iexbase/tron-api.svg?branch=master)](https://travis-ci.com/iexbase/tron-api)\n[![Issues](https://img.shields.io/github/issues/iexbase/tron-api.svg)](https://github.com/iexbase/tron-api/issues)\n[![Pull Requests](https://img.shields.io/github/issues-pr/iexbase/tron-api.svg)](https://github.com/iexbase/tron-api/pulls)\n[![Contributors](https://img.shields.io/github/contributors/iexbase/tron-api.svg)](https://github.com/iexbase/tron-api/graphs/contributors)\n\n## Install\n\n```bash\n\u003e composer require lessmore92/tron-api\n```\n## Requirements\n\nThe following versions of PHP are supported by this version.\n\n* PHP 7.1\n* PHP 7.2\n* PHP 7.3\n\n## Example Usage\n\n```php\nuse IEXBase\\TronAPI\\Tron;\n\n$fullNode = new \\IEXBase\\TronAPI\\Provider\\HttpProvider('https://api.trongrid.io');\n$solidityNode = new \\IEXBase\\TronAPI\\Provider\\HttpProvider('https://api.trongrid.io');\n$eventServer = new \\IEXBase\\TronAPI\\Provider\\HttpProvider('https://api.trongrid.io');\n\ntry {\n    $tron = new \\IEXBase\\TronAPI\\Tron($fullNode, $solidityNode, $eventServer);\n} catch (\\IEXBase\\TronAPI\\Exception\\TronException $e) {\n    exit($e-\u003egetMessage());\n}\n\n\n$this-\u003esetAddress('..');\n//Balance\n$tron-\u003egetBalance(null, true);\n\n// Transfer Trx\nvar_dump($tron-\u003esend('to', 1.5));\n\n//Generate Address\nvar_dump($tron-\u003ecreateAccount());\n\n//Get Last Blocks\nvar_dump($tron-\u003egetLatestBlocks(2));\n\n//Change account name (only once)\nvar_dump($tron-\u003echangeAccountName('address', 'NewName'));\n```\n\n## Testing\n\n``` bash\n$ vendor/bin/phpunit\n```\n\n## Donations\n**Tron(TRX)**: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flessmore92%2Ftron-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flessmore92%2Ftron-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flessmore92%2Ftron-api/lists"}