mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
Wires the canonical post-quantum stack per LP-4200 into the wallet:
• mldsa.ts — ML-DSA-44/65/87 providers (FIPS 204) over @noble/post-quantum
• mlkem.ts — ML-KEM-512/768/1024 KEM providers (FIPS 203)
• slhdsa.ts — SLH-DSA-128f/192f/192s/256f providers (FIPS 205)
• hybrid.ts — secp256k1∥ML-DSA + Ed25519∥ML-DSA containers; wire format
byte-compatible with luxfi/sdk wallet/keychain PQSigner
• hdPq.ts — BIP-32 → cSHAKE expandChildSeed → ML-DSA/SLH-DSA keypair
• domain.ts — FIPS-204 §5.4 ctx strings:
lux-evm-precompile-mldsa-v1 (0x012202)
lux-x-chain-utxo-v1
lux-p-chain-platform-mldsa-v1
lux-recovery-slhdsa-v1 (0x012203)
lux-handshake-mlkem-v1
• precompile.ts — eth_call encoders for 0x012201/02/03 LP-4200 verifiers
The pkgs/wallet/pq surface decomplects four concerns that were previously
tangled in luxfi/sdk's PQSigner: scheme dispatch (providerFor), domain
separation (contextBytesFor), hybrid composition (encode/decodeHybrid),
HD derivation (derivePQIdentity). Each module is independently complete;
the index re-exports them as a single PQ public API.
Web facade lives at apps/web/src/lib/pq.ts; usePQIdentity() hook derives
the canonical ML-DSA-65 identity at m/44'/9000'/<chainID>'/0'/0'/0' from
the unlocked auth-slice mnemonic.
Tests: 71 passing across 8 suites
domain: 4 mldsa: 11 mlkem: 7 slhdsa: 6
hybrid: 9 hdPq: 9 precompile: 8 pqAccount: 17 (pre-existing)
Test runner: jest.pq.config.js (standalone — bypasses upstream-shaped
jest-expo preset still pending refactor; see LLM.md).
Domain separators pinned by domain.test.ts; cSHAKE customizations pinned
by pqAccount.test.ts (pre-existing). Replay-across-chains explicitly
tested via mldsa.test.ts and hybrid.test.ts cross-ctx verify cases.
41 lines
1.1 KiB
JSON
41 lines
1.1 KiB
JSON
{
|
|
"name": "@luxfi/wallet-web",
|
|
"version": "0.1.0",
|
|
"license": "GPL-3.0-or-later",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@hanzo/gui": "^7.0.0",
|
|
"@luxfi/wallet-analytics": "workspace:^",
|
|
"@luxfi/wallet-brand": "workspace:^",
|
|
"@noble/curves": "^1.6.0",
|
|
"@noble/hashes": "^1.7.1",
|
|
"@noble/post-quantum": "0.6.1",
|
|
"@scure/bip32": "^1.5.0",
|
|
"@scure/bip39": "^1.4.0",
|
|
"@solana/web3.js": "^1.92.0",
|
|
"@tanstack/react-query": "^5.90.0",
|
|
"@walletconnect/sign-client": "^2.21.0",
|
|
"@walletconnect/utils": "^2.21.0",
|
|
"qrcode.react": "^4.1.0",
|
|
"react": "19.2.5",
|
|
"react-dom": "19.2.5",
|
|
"react-router-dom": "7.5.0",
|
|
"viem": "^2.30.0",
|
|
"wagmi": "^2.15.0",
|
|
"zustand": "^5.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-dom": "^19.0.0",
|
|
"@vitejs/plugin-react": "^4.4.1",
|
|
"typescript": "5.9.3",
|
|
"vite": "8.0.8"
|
|
}
|
|
} |