-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2935 from dfinity/add-ic-js
Add doc on ic-js
- Loading branch information
Showing
15 changed files
with
124 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
keywords: [intermediate, ic-js, javascript, ic js, js] | ||
--- | ||
|
||
import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow"; | ||
|
||
# ic-js | ||
|
||
<MarkdownChipRow labels={["Intermediate", "ic-js" ]} /> | ||
|
||
## Overview | ||
|
||
`ic-js` is a collection of JavaScript libraries that can be used to interface with ICP. Each library can be used independently from one another, or a project can use all of the libraries together. The NNS dapp is an example demonstration of all `ic-js` libraries being used together. | ||
|
||
|
||
## Dependencies | ||
|
||
`ic-js` uses `@dfinity/agent` (agent-js) and `@dfinity/utils` as peer dependencies. It is recommended to have these packages available in your project as well. | ||
|
||
You can install them using `npm`: | ||
|
||
``` | ||
npm i @dfinity/agent @dfinity/candid @dfinity/principal @dfinity/utils | ||
``` | ||
|
||
|
||
## Libraries | ||
|
||
|
||
### Governance | ||
|
||
- [nns](https://github.com/dfinity/ic-js/tree/main/packages/nns): Interface with the governance canisters of the Network Nervous System (NNS). | ||
|
||
- [sns](https://github.com/dfinity/ic-js/tree/main/packages/sns): Interface with a Service Nervous System (SNS) project. | ||
|
||
- [nns-proto](https://github.com/dfinity/ic-js/tree/main/packages/nns-proto): The protobuf source used by `nns-js` to support hardware wallets. | ||
|
||
|
||
You can install these libraries with `npm`: | ||
|
||
``` | ||
npm i @dfinity/nns | ||
npm i @dfinity/sns | ||
npm i @dfinity/nns-proto | ||
``` | ||
|
||
### Tokens | ||
|
||
- [cmc](https://github.com/dfinity/ic-js/tree/main/packages/cmc): Interface with the cycles minting canister (CMC). | ||
|
||
- [ledger-icp](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icp): Interface with the ICP ledger. | ||
|
||
- [ledger-icrc](https://github.com/dfinity/ic-js/tree/main/packages/ledger-icrc): Interface with ICRC-compatible ledgers. | ||
|
||
- [ckBTC](https://github.com/dfinity/ic-js/tree/main/packages/ckbtc): Interface with ckBTC. | ||
|
||
- [ckETH](https://github.com/dfinity/ic-js/tree/main/packages/cketh): Interface with ckETH. | ||
|
||
You can install these libraries with `npm`: | ||
|
||
``` | ||
npm i @dfinity/cmc | ||
npm i @dfinity/ledger-icp | ||
npm i @dfinity/ledger-icrc | ||
npm i @dfinity/ckbtc | ||
npm i @dfinity/cketh | ||
``` | ||
|
||
### Management canister | ||
|
||
- [ic-management](https://github.com/dfinity/ic-js/tree/main/packages/ic-management): Interface with the management canister. | ||
|
||
You can install this library with `npm`: | ||
|
||
``` | ||
npm i @dfinity/ic-management | ||
``` | ||
|
||
|
||
### Utilities | ||
|
||
- [utils](https://github.com/dfinity/ic-js/tree/main/packages/utils): A collection of utilities and constants. | ||
|
||
You can install this library with `npm`: | ||
|
||
``` | ||
npm i @dfinity/utils | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule internetidentity
updated
41 files
Submodule motoko
updated
22 files
Submodule response-verfication
updated
13 files
Submodule samples
updated
7 files
Submodule sdk
updated
53 files