ic-js
A collection of library for interfacing with the Internet Computer
The libraries are still in active development, and new features will incrementally be available.
Libraries
- nns: interfacing with the ledger and governance canisters of the IC
- sns: interacting with a Service Nervous System (SNS) project
- cmc: querying the Cmc canister (coming soon)
- utils: a collection of utilities and constants for NNS/SNS projects.
Installation
Install nns and/or sns in your project from npm:
npm i @dfinity/nns
npm i @dfinity/sns
You may be using both nns and sns in your project - as we do in NNS-dapp. That is s why, to help tree-shaking and avoid duplication of code, the libraries of this project are referencing agent-js and utils as peer dependencies.
Therefore, be sure that the needed agent-js
and utils dependencies are available in your project or install these as following:
npm i @dfinity/agent @dfinity/candid @dfinity/principal @dfinity/utils
Links
Here are some useful links:
- See the HACKING document for some information about local development