Start Circuit

Run your Circuit.

To monitor the conditions and execute the Lit Action code, start the circuit and pass in your PKP public key, IPFS hash of the Lit Action code and Auth Signature.

The ipfsCID is an optional parameter. If it is not passed then the LitActionCode generated and returned directly through setActions will be passed instead. authSig can also be passed as an optional parameter to start().

Please note that for any actions where the signed transaction or message is required to be broadcast to a blockchain network this is an additional step. It is supported by the SDK, see broadcast.

const authSig = await newCircuit.generateAuthSignature();

await newCircuit.start({publicKey, ipfsCID, authSig});

To get the logs of returned responses and handle errors see Errors and Logs and Error Strict Mode.

If you need to abort the execution forcefully call interrupt() . To ensure that the interrupt effectively stops the execution, it should not be called directly after an await on start() or the execution of interrupt() will be blocked.

The circuit will stop running after the current iteration is complete.


Last updated