Skip to content
GitHub

Signing with ML-DSA-65

Testnet

Native account and consensus signatures use ML-DSA-65. The public testnet mempool is plaintext; ML-KEM-768 is used for P2P transport, not mempool encryption. No supported SLH-DSA account, backup-key, or emergency-rotation path is released.

This page documents only deterministic helpers exercised against @monolythium/[email protected]. It does not provide an agent-wallet, hot-wallet, or transaction-submission recipe.

MlDsa65Backend has fromSeed; it does not have a generate static method in 0.6.8. Generate a standard 24-word BIP-39 phrase through the crypto helper and derive the backend:

import { addressToBech32 } from "@monolythium/core-sdk";
import {
generateMnemonic,
mnemonicToMlDsa65Backend,
validateMnemonic,
} from "@monolythium/core-sdk/crypto";
const mnemonic = generateMnemonic();
if (!validateMnemonic(mnemonic)) throw new Error("invalid mnemonic");
const backend = mnemonicToMlDsa65Backend(mnemonic);
const publicKey = backend.publicKey(); // 1,952 bytes
const displayAddress = addressToBech32(backend.addressBytes());
const message = new TextEncoder().encode("documentation self-test");
const signature = backend.sign(message); // 3,309 bytes in this release
if (!backend.verify(message, signature)) throw new Error("verification failed");
backend.dispose();

publicKey() and addressBytes() are methods. Older examples using publicKeyBytes, a publicKey property, MlDsa65Backend.generate, or a standalone mlDsa65Verify function do not match 0.6.8.

The example creates a secret in the JavaScript process. That is suitable for a deterministic SDK test, not proof of custody-grade key protection. Production wallets and exchanges need their own reviewed secret lifecycle and signing boundary. Never generate or hold a user’s key in Stele’s hosted service, a web login server, or a hosted MCP.

Wallet authentication signs a short-lived login challenge through the browser wallet. It does not give the relying website this backend or authorize transaction signing.

The package includes low-level transaction helpers, but this page intentionally does not present a copy-paste submission flow. Node activation, fee shape, nonce handling, exact review bytes, replay protection, and custody policy must be certified against the active release. Agent economic execution and protocol spending policy remain unavailable.