Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ton Php Laravel Package

amashukov/ton-php

View on GitHub
Deep Wiki
Context7

Pure-PHP TON (The Open Network) SDK — TLB Cell/BOC, Ed25519 wallets, mnemonic, and a typed toncenter client in one composer require.

Frequently asked questions about Ton Php
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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity