hackquest logo
  • ๅญฆไน 
  • ่ฏพ็จ‹ๆŽข็ดข
  • ๅฎžๆˆ˜
  • ๆŽข็ดข้ป‘ๅฎขๆพ
  • ๅพ€ๆœŸ้กน็›ฎ
  • ็คพๅŒบ
  • ่ฎบๅ›
  • ๅ…จ็ƒๆดปๅŠจ
  • ๆˆ‘็š„็คพๅŒบ
  • ๅ…ฑๅญฆ่ฅ
  • ็ป„็ป‡ไธญๅฟƒ
  • ๆ›ดๅคš
    • ่ฏๆฑ‡่กจ
    • ๅšๅฎข
    • ๆฐด้พ™ๅคด
    • ๅทฅไฝœๆœบไผš
    • ๅช’ไฝ“ๅทฅๅ…ทๅŒ…
    • ๅˆ›ๅง‹ไบบ
hackquest logo

Mantissa

Passkey-native smart wallet for Mantle L2. Features ๐Ÿ” Seedless Authentication - Use device biometrics instead of seed phrases ๐Ÿ“ฑ WebAuthn/FIDO2 - Industry-standard passkey protocol โ›ฝ ERC-4337

่ง†้ข‘

ๆŠ€ๆœฏๆ ˆ

Solidity
Python

ๆ่ฟฐ

Features

  • ๐Ÿ” Seedless Authentication - Use device biometrics instead of seed phrases

  • ๐Ÿ“ฑ WebAuthn/FIDO2 - Industry-standard passkey protocol

  • โ›ฝ ERC-4337 Compatible - Account abstraction ready

  • ๐Ÿ”‘ Multi-Owner Support - Add backup passkeys for recovery

  • โšก Mantle Optimized - Built for low gas costs on Mantle L2

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    User Device                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚  Biometric  โ”‚โ”€โ”€โ”€โ–ถโ”‚   Passkey    โ”‚โ”€โ”€โ”€โ–ถโ”‚  Wallet   โ”‚  โ”‚
โ”‚  โ”‚   Prompt    โ”‚    โ”‚  (WebAuthn)  โ”‚    โ”‚   SDK     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ”‚ Sign Transaction
                             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Mantle L2                            โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ MantissaFactoryโ”‚โ”€โ”€โ”€โ–ถโ”‚  MantissaWallet (Clone)  โ”‚  โ”‚
โ”‚  โ”‚ (Deploys Wallets)โ”‚    โ”‚  โ€ข P-256 Signature Verify โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚  โ€ข Execute Transactions   โ”‚  โ”‚
โ”‚                          โ”‚  โ€ข Multi-Owner Support    โ”‚  โ”‚
โ”‚                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ฆ Packages

Package

Description

packages/contracts

Solidity smart contracts (Foundry)

packages/sdk

TypeScript SDK for passkey + wallet integration

packages/demo

Next.js demo application

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+

  • Foundry

Installation

# Clone the repo
git clone https://github.com/subh/keymantle.git
cd keymantle

# Install dependencies
npm install

# Build all packages
npm run build

Run Demo

# Terminal 1: Start local Mantle forkcd packages/contracts
anvil --fork-url https://rpc.sepolia.mantle.xyz

# Terminal 2: Deploy contracts
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --broadcast

# Terminal 3: Run demo appcd packages/demo
npm run dev

Open http://localhost:3000 and click "Create Passkey Wallet"!

๐Ÿ“š Documentation

Smart Contracts

The core contracts implement a passkey-authenticated smart wallet:

  • MantissaWallet.sol - Smart wallet with P-256 signature verification

  • MantissaFactory.sol - Factory for deploying wallets (CREATE2)

  • WebAuthnVerifier.sol - On-chain WebAuthn signature verification

See packages/contracts/DEPLOYMENT.md for deployment instructions.

SDK Usage

import { MantissaClient } from '@mantlepass/sdk';

// Initialize clientconst client = new MantissaClient({
  rpcUrl: 'https://rpc.sepolia.mantle.xyz',
  factoryAddress: '0x...',
});

// Create wallet with passkeyconst wallet = await client.createWallet({
  name: 'My Wallet',
});

// Sign and send transactionconst txHash = await client.sendTransaction({
  to: '0x...',
  value: 1000000000000000000n, // 1 MNTdata: '0x',
});

Networks

Network

Chain ID

Factory Address

Mantle Sepolia

5003

0x876DBabB4A37cCB97D5ca4285444f1BcE06220a6

Mantle Mainnet

5000

TBD

Local (Anvil)

5003

0xae13506deae7f82ea5c1c646d0b6693b220a4bb8

๐Ÿงช Testing

# Run contract testscd packages/contracts
forge test -vvv

# Run SDK testscd packages/sdk
npm test

๐Ÿ› ๏ธ Development

Project Structure

keymantle/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ contracts/          # Solidity contracts
โ”‚   โ”‚   โ”œโ”€โ”€ src/           # Contract source files
โ”‚   โ”‚   โ”œโ”€โ”€ test/          # Foundry tests
โ”‚   โ”‚   โ””โ”€โ”€ script/        # Deployment scripts
โ”‚   โ”œโ”€โ”€ sdk/               # TypeScript SDK
โ”‚   โ”‚   โ””โ”€โ”€ src/
โ”‚   โ”‚       โ”œโ”€โ”€ client/    # MantissaClient
โ”‚   โ”‚       โ”œโ”€โ”€ webauthn/  # Passkey utilities
โ”‚   โ”‚       โ””โ”€โ”€ utils/     # Helpers
โ”‚   โ””โ”€โ”€ demo/              # Next.js demo app
โ”œโ”€โ”€ package.json           # Monorepo root
โ””โ”€โ”€ README.md

Build Commands

# Build everything
npm run build

# Build specific package
npm run build --workspace=packages/sdk

# Run tests
npm test

๐Ÿ” Security

  • P-256 (secp256r1) - Hardware-backed elliptic curve cryptography

  • WebAuthn - W3C standard for passwordless authentication

  • On-chain verification - All signatures verified by smart contracts

  • No private key exposure - Keys never leave secure hardware

Audit Status

โš ๏ธ Not audited - This is experimental software. Use at your own risk.

๐Ÿ—บ๏ธ Roadmap

  • Core smart contracts

  • TypeScript SDK

  • Demo application

  • ERC-4337 Bundler integration

  • Social recovery module

  • Session keys for dApps

  • Mobile SDK (React Native)

  • Hardware wallet backup

้˜Ÿ้•ฟ
Iivc
้กน็›ฎ้“พๆŽฅ
่ต›้“
Other