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. Database and Server Interactions

Persistant Circuit Architecture

Quick Start for Server-SDK Integration.

PreviousServer-SDK IntegrationNextLogs & Error Handling

Last updated 1 year ago

  1. MintGrantAndBurn a PKP on Chronicle using the .

    • Invoke mintGrantAndBurnNext using a keyType 2, the bytes hash of the IPFS CID found which generates the unsigned transaction data for logging all instantiated circuits and circuit responses to the ListenerDB Contract and a value of 0.000000000000000001 LIT.

  2. Deploy your ListenerDB and ListenerAccessControl from the on Polygon by invoking deployFromFactory with your minted PKP address, public key and tokenId.

  3. Set up an Node.js VM or similar and deploy your server architecture. For a full code example of the server <> sdk integration and set up see .

    • If you use the same architecture and endpoints, make sure to call /connect once at the start when the server is live to correctly instantiate the Lit client that is used to save logs on-chain.

  4. Create and connect your frontend using NextJS or similar to the server. See a full code example .

    • Queries can be made to the deployed subgraph to retrieve the logs recorded on-chain.

    • All DB contracts deployed through the Factory can easily retrieve their associated logs through this subgraph, with optionality to sort each query via your deployed DB address.

  5. Make sure to fund your PKP address with enough MATIC to pay for the gas costs associated with broadcasting signed transactions to the deployed LitDB contract on Polygon network.

Lit Explorer
here
ListenerFactory
here
here
Lit Listener Graph