- Can I use this package in Laravel without Symfony dependencies?
- Yes, this package has no Symfony or Laravel-specific dependencies. It’s framework-agnostic and integrates seamlessly with Laravel’s service container or any PSR-18 HTTP client like Guzzle or Symfony’s HTTP client.
- Does this SDK support WalletV4R2 and other TON wallet standards?
- Yes, the package includes a `WalletV4R2` contract wrapper and supports TON’s standard wallet formats. It also provides tools for parsing addresses (UQ/EQ, bounceable flags) and building internal messages for transactions.
- Is the BOC encoder in this package compatible with @ton/core (JavaScript SDK)?
- Absolutely. The package uses a *canonical BOC encoder*, ensuring byte-level compatibility with @ton/core. This guarantees interoperability with TON smart contracts and tools built on the JavaScript SDK.
- What PHP versions and extensions are required?
- This package requires PHP 8.3+. It relies on standard extensions: `gmp`, `sodium`, and `bcmath` for cryptographic operations. No native extensions beyond these are needed, making it highly portable.
- How do I integrate this with Laravel’s service container?
- Since there are no built-in Laravel service providers, you’ll manually bind interfaces (e.g., `WalletRpcInterface`) to implementations like `ToncenterWalletRpc` in your `AppServiceProvider`. The package’s modular design makes this straightforward.
- Are private keys and mnemonics securely handled?
- The package uses Ed25519 for signing and includes TON-flavored mnemonic derivation (not BIP-39). While the code follows best practices, always ensure private keys are zeroized after use in memory and stored securely (e.g., encrypted environment variables).
- What if I need a custom RPC endpoint instead of toncenter?
- The typed `ToncenterClient` is configurable via PSR-18 HTTP clients, so you can swap out toncenter for any JSON-RPC endpoint. However, the package doesn’t include built-in support for other RPC providers like GetBlock or EverX.
- How does performance compare to alternatives like olifanton/ton?
- The canonical BOC encoder is optimized for correctness over raw speed, matching @ton/core’s output. For large cell structures (e.g., NFT collections), memory usage may be higher than lighter alternatives, but the package prioritizes accuracy for smart contract interactions.
- Is there official documentation or examples for Laravel use cases?
- Documentation is currently limited to the README. For Laravel-specific examples, you’ll need to inspect the package’s tests or build custom integrations (e.g., facades, commands). The modular design makes it adaptable, but expect some manual setup.
- What’s the long-term maintenance outlook for this package?
- The package is actively maintained by Andrey Mashukov, with CI/CD pipelines and PHPStan L9 compliance. However, its niche focus (TON in PHP) and lack of stars/dependents suggest lower community adoption. Monitor GitHub activity for updates, especially for TON protocol changes.