Git Product home page Git Product logo

xchainjs-lib's Introduction

xchainjs logo

XChainJS - xchainjs Library

โญ Developed / Developing by xchainjs

XChainJS is a library with a common interface for multiple blockchains, built for simple and fast integration for wallets and more.

License

License

Telegram group: https://t.me/xchainjs
Homepage: https://xchainjs.org
Live Examples: https://dev.thorchain.org/thorchain-dev/xchainjs-integration-guide/query-package
Docs: http://docs.xchainjs.org/overview
Integration guide: https://dev.thorchain.org/thorchain-dev/xchainjs-integration-guide/overview

Interface

The interface is defined here.

Common Interface

A single common interface:

  1. Initialise with a valid BIP39 phrase and specified network (testnet/mainnet)
  2. Get the address, with support for BIP44 path derivations (default is Index 0)
  3. Get the balance (UTXO or account-based)
  4. Get transaction history for that address
  5. Make a simple transfer
  6. Get blockchain fee information (standard, fast, fastest)

Packages

Advanced Features

For wallets that need even more flexibility (smart contract blockchains) the client can be retrieved and the wallet is then free to handle directly.

XChainJS uses following libraries, frameworks and more:

Test

Tests

Make sure Jest and Lerna is installed

yarn add --dev jest lerna

Start with

yarn
yarn build

unit

yarn test

Integration Tests

There are a suite of integration test which work against testnet. You will need to specify a phrase which controls testnet coins

export PHRASE="secret phrase here"
yarn e2e

Development

lerna bootstrap

Releasing

To test the publish via a dryrun:

NPM_USERNAME="test123" NPM_PASSWORD="test123" NPM_EMAIL="[email protected]" ./dryrun_publish.sh

To publish:

NPM_USERNAME="TODO Use real npm username" NPM_PASSWORD="TODO Use real npm password" NPM_EMAIL="TODO Use real npm email" ./publish.sh

Contributing

Please ask in the telegram group to be added as a contributor.

Bug Reports

Please submit an issue and flag in the telegram group.

xchainjs-lib's People

Contributors

icafa avatar veado avatar ssdbkey avatar thorian1te avatar mikewyszinski avatar thatstrangeguythorchain avatar thorchain-admin avatar stuartwk avatar hellokashif avatar mrnerdhair avatar baebb avatar polaris-9r avatar gromxyz avatar thorswapdev avatar davidp94 avatar fedorovian avatar pluto9r avatar the-eridanus avatar thorcat avatar rex4539 avatar dollyvolley avatar stoicdev6 avatar liammcaweeney avatar maikelmclauflin avatar chinmaypatel avatar ecalchot-maya avatar l0blolly avatar severinwullschleger avatar woweek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.