Skip to content

UpgradeCanisterOptions

Defined in: packages/pic/src/pocket-ic-types.ts:652

Options for upgrading a given canister with a WASM module. This will reset the canister’s heap, but preserve stable memory.

Principal

optional arg: Uint8Array<ArrayBufferLike>

Defined in: packages/pic/src/pocket-ic-types.ts:668

Candid encoded argument to pass to the canister’s init function.


canisterId: Principal

Defined in: packages/pic/src/pocket-ic-types.ts:656

The Principal of the canister to upgrade.


optional sender: Principal

Defined in: packages/pic/src/pocket-ic-types.ts:674

The Principal to send the request as. Defaults to the anonymous principal.


optional upgradeModeOptions: CanisterInstallModeUpgradeOptions

Defined in: packages/pic/src/pocket-ic-types.ts:679

The options to pass to the management canister’s upgrade variant in the install code request.


wasm: string | Uint8Array<ArrayBufferLike>

Defined in: packages/pic/src/pocket-ic-types.ts:663

The WASM module to install to the canister. If a string is passed, it is treated as a path to a file. If an Uint8Array is passed, it is treated as the WASM module itself.