Skip to content

Repository files navigation

Smart Wallet Stellar (POC)

⚠️ Proof of Concept — an experimental project, not a production product. Built to explore passkey-based (WebAuthn) smart wallets on the Stellar/Soroban network. Not audited, not recommended for use with real assets.

Overview

This is a POC demonstrating how to build a non-custodial smart wallet on Stellar using:

  • Passkey (WebAuthn) instead of a traditional seed phrase to sign transactions.
  • A Soroban smart contract acting as the account contract, verifying passkey signatures on-chain.
  • Next.js App Router for the web/miniapp interface.
  • tRPC + Prisma for the backend API and wallet/signer-related data storage.

Features

  • Create a new passkey and deploy the corresponding smart wallet contract.
  • Sign and send Stellar transactions with a passkey (no manual private key handling).
  • View/manage signers attached to the smart wallet.
  • Send and receive assets through a simple web interface.
  • Standalone transaction confirmation (sign) flow, embeddable as a miniapp.

Project structure

src/
  app/            # Next.js App Router (pages, layouts, api routes)
  components/     # Shared UI components
  hooks/          # Business logic hooks: passkey, signer, contract, fund
  server/         # tRPC routers, DB connection
  trpc/           # tRPC client setup
  providers/      # React context providers
  lib/            # Helper functions
prisma/           # Prisma schema
soroban-contracts/ # Smart contract (Soroban/Rust)

Running locally

  1. Clone the repo:

    git clone git@github.com:pkx64/smart-wallet-stellar.git
    cd smart-wallet-stellar
  2. Install dependencies:

    npm install
  3. Create a .env file (see src/env.js for the required variables), e.g.:

    DATABASE_URL=postgresql://user:password@localhost:5432/smart_wallet
  4. Initialize the database (if using Postgres via Docker):

    ./start-database.sh
    npm run db:push
  5. Start the dev server:

    npm run dev

    The app runs at http://localhost:3000.

Smart contract

The contract lives in soroban-contracts/contracts/, built/tested with the Soroban CLI:

cd soroban-contracts
cargo build --target wasm32-unknown-unknown --release

Disclaimer

This repo is for personal learning/experimentation purposes. The code has not undergone a security audit and should not be used to manage real assets.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages