amashukov/blockchain-context-bundle
Symfony 7 bundle for crypto payments that autowires pure-PHP TON and EVM SDKs into typed RPC clients, plus signature verification, AES-256-GCM key encryption, and per-chain finality, detection, gas, and tx-builder services.
Detection\ChainDepositCheckChain, Finality\ConfirmationCheckChain, ConfirmationCounterRegistry, and DepthPollingFinalityVerifier map directly to "when do we credit a user's balance?" decisions — confirmation depth policy per chain, reorg tolerance, and polling cadence are configurable product levers rather than hardcoded logic.PrivKeyEncrypter (AES-256-GCM at rest) plus DepositWalletDeriverInterface / DerivedWallet / DepositEvidence value objects let a PM frame the custody question early: are we deriving per-user deposit addresses and encrypting keys in our own database, or delegating to a custodian? That decision drives compliance scope, insurance, and incident response — it should be made deliberately, not inherited from a library.SignatureVerifier (EIP-191 personal_sign, TON Connect Ed25519) supports "sign in with wallet," proving address ownership before withdrawals, and verifying signed payment intents — a discrete feature a PM can schedule independently of the deposit pipeline.Consider it when:
PrivKeyEncrypter).config/*.php publishing, and no Laravel-native facade. Laravel adoption means writing and maintaining that bridge yourself, and the autowiring/tagged-iterator benefits largely evaporate outside the Symfony container.ext-gmp, ext-sodium, ext-openssl, ext-bcmath. These are non-trivial on locked-down or shared hosting; verify before committing.Look elsewhere when:
amashukov/ton-php, amashukov/eth-php, amashukov/eth-rpc-client-php, amashukov/toncenter-client-php) directly and writing your own wiring.One line: An MIT-licensed, pure-PHP toolkit that gives us the chain-level building blocks for crypto deposits — RPC clients, deposit detection, confirmation tracking, gas estimates, and signature verification — so our engineers write payment logic instead of blockchain plumbing.
For executives: The strategic value is time-to-market and optionality. It compresses the "connect to a chain and detect a deposit safely" problem — normally several engineer-months of unfamiliar protocol work — into a configurable layer, and its extension model means adding a chain later is incremental rather than a rewrite. Cost is zero in license terms; the real cost is ownership risk. This is early-stage, single-maintainer software with no adoption to date. My recommendation is a time-boxed evaluation, not a production commitment: prove it in a spike on testnet, and if it holds, budget for us to fork it, pin the version, add security review, and treat it as internal code. If we are not prepared to own it, the honest alternative is a custodial payments provider.
For engineering: The design is sound and idiomatic Symfony — env-agnostic config tree, DI autowiring of typed clients, tagged-iterator chains so new chains/builders self-register without container edits, ports-and-adapters separation of domain services from the host app, AES-256-GCM key encryption, and EIP-191 + TON Connect verification. Quality signals are real: PHPStan level 9, php-cs-fixer @PER-CS, Rector dry-run, PHPUnit across PHP 8.3 and 8.4. The caveats are equally concrete: Symfony-only (Laravel requires an adapter we would maintain), PHP 8.3+ with gmp/sodium/openssl/bcmath, poll-based finality rather than an indexer, and no production track record. Please scope the evaluation to include: key-custody threat model, RPC provider redundancy and rate-limit behavior, reorg handling under the confirmation-depth policy, and an honest estimate of the Laravel bridge if we go that route.
Ask: Approve a two-sprint technical spike (testnet only, no customer funds) plus a written build-vs-buy-vs-custodian recommendation, with the explicit understanding that adoption implies a fork-and-own commitment and a named internal owner for the dependency.
How can I help you explore Laravel packages today?