JSPM

  • Created
  • Published
  • Downloads 592
  • Score
    100M100P100Q98865F
  • License GPL-3.0

Client-side library for dApp development.

Package Exports

  • conseiljs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (conseiljs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ConseilJS

npm version npm Build Status Coverage Status dependencies

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.

Use

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'
  }

Develop

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:

TezosConseilClient - Functions for querying the Conseil backend REST API v2

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

TezosNodeReader - Utility functions for interacting with the Tezos node.

TezosNodeWriter - Functions for sending operations on the Tezos network.

TezosFileWallet - Functions for Tezos wallet functionality.

TezosTypes - Types used to process data returned from Conseil server.

Example import:

import { TezosNodeWriter } from 'conseiljs';

Run Tests

Unit Tests

npm run test runs all unit tests.

Integration 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.

Dependency Issues

  • 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