Download the PHP package kielabokkie/bitcoin-address-validator without Composer

On this page you can find all versions of the php package kielabokkie/bitcoin-address-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bitcoin-address-validator

Bitcoin Address Validator

Author Build Packagist Version Total Downloads

Validate legacy, segwit, native segwit (bech32), and taproot Bitcoin addresses.

Requirements

PHP Package Version
7.x v1.0
8.x v2.0+

Please note that taproot addresses are supported from v2.1 of this package.

Installation

Install the package via composer:

Usage

First you instantiate the validator class:

Validate any kind of address (legacy, segwit, native segwit and taproot):

Legacy (P2PKH) address:

Segwit (P2SH) address:

Native segwit (bech32) address:

Taproot (P2TR) address:

Testnet

By default, the validator only passes mainnet addresses as valid. If you would like to validate both mainnet and testnet addresses you can use method chaining:

If you want to validate only testnet addresses you can do that as follows:

Testing

This package is tested against the test data of the official bitcoin/bitcoin repo. If you come across an address that is not validated correctly please open an issue for it.

Run the tests with:

Credits

This package is based on the following packages and uses a lot of their code:

All credit goes to the original authors.

Donate

Did this package made you lots of money, save you some time or just sparked joy?

A donation would be much appreciated: 32vtWJSomccxQ6y1tgSwSHXN5PChpdYy27


All versions of bitcoin-address-validator with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^7.4|^8.0|^8.1
ext-bcmath Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kielabokkie/bitcoin-address-validator contains the following files

Loading the files please wait ....