Skip to content

CreateInstanceOptions

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

Options for creating a PocketIc instance.

optional application: ApplicationSubnetConfig[]

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

Configuration options for creating application subnets. An application subnet will be created for each configuration object provided. If no config objects are provided, no application subnets are setup.


optional autoProgress: AutoProgressConfig

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

Makes the instance live from creation: it executes rounds on its own and follows the real time, see PocketIc.makeLive. Creating the instance returns once its certified time has been set for the first time. Cannot be combined with CreateInstanceOptions.initialTime.


optional bitcoin: BitcoinSubnetConfig

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

Configuration options for creating a Bitcoin subnet. If no config is provided, the Bitcoin subnet is not setup.


optional bitcoindAddrs: string[]

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

The addresses of bitcoind nodes, e.g. 127.0.0.1:18444, that the Bitcoin canister deployed by the bitcoin ICP feature syncs with. The addresses must be reachable from the machine running the PocketIC server. Cannot be combined with CreateInstanceOptions.dogecoindAddrs, as the PocketIC server fails to create an instance with both.


optional disableIngressValidation: boolean

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

Disables ingress message validation on the PocketIC instance.

When enabled, the PocketIC server skips the validation that would normally reject malformed or otherwise invalid ingress messages. This is useful for testing canister behavior against ingress messages that the replica would ordinarily refuse to process.

Defaults to false.


optional dogecoindAddrs: string[]

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

The addresses of dogecoind nodes, e.g. 127.0.0.1:18444, that the Dogecoin canister deployed by the dogecoin ICP feature syncs with. The addresses must be reachable from the machine running the PocketIC server. Cannot be combined with CreateInstanceOptions.bitcoindAddrs, as the PocketIC server fails to create an instance with both.


optional fiduciary: FiduciarySubnetConfig

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

Configuration options for creating a Fiduciary subnet. If no config is provided, the Fiduciary subnet is not setup. Like on mainnet, the II and Fiduciary subnets hold the key_1 threshold keys.


optional httpGateway: HttpGatewayConfig

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

Creates an HTTP gateway together with the PocketIC instance. Required by the ii and nnsUi ICP features.

The gateway serves requests once the instance is live, see PocketIc.makeLive, which returns the gateway’s port.


optional icpConfig: IcpConfig

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

Determines what non-mainnet features should be enabled for the PocketIC instance.


optional icpFeatures: IcpFeatures

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

Determines what ICP features should be enabled for the PocketIC instance.


optional ii: IiSubnetConfig

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

Configuration options for creating an II subnet. If no config is provided, the II subnet is not setup.


optional ingressMaxRetries: number

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

This option is no longer used. The PocketIC server now handles ingress message processing internally via the await_ingress_message endpoint. Use CreateInstanceOptions.processingTimeoutMs to control how long update calls can wait for ingress processing to complete.


optional initialTime: number | Date

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

The initial time of the instance, as a Date or in milliseconds since the Unix epoch. Must be at least 6 May 2021 21:17:10 CEST, or 10 May 2021 10:00:01 CEST if the cyclesMinting ICP feature is enabled, which is also the default time then. Cannot be combined with CreateInstanceOptions.autoProgress.


optional logLevel: LogLevel

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

The log level of the PocketIC instance’s replica, whose logs are written to the PocketIC server’s standard output, see StartServerOptions.showRuntimeLogs. Defaults to warn.


optional mainnetNnsSubnetId: boolean

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

Creates the NNS subnet with the subnet ID of the NNS subnet on mainnet, tdb26-jop6k-aogll-7ltgs-eruif-6kk7m-qpktf-gdiqx-mxtrf-vb5e6-eqe. Has no effect if the instance has no NNS subnet. Defaults to false.


optional nns: NnsSubnetConfig

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

Configuration options for creating an NNS subnet. If no config is provided, the NNS subnet is not setup.


optional processingTimeoutMs: number

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

How long the PocketIC client should wait for a response from the server.


optional sns: SnsSubnetConfig

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

Configuration options for creating an SNS subnet. If no config is provided, the SNS subnet is not setup.


optional system: SystemSubnetConfig[]

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

Configuration options for creating system subnets. A system subnet will be created for each configuration object provided. If no config objects are provided, no system subnets are setup.


optional testThresholdKeys: TestThresholdKeysSubnetConfig

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

Configuration options for creating a test threshold keys subnet. If no config is provided, the test threshold keys subnet is not setup. Like on mainnet, it is the subnet that holds the test_key_1 threshold keys for ECDSA, Schnorr and vetKD, so it is required to sign with or derive from them.


optional verifiedApplication: VerifiedApplicationSubnetConfig[]

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

Configuration options for creating verified application subnets. A verified application subnet will be created for each configuration object provided. If no config objects are provided, no verified application subnets are setup.