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

Instantiate Circuit

Create an Instance of your Circuit.

PreviousQuick StartNextSet Conditions

Last updated 1 year ago

Instantiate SDK:

Minting a PKP requires an ethers signer with LIT Tokens on the Chronicle Lit Rollup network. If you only need to generate Lit Action code then an ethers signer object is not necessary.

import { ethers } from "ethers";
import { Circuit } from "lit-listener-sdk";

const chronicleProvider = new ethers.providers.JsonRpcProvider("https://chain-rpc.litprotocol.com/http", 175177);
const chronicleSigner = new ethers.Wallet(YOUR_PRIVATE_KEY, chronicleProvider);

const newCircuit = new Circuit(chronicleSigner);

The signer is an optional constructor parameter. If you are minting a PKP then you must set a signer with a Provider compatible with the Lit Chronicle Network, you can use the standard RPC URL found . You can also optionally pass in the PKP Contract to mint from if it is not 0x8F75a53F65e31DD0D2e40d0827becAaE2299D111.

here