Skip to content

Tgcohce/Keyless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

87 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Keyless

Biometric Wallet Infrastructure for Solana

Eliminate seed phrases forever. Sign transactions with your face.

npm version License: MIT Solana Built with Anchor TypeScript Next.js Rust PRs Welcome

Live Demo Β· Watch Demo Video Β· Documentation


solana blockchain webauthn passkeys biometrics wallet secp256r1 anchor rust typescript nextjs defi web3 crypto hackathon


Table of Contents


The Problem

Seed phrases are the single biggest barrier to mainstream crypto adoption. Users must:

  • Write down 12-24 random words and store them securely forever
  • Risk permanent loss of funds if the phrase is lost, stolen, or damaged
  • Trust themselves to never make a mistake with irreversible consequences

78% of potential users abandon wallet setup when confronted with seed phrase management.

The Solution

Keyless replaces seed phrases with the biometric authentication users already trustβ€”Face ID and Touch ID. Private keys are generated and stored in your device's secure enclave, never exposed to the network or even the application itself.

Create a Solana wallet in 5 seconds. No seed phrase. No compromise on security.


Demo

For Hackathon Judges

  1. Open the live demo
  2. Click "Create with Face ID"
  3. Authenticate with biometrics
  4. You now have a fully functional Solana walletβ€”no seed phrase required

That's it. Five seconds to a working wallet.


Features

Feature Description
Zero Seed Phrases Private keys live in your device's secure enclaveβ€”nothing to write down or lose
Biometric Authentication Face ID / Touch ID for every transaction
Multi-Device Support Register up to 5 devices as backup authenticators
Configurable Multi-Sig Set threshold signatures for high-value transactions
Native secp256r1 Leverages Solana's new precompile (SIMD-0075) for on-chain passkey verification

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              USER DEVICE                                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Application   │───▢│    WebAuthn     │───▢│    Secure Enclave       β”‚  β”‚
β”‚  β”‚   (Next.js)     β”‚    β”‚   (Passkeys)    β”‚    β”‚  (secp256r1 keypair)    β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           SOLANA BLOCKCHAIN                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Keyless Program │───▢│ secp256r1       │───▢│   Identity PDA          β”‚  β”‚
β”‚  β”‚    (Anchor)     β”‚    β”‚ Precompile      β”‚    β”‚   + Vault               β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

How It Works

Wallet Creation

User clicks "Create with Face ID"
    ↓
Browser generates secp256r1 keypair in secure enclave
    ↓
Public key transmitted to Solana program
    ↓
Identity PDA created with associated vault
    ↓
Credential ID stored locally
    ↓
βœ“ Wallet readyβ€”no seed phrase generated or stored anywhere

Transaction Signing

User initiates transaction
    ↓
Biometric prompt (Face ID / Touch ID)
    ↓
Secure enclave signs with secp256r1 private key
    ↓
Signature submitted to Solana program
    ↓
On-chain verification via secp256r1 precompile
    ↓
Transaction executed if threshold met

Quick Start

Prerequisites

  • Node.js 18+
  • Rust 1.70+
  • Solana CLI 1.18+
  • Anchor 0.30.1
  • Device with Face ID, Touch ID, or security key

Installation

# Clone the repository
git clone https://github.com/your-org/keyless.git
cd keyless

# Install program dependencies
npm install

# Install frontend dependencies
cd app && npm install && cd ..

Deploy to Devnet

# Build the Solana program
anchor build

# Deploy
anchor deploy --provider.cluster devnet

# Get your program ID
solana address -k target/deploy/keystore-keypair.json

Update the program ID in three locations:

// programs/keystore/src/lib.rs
declare_id!("YOUR_PROGRAM_ID");
// app/src/lib/keystore.ts
export const PROGRAM_ID = new PublicKey("YOUR_PROGRAM_ID");
# Anchor.toml
[programs.devnet]
keystore = "YOUR_PROGRAM_ID"

Run the Application

cd app
npm run dev

Open http://localhost:3000


Project Structure

keyless/
β”œβ”€β”€ programs/keystore/           # Solana program (Anchor)
β”‚   └── src/
β”‚       β”œβ”€β”€ lib.rs              # Program entrypoint
β”‚       β”œβ”€β”€ state.rs            # Account structures
β”‚       β”œβ”€β”€ error.rs            # Custom errors
β”‚       └── instructions/       # Instruction handlers
β”‚
β”œβ”€β”€ app/                         # Next.js frontend
β”‚   └── src/
β”‚       β”œβ”€β”€ app/                # Pages and routing
β”‚       β”œβ”€β”€ lib/
β”‚       β”‚   β”œβ”€β”€ passkey.ts     # WebAuthn integration
β”‚       β”‚   β”œβ”€β”€ keystore.ts    # On-chain client
β”‚       β”‚   └── solana.ts      # Solana utilities
β”‚       └── components/         # React components
β”‚
β”œβ”€β”€ tests/                       # Anchor test suite
β”œβ”€β”€ Anchor.toml                 # Anchor configuration
└── README.md

Program Instructions

create_identity

Creates a new identity with the initial passkey.

Accounts: payer (signer), identity (PDA), vault (PDA)

Arguments:

  • pubkey: 33-byte compressed secp256r1 public key
  • device_name: Human-readable identifier

add_key

Registers an additional passkey to an existing identity.

Accounts: authority (signer), identity (PDA)

Arguments:

  • new_pubkey: Public key to add
  • device_name: Device identifier

execute

Executes an action after verifying signatures against the configured threshold.

Accounts: identity, vault, recipient (optional), instructions (sysvar), system_program

Arguments:

  • action: Send { amount, recipient } or SetThreshold { threshold }
  • sigs: Array of signatures with corresponding key indices

Browser Compatibility

Browser Minimum Version
Chrome / Edge 109+
Safari 16+
Firefox 119+
iOS Safari 16+
Android Chrome 109+

Security Model

Layer Protection
Key Storage Private keys generated and stored in device secure enclaveβ€”never exported
Authentication Biometric verification required for all signing operations
Recovery Multi-device registration prevents single point of failure
High-Value Protection Configurable multi-sig thresholds
Cryptography secp256r1 (NIST P-256)β€”industry standard used by Apple, Google, Microsoft

Tech Stack

On-Chain: Anchor 0.30.1 Β· Solana 1.18 Β· secp256r1 Precompile (SIMD-0075)

Frontend: Next.js 14 Β· React 18 Β· TypeScript Β· Tailwind CSS Β· @solana/web3.js


Roadmap

  • Session keys for gasless transactions
  • Social recovery with guardian keys
  • SPL token and NFT support
  • Transaction batching
  • React Native mobile app
  • Hardware wallet integration
  • Multi-chain expansion

Known Limitations

This is a hackathon demonstration. Current constraints:

  • Devnet deployment only
  • Transaction history not yet implemented
  • Multi-key UI partially complete

Acknowledgments

  • Solana Foundation β€” Hackathon sponsorship
  • SIMD-0075 β€” secp256r1 precompile specification
  • WebAuthn Community β€” Passkey standards
  • Anchor Framework β€” Solana development infrastructure

Built for the Solana University Hackathon

Live Demo Β· Video Walkthrough


⚠️ This is hackathon software. Not audited for production use.

About

Biometric Wallet Infrastructure for SolanaπŸ†Solana Foundation University Hackathon 2nd Place Winner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors