@dfinity/ic-management
v11.0.0
Published
A library for interfacing with the IC management canister.
Readme
ic-management-js
A library for interfacing with the Internet Computer (IC) management canister.
[!TIP] Still using
@dfinity/ic-management? Upgrade to@icp-sdk/canisters/ic-management!
Table of contents
Installation
You can use ic-management-js by installing it in your project.
npm i @dfinity/ic-managementThe bundle needs peer dependencies, be sure that following resources are available in your project as well.
npm i @icp-sdk/core @dfinity/utilsUsage
The features are available through the class ICMgmtCanister. It has to be instantiated with a canister ID.
e.g. fetching a token metadata.
import { IcManagementCanister } from "@dfinity/ic-management";
import { createAgent } from "@dfinity/utils";
const agent = await createAgent({
identity,
host: HOST,
});
const { canisterStatus } = IcManagementCanister.create({
agent,
});
const { status, memory_size, ...rest } = await canisterStatus(YOUR_CANISTER_ID);Documentation
You can find the API docs here.
