Commons

A Nostr social app with a built-in multichain wallet: email login, gasless USDC, BTC + Solana.

Commons

Created At

ETHGlobal Mumbai

Project Description

Commons is a mobile social app built on Nostr where every account comes with a self-custodial wallet, without seed phrases or gas. People sign in with email or Google; behind the scenes Privy creates embedded wallets on EVM, Solana and Bitcoin (both Native SegWit and Taproot) for them.

The social side is a full Nostr client: a home feed of people you follow, posting, replies and threads, likes, profiles, search across Nostr (people, posts, npub, NIP-05), notifications, and end-to-end encrypted DMs (NIP-17). Every post and profile can be tipped in USDC with no gas, and the tip shows up on Nostr for everyone to see. Your Nostr identity is derived from your Privy wallet, so logging in with the same email on a new phone gives you the same npub, with no nsec or seed phrase to manage.

The Wallet tab shows one total balance across Ethereum, Base, Arbitrum, Optimism, Polygon, Solana and Bitcoin, with native tokens and USDC, plus per-network deposit sheets with QR codes and clear network warnings. Transactions are gas-sponsored: a brand-new user holding 0 ETH and 0 SOL can still move USDC, because the app pays the fees.

How it's Made

  • App: Expo SDK 58, React Native 0.88 (New Architecture, React Compiler), Expo Router with native tabs and protected routes, TypeScript strict, TanStack Query.
  • Auth + wallets: Privy (@privy-io/expo) with whitelabel email-OTP and Google login. Wallets run on Privy's TEE infrastructure; the app creates EVM, Solana and Bitcoin (extended-chain) wallets itself after login.
  • Nostr identity from Privy: Nostr needs a raw key in the app (Schnorr signatures, NIP-44 ECDH), which a remote signer can't provide. The app asks the Privy EVM wallet for a personal_sign over a fixed message and runs it through HKDF-SHA256 to get the Nostr secret key, cached in the iOS Keychain. The signature is deterministic (checked in-app), so the same login gives the same npub on any device.
  • Nostr client: nostr-tools with one shared relay pool, publish-on-first-ack so slow relays never block the UI, batched profile loading, one query for a whole feed's likes/replies/tips, optimistic follows and likes. Signatures are verified only for events the app shows, because BigInt Schnorr checks are slow in Hermes. DMs are NIP-17: one kind-14 rumor sealed and gift-wrapped for both sides and sent to the recipient's kind-10050 relays; messages from strangers go to message requests. Search uses NIP-50 relays plus npub/NIP-05 lookup.
  • Gasless USDC tips without a backend: the Expo SDK has no sponsor flag yet, so the app calls Privy's Wallet API rpc directly, each request signed by the user's own authorization key. On EVM Privy sponsors via EIP-7702; on Solana the fee is paid by the sponsor. Tips are announced as a kind-7 reaction with a tip tag (amount, CAIP-2 chain, tx hash), so they show up in notifications and on the post.
  • Signature lab: an in-app test suite that signs with every method Privy offers and verifies each result on-device with viem and @noble/curves: Nostr key derivation, EIP-191, EIP-712, EIP-1559 tx, raw secp256k1, EIP-7702 authorization, Solana message + tx (ed25519), Bitcoin SegWit (ECDSA) and Taproot (BIP-340 Schnorr against the tweaked output key), plus sponsored sends on Base Sepolia and Solana Devnet. 12/12 pass.
  • Bitcoin testnet trick: Privy only issues bc1 addresses, so the app re-encodes the witness program with the tb prefix (bech32/bech32m) to use the same keys on Testnet4.
  • Balances: keyless public RPCs (publicnode, Solana RPC, mempool.space) batched per chain, CoinGecko for prices and token logos; images load from CDNs and are disk-cached, nothing bundled.
background image mobile

Join the mailing list

Get the latest news and updates

Commons | ETHGlobal