Skip to content

InstallCodeOptions

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

Options for installing a WASM module to a given canister.

Principal

optional arg: Uint8Array<ArrayBufferLike>

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

Candid encoded argument to pass to the canister’s init function. Defaults to an empty Uint8Array.


canisterId: Principal

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

The Principal of the canister to install the code to.


optional sender: Principal

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

The principal to install the code as. Defaults to the anonymous principal.


optional targetSubnetId: Principal

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

The ID of the subnet that the canister resides on.


wasm: string | Uint8Array<ArrayBufferLike>

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

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.