#dfinity #subcanister #manager #canister

bity-ic-subcanister-manager

A library for managing sub-canisters on the Internet Computer

6 releases

new 0.2.4 May 13, 2025
0.2.3 May 13, 2025
0.2.2 Mar 18, 2025
0.1.0 Mar 14, 2025

#49 in Magic Beans


Used in bity-ic-icrc3

MIT license

40KB
793 lines

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.

Dependencies

~8–17MB
~226K SLoC