https://github.com/dan-da/coinparams-bitwasp-addon
classes to integrate bitwasp bitcoin-php with coinparams for multicoin functionality.
https://github.com/dan-da/coinparams-bitwasp-addon
altcoins bitwasp coinparams multicoin
Last synced: 10 months ago
JSON representation
classes to integrate bitwasp bitcoin-php with coinparams for multicoin functionality.
- Host: GitHub
- URL: https://github.com/dan-da/coinparams-bitwasp-addon
- Owner: dan-da
- License: unlicense
- Created: 2018-07-21T15:15:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-02T01:19:27.000Z (over 5 years ago)
- Last Synced: 2025-07-03T16:14:12.399Z (12 months ago)
- Topics: altcoins, bitwasp, coinparams, multicoin
- Language: PHP
- Size: 21.5 KB
- Stars: 6
- Watchers: 3
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coinparams-bitwasp-addon
These are addon classes to integrate bitwasp [bitcoin-php](https://github.com/Bit-Wasp/bitcoin-php) with [coinparams](https://github.com/dan-da/coinparams) for
multicoin functionality.
This library adds two classes:
* *MultiCoinNetwork* extends BitWasp\Bitcoin\Network\Network and provides address prefixes, etc.
* *MultiCoinRegistry* extends BitWasp\Bitcoin\Key\Deterministic\Slip132\PrefixRegistry
and provides xpub/ypub,zpub extended key prefixes.
These classes accept string arguments \[symbol,network\] to automatically
load prefixes from coinparams.json. The classes can then be used anywhere
that *Network* or *PrefixRegistry* would normally be used.
See the examples and tests directory for usage.
note: Litecoin has irregular extended key prefixes. See examples/bip39 for details.
# Installation
```
$ cd
$ composer require dan-da/coinparams-bitwasp-addon
```
## Run some tests.
```
$ cd vendor/dan-da/coinparams-bitwasp-addon/tests
$ ./tester.php
```
## Run some examples.
```
$ cd vendor/dan-da/coinparams-bitwasp-addon/examples
$ php bip39.php
etc, etc.
```