Skip to content
Bip39Chiper

Bip39Chiper-TS

TypeScript library for Positional BIP-39 Obfuscation format v1 — the same scheme as the macOS app. Obfuscate a mnemonic into position-bound codes, recover in any order with your password. Works in Node.js and the browser.

Features

  • Obfuscate — BIP-39 English mnemonic → 9-character codes
  • Recover — codes in any order + password → phrase
  • Session — eager lookup table for repeated recoveries
  • Export.txt headers compatible with the macOS app
  • Conformance — official test vectors

Quick start

npm install bip39chiper
import { obfuscate, recover } from "bip39chiper";

const tokens = await obfuscate(mnemonic, password, {
  iterations: 100_000,
  keyBytes: 32,
});

const words = await recover(tokens, password, 12, {
  iterations: 100_000,
  keyBytes: 32,
});

See API for the full surface.

Docs

Page Topic
API Public exports, sessions, errors
Security Threat model notes for the library
Conformance Submodule and npm test scripts
Algorithm specification Normative format v1

License

MIT © Markus Lind