TronAPI 6.0 targets PHP 8.4 and follows the current official TRON protocol documentation and java-tron behavior.
composer install
composer checkRequired PHP extensions are declared in composer.json. Do not bypass platform
requirements.
- Add
declare(strict_types=1);to every PHP source, test, and example file. - Keep the TronAPI/iEXBase copyright, author, license, and project-link header in source and test files; examples intentionally use a shorter executable form.
- Write class, method, function, and inline explanatory comments in English.
- Use exact integer/decimal-string values for money and protocol counters; never
introduce
floatfor TRX or token values. - Reuse the existing address, hex, integer, ABI, HTTP, endpoint, transaction, and stake components instead of copying their logic.
- Keep provider-specific behavior behind an adapter interface.
- Never add a private key to configuration, transport, service, facade, logging, exception, or serialization paths.
- Add typed tests and a runnable example for new public workflows.
Names should describe domain responsibility. Helper and Manager are allowed
when they are genuinely the clearest role; generic transformation-oriented class
names should not replace specific domain terms.
For a new java-tron endpoint:
- verify the route, HTTP method, node role, request fields, and response against current java-tron source and official documentation;
- add one
Endpointcase rather than repeating path strings; - place typed behavior in the smallest existing domain service, or introduce a cohesive service when it is a separate protocol domain;
- add latest/confirmed handling only where the node exposes both routes;
- add deterministic transport tests for request and response contracts.
For ABI or signing changes, include authoritative interoperability vectors.
Keep changes focused, document breaking behavior, and include the output of:
composer validate --strict
composer audit
composer checkTests must not require real funds, production credentials, or a live broadcast.