承接 aflorea4/block_io-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aflorea4/block_io-php

Composer 安装命令:

composer require aflorea4/block_io-php

包简介

Block.io is the easiest way to create wallets, send, and accept payments through Bitcoin, Litecoin, and Dogecoin. This is its PHP library.

README 文档

README

Current Release: 1.3.5

09/12/20: Change _withdraw and _sweep names for further disambiguation from actual API endpoints.
08/15/20: Add cURL headers for requests.
07/03/20: Use implode() instead of join() to remove PHP7.4 warning.
07/01/20: Use low R signatures by default.
06/02/20: Replace deprecated array_key_exists. Tested for PHP7.2, PHP7.3, PHP7.4. Support for earlier (EOL) versions of PHP is not guaranteed.
05/10/19: Minor updates. Tested for PHP7.x.
09/10/17: Replace mCrypt with OpenSSL. PHP5.6+ only.
02/06/17: Enforce use of TLSv1.2.
01/29/15: Added support for getting Wallet Import Format private keys from custom keys.
01/19/15: Added support for sweeping legacy keys.
01/09/15: Added sweep functionality.
11/03/14: Fix DER signature encoding. Now stable.
18/10/14: Enforcing Determinism in Signatures (RFC6979), also using BIP62 to hinder transaction malleability.
15/10/14: Enforce use of TLSv1, step away from the vulnerable SSLv3.
10/10/14: Added 3 of 4 MultiSig example.
09/28/14: Updated for v2 handling.

PHP wrapper for Block.io for use with Dogecoin, Bitcoin, and Litecoin. API key validation on instantiation, simple abstraction layer on top of existing API interfaces, and automatic JSON decoding on response.

Requirements

This library requires the 'gmp', and cURL extensions for PHP. To enable these extensions, see:

GMP Installation Guide

cURL Installation Guide

Warning

If you're using Windows, beware that SSL will not function properly, and this library will throw errors.

To fix the SSL issue on Windows, please do the following:

Download http://curl.haxx.se/ca/cacert.pem to a directory of your choice
Make PHP use this file to validate Block.io's SSL certificate by adding this line to your php.ini:

curl.cainfo=c:\path\to\cacert.pem

Usage

First, sign up for an account at Block.io and take note of your API key under Account > Dashboard.

Download and include the block_io.php class:

require_once 'path/to/block_io.php';

Or preferably install via Composer

composer require block_io-php/block_io-php

Instantiate the class and set your API key. If the API key is valid the set function will return true otherwise false.

$apiKey = "YOUR API KEY FOR DOGECOIN, BITCOIN, OR LITECOIN";
$pin = "YOUR SECRET PIN";
$version = 2; // the API version to use

$block_io = new BlockIo($apiKey, $pin, $version);

echo "Confirmed Balance: " . $block_io->get_balance()->data->available_balance . "\n";

The wrapper abstracts all methods listed at https://block.io/api/php using the same interface names. For example, to get your current account balance:

$balance = $block_io->get_balance(array('label' => 'default'));
echo $balance->data->available_balance . "\n";

To make requests that require parameters (eg. an address label or address to withdraw to), pass through each parameter in an associative array. For example, the request below will withdraw 50 DOGE to the wallet you specify in place of WALLET-ADDRESS-HERE:

$withdraw = $block_io->withdraw(array('amount' => '50.0', 'to_address' => 'WALLET-ADDRESS-HERE'));

Note: This library throws Exceptions when calls fail. Implement try/catch blocks, and retrieve the Exception message to see details.

Please see Block.io PHP Docs for details on available calls.

aflorea4/block_io-php 适用场景与选型建议

aflorea4/block_io-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 419 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 02 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「bitcoin」 「litecoin」 「dogecoin」 「block.io」 「block_io」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 aflorea4/block_io-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aflorea4/block_io-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 aflorea4/block_io-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-28