@theqrl/qrllib-wasm
v0.1.3
Published
wasm-bindgen wrappers around the Rust QRL library for browser demos
Downloads
241
Readme
@theqrl/qrllib-wasm
WebAssembly bindings for QRL (Quantum Resistant
Ledger) post-quantum cryptography — ML-DSA-87 (FIPS 204), SPHINCS+-256s, and
XMSS wallets, plus QRL address/signature helpers. Compiled with wasm-pack
(--target web) from theQRL/rust-qrllib;
the version tracks the qrllib crate.
Install
npm install @theqrl/qrllib-wasmUsage
This is a --target web build, so initialise the module once before calling any
export:
import init, { generate_wallet, sign_message, verify_message } from '@theqrl/qrllib-wasm';
await init();
const wallet = generate_wallet(); // { scheme, address, extendedSeedHex, publicKeyHex, descriptorHex, ... }
const signature = sign_message(wallet.extendedSeedHex, 'hello, post-quantum world');
const ok = verify_message(
wallet.publicKeyHex,
wallet.descriptorHex,
'hello, post-quantum world',
signature.signatureHex,
);API
Snapshot-style helpers (return a plain object): generate_wallet,
wallet_from_extended_seed_hex, sign_message, verify_message, the
*_sphincsplus_* and *_xmss_* equivalents.
Handle-based helpers (return a numeric wallet handle): create_mldsa_wallet /
open_mldsa_wallet, the SPHINCS+ and legacy-XMSS equivalents, then
wallet_snapshot, wallet_sign, close_wallet, close_all_wallets.
SPHINCS+ note: creating new SPHINCS+ wallets is disabled by default (pre-FIPS-205 parameter set, TOB-QRLLIB-4); verifying existing SPHINCS+ signatures is always available. See the repository for details.
