infernosquad/bitcoind-bundle

一个提供与 bitcoind PHP 库集成的打包工具

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

This package is not auto-updated.

Last update: 2024-09-14 20:04:00 UTC


README

将 InfernosquadBitcoindBundle 添加到您的项目中

composer require infernosquad/bitcoind-bundle

启用捆绑包

在内核中启用捆绑包

// app/AppKernel.php

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

配置

配置您的 bitcoind 客户端

#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

用法

现在您可以从控制器中获取您的客户端和驱动程序。
查看 bitcoind 捆绑包的文档 https://github.com/nbobtc/bitcoind-php

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