Skip to content

Latest commit

 

History

History
95 lines (73 loc) · 5.79 KB

File metadata and controls

95 lines (73 loc) · 5.79 KB

LazorKit Cookbook Documentation

Welcome to the LazorKit Cookbook! This collection of tutorials shows you how to build seamless Solana dApps using LazorKit's passkey authentication and gasless transaction infrastructure.

Choose Your Platform

Platform SDK Examples
Web (Next.js) @lazorkit/wallet 8 examples including NFT minting, DEX swaps, staking
Mobile (React Native / Expo) @lazorkit/wallet-mobile-adapter 3 examples: connect, transfer, swap

What You'll Learn

This cookbook demonstrates how to:

  1. Set up LazorKit - Initialize the SDK and create passkey-based wallets
  2. Build gasless experiences - Send tokens, swap on DEXs, mint NFTs - all without users paying gas
  3. Integrate with Solana protocols - Connect LazorKit with Raydium, Metaplex, Marinade
  4. Build custom programs - Create your own Anchor programs that work with LazorKit
  5. Support multiple wallets - Use LazorKit alongside Phantom, Solflare, and other wallets

Web Documentation

Guide Description
01 - Getting Started Set up your environment and run your first example
02 - LazorKit Basics What the LazorKit SDK provides natively
03 - Cookbook Patterns Reusable patterns for protocol integrations
04 - Solana Protocols Integrate with Raydium, Metaplex, Marinade
05 - Custom Programs Build custom Anchor programs with LazorKit
06 - Wallet Adapters Multi-wallet support with LazorKit
07 - Utilities Reference API reference for hooks and helpers

Web Examples

# Example Description
01 Passkey Wallet One-click wallet creation with Face ID/Touch ID
02 Gasless Transfer Send USDC without gas fees
03 Subscription Service Automated recurring payments
04 Raydium Swap Gasless DEX trading
05 Wallet Adapters Multi-wallet dApp
06 NFT Minting Mint Metaplex NFTs
07 Compressed NFTs Mint cNFTs with Bubblegum
08 Marinade Staking Liquid staking integration

Mobile Documentation

Guide Description
01 - Getting Started Expo setup, polyfills, deep linking
02 - LazorKit Basics What the LazorKit SDK provides natively
03 - Cookbook Patterns Reusable patterns
04 - Connect Wallet Passkey auth with deep links
05 - Gasless Transfer USDC transfers on mobile
06 - Raydium Swap DEX swaps with Raydium API

Mobile Examples

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

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                      Your dApp                              │
├─────────────────────────────────────────────────────────────┤
│  COOKBOOK PATTERNS (copy these!)                            │
│  ├─ Hooks: useLazorkitWalletConnect, useBalances            │
│  └─ Utils: processInstructionsForLazorKit                   │
├─────────────────────────────────────────────────────────────┤
│  LazorKit SDK                                               │
│  ├─ Web: @lazorkit/wallet                                   │
│  └─ Mobile: @lazorkit/wallet-mobile-adapter                 │
├─────────────────────────────────────────────────────────────┤
│                      Solana                                 │
└─────────────────────────────────────────────────────────────┘

Note on Code Sharing: The web and mobile directories contain similar utility files (solana-utils.ts, lazorkit-utils.ts). This duplication is intentional - each platform is fully self-contained for easy copy-pasting into your project.

Quick Links