定制 tugmaks/php-coin-core 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tugmaks/php-coin-core

Composer 安装命令:

composer require tugmaks/php-coin-core

包简介

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

README 文档

README

This package provides an easy to use rpc client for litecoin and bitcoin wallets

Installation

The recommended way to install client is using Composer:

Download and install Composer.

Add tugmaks/php-coin-core as a dependency of your project:

$ 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.

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:

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

You are free to use json_decode or any other advanced serializers to work with response.

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2018-06-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固