New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dfinity/ic-management

Package Overview
Dependencies
Maintainers
11
Versions
501
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/ic-management

A library for interfacing with the IC management canister.

  • 0.0.4-next-2023-06-21
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4K
decreased by-4.56%
Maintainers
11
Weekly downloads
 
Created
Source

ic-management-js

A library for interfacing with Internet Computer (IC) management canister.

npm version GitHub license

Table of contents

Installation

You can use ic-management-js by installing it in your project.

npm i @dfinity/ic-management

The bundle needs peer dependencies, be sure that following resources are available in your project as well.

npm i @dfinity/agent @dfinity/candid @dfinity/principal @dfinity/utils

Usage

The features are available through the class ICMgmtCanister. It has to be instantiated with a canister ID.

e.g. fetching a token metadata.

import { ICMgmtCanister } from "@dfinity/ic-management";
import { createAgent } from "@dfinity/utils";

const agent = await createAgent({
  identity,
  host: HOST,
});

const { canisterStatus } = ICMgmtCanister.create({
  agent,
});

const { status, memory_size, ...rest } = await canisterStatus(YOUR_CANISTER_ID);

Features

ic-management-js implements following features:

:factory: ICManagementCanister

Methods
:gear: create
MethodType
create(options: ICManagementCanisterOptions) => ICManagementCanister
:gear: canisterStatus

Returns canister details (memory size, status, etc.)

MethodType
canisterStatus(canisterId: Principal) => Promise<CanisterStatusResponse>
:gear: updateSettings

Update canister settings

MethodType
updateSettings({ canisterId, settings: { controllers, freezingThreshold, memoryAllocation, computeAllocation, }, }: UpdateSettingsParams) => Promise<void>

Resources

Keywords

FAQs

Package last updated on 21 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc