waygood/blockchaindata
Composer 安装命令:
composer require waygood/blockchaindata
包简介
This is a package designed to integrate with laravel 5.0+
README 文档
README
This is a laravel package for interacting with blockchain data api
laravel-blockchain
A Laravel 5 Package for working with blockchain data api
Installation
PHP 5.4+ or HHVM 3.3+, and Composer are required.
To get the latest version of blockchain data api, simply run the code below in your project.
"composer require waygood/blockchaindata"
Once Laravel Blockchain Data is installed, You need to register the service provider. Open up config/app.php and add the following to the providers key.
Waygood\BlockchainData\BlockchainDataServiceProvider::class,
Also, register the Facade like so:
'aliases' => [ ... 'BlockchainData' => Waygood\BlockchainData\Facades\BlockchainData::class, ... ]
USING /WAYGOOD/BLOCKCHAINDATA PACKAGE
Add the following line to your controller
use BlockchainData;
1. GET ADDRESS CONTENTS
$bitcoin_address contains multiple addresses (can be base58 or xpub) divided by | Optional limit parameter to show n transactions e.g. &n=50 (Default: 50, Max: 100) Optional offset parameter to skip the first n transactions e.g. &offset=100 (Page 3 for limit 50)
$blocks = BlockchainData::getAddress($bitcoin_address[, $limit[, $offset]]);
2. UNSPENT OUTPUTS
$bitcoin_address contains multiple addresses (can be base58 or xpub) divided by | Optional limit parameter to show n transactions e.g. &n=50 (Default: 50, Max: 100) Optional offset parameter to skip the first n transactions e.g. &offset=100 (Page 3 for limit 50)
$blocks = BlockchainData::unspentAddress($bitcoin_address[, $limit[, $offset]]);
3. BALANCE
$bitcoin_address contains multiple addresses (can be base58 or xpub) divided by |
$blocks = BlockchainData::balanceAddress($bitcoin_address[, $limit[, $offset]]);
4. GET SINGLE BLOCK
optional $format JSON by default, alternatively HEX
$block = BlockchainData::getBlock($block_hash[, $format]);
5. GET SINGLE TRANSACTION
optional $format JSON by default, alternatively HEX
$tx = BlockchainData::getTransaction($tx_hash[, $format]);
6. GET SINGLE SUB TRANSACTION
Uses the tx_index and n values from an output (or prev_out) optional $format JSON by default, alternatively HEX
$tx = BlockchainData::getSubTransaction($tx_index, $n[, $format]);
7. GET STATISTICS CHART
$chart = BlockchainData::getChart($chart_type);
8. BLOCKS AT HEIGHT
$blocks = BlockchainData::blocksAtHeight($height);
9. LATEST BLOCK
$blocks = BlockchainData::latestBlock();
10. UNCONFIRMED TRANSACTIONS
$blocks = BlockchainData::unconfirmedTransactions();
11. DAILY BLOCKS
$blocks = BlockchainData::dailyBlocks($timestamp);
12. DAILY BLOCKS
$blocks = BlockchainData::poolBlocks($pool_name);
Credit
Readme document was inpsired and tuned from one of @Unicodedeveloper. Prosper Otemuyiwa.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
How can I thank you?
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!
Thanks! Matthew Waygood
License
The MIT License (MIT). Please see License File for more information.
waygood/blockchaindata 适用场景与选型建议
waygood/blockchaindata 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 11 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「data」 「laravel」 「bitcoin」 「open source」 「blockchain」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 waygood/blockchaindata 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 waygood/blockchaindata 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 waygood/blockchaindata 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Shoot aims to make providing data to your templates more manageable
Adds the EDTF data type to Wikibase
A simple library that allows transform any kind of data to native php data or whatever
Data provider for yii2
A CakePHP behavior to validate foreign keys
Common interface for interacting with data in objects and arrays.
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-19