Comment on page
Persistant Circuit Architecture
Quick Start for Server-SDK Integration.
- 1.MintGrantAndBurn a PKP on Chronicle using the Lit Explorer.
mintGrantAndBurnNextusing a keyType
2, the bytes hash of the
IPFS CIDfound here which generates the unsigned transaction data for logging all instantiated circuits and circuit responses to the ListenerDB Contract and a value of
- 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 here.
- If you use the same architecture and endpoints, make sure to call
/connectonce 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 here.
- 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.