@icp-sdk/canistersA modular library for interacting with canisters on the Internet Computer.
This repository provides an SDK designed to make it easy to interact with Internet Computer canisters when developing frontend applications or Node.js scripts in TypeScript or JavaScript.
@icp-sdk/canisters: a modular entry-point library exposing various submodules for interacting with well-known Internet Computer canisters and services.The following libraries are exposed by the modular subpath-only library above, but remain available and are released in parallel for backward compatibility:
@dfinity/nns: interfacing with the governance canisters of the Network Nervous System (NNS)@dfinity/sns: interacting with a Service Nervous System (SNS) project@dfinity/cmc: interfacing with the CMC canister of the IC@dfinity/ledger-icp: interfacing with the ICP ledger@dfinity/ledger-icrc: interacting with ICRC-compatible ledgers@dfinity/ckbtc: interfacing with ckBTC@dfinity/cketh: interfacing with ckETH@dfinity/ic-management: interfacing with the IC management canisterThis repo also provides various tools that are used internally by the SDK packages but also prove to be extremely useful when developing projects.
@dfinity/utils: a collection of utilities and constants@dfinity/zod-schemas: reusable Zod schemas and validators for common data patterns in ICP applications[!NOTE]
@dfinity/utilsis a peer dependency of the libraries exposed by@icp-sdk/canistersbut is not itself re-exported by this library.
While not deprecated on npm, the following library is no longer actively developed:
@dfinity/nns-proto: protobuf sources formerly used by nns-js to support hardware wallets.Install the recommended modular library from npm:
npm i @icp-sdk/canisters
Or, if you prefer to install individual packages:
npm i @dfinity/utils
npm i @dfinity/ledger-icp
npm i @dfinity/ledger-icrc
npm i @dfinity/nns
npm i @dfinity/sns
npm i @dfinity/cmc
npm i @dfinity/ckbtc
To ensure proper tree-shaking and avoid code duplication, all packages reference @icp-sdk/core and @dfinity/utils as peer dependencies.
Make sure these are installed in your project:
npm i @icp-sdk/core @dfinity/utils
Here are some useful links: