PHPackages                             it-healer/laravel-bitcoin - 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. it-healer/laravel-bitcoin

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

it-healer/laravel-bitcoin
=========================

A library for Laravel that allows you to create and manage the Bitcoin cryptocurrency.

v2.0.4(4w ago)22081[2 issues](https://github.com/it-healer/laravel-bitcoin/issues)MITPHPPHP ^8.2

Since Jul 23Pushed 4w agoCompare

[ Source](https://github.com/it-healer/laravel-bitcoin)[ Packagist](https://packagist.org/packages/it-healer/laravel-bitcoin)[ Docs](https://github.com/it-healer/laravel-bitcoin)[ RSS](/packages/it-healer-laravel-bitcoin/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (8)Versions (16)Used By (0)

[![Pest Laravel Expectations](https://camo.githubusercontent.com/8d84fe7eaf9b972c328209652230137a63c76caaef5d140d433646ad8ec04199/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230424954434f494e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d69742d6865616c65722532466c61726176656c2d626974636f696e267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d426974636f696e2b57616c6c65742b4c6962726172792b666f722b4c61726176656c266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/8d84fe7eaf9b972c328209652230137a63c76caaef5d140d433646ad8ec04199/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c253230424954434f494e2e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d69742d6865616c65722532466c61726176656c2d626974636f696e267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d426974636f696e2b57616c6c65742b4c6962726172792b666f722b4c61726176656c266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

[ ![Latest Version on Packagist](https://camo.githubusercontent.com/cccb109cb27081ad0627d3d7ef3c7e3dd21626d0a3a5a824798ab0e3d84ae422/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69742d6865616c65722f6c61726176656c2d626974636f696e2e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/it-healer/laravel-bitcoin)[ ![Total Downloads](https://camo.githubusercontent.com/1980d62c8bb0a8922017c1611a18e2f395a2cf54037ac4654090f963ad23b17e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69742d6865616c65722f6c61726176656c2d626974636f696e2e7376673f7374796c653d666c61742663616368655365636f6e64733d33363030)](https://packagist.org/packages/it-healer/laravel-bitcoin)---

**Laravel Bitcoin** 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.

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 it-healer/laravel-bitcoin
```

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([
    ...,
    \ItHealer\LaravelBitcoin\BitcoinServiceProvider::class,
])->toArray(),

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

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

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

```

Electrum
--------

[](#electrum)

Для установки приложения Electrum установите на сервер зависимости

```
apt-get install python3-pyqt6 libsecp256k1-dev python3-cryptography
```

А потом выполните команду:

```
php artisan electrum:install
```

Для запуска процесса Electrum добавьте в Supervisor конфигурацию:

```
[program:electrum]
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan electrum
user=%(ENV_SUPERVISOR_PHP_USER)s
environment=LARAVEL_SAIL="1"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autostart=true
autorestart=true
startretries=100

```

В Sheduler добавьте выполнение команды `electrum:cron` ежеминутно:

```
Schedule::command('electrum:cron')
    ->everyMinute()
    ->runInBackground();
```

Для корректной работы `локальной ноды` в Firewall разрешите `TCP 8333`

Установка Bitcoind на сервер
----------------------------

[](#установка-bitcoind-на-сервер)

1. Заходим на сайт  и скачиваем актуальную версию Bitcoin Core для вашей системы (Linux tgz) при помощи команды: `wget https://bitcoincore.org/bin/bitcoin-core-29.0/bitcoin-29.0-x86_64-linux-gnu.tar.gz`.
2. Распаковуем архив при помощи команды: `tar -xvf bitcoin-29.0-x86_64-linux-gnu.tar.gz`
3. Устанавливаем приложение командой: `sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-29.0/bin/*`
4. Теперь у Вас доступна команда `bitcoind` и `bitcoin-cli`.
5. От пользователя создаём папку `mkdir ~/.bitcoin` и файл `~./bitcoin/bitcoin.conf` содержимое описано ниже.
6. Создаём supervisor команду и запускаем её.

### Bitcoin.conf

[](#bitcoinconf)

Ложим в папку `/home/%USER%/.bitcoin/bitcoin.conf`:

```
server=1
datadir=/home/%USER%/.bitcoin
walletdir=/home/%USER%/.bitcoin/wallets

rpcbind=127.0.0.1
rpcport=10497
rpcallowip=127.0.0.1
rpcauth=qEIop8Liv9TisWri:f635d8c82dc0c1205134ab909f39e9a5$508243bcc43f507a1ecb8160b97e6b81b2c756ff06caa1b7c33f3d31de325843

deprecatedrpc=addresses

disablewallet=0

listen=0
dnsseed=1
upnp=0
natpmp=0

prune=550

fallbackfee=0.000050
printtoconsole=1

```

Создаём файл `Supervisor'а` с названием `/etc/supervisor/conf.d/bitcoin.conf`:

```
[program:bitcoin]
process_name=%(program_name)s
command=/usr/local/bin/bitcoind
autostart=true
autorestart=true
startretries=3
user=wallet
redirect_stderr=true
stdout_logfile=/home/%USER%/%PATH_FOR_LARAVEL%/storage/logs/bitcoin.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=5
stopsignal=TERM
stopwaitsecs=6000
environment=HOME="/home/%USER%"

```

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' => \ItHealer\LaravelBitcoin\WebhookHandlers\EmptyWebhookHandler::class,
```

Example WebHook handler:

```
class EmptyWebhookHandler implements WebhookHandlerInterface
{
    public function handle(BitcoinDeposit $transaction): void
    {
        Log::error('Bitcoin new deposit '.$transaction->txid);
    }
}
```

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

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 8.2 and older

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [IT-HEALER](https://github.com/it-healer)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance74

Regular maintenance activity

Popularity19

Limited adoption so far

Community7

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 ~22 days

Recently: every ~69 days

Total

15

Last Release

29d ago

Major Versions

v1.0.9 → v2.0.02025-09-01

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/222434019?v=4)[IT-HEALER | Путь от Программиста к Целителю](/maintainers/it-healer)[@it-healer](https://github.com/it-healer)

---

Top Contributors

[![it-healer](https://avatars.githubusercontent.com/u/222434019?v=4)](https://github.com/it-healer "it-healer (16 commits)")

---

Tags

bitcoinblockchainbtccryptocryptocurrencylaravelphpwalletphplaravelbitcoinbtcit-healer

### Embed Badge

![Health badge](/badges/it-healer-laravel-bitcoin/health.svg)

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

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

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

Monitor the health of a Laravel application

87512.0M167](/packages/spatie-laravel-health)[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.

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

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[plin-code/laravel-istat-geography

Laravel package for importing and managing Italian geography data from ISTAT

107.0k](/packages/plin-code-laravel-istat-geography)

PHPackages © 2026

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