PHPackages                             kemalevren/laravel-bitcoinrpc - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. kemalevren/laravel-bitcoinrpc

ActiveLibrary[HTTP &amp; Networking](/categories/http)

kemalevren/laravel-bitcoinrpc
=============================

Bitcoin JSON-RPC Service Provider for Laravel

v1.1.2(8y ago)012MITPHPPHP &gt;=5.6.0

Since Feb 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kemalevren/laravel-bitcoinrpc)[ Packagist](https://packagist.org/packages/kemalevren/laravel-bitcoinrpc)[ Docs](https://github.com/denpamusic/laravel-bitcoinrpc)[ RSS](/packages/kemalevren-laravel-bitcoinrpc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (7)Used By (0)

Bitcoin JSON-RPC Service Provider for Laravel
=============================================

[](#bitcoin-json-rpc-service-provider-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/c081297fe80d698b250a17d7283d3f87dc8dce457e5fc4ee719fa0a4c5aa33c1/68747470733a2f2f706f7365722e707567782e6f72672f64656e70612f6c61726176656c2d626974636f696e7270632f762f737461626c65)](https://packagist.org/packages/denpa/laravel-bitcoinrpc) [![License](https://camo.githubusercontent.com/bee71b4b3162fbf9f37047b27ead35a69f0ae87eb572b6675df2c563c459db46/68747470733a2f2f706f7365722e707567782e6f72672f64656e70612f6c61726176656c2d626974636f696e7270632f6c6963656e7365)](https://packagist.org/packages/denpa/laravel-bitcoinrpc) [![Build Status](https://camo.githubusercontent.com/5ebed14beaa3339e6137be1db69826f36884c2a33b3978e1840135894f3a105a/68747470733a2f2f7472617669732d63692e6f72672f64656e70616d757369632f6c61726176656c2d626974636f696e7270632e737667)](https://travis-ci.org/denpamusic/laravel-bitcoinrpc) [![Code Climate](https://camo.githubusercontent.com/fd5baa47c1934e531119176b4278d3371b037ff55781cf8022ff7e2c6c5aab4e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64656e70616d757369632f6c61726176656c2d626974636f696e7270632f6261646765732f6770612e737667)](https://codeclimate.com/github/denpamusic/laravel-bitcoinrpc) [![](https://camo.githubusercontent.com/7877d2da374b84df1d88b6fdd42dd3b80aae5fc0072e94febb0d04a04b1f1e08/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f64656e70616d757369632f6c61726176656c2d626974636f696e7270632f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/denpamusic/laravel-bitcoinrpc/coverage) [![Dependency Status](https://camo.githubusercontent.com/fc500b1bbb9826f08980c499c2aba3326a136493b47b2feb986880d192932d12/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3538383333626663653235663539303033363533363263662f62616467652e7376673f7374796c653d726f756e646564)](https://www.versioneye.com/user/projects/58833bfce25f5900365362cf)

About
-----

[](#about)

This package allows you to make JSON-RPC calls to Bitcoin Core JSON-RPC server from your laravel project. It's based on [php-bitcoinrpc](https://github.com/denpamusic/php-bitcoinrpc) project - fully unit-tested Bitcoin JSON-RPC client powered by GuzzleHttp.

Installation
------------

[](#installation)

Run `php composer.phar require denpa/laravel-bitcoinrpc` in your project directory or add following lines to composer.json

```
"require": {
    "denpa/laravel-bitcoinrpc": "^1.1"
}
```

and run `php composer.phar update`.

Add `Denpa\Bitcoin\Providers\ServiceProvider::class,` line to the providers list somewhere near the bottom of your /config/app.php file.

```
'providers' => [
    ...
    Denpa\Bitcoin\Providers\ServiceProvider::class,
];
```

Publish config file by running `php artisan vendor:publish --provider="Denpa\Bitcoin\ServiceProvider"` in your project directory.

You might also want to add facade to $aliases array in /config/app.php.

```
'aliases' => [
    ...
    'Bitcoind' => Denpa\Bitcoin\Facades\Bitcoind::class,
];
```

I recommend you to use .env file to configure client. To connect to Bitcoin Core you'll need to add at least following parameters

```
BITCOIND_USER=(rpcuser from bitcoin.conf)
BITCOIND_PASSWORD=(rpcpassword from bitcoin.conf)

```

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

[](#requirements)

- PHP 7.0 or higher (should also work on 5.6, but this is unsupported)
- Laravel 5.1 or higher

Usage
-----

[](#usage)

You can perform request to Bitcoin Core using any of methods listed below:

### Helper Function

[](#helper-function)

```
