Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test changes #371

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 72 additions & 9 deletions packages/ic-management/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,93 @@ const { status, memory_size, ...rest } = await canisterStatus(YOUR_CANISTER_ID);
#### Methods

- [create](#gear-create)
- [canisterStatus](#gear-canisterstatus)
- [createCanister](#gear-createcanister)
- [updateSettings](#gear-updatesettings)
- [installCode](#gear-installcode)
- [uninstallCode](#gear-uninstallcode)
- [startCanister](#gear-startcanister)
- [stopCanister](#gear-stopcanister)
- [canisterStatus](#gear-canisterstatus)
- [canisterInfo](#gear-canisterinfo)
- [deleteCanister](#gear-deletecanister)

##### :gear: create

| Method | Type |
| -------- | ---------------------------------------------------------------- |
| `create` | `(options: ICManagementCanisterOptions) => ICManagementCanister` |

##### :gear: canisterStatus
##### :gear: createCanister

Returns canister details (memory size, status, etc.)
Create a new canister

| Method | Type |
| ---------------- | ------------------------------------------------------------ |
| `canisterStatus` | `(canisterId: Principal) => Promise<CanisterStatusResponse>` |
| Method | Type |
| ---------------- | ------------------------------------------------------------------------------------ |
| `createCanister` | `({ settings, senderCanisterVerion, }?: CreateCanisterParams) => Promise<Principal>` |

##### :gear: updateSettings

Update canister settings

| Method | Type |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `updateSettings` | `({ canisterId, settings: { controllers, freezingThreshold, memoryAllocation, computeAllocation, }, }: UpdateSettingsParams) => Promise<void>` |
| Method | Type |
| ---------------- | ------------------------------------------------------------------------------------------ |
| `updateSettings` | `({ canisterId, senderCanisterVerion, settings, }: UpdateSettingsParams) => Promise<void>` |

##### :gear: installCode

Install code to a canister

| Method | Type |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| `installCode` | `({ mode, canisterId, wasmModule, arg, senderCanisterVerion, }: InstallCodeParams) => Promise<void>` |

##### :gear: uninstallCode

Uninstall code from a canister

| Method | Type |
| --------------- | ------------------------------------------------------------------------------- |
| `uninstallCode` | `({ canisterId, senderCanisterVerion, }: UninstallCodeParams) => Promise<void>` |

##### :gear: startCanister

Start a canister

| Method | Type |
| --------------- | ------------------------------------------ |
| `startCanister` | `(canisterId: Principal) => Promise<void>` |

##### :gear: stopCanister

Stop a canister

| Method | Type |
| -------------- | ------------------------------------------ |
| `stopCanister` | `(canisterId: Principal) => Promise<void>` |

##### :gear: canisterStatus

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

| Method | Type |
| ---------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `canisterStatus` | `(canisterId: Principal) => Promise<{ status: { stopped: null; } or { stopping: null; } | { running: null; }; memory_size: bigint; cycles: bigint; settings: definite_canister_settings; idle_cycles_burned_per_day: bigint; module_hash: [] | [...]; }>` |

##### :gear: canisterInfo

Get canister info (controllers, module hash, changes, etc.)

| Method | Type |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `canisterInfo` | `({ canisterId, numRequestChanges, }: CanisterInfoParams) => Promise<{ controllers: Principal[]; module_hash: [] or [Uint8Array]; recent_changes: change[]; total_num_changes: bigint; }>` |

##### :gear: deleteCanister

Deletes a canister

| Method | Type |
| ---------------- | ------------------------------------------ |
| `deleteCanister` | `(canisterId: Principal) => Promise<void>` |

<!-- TSDOC_END -->

Expand Down
1 change: 1 addition & 0 deletions packages/nns/candid/governance.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type Action =
| { AddOrRemoveNodeProvider: AddOrRemoveNodeProvider }
| { Motion: Motion };
export interface AddHotKey {
// test changes
new_hot_key: [] | [Principal];
}
export interface AddOrRemoveNodeProvider {
Expand Down