Skip to main content

Crate bity_ic_subcanister_manager

Crate bity_ic_subcanister_manager 

Source
Expand description

A library for managing sub-canisters on the Internet Computer.

This library provides functionality to create, manage, and update sub-canisters on the Internet Computer. It handles the lifecycle of canisters including creation, installation, updates, and state management.

§Features

  • Create and manage sub-canisters
  • Handle canister lifecycle (create, install, update, stop)
  • Manage canister controllers and permissions
  • Handle cycles allocation and management

§Example

use bity_ic_subcanister_manager::{SubCanisterManager, CanisterState};

// Create a new sub-canister manager
let manager = SubCanisterManager::new(
    master_canister_id,
    HashMap::new(),
    vec![],
    vec![],
    1_000_000_000, // initial cycles
    100_000_000,   // reserved cycles
    false,         // test mode
    "commit_hash".to_string(),
    wasm_module,
);

§License

This project is licensed under the MIT License.

Structs§

SubCanisterManager
Manager for handling sub-canisters

Enums§

CanisterError
Error types for canister operations
CanisterState
Represents the current state of a canister
NewCanisterError
Error types for canister operations
NewStorageError
Error types for storage operations

Traits§

Canister
Trait that must be implemented by canister types

Functions§

add_canisters_to_fund_manager