PHPackages                             mollsoft/laravel-bitcoin-module - 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. [API Development](/categories/api)
4. /
5. mollsoft/laravel-bitcoin-module

ActiveLibrary[API Development](/categories/api)

mollsoft/laravel-bitcoin-module
===============================

Laravel Bitcoin Module

v1.0.7(2y ago)184MITPHPPHP ^8.2

Since Dec 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mollsoft/laravel-bitcoin-module)[ Packagist](https://packagist.org/packages/mollsoft/laravel-bitcoin-module)[ Docs](https://github.com/mollsoft/laravel-bitcoin-module)[ RSS](/packages/mollsoft-laravel-bitcoin-module/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

[![Pest Laravel Expectations](https://camo.githubusercontent.com/51d922ef14f029f9b0ce24a1847beb01238b17e0fc39c97df9f32b3df5bb24d8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f426974636f696e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6d6f6c6c736f66742532466c61726176656c2d626974636f696e2d6d6f64756c65267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d576f726b696e672b776974682b63727970746f63757272656e63792b426974636f696e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/51d922ef14f029f9b0ce24a1847beb01238b17e0fc39c97df9f32b3df5bb24d8/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f426974636f696e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6d6f6c6c736f66742532466c61726176656c2d626974636f696e2d6d6f64756c65267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d576f726b696e672b776974682b63727970746f63757272656e63792b426974636f696e266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

[ ![Latest Version on Packagist](https://camo.githubusercontent.com/595a3088e281ad3db98733f4f03c9112b1afa30e82a78c01be980be9d3c3ee5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6c6c736f66742f6c61726176656c2d626974636f696e2d6d6f64756c652e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/mollsoft/laravel-bitcoin-module)[ ![Php Version](https://camo.githubusercontent.com/af3c14fed4241be47ccc899f006a8cddf0bd4f0ee21ac9b1ed280a351df75c08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e322d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://www.php.net)[ ![Php Version](https://camo.githubusercontent.com/c052236cf00f5483f3811fcb9822473314014aabe3edab756a1bc55270897fdc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d2533453d31302d7265642e7376673f6d61784167653d32353932303030)](https://laravel.com/)[ ![Total Downloads](https://camo.githubusercontent.com/06fd009f76ae0f64a34541f7ce0600febfaa12633b56579575604c934fd34733/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6c6c736f66742f6c61726176656c2d626974636f696e2d6d6f64756c652e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/mollsoft/laravel-bitcoin-module)[![Website](https://camo.githubusercontent.com/32092acc7d40888936c3ebeecec5d97294fed6ea1561fcbbcd17ec7a0a001c2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576562736974652d68747470733a2f2f6d6f6c6c736f66742e636f6d2d626c61636b)](https://mollsoft.com)[![Telegram](https://camo.githubusercontent.com/10db3b0fd4e2c0154cd02533cfc67c102acd88202857f79f950885ddaa0843e1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54656c656772616d2d406d6f6c6c736f66742d626c7565)](https://t.me/mollsoft)

---

**Laravel Bitcoin Module** is a Laravel package for work with cryptocurrency Bitcoin. You can create descriptor wallets, generate addresses, track current balances, collect transaction history, organize payment acceptance on your website, and automate outgoing transfers.

You can contact me for help in integrating payment acceptance into your project.

Examples
--------

[](#examples)

Create Descriptor Wallet:

```
$name = 'my-wallet';
$password = 'password for encrypt wallet files';
$title = 'My First Wallet';

$node = Bitcoin::createNode('localhost', 'LocalHost', '127.0.0.1');
$wallet = Bitcoin::createWallet($node, $name, $password, $title);
```

Import Descriptor Wallet using descriptors:

```
$name = 'my-wallet';
$password = 'password for encrypt wallet files';
$descriptions = json_decode('DESCRIPTORS JSON', true);
$title = 'My First Wallet';

$node = Bitcoin::createNode('localhost', 'LocalHost', '127.0.0.1');
$wallet = Bitcoin::importWallet($node, $name, $descriptions, $password, $title);
```

Create address:

```
$wallet = BitcoinWallet::firstOrFail();
$title = 'My address title';

$address = Bitcoin::createAddress($wallet, AddressType::BECH32, $title);
```

Validate address:

```
$address = '....';

$node = BitcoinNode::firstOrFail();
$addressType = Bitcoin::validateAddress($node, $address);
if( $addressType === null ) {
    die('Address is not valid!');
}

var_dump($addressType); // Enum value of AddressType
```

Send all BTC from wallet:

```
$wallet = BitcoinWallet::firstOrFail();
$address = 'to_address';

$txid = Bitcoin::sendAll($wallet, $address);

echo 'TXID: '.$txid;
```

Send BTC from wallet:

```
$wallet = BitcoinWallet::firstOrFail();
$address = 'to_address';
$amount = 0.001;

$txid = Bitcoin::send($wallet, $address, $amount);

echo 'TXID: '.$txid;
```

### Installation

[](#installation)

You can install the package via composer:

```
composer require mollsoft/laravel-bitcoin-module
```

After you can run installer using command:

```
php artisan bitcoin:install
```

And run migrations:

```
php artisan migrate
```

Register Service Provider and Facade in app, edit `config/app.php`:

```
'providers' => ServiceProvider::defaultProviders()->merge([
    ...,
    \Mollsoft\LaravelBitcoinModule\BitcoinServiceProvider::class,
])->toArray(),

'aliases' => Facade::defaultAliases()->merge([
    ...,
    'Bitcoin' => \Mollsoft\LaravelBitcoinModule\Facades\Bitcoin::class,
])->toArray(),
```

In file `app/Console/Kernel` in method `schedule(Schedule $schedule)` add

```
$schedule->command('bitcoin:sync')
    ->everyMinute()
    ->runInBackground();

```

Commands
--------

[](#commands)

Scan transactions and update balances:

```
> php artisan bitcoin:sync
```

Scan transactions and update balances for wallet:

```
> php artisan bitcoin:sync-wallet {wallet_id}
```

WebHook
-------

[](#webhook)

You can set up a WebHook that will be called when a new incoming BTC deposit is detected.

In file config/bitcoin.php you can set param:

```
'webhook_handler' => \Mollsoft\LaravelBitcoinModule\WebhookHandlers\EmptyWebhookHandler::class,
```

Example WebHook handler:

```
class EmptyWebhookHandler implements WebhookHandlerInterface
{
    public function handle(BitcoinWallet $wallet, BitcoinAddress $address, BitcoinDeposit $transaction): void
    {
        Log::error('Bitcoin Wallet '.$wallet->name.' new transaction '.$transaction->txid.' for address '.$address->address);
    }
}
```

Requirements
------------

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 8.2 and older
- PHP Extensions: Decimal.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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

Every ~1 days

Total

3

Last Release

877d ago

### Community

Maintainers

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

---

Top Contributors

[![mollsoft](https://avatars.githubusercontent.com/u/151442118?v=4)](https://github.com/mollsoft "mollsoft (28 commits)")

---

Tags

bitcoincryptocurrencylaravelphp8laravelbitcoinmollsoft

### Embed Badge

![Health badge](/badges/mollsoft-laravel-bitcoin-module/health.svg)

```
[![Health](https://phpackages.com/badges/mollsoft-laravel-bitcoin-module/health.svg)](https://phpackages.com/packages/mollsoft-laravel-bitcoin-module)
```

###  Alternatives

[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[combindma/laravel-facebook-pixel

Meta pixel integration for Laravel

4956.9k](/packages/combindma-laravel-facebook-pixel)[stechstudio/laravel-hubspot

A Laravel SDK for the HubSpot CRM Api

2971.0k](/packages/stechstudio-laravel-hubspot)

PHPackages © 2026

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