2017 © Pedro Peláez
 

library php-coin-core

Simple php library for interacting with Litecoin/Bitcoin Core wallet via json rpc

image

tugmaks/php-coin-core

Simple php library for interacting with Litecoin/Bitcoin Core wallet via json rpc

  • Tuesday, June 26, 2018
  • by tugmaks
  • Repository
  • 0 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP Litecoin Core and Bitcoin Core rpc client

This package provides an easy to use rpc client for litecoin and bitcoin wallets, (*1)

Installation

The recommended way to install client is using Composer:, (*2)

Download and install Composer., (*3)

Add tugmaks/php-coin-core as a dependency of your project:, (*4)

$ composer require tugmaks/php-coin-core php-http/guzzle6-adapter

Note: This client relies on HTTPlug to perform HTTP requests. So you will need to install a client implementation to use the this client. The command above uses the Guzzle 6 adapter, but you can use any implementation., (*5)

Usage

<?php
require __DIR__ . '/vendor/autoload.php';

use Tugmaks\CoinCore\Client\ClientFactory;
use Tugmaks\CoinCore\Client\RpcClient;
use Tugmaks\CoinCore\Configuration;

$conf = new Configuration('http://127.0.0.1', 9332, 'guest', 'guest');
$client = ClientFactory::create($conf);

$rpcClient = new RpcClient($conf->getUrlAndPort(), $client);

echo $rpcClient->getBalance();

Response from rpc

This library does not handle deserialization of response. Typical response (for getBalance) will look like:, (*6)

 {"result":0.15707054,"error":null,"id":null}

You are free to use json_decode or any other advanced serializers to work with response., (*7)

The Versions

26/06 2018

dev-master

9999999-dev

Simple php library for interacting with Litecoin/Bitcoin Core wallet via json rpc

  Sources   Download

The Requires

 

The Development Requires

by Maxim Tyugaev

client rpc bitcoin core litecoin core

26/06 2018

0.1

0.1.0.0

Simple php library for interacting with Litecoin/Bitcoin Core wallet via json rpc

  Sources   Download

The Requires

 

The Development Requires

by Maxim Tyugaev

client rpc bitcoin core litecoin core