A privacy-focused payment application built on Solana using MagicBlock's Trusted Execution Environment (TEE) for truly private transfers.
- Private Transfers: Send tokens privately using MagicBlock TEE - transfer amounts and details are hidden from public view
- Private Vault: Deposit tokens into a private vault protected by TEE
- Delegation System: Delegate your deposits to TEE for privacy, undelegate when needed
- Session Keys: Secure session management for TEE operations
- Authenticate: Connect your wallet and authenticate with MagicBlock TEE
- Deposit: Move tokens from your wallet to your private vault
- Delegate: Delegate your vault to TEE for privacy protection
- Transfer: Send private payments - transfers happen inside TEE
- Withdraw: Undelegate and withdraw tokens back to your wallet
| Operation | Privacy Level | Notes |
|---|---|---|
| Transfers | Private | Executed inside TEE, hidden from public |
| Balances (delegated) | Private | Stored in TEE |
| Deposits | Public | On-chain transaction |
| Withdrawals | Public | On-chain transaction |
- Frontend: React + TypeScript + Vite
- Blockchain: Solana (Devnet)
- Privacy: MagicBlock TEE (Private Ephemeral Rollups)
- Smart Contracts: Anchor Framework
- Node.js 18+
- A Solana wallet (Phantom, Solflare, etc.)
- Some devnet SOL and USDC for testing
# Clone the repository
git clone https://github.com/yourusername/ghost-pay.git
cd ghost-pay
# Install dependencies
npm install
# Copy environment file (optional)
cp .env.example .env.local
# Start development server
npm run devnpm run buildAll public configuration is in lib/constants.ts:
EPHEMERAL_RPC_URL: MagicBlock TEE endpointVALIDATOR_PUBKEY: TEE validator public keyPAYMENTS_PROGRAM: Private payments program IDSOLANA_RPC_URL: Solana RPC endpoint
- Never share your private keys or seed phrases
- This is a devnet application - do not use with real funds
- TEE authentication tokens are stored in localStorage
- Always verify transaction details before signing
ghost-pay/
├── components/ # React UI components
├── contexts/ # React context providers
├── hooks/ # Custom React hooks
│ ├── use-private-rollup-auth.ts # TEE authentication
│ ├── use-private-transfer.ts # Private transfer logic
│ └── use-program.ts # Anchor program interactions
├── lib/ # Utilities and constants
├── program/ # Anchor IDL files
└── services/ # External service integrations
MIT
- MagicBlock for the TEE infrastructure
- Solana for the blockchain platform
- Anchor for the smart contract framework