PHPackages                             h-byte-hegelian/bitwasp-bitcoin-lib - 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. h-byte-hegelian/bitwasp-bitcoin-lib

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

h-byte-hegelian/bitwasp-bitcoin-lib
===================================

Implementation of raw transactions in bitcoin, HD wallets, Electrum wallets, and other fun stuff.

v1.2.3(9y ago)011UnlicensePHPPHP &gt;=5.3.3

Since Dec 11Pushed 7y agoCompare

[ Source](https://github.com/h-byte-hegelian/bitcoin-lib-php)[ Packagist](https://packagist.org/packages/h-byte-hegelian/bitwasp-bitcoin-lib)[ RSS](/packages/h-byte-hegelian-bitwasp-bitcoin-lib/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (12)Used By (0)

bitcoin-lib-php
===============

[](#bitcoin-lib-php)

PHP libraries implementing bitcoin key functions, as well as BIP32 and electrum.

[![Gitter](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/Bit-Wasp/bitcoin-lib-php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

> NB: This library is outdated, and no longer maintained. BC breaks will not be accepted for this reason. For a newer library, please see

The library intends to expose a lot of general functionality which isn't available using the RPC (like deterministic addresses).

It also allows you to reduce the number of queries that are made to bitcoind, such as createrawtransaction/signrawtransaction/decoderawtransaction. As such, such, use of bitcoin RPC functionality can be kept to a minimum.

Libraries
=========

[](#libraries)

- Raw Transactions: create, sign, validate, with support for P2SH.
- Create multi-signature addresses, create redeeming transactions.
- BIP32: Functions for generating BIP32 deterministic keys.
- Electrum: Create seed from mnemonic, create MPK from seed, derive public keys from MPK, or private keys from seed.
- BitcoinLib: The core class, with key functionality, encoding/decoding &amp; validation functions, etc.
- BIP39: Functions for generating Mnemonic code for generating deterministic keys (possibly password protected)

If this library powers your project and you're feeling tipsy, buy me lunch some day! 1sCVtkEhQmvp3D4K22Pw9xhFPTDWFh8SZ

Installation
============

[](#installation)

Installing via Composer (recommended)
-------------------------------------

[](#installing-via-composer-recommended)

1. Install Composer in your project:

    curl -s  | php
2. Create a `composer.json` file in your project root:

    { "require": { "bitwasp/bitcoin-lib": "1.0.\*" } }
3. Install via Composer

    php composer.phar install

Dependencies
============

[](#dependencies)

Mcrypt Extension (Random data)
------------------------------

[](#mcrypt-extension-random-data)

The Mcrypt Extension is required for generating random data, it does this internally by using `/dev/urandom` on unix or `CryptGenRandom` on windows.

GMP Extension (Math)
--------------------

[](#gmp-extension-math)

The GMP Extension is required for the crypto math.

PECL intl extension (BIP39)
---------------------------

[](#pecl-intl-extension-bip39)

The PECL intl extension is required for BIP39 Mnemonic Seeds when a UTF-8 passphrase is used.

Mdanter's PHP Pure PHP Elliptic Curve Cryptography Library
----------------------------------------------------------

[](#mdanters-php-pure-php-elliptic-curve-cryptography-library)

`mdanter/ecc` is required for most of the crypto.

Contributing
============

[](#contributing)

Please make sure that all phpunit tests pass (and preferably added new unit tests) and that the coding style passing PSR2 checks:

- `./vendor/bin/phpunit`
- `./vendor/bin/phpcs --standard=./phpcs.xml -n -s ./src/`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 53.2% 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 ~90 days

Recently: every ~183 days

Total

10

Last Release

3353d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1397cb228778ea7f7038a82d01db9285708b1267b29d664ac710d325ade7c9d1?d=identicon)[h-byte-hegelian](/maintainers/h-byte-hegelian)

---

Top Contributors

[![rubensayshi](https://avatars.githubusercontent.com/u/649160?v=4)](https://github.com/rubensayshi "rubensayshi (82 commits)")[![afk11](https://avatars.githubusercontent.com/u/5617245?v=4)](https://github.com/afk11 "afk11 (45 commits)")[![cryptonaut420](https://avatars.githubusercontent.com/u/8463048?v=4)](https://github.com/cryptonaut420 "cryptonaut420 (9 commits)")[![h-byte-hegelian](https://avatars.githubusercontent.com/u/34963473?v=4)](https://github.com/h-byte-hegelian "h-byte-hegelian (9 commits)")[![willgriffin](https://avatars.githubusercontent.com/u/590602?v=4)](https://github.com/willgriffin "willgriffin (5 commits)")[![OACDesigns](https://avatars.githubusercontent.com/u/2932334?v=4)](https://github.com/OACDesigns "OACDesigns (2 commits)")[![macdabby](https://avatars.githubusercontent.com/u/176957?v=4)](https://github.com/macdabby "macdabby (1 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

---

Tags

phpbitcoinbtctransactionscryptocurrencyhd-walleteccbip32electrum

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/h-byte-hegelian-bitwasp-bitcoin-lib/health.svg)

```
[![Health](https://phpackages.com/badges/h-byte-hegelian-bitwasp-bitcoin-lib/health.svg)](https://phpackages.com/packages/h-byte-hegelian-bitwasp-bitcoin-lib)
```

###  Alternatives

[bitwasp/bitcoin-lib

Implementation of raw transactions in bitcoin, HD wallets, Electrum wallets, and other fun stuff.

13922.3k5](/packages/bitwasp-bitcoin-lib)[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[bitwasp/secp256k1-php

PHP Extension with bindings for bitcoin/secp256k1.

58185.7k35](/packages/bitwasp-secp256k1-php)[coinpaymentsnet/coinpayments-php

A PHP wrapper for the CoinPayments.net v1 API.

55126.2k](/packages/coinpaymentsnet-coinpayments-php)[jimmerioles/bitcoin-currency-converter-php

A simple and lightweight bitcoin to currency converter and vice versa based on current exchange rates from your chosen provider: Coinbase, Coindesk, Bitpay and etc.

132.7k](/packages/jimmerioles-bitcoin-currency-converter-php)

PHPackages © 2026

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