ICManagementCanister
Defined in: packages/ic-management/src/ic-management.canister.ts:54
Methods
Section titled “Methods”canisterStatus()
Section titled “canisterStatus()”canisterStatus(
params):Promise<canister_status_result>
Defined in: packages/ic-management/src/ic-management.canister.ts:300
Get canister details (memory size, status, etc.)
Parameters
Section titled “Parameters”params
Section titled “params”The parameters for the status call.
Returns
Section titled “Returns”Promise<canister_status_result>
A promise that resolves with the canister status details.
clearChunkStore()
Section titled “clearChunkStore()”clearChunkStore(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:181
Clear the entire chunk storage of a canister.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<void>
https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-clear_chunk_store
createCanister()
Section titled “createCanister()”createCanister(
params):Promise<Principal>
Defined in: packages/ic-management/src/ic-management.canister.ts:87
Create a new canister
Parameters
Section titled “Parameters”params
Section titled “params”CreateCanisterParams = {}
Returns
Section titled “Returns”Promise<Principal>
deleteCanister()
Section titled “deleteCanister()”deleteCanister(
canisterId):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:317
Deletes a canister
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”Principal
Returns
Section titled “Returns”Promise<void>
deleteCanisterSnapshot()
Section titled “deleteCanisterSnapshot()”deleteCanisterSnapshot(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:454
Deletes a specific snapshot of a canister.
Parameters
Section titled “Parameters”params
Section titled “params”Parameters for the deletion operation.
Returns
Section titled “Returns”Promise<void>
A promise that resolves when the snapshot is successfully deleted.
https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-delete_canister_snapshot
Throws
Section titled “Throws”If the deletion operation fails.
fetchCanisterLogs()
Section titled “fetchCanisterLogs()”fetchCanisterLogs(
canisterId):Promise<fetch_canister_logs_result>
Defined in: packages/ic-management/src/ic-management.canister.ts:355
Given a canister ID as input, this method returns a vector of logs of that canister including its trap messages. The canister logs are not collected in canister methods running in non-replicated mode (NRQ, CQ, CRy, CRt, CC, and F modes, as defined in Overview of imports). The total size of all returned logs does not exceed 4KiB. If new logs are added resulting in exceeding the maximum total log size of 4KiB, the oldest logs will be removed. Logs persist across canister upgrades and they are deleted if the canister is reinstalled or uninstalled.
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”Principal
Returns
Section titled “Returns”Promise<fetch_canister_logs_result>
installChunkedCode()
Section titled “installChunkedCode()”installChunkedCode(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:225
Installs code that had previously been uploaded in chunks.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<void>
https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-install_chunked_code
installCode()
Section titled “installCode()”installCode(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:135
Install code to a canister
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<void>
listCanisterSnapshots()
Section titled “listCanisterSnapshots()”listCanisterSnapshots(
params):Promise<list_canister_snapshots_result>
Defined in: packages/ic-management/src/ic-management.canister.ts:401
Lists the snapshots of a canister.
Parameters
Section titled “Parameters”params
Section titled “params”Parameters for the listing operation.
canisterId
Section titled “canisterId”Principal
The ID of the canister for which snapshots will be listed.
Returns
Section titled “Returns”Promise<list_canister_snapshots_result>
A promise that resolves with the list of snapshots.
https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-list_canister_snapshots
Throws
Section titled “Throws”If the operation fails.
loadCanisterSnapshot()
Section titled “loadCanisterSnapshot()”loadCanisterSnapshot(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:427
Loads a snapshot of a canister’s state.
Parameters
Section titled “Parameters”params
Section titled “params”Required<OptionSnapshotParams> & object
Parameters for the snapshot loading operation.
Returns
Section titled “Returns”Promise<void>
A promise that resolves when the snapshot is successfully loaded.
https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-load_canister_snapshot
Throws
Section titled “Throws”If the snapshot loading operation fails.
provisionalCreateCanisterWithCycles()
Section titled “provisionalCreateCanisterWithCycles()”provisionalCreateCanisterWithCycles(
params):Promise<Principal>
Defined in: packages/ic-management/src/ic-management.canister.ts:332
Creates a canister. Only available on development instances.
Parameters
Section titled “Parameters”params
Section titled “params”ProvisionalCreateCanisterWithCyclesParams = {}
Returns
Section titled “Returns”Promise<Principal>
readCanisterSnapshotData()
Section titled “readCanisterSnapshotData()”readCanisterSnapshotData(
params):Promise<read_canister_snapshot_data_response>
Defined in: packages/ic-management/src/ic-management.canister.ts:499
Reads snapshot data for a specific canister snapshot and kind.
Parameters
Section titled “Parameters”params
Section titled “params”ReadCanisterSnapshotDataParams
Parameters for the data read operation.
Returns
Section titled “Returns”Promise<read_canister_snapshot_data_response>
A promise that resolves with the snapshot data payload.
Throws
Section titled “Throws”If the data read operation fails.
readCanisterSnapshotMetadata()
Section titled “readCanisterSnapshotMetadata()”readCanisterSnapshotMetadata(
params):Promise<ReadCanisterSnapshotMetadataResponse>
Defined in: packages/ic-management/src/ic-management.canister.ts:473
Reads metadata for a specific canister snapshot.
Parameters
Section titled “Parameters”params
Section titled “params”Parameters for the metadata read operation.
Returns
Section titled “Returns”Promise<ReadCanisterSnapshotMetadataResponse>
A promise that resolves with the snapshot metadata.
Throws
Section titled “Throws”If the metadata read operation fails.
startCanister()
Section titled “startCanister()”startCanister(
canisterId):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:274
Start a canister
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”Principal
Returns
Section titled “Returns”Promise<void>
stopCanister()
Section titled “stopCanister()”stopCanister(
canisterId):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:286
Stop a canister
Parameters
Section titled “Parameters”canisterId
Section titled “canisterId”Principal
Returns
Section titled “Returns”Promise<void>
storedChunks()
Section titled “storedChunks()”storedChunks(
params):Promise<chunk_hash[]>
Defined in: packages/ic-management/src/ic-management.canister.ts:200
List the hashes of chunks in the chunk storage of a canister.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<chunk_hash[]>
The list of hash of the stored chunks.
https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-stored_chunks
takeCanisterSnapshot()
Section titled “takeCanisterSnapshot()”takeCanisterSnapshot(
params):Promise<snapshot>
Defined in: packages/ic-management/src/ic-management.canister.ts:381
This method takes a snapshot of the specified canister. A snapshot consists of the wasm memory, stable memory, certified variables, wasm chunk store and wasm binary.
Parameters
Section titled “Parameters”params
Section titled “params”Parameters for the snapshot operation.
Returns
Section titled “Returns”Promise<snapshot>
A promise that resolves with the snapshot details, including the snapshot ID, total size, and timestamp.
https://internetcomputer.org/docs/current/references/ic-interface-spec#ic-take_canister_snapshot
Throws
Section titled “Throws”If the snapshot operation fails.
uninstallCode()
Section titled “uninstallCode()”uninstallCode(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:256
Uninstall code from a canister
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<void>
updateSettings()
Section titled “updateSettings()”updateSettings(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:110
Update canister settings
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<void>
uploadCanisterSnapshotData()
Section titled “uploadCanisterSnapshotData()”uploadCanisterSnapshotData(
params):Promise<void>
Defined in: packages/ic-management/src/ic-management.canister.ts:552
Uploads a chunk of snapshot data for a canister snapshot.
Parameters
Section titled “Parameters”params
Section titled “params”UploadCanisterSnapshotDataParams
Parameters for the data upload operation.
Returns
Section titled “Returns”Promise<void>
A promise that resolves when the data is successfully uploaded.
Throws
Section titled “Throws”If the data upload operation fails.
uploadCanisterSnapshotMetadata()
Section titled “uploadCanisterSnapshotMetadata()”uploadCanisterSnapshotMetadata(
params):Promise<upload_canister_snapshot_metadata_response>
Defined in: packages/ic-management/src/ic-management.canister.ts:525
Uploads snapshot metadata for a canister.
Parameters
Section titled “Parameters”params
Section titled “params”UploadCanisterSnapshotMetadataParams
Parameters for the metadata upload operation.
Returns
Section titled “Returns”Promise<upload_canister_snapshot_metadata_response>
A promise that resolves with the upload response.
Throws
Section titled “Throws”If the metadata upload operation fails.
uploadChunk()
Section titled “uploadChunk()”uploadChunk(
params):Promise<chunk_hash>
Defined in: packages/ic-management/src/ic-management.canister.ts:161
Upload chunks of Wasm modules that are too large to fit in a single message for installation purposes.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<chunk_hash>
The hash of the stored chunk.
https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-upload_chunk
create()
Section titled “create()”
staticcreate(options):ICManagementCanister
Defined in: packages/ic-management/src/ic-management.canister.ts:63
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”ICManagementCanister