@ocap/mpc-hsm 1.33.6 → 1.33.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/esm/bip39-english-wordlist.d.mts +11 -0
  2. package/esm/bip39-english-wordlist.mjs +31 -0
  3. package/esm/constants.d.mts +66 -2
  4. package/esm/constants.mjs +65 -1
  5. package/esm/dkg.mjs +2 -2
  6. package/esm/index.d.mts +11 -3
  7. package/esm/index.mjs +11 -3
  8. package/esm/ocap-clear-signing.d.mts +125 -0
  9. package/esm/ocap-clear-signing.mjs +1170 -0
  10. package/esm/offline-ceremony.d.mts +127 -0
  11. package/esm/offline-ceremony.mjs +481 -0
  12. package/esm/ot.d.mts +7 -1
  13. package/esm/ot.mjs +149 -16
  14. package/esm/personal-vault.d.mts +1292 -0
  15. package/esm/personal-vault.mjs +3615 -0
  16. package/esm/personal.d.mts +10 -0
  17. package/esm/personal.mjs +11 -0
  18. package/esm/presign.mjs +1 -1
  19. package/esm/rlp-eip1559.d.mts +75 -0
  20. package/esm/rlp-eip1559.mjs +293 -0
  21. package/esm/secp256k1-scalar.d.mts +1 -1
  22. package/esm/secp256k1-scalar.mjs +14 -5
  23. package/esm/steel-mnemonic.d.mts +55 -0
  24. package/esm/steel-mnemonic.mjs +247 -0
  25. package/esm/ves-backup.d.mts +296 -0
  26. package/esm/ves-backup.mjs +1025 -0
  27. package/esm/x402-agent-guard.d.mts +111 -0
  28. package/esm/x402-agent-guard.mjs +780 -0
  29. package/lib/bip39-english-wordlist.cjs +33 -0
  30. package/lib/bip39-english-wordlist.d.cts +11 -0
  31. package/lib/constants.cjs +128 -0
  32. package/lib/constants.d.cts +66 -2
  33. package/lib/dkg.cjs +2 -2
  34. package/lib/index.cjs +249 -0
  35. package/lib/index.d.cts +11 -3
  36. package/lib/ocap-clear-signing.cjs +1176 -0
  37. package/lib/ocap-clear-signing.d.cts +125 -0
  38. package/lib/offline-ceremony.cjs +487 -0
  39. package/lib/offline-ceremony.d.cts +127 -0
  40. package/lib/ot.cjs +150 -15
  41. package/lib/ot.d.cts +7 -1
  42. package/lib/personal-vault.cjs +3725 -0
  43. package/lib/personal-vault.d.cts +1292 -0
  44. package/lib/personal.cjs +338 -0
  45. package/lib/personal.d.cts +10 -0
  46. package/lib/presign.cjs +1 -1
  47. package/lib/rlp-eip1559.cjs +303 -0
  48. package/lib/rlp-eip1559.d.cts +75 -0
  49. package/lib/secp256k1-scalar.cjs +14 -5
  50. package/lib/steel-mnemonic.cjs +253 -0
  51. package/lib/steel-mnemonic.d.cts +55 -0
  52. package/lib/ves-backup.cjs +1053 -0
  53. package/lib/ves-backup.d.cts +296 -0
  54. package/lib/x402-agent-guard.cjs +788 -0
  55. package/lib/x402-agent-guard.d.cts +111 -0
  56. package/package.json +6 -1
