LitListenerSDK
  • Overview
  • Quick Start
  • SDK Reference
    • Instantiate Circuit
    • Set Conditions
    • Conditional Logic
    • Set Actions
    • Execution Constraints
    • IPFS Hash
    • MintGrantBurn PKP
    • Start Circuit
    • Broadcast Transactions
    • Add Secure Key
  • Database and Server Interactions
    • Server-SDK Integration
    • Persistant Circuit Architecture
  • Errors and Logs
    • Logs & Error Handling
    • Error Strict Mode
  • Live
    • No Code Interface
  • Resources
    • Issues
    • Testing
    • Contributors
    • System Architecture
    • About the Devs
    • Storefront
  • Github
  • Lit Developer Docs
Powered by GitBook
On this page
  1. SDK Reference

Start Circuit

Run your Circuit.

PreviousMintGrantBurn PKPNextBroadcast Transactions

Last updated 1 year ago

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 .

const authSig = await newCircuit.generateAuthSignature();

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

To get the logs of returned responses and handle errors see and .

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.

newCircuit.interrupt();
broadcast
Errors and Logs
Error Strict Mode