jaycodesign/btchelper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

jaycodesign/btchelper

Composer 安装命令:

composer require jaycodesign/btchelper

包简介

Btc Helper is a class with some helper methods for bitcoin

关键字:

README 文档

README

Btc Helper is a class with some helper methods for bitcoin

Installation

Simply add a dependency to your project's composer.json file if you use Composer to manage the dependencies of your project.

Here is a minimal example of a composer.json file that just defines a dependency on BTCHelper:

{
    "require": {
        "jaycodesign/btchelper": "dev-master"
    }
}

Formatting

You can deal with Satoshis everywhere in your code and only convert to BTC at display time like so:

  use JaycoDesign\BTCHelper\BTCHelper;
  $one_satoshi = BTCHelper::format(1); // 0.00000001

Conversion

BTCHelper::convertToBTCFromSatoshi(303490); // 0.0030349
BTCHelper::convertToSatoshiFromBTC("0.00000001"); // 1
BTCHelper::convertBTCToMilliBits("0.001"); // 1
BTCHelper::convertMilliBitsToBTC(1); // 0.001
BTCHelper::convertBTCToMicroBits("0.000001"); // 1
BTCHelper::convertMicroBitsToBTC(1); // 0.000001

Bitcoin Address Validation

BTCHelper::validBitcoinAddress("1Af3EHHrbYRwaj4dcbKKcBxYxc6Z8j7xMZ"); // TRUE
BTCHelper::validBitcoinAddress("POO"); // FALSE

If this package helped you please consider sending a tip to this address: 1Af3EHHrbYRwaj4dcbKKcBxYxc6Z8j7xMZ

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固