Link your X (Twitter) identity with your Lens Protocol Account - mint your X handle in a dedicated LenX namespace.
"Linked with X" feature as implemented in hey#5598 PR
LenX is a trusted service that verifies X identity and mints LenX Handles to be 1<>1 linked with Lens Accounts. It allows to:
- Simplify Onboarding: Bring X users into Lens seamlessly, keeping their existing X handle.
- Prevent Fakes: Validate that a given Lens Account is actually controlled by the same person who has the same X handle.
- Social Discovery: Discover who of your X friends is already on Lens.
LenX aims to bridge the gap between the Web2 social experience you know and the exciting possibilities of Web3 social.
-
Step 1: Log in with your X account
-
Step 2: Log in with your Lens account
- Connect your favorite cryptocurrency wallet (MetaMask, Coinbase Wallet, etc.) via ConnectKit.
- This wallet should be the Owner EOA of your Lens Account.
- Choose which Lens Account to use if wallet controls many
-
Step 3: Link your X Handle to Lens Account
LenX is built with a modern tech stack and a focus on a visually engaging experience:
- Frontend: Next.js, React, TypeScript
- Styling & Animation: Tailwind CSS, Framer Motion
- Background Magic:
oglfor the captivating background threads. - Web3 Power:
ConnectKitfor a seamless wallet connection experience.wagmi&viemfor robust blockchain interactions.@lens-protocol/clientfor all things Lens.
- X Integration: Secure X OAuth 2.0 with PKCE for handle fetching.
- Blockchain:
- Lens Chain (ID 232): For Lens Protocol smart account operations.
- Package Manager: PNPM
LenX is currently an MVP, focused on the core X-to-Lens linking. Here's what's on the horizon:
- β X Login & Handle Fetching
- β Wallet Connection & Lens Account Log In
- β Link X Handle in LenX Namespace on Lens
- β³ Lens Account creation: Create a Lens Account if user doesn't have one.
- β³ Discover X Friends on Lens: Find all your bros.
- β³ Sync User's X Posts to Lens Feed: Bring your content over to Lens (and back to X).
- β³ Even easier on-boarding: Initial user on-boarding without crypto wallets.
-
Clone the repository:
git clone <repository-url>
-
Install dependencies:
pnpm install
-
Set up environment variables: Create a
.env.localfile in the root and add your API keys and configurations:NEXT_PUBLIC_APP_URL= NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID= NEXT_PUBLIC_X_CLIENT_ID= X_CLIENT_SECRET=
- Ensure your X App has the correct callback URI configured:
http://localhost:3000/api/auth/x/callback(for local dev).
- Ensure your X App has the correct callback URI configured:
-
Run the development server:
pnpm dev
-
Open http://localhost:3000 in your browser.
Contributions are welcome! Whether it's bug fixes, feature suggestions, or improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
LenX