Lens Protocol: Interactive Guide
Execute the code examples live on the Lens Testnet.
Lens Guest Mode
3. Apps
Create and manage Lens Applications.
Authentication Required
You need to act as a "Builder" to create apps.
Create New App
Available Inputs (createApp):
- metadataUri: JSON with name, bio, logo, platforms, etc.
- defaultFeed: Address of feed logic (Default: GlobalFeeed)
- graph: Address of graph logic (Default: GlobalGraph)
- namespace: Address of namespace (Default: GlobalNamespace)
- treasury: Address to collect fees
- sponsorship: Address of sponsorship manager
Create App CodeTypeScript
import { app } from '@lens-protocol/metadata';
// 1. Create Metadata
const metadata = app({ name: "My Lens App" });
const uri = await upload(metadata);
// 2. Create App
const result = await createApp(sessionClient, {
metadataUri: uri,
defaultFeed: { globalFeed: true },
});