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
ãããª
ããã¯ã¹ã¿ãã¯
説æ
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 |
|---|---|
| Solidity smart contracts (Foundry) |
| TypeScript SDK for passkey + wallet integration |
| Next.js demo application |
ð Quick Start
Prerequisites
Installation
# Clone the repo
git clone https://github.com/subh/keymantle.git
cd keymantle
# Install dependencies
npm install
# Build all packages
npm run buildRun 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 devOpen 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 verificationMantissaFactory.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 |
|
Mantle Mainnet | 5000 |
|
Local (Anvil) | 5003 |
|
𧪠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