Download the PHP package amashukov/blockchain-context-bundle without Composer
On this page you can find all versions of the php package amashukov/blockchain-context-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amashukov/blockchain-context-bundle
More information about amashukov/blockchain-context-bundle
Files in amashukov/blockchain-context-bundle
Package blockchain-context-bundle
Short Description Symfony 7 bundle wiring the pure-PHP TON + EVM SDKs (amashukov/ton-php + amashukov/eth-php) into an application — autowired signature verification (EIP-191 + Ed25519/TonConnect), AES-256-GCM private-key encryption, and an HD deposit-wallet deriver port.
License MIT
Homepage https://github.com/AndreyMashukov/blockchain-context-bundle
Informations about the package blockchain-context-bundle
amashukov/blockchain-context-bundle
Symfony 7 bundle for crypto payments — autowires the pure-PHP TON + EVM SDKs into typed RPC clients, signature verification, key encryption, and per-chain finality / detection / gas / tx-builder services.
amashukov/blockchain-context-bundle is a Symfony 7 bundle for crypto payments that turns the pure-PHP TON + EVM SDKs (amashukov/ton-php + amashukov/eth-php) into a ready, autowired blockchain surface for your application — typed JSON-RPC clients, deposit-detection / finality / gas / deposit-tx-builder services, EIP-191 + TON Connect signature verification, and AES-256-GCM private-key encryption — all configured from one place, env-agnostic, with full DI autowiring.
Features
- Autowired RPC clients —
Amashukov\EthRpc\JsonRpcProvider/EthRpcClient(ethers.js-style EVM JSON-RPC) andAmashukov\Toncenter\ToncenterClient(typed toncenter v2), wired over a PSR-18 transport (amashukov/http-client-phpcURL client; toncenter gets anX-Api-Key+429/5xx/542-retry middleware pipeline). - Signing & wallet —
Amashukov\Eip1559TxSigner\Eip1559Signer(EIP-1559 offline signer) andAmashukov\TonWallet\WalletV4R2(built from a mnemonic via the bundle factory);ToncenterWalletRpcimplements the wallet's RPC port. - Per-chain domain services (host-app-agnostic, owning ports the host implements):
Detection\ChainDepositCheckChain,Finality\{ConfirmationCheckChain,ConfirmationCounterRegistry,DepthPollingFinalityVerifier},Gas\{EthGasFetcher,TonGasFetcher,ZeroGasFetcher},TxBuilder\DepositTxBuilderChain(+ per-chain TON / TON-Jetton / ETH / USDT-ERC20 builders),Explorer\DefaultExplorerUrl,Numeric\{BcDecimal,UuidIntCodec,UsdtJettonDecimals},Time\RealSleeper. SignatureVerifier— EIP-191 (personal_sign, secp256k1 ecrecover + Keccak-256) + Ed25519 (TON Connect) verification.PrivKeyEncrypter— AES-256-GCM authenticated encryption for keys at rest.DepositWalletDeriverInterfaceport +DerivedWallet/DepositEvidencevalue objects.- Tagged-iterator chains —
ChainDepositCheckChain,ConfirmationCheckChain,ConfirmationCounterRegistry, andDepositTxBuilderChainauto-collect their members via bundle-namespaced tags (blockchain_context.*); drop a new impl and it joins the chain with no DI edits.
Why amashukov/blockchain-context-bundle
There is no maintained Symfony bundle for crypto-payment infrastructure — most projects glue a raw RPC client into a service by hand. This bundle fills that empty niche: it wires the entire TON + EVM stack into Symfony's container with autowiring, env-agnostic config, and a tagged-iterator extension model, so adding a new chain or deposit builder is a drop-in service, not a DI rewrite.
Installation
Register the bundle (Symfony Flex does this automatically):
Usage
Inject any autowired service directly:
Configuration
The bundle is env-agnostic: it exposes a config tree and reads only %blockchain_context.*% parameters internally. The host maps them to its own environment (use %env(...)%, with default: processors as you like). Config is split per chain (eth: / ton:), each toggleable via enabled (default true — set false for a single-chain deployment):
Every key is optional (sensible empty / 0 / explorer defaults), so a host that uses only one chain can leave the other section's values unset (or enabled: false).
Requirements
- PHP 8.3+
- Symfony 7.x (
symfony/framework-bundle) ext-gmp,ext-sodium,ext-openssl,ext-bcmath
Related packages
| Package | Layer |
|---|---|
| amashukov/ton-php | Umbrella TON SDK (Cell/BOC, wallet, toncenter) |
| amashukov/eth-php | Umbrella EVM SDK (Keccak, secp256k1, RLP, EIP-1559, ABI, RPC) |
| amashukov/http-client-php | PSR-18 cURL HTTP client |
| amashukov/eth-rpc-client-php | ethers.js v6-style JSON-RPC client |
| amashukov/toncenter-client-php | Typed toncenter v2 client |
Quality
- PHPStan level 9 across
src/. - php-cs-fixer with the
@PER-CSruleset. - GitHub Actions CI on every push.
License
MIT — see LICENSE.
All versions of blockchain-context-bundle with dependencies
ext-gmp Version *
ext-openssl Version *
ext-sodium Version *
amashukov/eth-php Version ^0.1.0
amashukov/http-client-php Version ^0.1.0
amashukov/ton-php Version ^0.1.0
nyholm/psr7 Version ^1.8
psr/clock Version ^1.0
psr/log Version ^3.0
symfony/cache Version ^7.0
symfony/config Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/framework-bundle Version ^7.0
symfony/http-kernel Version ^7.0
symfony/yaml Version ^7.0