Download the PHP package dan-da/coinparams without Composer

On this page you can find all versions of the php package dan-da/coinparams. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package coinparams

coinparams

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

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.


All versions of coinparams with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dan-da/coinparams contains the following files

Loading the files please wait ....