@@ -0,0 +1,55 @@
1
+ //#region src/steel-mnemonic.d.ts
2
+ /**
3
+ * Pure 3-Plate 24-Word Standard `BIP-39` Stainless-Steel Cold Backup (`design.md` §5.2):
4
+ * - ZERO human-memorized passphrases (`25th word`) anywhere in cold-backup encoding, decoding, or derivation.
5
+ * - Standard 256-bit entropy (`coldShareBytes32` in `[1, secp256k1.n - 1]`) + 8-bit `SHA-256` BIP-39 checksum
6
+ * -> 24 lowercase English BIP-39 words (`Plate A`, `Plate B`, `Plate C`).
7
+ * - Feldman index identification (`g(k) * G == Y_k`) and 24th-word 8-sibling `m/44'/60'/0'/0/0` decoy address
8
+ * enumeration for outgoing-nonce physical-burglar tripwires.
9
+ */
10
+ declare const BIP44_ETH_STANDARD_PATH: "m/44'/60'/0'/0/0";
11
+ declare function guardianIndexToPlateLabel(guardianIndex: number): string;
12
+ /**
13
+ * Encodes a 32-byte cold Shamir share (`1 <= scalar < secp256k1.n`) into 24 standard English BIP-39 words
14
+ * (`256` entropy bits + `8` SHA-256 checksum bits = `264` bits = `24 x 11` bits).
15
+ */
16
+ declare function encodeColdShareToBip39Words24(coldShareBytes32: Uint8Array): string[];
17
+ /**
18
+ * Decodes 24 standard English BIP-39 words into a validated 32-byte `secp256k1` scalar (`1 <= scalar < n`),
19
+ * verifying exact 24-word count (zero passphrases) and the 8-bit SHA-256 BIP-39 checksum.
20
+ */
21
+ declare function decodeBip39Words24ToColdShare(wordsInput: ReadonlyArray<string> | string): Uint8Array;
22
+ interface IdentifiedColdShare {
23
+ readonly guardianIndex: number;
24
+ readonly plateLabel: string;
25
+ readonly coldPublicShareComp33: Uint8Array;
26
+ }
27
+ /**
28
+ * Identifies which guardian index `k in 1..nCold` a physical 24-word cold share belongs to by
29
+ * evaluating the aggregated cold Feldman commitments `Y_k = \sum_{l=0}^{t_c-1} k^l C^{cold}_l`
30
+ * and checking `scalar * G == Y_k`. Fails closed if zero indices match (e.g. wrong 24th sibling word).
31
+ */
32
+ declare function identifyColdShareIndexViaFeldman(coldShareBytes32: Uint8Array, coldFeldmanCommitmentsComp33: ReadonlyArray<Uint8Array | string>, nCold: number): IdentifiedColdShare;
33
+ /**
34
+ * Derives the standard `m/44'/60'/0'/0/0` Ethereum EOA address (zero passphrase: salt = `"mnemonic"`)
35
+ * for a 24-word BIP-39 mnemonic so honeypot monitoring matches standard hardware/software wallets
36
+ * (`design.md` §5.2(2)).
37
+ */
38
+ declare function deriveBip44EthAddressFromWords24(wordsInput: ReadonlyArray<string> | string): string;
39
+ interface Bip39TwentyFourthSiblingEntry {
40
+ readonly tail3Bits: number;
41
+ readonly wordIndex: number;
42
+ readonly word24: string;
43
+ readonly words24: ReadonlyArray<string>;
44
+ readonly derivationPath: typeof BIP44_ETH_STANDARD_PATH;
45
+ readonly ethAddress: string;
46
+ readonly isValidColdScalar: boolean;
47
+ }
48
+ /**
49
+ * Given the first 23 standard BIP-39 words (`253` bits), enumerates all `2^3 = 8` checksum-valid
50
+ * 24th words (`3` entropy bits + `8` SHA-256 checksum bits) and derives each candidate's standard
51
+ * `m/44'/60'/0'/0/0` `0x...` Ethereum canary/honeypot address (`design.md` §5.2(2)).
52
+ */
53
+ declare function enumerateValid24thBip39Siblings(first23WordsInput: ReadonlyArray<string> | string): ReadonlyArray<Bip39TwentyFourthSiblingEntry>;
54
+ //#endregion
55
+ export { BIP44_ETH_STANDARD_PATH, Bip39TwentyFourthSiblingEntry, IdentifiedColdShare, decodeBip39Words24ToColdShare, deriveBip44EthAddressFromWords24, encodeColdShareToBip39Words24, enumerateValid24thBip39Siblings, guardianIndexToPlateLabel, identifyColdShareIndexViaFeldman };