Skip to content

adelos-protocol/demo-dapp

Repository files navigation

Adelos Demo dApp

Next.js demo application for Adelos Protocol stealth transfers.

🚀 Features

  • Receiver Page: Register identity, scan for transfers, withdraw funds
  • Sender Page: Send SOL privately to registered recipients
  • Wallet Balance: Real-time balance display with auto-updates
  • Modern UI: Dark theme with toast notifications and loading states

📋 Prerequisites

  • Node.js 18+
  • Phantom Wallet (or other Solana wallet)
  • SOL on Devnet (get from faucet)

🛠️ Setup

1. Install dependencies

cd demo-dapp
npm install

2. Configure environment

Copy .env.example to .env.local:

cp .env.example .env.local

Edit .env.local:

# RPC URL (Helius recommended for better performance)
NEXT_PUBLIC_RPC_URL=https://api.devnet.solana.com

3. Run development server

npm run dev

Open http://localhost:3000

📖 Usage

As Receiver

  1. Connect your Phantom wallet
  2. Go to /receiver
  3. Click "Register Identity" (~0.002 SOL for rent)
  4. Share your wallet address with senders
  5. Click "Unlock Privacy" then "Scan Transfers"
  6. Click "Withdraw" to claim funds to your wallet
  7. Or click "Withdraw To" to send to a custom address

As Sender

  1. Connect your Phantom wallet
  2. Go to /sender
  3. Enter receiver's wallet address (must be registered)
  4. Enter SOL amount
  5. Click "Send Stealth Transfer"
  6. Receiver can now scan and claim the funds

📁 Project Structure

demo-dapp/
├── src/
│   ├── app/
│   │   ├── page.tsx              # Landing page with protocol docs
│   │   ├── receiver/page.tsx     # Receiver dashboard
│   │   └── sender/page.tsx       # Sender form
│   ├── components/
│   │   ├── WalletProvider.tsx    # Wallet context
│   │   ├── Header.tsx            # Shared header with balance
│   │   └── Toast.tsx             # Toast notification system
│   └── globals.css               # Dark theme styles
├── .env.example
├── .env.local                    # Your config (git-ignored)
└── README.md

🎨 UI Components

Toast Notifications

Modern toast system replacing browser alerts:

  • Success (green): Successful operations
  • Error (red): Failed operations
  • Warning (yellow): Identity mismatches
  • Info (cyan): General information

Shared Header

Consistent header across all pages with:

  • Logo and navigation
  • Wallet balance (auto-updates)
  • Network badge (Devnet)
  • Wallet connect button

🔗 Environment Variables

Variable Description Default
NEXT_PUBLIC_RPC_URL Solana RPC endpoint https://api.devnet.solana.com
NEXT_PUBLIC_HELIUS_API_KEY Helius API key (optional) -

📄 License

MIT

Releases

No releases published

Packages

 
 
 

Contributors