PHPackages                             submtd/cashaddr-converter - 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. submtd/cashaddr-converter

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

submtd/cashaddr-converter
=========================

Converts old Bitcoin Cash addresses to the new CashAddr format and vice versa

1.0.1(8y ago)470.6k↓25%1MITPHPPHP &gt;=7.0.0

Since Jan 23Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (1)

CashaddrConverter
=================

[](#cashaddrconverter)

Converts old Bitcoin Cash addresses to the new CashAddr format and vice versa in a Laravel friendly package. Based off [Har01d's CashAddressPHP code](https://github.com/Har01d/CashAddressPHP).

Installation
------------

[](#installation)

Begin by pulling in the package through Composer.

```
composer require submtd/cashaddr-converter
```

Next, if you are using Laravel 5.4, you will need to include the service provider and optionally, the alias in your `config/app.php` file. If you are using Laravel 5.5, these will be discovered automatically.

```
'providers' => [
    Submtd\CashaddrConverter\Providers\CashaddrConverterServiceProvider::class,
];

'aliases' => [
    'CashaddrConverter' => Submtd\CashaddrConverter\Facades\CashaddrConverterFacade::class,
];
```

Usage
-----

[](#usage)

A facade and a helper function are provided to make it super simple to use.

### Using the facade

[](#using-the-facade)

```
// convert from a legacy address to a cashaddr address
$legacyAddress = '1PchCm7XXAjifhpchPB8wR2WG5rzMFqjnR';
CashaddrConverter::convertToCashaddr($legacyAddress);
// returns bitcoincash:qrup9c40gr9usrz6m7rg7rknjmsp685r2yhxkdx8tf

// convert from a cashaddr address to a legacy address
$cashaddrAddress = 'bitcoincash:qrup9c40gr9usrz6m7rg7rknjmsp685r2yhxkdx8tf';
CashaddrConverter::convertFromCashaddr($cashaddrAddress);
// returns 1PchCm7XXAjifhpchPB8wR2WG5rzMFqjnR
```

### Using the helper functions

[](#using-the-helper-functions)

```
// convert from a legacy address to a cashaddr address
$legacyAddress = '1PchCm7XXAjifhpchPB8wR2WG5rzMFqjnR';
convertToCashaddr($legacyAddress);
// returns bitcoincash:qrup9c40gr9usrz6m7rg7rknjmsp685r2yhxkdx8tf

// convert from a cashaddr address to a legacy address
$cashaddrAddress = 'bitcoincash:qrup9c40gr9usrz6m7rg7rknjmsp685r2yhxkdx8tf';
convertFromCashaddr($cashaddrAddress);
// returns 1PchCm7XXAjifhpchPB8wR2WG5rzMFqjnR
```

Donation
--------

[](#donation)

If this project helped you save some development time, feel free to buy me a beer ;)

[![paypal](https://camo.githubusercontent.com/e1ff554a09e8e92bef25abc553ff05b88f45afd695877cf12f3a46558ef65b2e/68747470733a2f2f7777772e70617970616c6f626a656374732e636f6d2f656e5f55532f692f62746e2f62746e5f646f6e61746543435f4c472e676966)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=G72FZ5PYP6EZU)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~1 days

Total

3

Last Release

3036d ago

Major Versions

0.1 → 1.02018-01-23

PHP version history (2 changes)0.1PHP &gt;=5.4.0

1.0.1PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f2ec485b862557409bdcfdc47aae18b204e6ee01395abb8113cb30c40c30e59?d=identicon)[submtd](/maintainers/submtd)

---

Top Contributors

[![submtd](https://avatars.githubusercontent.com/u/2303288?v=4)](https://github.com/submtd "submtd (7 commits)")

### Embed Badge

![Health badge](/badges/submtd-cashaddr-converter/health.svg)

```
[![Health](https://phpackages.com/badges/submtd-cashaddr-converter/health.svg)](https://phpackages.com/packages/submtd-cashaddr-converter)
```

###  Alternatives

[arispati/emoji-remover

PHP library that remove an emoji from text

30341.5k](/packages/arispati-emoji-remover)

PHPackages © 2026

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