Skip to content

0xharp/lazorkit-cookbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LazorKit Cookbook

Practical examples for building Solana dApps with LazorKit SDK

A collection of working examples demonstrating how LazorKit simplifies Solana development - from basic passkey authentication to advanced DeFi integrations with gasless transactions. Now with React Native mobile support!

Live Demo Solana Devnet LazorKit License: MIT


Why LazorKit?

Traditional Solana UX With LazorKit
Seed phrases required Face ID / Touch ID authentication
Browser extensions needed Works directly in browser or mobile app
Users must buy SOL for gas Gasless transactions via paymaster
Complex wallet setup One-click wallet creation

Platforms

Platform Directory SDK Description
Web /web @lazorkit/wallet Next.js 16 app with 8 examples
Mobile /mobile @lazorkit/wallet-mobile-adapter Expo app with 3 examples

Web Examples

# Example Description Docs
01 Passkey Wallet Basics Create wallets with Face ID, check balances Getting Started
02 Gasless USDC Transfer Send tokens without paying gas fees Getting Started
03 Subscription Service Automated recurring USDC payments Custom Programs
04 Gasless Raydium Swap DEX token swaps without gas fees Raydium Tutorial
05 Wallet Adapters LazorKit with Anza, ConnectorKit, Jupiter Wallet Adapters
06 NFT Minting Standard Metaplex NFTs Metaplex Tutorial
07 Compressed NFT Truly gasless cNFT minting Metaplex Tutorial
08 Marinade Staking Liquid staking with Marinade Finance Marinade Tutorial

Mobile Examples (React Native / Expo)

# Example Description Docs
01 Connect Wallet Passkey auth with deep linking Mobile Docs
02 Gasless Transfer USDC transfers without gas fees Mobile Docs
03 Raydium Swap DEX swaps powered by Raydium Mobile Docs

Quick Start

Web (Next.js)

cd web
npm install
npm run dev

Open http://localhost:3000

Mobile (Expo)

cd mobile
npm install
npx expo start

Scan the QR code with Expo Go or run on simulator.


Documentation

This cookbook has three layers of documentation:

Layer Location Purpose
Tutorials /docs/web/ & /docs/mobile/ Conceptual guides: LazorKit SDK basics, cookbook patterns, integration strategies
Example Recipes Each example folder Step-by-step walkthroughs with complete code (e.g., web/app/examples/01-passkey-wallet-basics/README.md)
Quick Reference /examples/ Index linking to all examples across web and mobile

Start here: docs/README.md


Project Structure

lazorkit-cookbook/
├── web/                    # Next.js web app
│   ├── app/examples/       # 8 web examples (each with detailed README)
│   ├── hooks/              # Custom React hooks
│   └── lib/                # Utilities
├── mobile/                 # Expo mobile app
│   ├── app/examples/       # 3 mobile examples (each with detailed README)
│   ├── hooks/              # Mobile hooks
│   └── lib/                # Shared utilities
├── docs/                   # Tutorial documentation
│   ├── web/                # Web conceptual guides & patterns
│   └── mobile/             # Mobile conceptual guides & patterns
├── examples/               # Quick reference index
└── program/                # Anchor subscription program

Note on Code Sharing: The /web/lib and /mobile/lib directories contain similar utilities (e.g., solana-utils.ts, lazorkit-utils.ts). This is intentional - each platform is self-contained so you can copy the code directly into your project without dependencies on a shared package.

Live Demo

https://lazorkit-cookbook.vercel.app/

Testing on Devnet:

  1. Create a wallet using Face ID/Touch ID
  2. Get devnet SOL from Solana Faucet
  3. Get devnet USDC from Circle Faucet
  4. Try the examples

Tech Stack

Category Technology
Web Framework Next.js 16, React 19
Mobile Framework Expo 54, React Native
Styling Tailwind CSS 4 (web), StyleSheet (mobile)
Blockchain Solana (Devnet)
Wallet SDK LazorKit 2.0.1
Smart Contracts Anchor 0.31.1

Bounty Submission

Created for the Superteam x LazorKit Bounty.

Deliverables:

  • 8 web examples + 3 mobile examples with tutorials
  • Live demo on Solana Devnet
  • Custom Anchor subscription program
  • Protocol integrations: Raydium, Metaplex, Marinade
  • Wallet adapter examples: Anza, ConnectorKit, Wallet-UI, Jupiter
  • React Native mobile SDK integration

Author

0xharp - @0xharp | GitHub


License

MIT License - feel free to use this as a starting point for your own projects.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages