Repository navigation
Verification
npm testThis runs node test/node-harness.js (see package.json:9). It loads the shipped src/*.js files in Node and checks them against test/vectors.js. Currently 189 vectors pass. test/self-test.html runs the identical suite in the browser under the same CSP the app uses, with a drift guard that fails if the test page stops loading the same scripts as index.html.
bash tools/build-crypto.sh --checksrc/vendor/keysense-hashes.js is the only generated file. It holds blake2b (Sui) and sha3_256 (Aptos) from @noble/hashes@1.5.0, built with esbuild@0.28.1. The check rebuilds it from pinned inputs and diffs against the committed copy. See SECURITY.md:41-63 and README.md:76-84.
bash tools/verify-vendor.shRe-checks the three copied vendored files against their pinned upstream SHA-384 hashes. Run before every release, not just once. See SECURITY.md:29-39.
Published in the spec itself. Tagged in test/vectors.js:9-10.
-
bip39,bip44: Ethereum and Bitcoin Legacy vectors on theabandon...aboutphrase. Seetest/vectors.js:40-46. -
bip49: wrapped segwit vector. Seetest/vectors.js:47-48. -
bip84: native segwit vectors, plus the WIF row. Seetest/vectors.js:49-52andtest/vectors.js:161-162. -
bip32: account xpub row. Seetest/vectors.js:163-165. -
bip86: all three published Taproot vectors. Seetest/vectors.js:54-60. -
slip10: both published Ed25519 test vectors, every level. Seetest/vectors.js:168-226.
Published by the chain maintainers. Ground truth, not a second opinion. See test/vectors.js:11-13.
- Sui SDK, three cases. Repo
MystenLabs/ts-sdks, filepackages/sui/test/unit/cryptography/ed25519-keypair.test.ts, commit013ea22520d668ec8259c8c4535f3b344b82ce66, double-sourced against the Rust keytool CLI atMystenLabs/sui crates/sui/src/unit_tests/keytool_tests.rs, commitedd2cd31e0b05d336b1b03b6e79a67d8dd00d06b. Seetest/vectors.js:122-135. - Aptos TS SDK wallet fixture. Repo
aptos-labs/aptos-ts-sdk, filetests/unit/helper.ts, commit9451281f85f828cf7fa8562a07b4099fcd15965b. Pathm/44'/637'/0'/0'/0', with published seed and public key intermediates. Seetest/vectors.js:143-156. - CosmJS fixture. Repo
cosmos/cosmjs, filepackages/proto-signing/src/directsecp256k1hdwallet.spec.ts, commitfcaa08011c343b350b7fc260e6681924a5f66f62. Seetest/vectors.js:101-107. - Litecoin and Dogecoin encoding constants cited from each chain's
chainparams.cpp: Litecoinlitecoin-project/litecoin, commitb250b016a9166928c0e702d48ecd037a57a489a4; Dogecoindogecoin/dogecoin, commit7237da74b8c356568644cbe4fba19d994704355b. Seetest/vectors.js:66-77.
From test/vectors.js:14-21:
-
crosstool-locked: regression lock on a value this tool already produces. Derivation maths is already proven by the Bitcoin BIP vectors; only the address-encoding constants differ. Drift detection, not proof. -
no-official-vector: no citable official mnemonic-to-address fixture was found. Regression lock only. Seeaudit/AUDIT.mdsection 5.
Tron encoding is base58check of 0x41 plus the last 20 bytes of Keccak-256 over the uncompressed public key. No citable official mnemonic-to-address vector was found in java-tron or Tron developer docs at the time of entry. The tron-0 row is a regression lock. See test/vectors.js:90-94 and SECURITY.md:86.
Repository documents: