PHPackages                             catchain/ton-address - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. catchain/ton-address

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

catchain/ton-address
====================

Utility functions for working with TON blockchain addresses

1.0.0(3y ago)411.7k↓27.1%1[1 PRs](https://github.com/catchain/ton-address/pulls)MITPHPPHP ^8.1

Since Dec 26Pushed 3y ago2 watchersCompare

[ Source](https://github.com/catchain/ton-address)[ Packagist](https://packagist.org/packages/catchain/ton-address)[ RSS](/packages/catchain-ton-address/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

TON Addresses for PHP
=====================

[](#ton-addresses-for-php)

This package contains some PHP utility functions for working with TON blockchain addresses.

### Installation

[](#installation)

```
composer require catchain/ton-address

```

### Usage

[](#usage)

Checking address validity:

```
use Catchain\Ton\Address\Address;

Address::isValid('EQB/tWkYGPdyPxqz8TXjVaSTKfr1gOOPqOez4d07vHFqUMuk');
// >>> true

Address::isValid('this-is-definitely-not-an-address');
// >>> false
```

Creating Address object:

```
$address = Address::parse('-1:811ced271f8f449cb51eb5920090b92cb200b20f07170676e9db6fbe9da516cf');

// or in any other format:

$address = Address::parse('Uf+BHO0nH49EnLUetZIAkLkssgCyDwcXBnbp22++naUWz5id');
```

Object structure:

```
Catchain\Ton\Address\Address {
  +wc: -1,
  +hashPart: b"ü\x1CÝ'\x1FÅD£Á\x1EÁÆ\0É╣,▓\0▓\x0F\x07\x17\x06vÚ█o¥ØÑ\x16¤",
  +isTestOnly: true,
  +isBounceable: true,
  +isUserFriendly: true,
  +isUrlSafe: true,
}

```

Serializing to string (arguments are self-explanatory):

```
$address->toString(
  userFriendly: true,
  urlSafe: true,
  bounceable: true,
  testOnly: false,
);

// >>> Ef-BHO0nH49EnLUetZIAkLkssgCyDwcXBnbp22--naUWz8VY
```

Serializing to the long format:

```
$address->toString(userFriendly: false);

// >>> -1:811ced271f8f449cb51eb5920090b92cb200b20f07170676e9db6fbe9da516cf
```

By default the object is serialized to the same format that it was created from:

```
Address::parse('Uf+BHO0nH49EnLUetZIAkLkssgCyDwcXBnbp22++naUWz5id')->toString();
// >>> Uf+BHO0nH49EnLUetZIAkLkssgCyDwcXBnbp22++naUWz5id

Address::parse('kf-BHO0nH49EnLUetZIAkLkssgCyDwcXBnbp22--naUWz37S')->toString();
// >>> kf-BHO0nH49EnLUetZIAkLkssgCyDwcXBnbp22--naUWz37S
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a660e98804e315e4abc1dda305d0f676250d80a7064a95bafd35c8229970d3b7?d=identicon)[ingria](/maintainers/ingria)

---

Top Contributors

[![ingria](https://avatars.githubusercontent.com/u/2178368?v=4)](https://github.com/ingria "ingria (3 commits)")

---

Tags

cryptocurrencytonton-blockchain

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/catchain-ton-address/health.svg)

```
[![Health](https://phpackages.com/badges/catchain-ton-address/health.svg)](https://phpackages.com/packages/catchain-ton-address)
```

###  Alternatives

[slushie/laravel-assetic

Assetic support for Laravel 4

3717.0k](/packages/slushie-laravel-assetic)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
