承接 dan-da/coinparams 相关项目开发

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

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

dan-da/coinparams

Composer 安装命令:

composer require dan-da/coinparams

包简介

provides crypto currency specific information such as version numbers, DNS seeds, etc, available in JSON format

README 文档

README

This project provides crypto currency specific information such as key prefixes, DNS seeds, network ports, etc.

Data is available in JSON format and human readable tables. Language bindings are available for JS and PHP.

It is intended for use as a quick reference or in any software that is working with multiple cryptocurrencies, no matter the programming language.

Here's the data.

Meta Prefixes Networking Genesis Blocks JSON

The above files contain data mainly for bitcoin-derived coins.

Some additional metadata for coins and tokens not listed can be found in coinmeta.json.

How to use

For any language

Just copy coinparams.json into your project and read it as you would read any JSON file.

JS

First, install the package using npm:

npm install coinparams --save

Then, require the package and use it like so:

var coinparams = require('coinparams');

console.log(coinparams.get_coin('BTC'));
console.log(coinparams.get_coin_network('DASH', 'test'));

// console.log(coinparams.get_all_coins());
// console.log(coinparams.get_raw_json());

PHP

$ cd yourproject
$ composer require dan-da/coinparams

include in your code and use via:

require_once 'path/to/vendor/autoload.php';

// get all info for single coin
$info = coinParams::get_coin('BTC');

// get info for a coin + network (main, test, regest)
$info = coinParams::get_coin_network('DOGE', 'main');

// get info for all coins
$info = coinParams::get_all_coins();

// get raw json text for all coins
$buf = coinParams::get_raw_json();

How values are obtained

For bitcoin and bitcoin derivates, values have been automatically parsed directly from the original source code of each cryptocurrency repo on github. The script gen-masters-from-coin-src.php performs this task.

For non bitcoin derivates (eg eth, monero, decred, etc) the values are manually obtained.

Metadata such as website urls and max supply have been scraped from coinmarketcap.com.

How values are tested

There is a simple validation script that checks for any problems in the json tree structure, ie missing or empty fields. It does not ensure correctness of values.

Advanced testing such as generating addresses or connecting to a a running instance of each altcoin has not been attempted.

Contributions welcome.

If you wish to add new coins or update an existing one, please submit a pull request. There is one file per coin in the ./coins directory. Just use an existing file such as BTC.json as a template.

If you are adding a bitcoin derivative, you can try adding it to the list in gen-masters-from-coin-src.php. Then run the script. If successful, validate with check-masters-valid.php then submit a pull request for the script and the new coin.json file.

If you wish to add new language bindings, please see the example under bindings/php or bindings/js and try to keep the api similar. Also, please try to use no more than one file (eg for package manager) in the project root directory per language.

Pull Requests

Please include the output of running:

$ ./check-masters-valid.php <yourcoin-symbol>

The file should fully validate (main, test, regtest) for the pull request to be accepted.

Todos

  • Add more coins. esp top 20 by market cap. many are non bitcoin codebase.
  • Add bindings for other languages, to easily install and use the list as a class.
  • add meta fields for hashing algorithm, POW, POS, mineable, etc...
  • add seed node list (maybe: btc mainnet has more than 1500)
  • Use a json5 parser when reading the individual JSON files for each coin. This will allow comments to be used in them.
  • document the schema/format used.
  • add better tests.

Use at your own risk.

The author makes no claims or guarantees of correctness.

By using this software you agree to take full responsibility for any losses incurred before, during, or after the usage, whatsoever the cause, and not to hold the software author liable in any manner.

dan-da/coinparams 适用场景与选型建议

dan-da/coinparams 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 52.53k 次下载、GitHub Stars 达 36, 最近一次更新时间为 2018 年 06 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 dan-da/coinparams 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 52.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 36
  • 点击次数: 23
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 36
  • Watchers: 4
  • Forks: 29
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-25