Skip to content

SetupCanisterOptions

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

Options for setting up a canister.

optional arg: Uint8Array<ArrayBufferLike>

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

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


optional computeAllocation: bigint

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

The compute allocation of the canister.

CreateCanisterOptions.computeAllocation


optional controllers: Principal[]

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

The controllers of the canister. Defaults to the sender, which defaults to the anonymous principal.

CreateCanisterOptions.controllers


optional cycles: bigint

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

The amount of cycles to send to the canister. Defaults to 1_000_000_000_000_000_000n.

CreateCanisterOptions.cycles


optional environmentVariables: EnvironmentVariable[]

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

Environment variables exposed to the canister.

CreateCanisterOptions.environmentVariables


optional freezingThreshold: bigint

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

The freezing threshold of the canister.

CreateCanisterOptions.freezingThreshold


idlFactory: InterfaceFactory

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

The interface factory to use for the Actor.


optional logMemoryLimit: bigint

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

The log memory limit of the canister in bytes.

CreateCanisterOptions.logMemoryLimit


optional logVisibility: LogVisibility

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

Who can read the canister’s logs. Defaults to its controllers.

CreateCanisterOptions.logVisibility


optional memoryAllocation: bigint

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

The memory allocation of the canister.

CreateCanisterOptions.memoryAllocation


optional minimumIncomingCanisterCallCycles: bigint

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

The minimum cycles that calls from other canisters must attach. Calls attaching fewer cycles are rejected and refunded. Ingress messages and calls from the canister itself are not affected.

CreateCanisterOptions.minimumIncomingCanisterCallCycles


optional reservedCyclesLimit: bigint

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

The reserved cycles limit of the canister.

CreateCanisterOptions.reservedCyclesLimit


optional sender: Principal

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

The principal to setup the canister as. Defaults to the anonymous principal.

CreateCanisterOptions.sender


optional snapshotVisibility: SnapshotVisibility

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

Who can list and read the canister’s snapshots. Defaults to its controllers.

CreateCanisterOptions.snapshotVisibility


optional statusVisibility: StatusVisibility

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

Who can read the canister’s status. Defaults to its controllers. The canister itself can always read it.

CreateCanisterOptions.statusVisibility


optional targetCanisterId: Principal

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

The Id of the canister to create. Can only be used on Bitcoin, Fiduciary, II, SNS and NNS subnets.

CreateCanisterOptions.targetCanisterId


optional targetSubnetId: Principal

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

The Id of the subnet to create the canister on.

CreateCanisterOptions.targetSubnetId


wasm: string | Uint8Array<ArrayBufferLike>

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

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.


optional wasmMemoryLimit: bigint

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

The WASM memory limit of the canister in bytes.

CreateCanisterOptions.wasmMemoryLimit


optional wasmMemoryThreshold: bigint

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

The WASM memory threshold of the canister in bytes. The canister_on_low_wasm_memory function will be called when the canister’s remaining wasm memory is below this threshold.

CreateCanisterOptions.wasmMemoryThreshold