Skip to content

Repository files navigation

SSS Wallet Client

A Next.js-based client application for SSS (Shamir's Secret Sharing) wallet operations. Built with TypeScript and Tailwind CSS.

Features

  • Wallet Info: Display public key coordinates (X, Y)
  • Message Signing: Sign user messages with digital signatures
  • Signature Verification: Verify signature validity
  • Real-time Updates: Instant display of signing results

Tech Stack

  • Frontend: Next.js 15.3.5, React 19
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Build Tool: Turbopack

Prerequisites

Quick Start

Install dependencies

npm install

Run development server

npm run dev

Open http://localhost:3000 to view the application.

Build for production

npm run build
npm start

Project Structure

sss-wallet-client/
├── app/                    # Next.js App Router
│   ├── layout.tsx         # Root layout
│   ├── page.tsx           # Main page
│   └── globals.css        # Global styles
├── components/            # React components
│   ├── WalletInfo.tsx     # Wallet info display
│   ├── SignForm.tsx       # Message signing form
│   └── VerifyForm.tsx     # Signature verification form
├── lib/                   # Utilities and API
│   └── api.ts            # Backend API functions
└── public/               # Static files

API Endpoints

The client communicates with these backend endpoints:

  • GET /wallet - Get wallet public key
  • POST /sign - Sign a message
  • POST /verify - Verify a signature

Usage

  1. View Wallet Info: Check public key information at the top
  2. Sign Message:
    • Enter message in "Message to sign" field
    • Click "Sign" button
    • View signature result below
  3. Verify Signature:
    • Enter message, R, and S values
    • Click "Verify" button
    • See verification result

Known Issues

  • Build error due to type mismatch between lastSig state in app/page.tsx and onSign prop in SignForm
  • API calls will fail if backend server (http://localhost:8080) is not running

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages