Client-side library for building decentralized applications, currently focused on Tezos.
ConseilJS connects to Conseil for cached blockchain data and Nautilus for live chain data and operations.
Add our NPM package to your project.
$ npm i conseiljs
If you are using webpack in your project, add below lines to your webpack.config.js
file:
node: {
fs: 'empty'
}
You can find some tutorials in our wiki to help you get started with ConseilJS.
Below is the list of namespaces you can import to your project and start building immediately:
TezosNodeQuery
- Utility functions for interacting with the Tezos node.
TezosConseilClient
- Functions for querying the Conseil backend REST API v2
TezosConseilQuery
- Functions for querying the Conseil backend REST API v1
TezosHardwareWallet
- Functions for interaction with the Tezos node via a Hardware wallet. (Only Ledger Nano S for now)
TezosMessageCodec
- A collection of functions to encode and decode various Tezos P2P message components
TezosOperations
- Functions for sending operations on the Tezos network.
TezosWallet
- Functions for Tezos wallet functionality.
TezosTypes
- Types used to process data returned from Conseil server.
Example import:
import { TezosOperations } from 'conseiljs';
npm run test
runs all unit tests.
Add a file called servers.ts
under the integration_test
with these contents:
export const servers = {
conseilServer: '',
conseilApiKey: '',
tezosServer: ''
}
The blank strings should be replaced with the details of your Conseil & Tezos servers.
After this, npm run integration-test
to run all integration tests.
Please note that some of the integration tests require the usage of a hardware wallet.
- As later versions of the npm package libsodium-sumo (a JS wrapper around libSodium) do not support all methods of libSodium, this version must remain at 0.5.4
- AWS-SDK dependency must remain as the Ledger Connect feature depends on this package