Download the PHP package amashukov/ton-wallet-php without Composer
On this page you can find all versions of the php package amashukov/ton-wallet-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amashukov/ton-wallet-php
More information about amashukov/ton-wallet-php
Files in amashukov/ton-wallet-php
Package ton-wallet-php
Short Description TON Wallet v4r2 contract wrapper + internal-message builder + address parser/serializer in pure PHP. Offline transfer assembly; pluggable RPC for seqno + broadcast.
License MIT
Homepage https://github.com/AndreyMashukov/ton-wallet-php
Informations about the package ton-wallet-php
amashukov/ton-wallet-php
Pure-PHP TON Wallet v4r2 — address derivation, transfer assembly, and a TON address parser for The Open Network.
A pure-PHP implementation of the TON Wallet v4r2 contract for The Open Network (TON): derive the wallet address, assemble signed transfers with the standard InternalMessage envelope, and parse / serialize TON addresses in every form. Address derivation matches @ton/ton's WalletContractV4 byte-for-byte, so a wallet built here lands at the same on-chain address as the JavaScript SDK. Broadcasting is decoupled behind a tiny RPC interface, so the same wallet object signs offline and ships through any backend.
Features
- Wallet v4r2 address derivation —
WalletV4R2::address()reproduces the exact state-init hash@ton/toncomputes; same keys, same address. - Offline transfer assembly —
createTransfer()builds and signs the external-in message body without any network I/O; broadcast is a separate step. - 1..4 messages per transfer — batch up to four outgoing
InternalMessages in a single signed external message, with a per-messagesendMode. - Full TON address parser —
Address::parse()handles user-friendlyUQ…/EQ…(bounceable + non-bounceable, mainnet + testnet, url-safe + standard base64) and rawworkchain:hexforms, with CRC16 validation. - Address re-serialization — emit any parsed address in any target form via
Address::toString()flags ortoTonscanFormat(). - Pluggable RPC — implement
WalletRpcInterface(getSeqno+sendBoc) once and broadcast through toncenter, a custom node, or a test double.
Why amashukov/ton-wallet-php
olifanton/ton covers parts of the TON wallet surface, but this package keeps the wallet contract, the transfer builder, and the address parser as small final readonly value objects with PHPStan level 9 across the board, and pins address derivation to a cross-checked @ton/ton parity vector. Broadcasting is never baked in — you bring the transport.
Installation
Usage
Derive the wallet address
Build and broadcast a transfer
InternalMessage values are decimal-string nano-TON. validUntil is a UNIX
timestamp after which an unconfirmed external message is dropped by the network.
Sign offline, broadcast later
Parse and re-serialize an address
Requirements
- PHP 8.3+
ext-sodium(Ed25519 signing)ext-bcmath
Related packages
| Package | Role |
|---|---|
| amashukov/ton-cell-php | TLB Cell / Builder / BOC layer (dependency) |
| amashukov/ton-crypto-php | Mnemonic + Ed25519 KeyPair (dependency) |
| amashukov/toncenter-client-php | Typed toncenter v2 client + ready WalletRpcInterface adapter |
| amashukov/ton-php | TON meta-package |
| amashukov/blockchain-context-bundle | Symfony bundle wiring the whole family |
Quality
- PHPStan level 9, clean.
- php-cs-fixer
@PER-CSruleset. - GitHub Actions CI on every push.
- Address derivation pinned against a
@ton/tonWalletContractV4parity vector.
License
MIT — see LICENSE.
All versions of ton-wallet-php with dependencies
ext-bcmath Version *
amashukov/ton-cell-php Version ^0.1.0
amashukov/ton-crypto-php Version ^0.1.0