XChainJS is a library with a common interface for multiple blockchains, built for simple and fast integration for wallets and more.
Join the conversation! https://t.me/xchainjs
The interface is defined here.
The interface supports as a minimum the following functions for each blockchain:
- Initialise with a valid BIP39 phrase and specified network (testnet/mainnet)
- Get the address, with support for BIP44 path derivations (default is Index 0)
- Get the balance (UTXO or account-based)
- Get transaction history for that address
- Make a simple transfer
- Get blockchain fee information (standard, fast, fastest)
Some blockchains have different functions. More advanced logic can be built by extending the interface, such as for Binance Chain and Cosmos chains.
For wallets that need even more flexibility (smart contract blockchains) the client can be retrieved and the wallet is then free to handle directly.
yarn test
lerna bootstrap
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
Please see the Contributing Guidelines here (coming soon).
Please see the Bug Report Process here (coming soon).
MIT XChainJS