@developers.cash/libcash-js
Pure Bitcoin Cash JavaScript Library based on Chris Troutner's BCH-JS library.
Last updated 3 months ago by jimtendo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @developers.cash/libcash-js 
SYNC missed versions from official npm registry.

LibCash-JS

LibCash-JS is a "pure" JavaScript Bitcoin Cash NPM library intended to be used as a "core" package that provides commonly used utility functions. It does not (and should not) contain any code that leverages any service (e.g. REST API Calls, Sockets, etc).

Although it can be used as a stand-alone library - it is intended to be used as a foundation to other SDK's by "extending" from it, thus providing these SDK's with a common library they can use to provide common BCH utilities.

For example, the Flowee-JS package extends this class, providing the Flowee SDK with many functions that would be required in typical BCH use-cases.

/**
 * The Flowee Class will now have all the features/functions of the LibCash-JS Library
 */
class Flowee extends LibCash {
  // ... Flowee specific Code here
}

Usage

  • Install library: npm install @developers.cash/libcash-js

  • Instantiate in your code:

const LibCash = require("@developers.cash/libcash-js")

// Stand-alone
let libCash = new libCash();

// Or extend your SDK with LibCash functions
class MyBCHSDK extends LibCash {
  constructor(opts) {
    super(opts);
  }
  
  getTransaction(txId) {
    // REST API call to return Raw Transaction
    // return this.Transaction.fromBuffer(tx);
  }
}

Features

LibCash-JS provides the following Utility Classes:

  • Address
  • BitcoinCash
  • Crypto
  • ECPair
  • HDNode
  • Mnemonic
  • Schnorr
  • Script
  • TransactionBuilder
  • Transaction

License

MIT

Current Tags

  • 0.9.5                                ...           latest (3 months ago)

5 Versions

  • 0.9.5                                ...           3 months ago
  • 0.9.4                                ...           3 months ago
  • 0.9.3                                ...           3 months ago
  • 0.9.2                                ...           3 months ago
  • 0.9.1                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 5
Last Month 0
Dependencies (40)
Dev Dependencies (15)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |