infernosquad/bitcoind-bundle

A bundle which provides integration with bitcoind php library

v0.1 2016-08-02 05:18 UTC

This package is not auto-updated.

Last update: 2024-12-21 21:19:54 UTC


README

Add InfernosquadBitcoindBundle to your project

composer require infernosquad/bitcoind-bundle

Enable the bundle

Enable the bundle in the kernel:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Infernosquad\BitcoindBundle\InfernosquadBitcoindBundle(),
    );
}

Configuration

Configure your bitcoind clients

#app/config/config.yml
infernosquad_bitcoind:
    drivers:
      driver1:
          class: 'Nbobtc\Http\Driver\CurlDriver' #default
          options:
              name: value
              name1: value1

    clients:
        client1:
            dsn: 'https://username:password@localhost:18332'
            driver: driver1

Usage

Now you can get your clients and drivers from controllers.
See documentation of bitcoind bundle https://github.com/nbobtc/bitcoind-php

$client = $this->container->get('infernosquad.bitcoind.clients.client1');