Lit Protocol is a decentralized key management network powered by threshold cryptography. Lit provides a set of blockchain-agnostic tools that can be used to power access control, signing, and authentication for web3-native identity management.
We’re excited to showcase an integration of Lit Protocol and Ceramic, enabling developers to store encrypted data on ComposeDB. This integration allows developers to build applications that provide users with more control over their data and privacy.
Lit Protocol is a decentralized key management system that allows users to encrypt their data and control who has access to it. Lit Protocol’s access control system gives users granular control over who can access and use their data.
Along with flexible access control features, Lit Protocol also offers tooling around multi-party computation (MPC). MPC enables secure reading and writing of data between blockchains and off-chain platforms, programmable signing that allows developers to build distributed serverless functions that can sign, event listening capabilities to create specific triggers for executing programmatic signing, and much more.
The Ceramic Network
Ceramic is a decentralized data network that leverages the verifiable qualities you can expect from a blockchain, with cost efficiency and querying capabilities similar to a traditional database. Ceramic empowers developers to leverage interoperable data formats stored on the Network, helping product teams circumvent "cold-start" data problems while simultaneously allowing individuals to take ownership of their digital presence.
Why integrate Lit Protocol and Ceramic Network?
The integration of Lit and Ceramic Network allows developers to build applications that provide users with more control over their data and privacy.
The Ceramic protocol is built on decentralized event streams, where user accounts (enabled by decentralized identifiers, or DIDs) cryptographically sign data events and submit them to the network. These events are stored in the Interplanetary File System (IPFS) using the IPLD protocol, and organized into readable streams. Each stream is flexible enough to store many types of content. Therefore, Ceramic is home to a diversity of different data use cases such as user profiles, posts, relations to other entities, and more.
Due to Ceramic's open readability, any participating node can read from any stream in the network. Therefore, encrypting data using Lit Protocol and saving it on Ceramic is a common (and necessary) integration for many teams.
A Peek Under the Hood
Given Ceramic’s architecture, Lit's access control capabilities allow developers to gate access to content based on highly flexible conditions. For instance, developers may want to allow their users the ability to grant read access to all addresses that hold a specific NFT or ERC20 asset.
With Lit, developers allow their users to assign access control conditions that are associated with the encrypted object when generated. The Lit nodes confirm those conditions have been satisfied using the user’s wallet signature when they request access. This offers a seamless user flow for the end user, whereas (without Lit Protocol) users might otherwise be required to manually decrypt or re-encode their encrypted data for other users they want to grant access to.
How to use Lit to Encrypt Messages and Save Them to ComposeDB (Ceramic)
To use Lit to encrypt messages and save them to Ceramic using ComposeDB, you can follow the tutorial here.
This tutorial will use a message board example application to show how to create encrypted messages using Lit and save message instances to the Ceramic Network using ComposeDB.
In the tutorial, you’ll learn how to:
- Create ComposeDB schemas and deploy those models on a local Ceramic node
- Authenticate users on Ceramic to allow them to author their own documents.
- Encrypt data with Lit Protocol and write mutation queries to save the encrypted data to ComposeDB using GraphQL
- Decrypt data using Lit Protocol based on specific access control logic
What do you need to get started?
As outlined in the tutorial, the only dependencies you’ll need are:
- MetaMask Chrome Extension
- Node v16
Learn More about Building on Ceramic
Build an AI Chatbot on Ceramic
Build an AI-powered Chatbot and save message history to ComposeDB by following this ComposeDB Tutorial. Add privacy by gating on who can see message history.
Create a Social App on ComposeDB
The Social App ComposeDB Starter will help you get started building your own social app. Build privacy preserving networks with Lit's encryption features.
The integration of Lit and Ceramic is an exciting glimpse into the future of the web! By combining Lit's encryption and access controls with Ceramic's flexible decentralized data storage, developers now have the tools to build next-generation applications where users own their data.
Imagine the possibilities - social networks where your posts are encrypted and shared only with chosen friends, AI assistants with private memory stores, collaborative apps where access permissions can be finely tuned. The options are numerous when users can securely store data with decentralized applications.
With just a few dependencies, anyone can get started building on this powerful combo as shown in the guide. Let's start building the future together using the combined powers of Lit Protocol and Ceramic.
Questions or comments? Reach out to the Lit team on Discord.
Ceramic specific queries? Join Ceramic's Discord.
Keep updated with Lit Protocol by subscribing to Spark!
Spark is an open community for developers passionate about shaping the future of our digital world. Join us on our mission to Free The Web!
No spam. Unsubscribe anytime.