PHPackages                             tmwclaxton/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tmwclaxton/laravel-bitcoin-module

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

tmwclaxton/laravel-bitcoin-module
=================================

Laravel Bitcoin Module

v1.0.3(2y ago)09MITPHPPHP ^8.2

Since Jun 24Pushed 2y agoCompare

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

READMEChangelog (4)Dependencies (3)Versions (5)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

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% 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 ~0 days

Total

4

Last Release

738d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57643714?v=4)[Toby Claxton](/maintainers/tmwclaxton)[@tmwclaxton](https://github.com/tmwclaxton)

---

Top Contributors

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

---

Tags

laravelbitcoinmollsoft

### Embed Badge

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

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

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

1.1k75.1k91](/packages/nativephp-mobile)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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