@pasosdejesus/m 0.23.0 → 0.24.0

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 (163) hide show
  1. package/dist/CHANGELOG.md +47 -0
  2. package/dist/e2e/env.test.js +13 -0
  3. package/dist/e2e/env.test.js.map +1 -1
  4. package/dist/e2e/full-wallet.d.ts +41 -0
  5. package/dist/e2e/full-wallet.d.ts.map +1 -0
  6. package/dist/e2e/full-wallet.js +138 -0
  7. package/dist/e2e/full-wallet.js.map +1 -0
  8. package/dist/e2e/full-wallet.test.d.ts +2 -0
  9. package/dist/e2e/full-wallet.test.d.ts.map +1 -0
  10. package/dist/e2e/full-wallet.test.js +37 -0
  11. package/dist/e2e/full-wallet.test.js.map +1 -0
  12. package/dist/e2e/index.d.ts +5 -1
  13. package/dist/e2e/index.d.ts.map +1 -1
  14. package/dist/e2e/index.js +2 -0
  15. package/dist/e2e/index.js.map +1 -1
  16. package/dist/e2e/local-node.d.ts +22 -0
  17. package/dist/e2e/local-node.d.ts.map +1 -0
  18. package/dist/e2e/local-node.js +144 -0
  19. package/dist/e2e/local-node.js.map +1 -0
  20. package/dist/e2e/local-node.test.d.ts +2 -0
  21. package/dist/e2e/local-node.test.d.ts.map +1 -0
  22. package/dist/e2e/local-node.test.js +43 -0
  23. package/dist/e2e/local-node.test.js.map +1 -0
  24. package/dist/e2e/signer.test.d.ts +2 -0
  25. package/dist/e2e/signer.test.d.ts.map +1 -0
  26. package/dist/e2e/signer.test.js +57 -0
  27. package/dist/e2e/signer.test.js.map +1 -0
  28. package/dist/e2e/wallet-mock.d.ts +18 -3
  29. package/dist/e2e/wallet-mock.d.ts.map +1 -1
  30. package/dist/e2e/wallet-mock.js +22 -10
  31. package/dist/e2e/wallet-mock.js.map +1 -1
  32. package/dist/e2e/wallet-mock.test.js +7 -7
  33. package/dist/e2e/wallet-mock.test.js.map +1 -1
  34. package/dist/tasks/wallet.d.ts.map +1 -1
  35. package/dist/tasks/wallet.js +14 -25
  36. package/dist/tasks/wallet.js.map +1 -1
  37. package/dist/test-utils/index.d.ts +1 -0
  38. package/dist/test-utils/index.d.ts.map +1 -1
  39. package/dist/test-utils/index.js +1 -0
  40. package/dist/test-utils/index.js.map +1 -1
  41. package/dist/test-utils/wallet-mocks.d.ts +44 -0
  42. package/dist/test-utils/wallet-mocks.d.ts.map +1 -0
  43. package/dist/test-utils/wallet-mocks.js +114 -0
  44. package/dist/test-utils/wallet-mocks.js.map +1 -0
  45. package/dist/test-utils/wallet-mocks.test.d.ts +2 -0
  46. package/dist/test-utils/wallet-mocks.test.d.ts.map +1 -0
  47. package/dist/test-utils/wallet-mocks.test.js +55 -0
  48. package/dist/test-utils/wallet-mocks.test.js.map +1 -0
  49. package/dist/test-utils/wallet-setup.d.ts +2 -0
  50. package/dist/test-utils/wallet-setup.d.ts.map +1 -0
  51. package/dist/test-utils/wallet-setup.js +23 -0
  52. package/dist/test-utils/wallet-setup.js.map +1 -0
  53. package/dist/test-utils/wallet-setup.test.d.ts +2 -0
  54. package/dist/test-utils/wallet-setup.test.d.ts.map +1 -0
  55. package/dist/test-utils/wallet-setup.test.js +18 -0
  56. package/dist/test-utils/wallet-setup.test.js.map +1 -0
  57. package/dist/wallet/biometric.d.ts +33 -0
  58. package/dist/wallet/biometric.d.ts.map +1 -0
  59. package/dist/wallet/biometric.js +88 -0
  60. package/dist/wallet/biometric.js.map +1 -0
  61. package/dist/wallet/biometric.test.d.ts +2 -0
  62. package/dist/wallet/biometric.test.d.ts.map +1 -0
  63. package/dist/wallet/biometric.test.js +44 -0
  64. package/dist/wallet/biometric.test.js.map +1 -0
  65. package/dist/wallet/crypto.d.ts +42 -0
  66. package/dist/wallet/crypto.d.ts.map +1 -0
  67. package/dist/wallet/crypto.js +127 -0
  68. package/dist/wallet/crypto.js.map +1 -0
  69. package/dist/wallet/crypto.test.d.ts +2 -0
  70. package/dist/wallet/crypto.test.d.ts.map +1 -0
  71. package/dist/wallet/crypto.test.js +34 -0
  72. package/dist/wallet/crypto.test.js.map +1 -0
  73. package/dist/wallet/destinations.d.ts +20 -0
  74. package/dist/wallet/destinations.d.ts.map +1 -0
  75. package/dist/wallet/destinations.js +98 -0
  76. package/dist/wallet/destinations.js.map +1 -0
  77. package/dist/wallet/destinations.test.d.ts +2 -0
  78. package/dist/wallet/destinations.test.d.ts.map +1 -0
  79. package/dist/wallet/destinations.test.js +34 -0
  80. package/dist/wallet/destinations.test.js.map +1 -0
  81. package/dist/wallet/external-provider.d.ts +33 -0
  82. package/dist/wallet/external-provider.d.ts.map +1 -0
  83. package/dist/wallet/external-provider.js +108 -0
  84. package/dist/wallet/external-provider.js.map +1 -0
  85. package/dist/wallet/external-provider.test.d.ts +2 -0
  86. package/dist/wallet/external-provider.test.d.ts.map +1 -0
  87. package/dist/wallet/external-provider.test.js +44 -0
  88. package/dist/wallet/external-provider.test.js.map +1 -0
  89. package/dist/wallet/index.d.ts +14 -0
  90. package/dist/wallet/index.d.ts.map +1 -0
  91. package/dist/wallet/index.js +24 -0
  92. package/dist/wallet/index.js.map +1 -0
  93. package/dist/wallet/indexeddb.test.d.ts +2 -0
  94. package/dist/wallet/indexeddb.test.d.ts.map +1 -0
  95. package/dist/wallet/indexeddb.test.js +28 -0
  96. package/dist/wallet/indexeddb.test.js.map +1 -0
  97. package/dist/wallet/kdf.test.d.ts +2 -0
  98. package/dist/wallet/kdf.test.d.ts.map +1 -0
  99. package/dist/wallet/kdf.test.js +54 -0
  100. package/dist/wallet/kdf.test.js.map +1 -0
  101. package/dist/wallet/provider.d.ts +38 -0
  102. package/dist/wallet/provider.d.ts.map +1 -0
  103. package/dist/wallet/provider.js +285 -0
  104. package/dist/wallet/provider.js.map +1 -0
  105. package/dist/wallet/provider.test.d.ts +2 -0
  106. package/dist/wallet/provider.test.d.ts.map +1 -0
  107. package/dist/wallet/provider.test.js +170 -0
  108. package/dist/wallet/provider.test.js.map +1 -0
  109. package/dist/wallet/signer.d.ts +55 -0
  110. package/dist/wallet/signer.d.ts.map +1 -0
  111. package/dist/wallet/signer.js +91 -0
  112. package/dist/wallet/signer.js.map +1 -0
  113. package/dist/wallet/signer.test.d.ts +2 -0
  114. package/dist/wallet/signer.test.d.ts.map +1 -0
  115. package/dist/wallet/signer.test.js +62 -0
  116. package/dist/wallet/signer.test.js.map +1 -0
  117. package/dist/wallet/siwe.d.ts +2 -0
  118. package/dist/wallet/siwe.d.ts.map +1 -0
  119. package/dist/wallet/siwe.js +5 -0
  120. package/dist/wallet/siwe.js.map +1 -0
  121. package/dist/wallet/storage/file.d.ts +19 -0
  122. package/dist/wallet/storage/file.d.ts.map +1 -0
  123. package/dist/wallet/storage/file.js +48 -0
  124. package/dist/wallet/storage/file.js.map +1 -0
  125. package/dist/wallet/storage/idb.d.ts +25 -0
  126. package/dist/wallet/storage/idb.d.ts.map +1 -0
  127. package/dist/wallet/storage/idb.js +58 -0
  128. package/dist/wallet/storage/idb.js.map +1 -0
  129. package/dist/wallet/storage/index.d.ts +5 -0
  130. package/dist/wallet/storage/index.d.ts.map +1 -0
  131. package/dist/wallet/storage/index.js +4 -0
  132. package/dist/wallet/storage/index.js.map +1 -0
  133. package/dist/wallet/storage/indexeddb.d.ts +8 -0
  134. package/dist/wallet/storage/indexeddb.d.ts.map +1 -0
  135. package/dist/wallet/storage/indexeddb.js +18 -0
  136. package/dist/wallet/storage/indexeddb.js.map +1 -0
  137. package/dist/wallet/storage/memory.d.ts +10 -0
  138. package/dist/wallet/storage/memory.d.ts.map +1 -0
  139. package/dist/wallet/storage/memory.js +19 -0
  140. package/dist/wallet/storage/memory.js.map +1 -0
  141. package/dist/wallet/storage.test.d.ts +2 -0
  142. package/dist/wallet/storage.test.d.ts.map +1 -0
  143. package/dist/wallet/storage.test.js +103 -0
  144. package/dist/wallet/storage.test.js.map +1 -0
  145. package/dist/wallet/types.d.ts +69 -0
  146. package/dist/wallet/types.d.ts.map +1 -0
  147. package/dist/wallet/types.js +6 -0
  148. package/dist/wallet/types.js.map +1 -0
  149. package/dist/wallet/wallet.d.ts +81 -0
  150. package/dist/wallet/wallet.d.ts.map +1 -0
  151. package/dist/wallet/wallet.js +358 -0
  152. package/dist/wallet/wallet.js.map +1 -0
  153. package/dist/wallet/wallet.test.d.ts +2 -0
  154. package/dist/wallet/wallet.test.d.ts.map +1 -0
  155. package/dist/wallet/wallet.test.js +150 -0
  156. package/dist/wallet/wallet.test.js.map +1 -0
  157. package/dist/wallet/web-authn.d.ts +78 -0
  158. package/dist/wallet/web-authn.d.ts.map +1 -0
  159. package/dist/wallet/web-authn.js +250 -0
  160. package/dist/wallet/web-authn.js.map +1 -0
  161. package/package.json +14 -4
  162. package/src/e2e/README.md +51 -0
  163. package/src/wallet/README.md +96 -0
@@ -0,0 +1,69 @@
1
+ export type ChainName = 'celo' | 'celoSepolia';
2
+ export declare const CHAIN_IDS: Record<ChainName, number>;
3
+ export declare const DEFAULT_CHAIN: ChainName;
4
+ export interface WalletInfo {
5
+ address: `0x${string}`;
6
+ chain: ChainName;
7
+ createdAt: number;
8
+ }
9
+ export interface StoredWallet {
10
+ version: 1;
11
+ address: `0x${string}`;
12
+ chain: ChainName;
13
+ createdAt: number;
14
+ kdf: {
15
+ name: 'PBKDF2';
16
+ hash: 'SHA-256';
17
+ iterations: number;
18
+ salt: string;
19
+ };
20
+ cipher: {
21
+ name: 'AES-GCM';
22
+ iv: string;
23
+ data: string;
24
+ };
25
+ }
26
+ export interface StorageAdapter {
27
+ get(): Promise<StoredWallet | null>;
28
+ set(record: StoredWallet): Promise<void>;
29
+ delete(): Promise<void>;
30
+ has(): Promise<boolean>;
31
+ }
32
+ export interface CreateWalletOptions {
33
+ password: string;
34
+ chain?: ChainName;
35
+ storage?: StorageAdapter;
36
+ }
37
+ export interface ImportWalletOptions {
38
+ mnemonic?: string;
39
+ privateKey?: `0x${string}`;
40
+ password: string;
41
+ chain?: ChainName;
42
+ storage?: StorageAdapter;
43
+ }
44
+ export interface InAppWallet {
45
+ address: `0x${string}`;
46
+ chain: ChainName;
47
+ createdAt: number;
48
+ account: {
49
+ address: `0x${string}`;
50
+ signMessage(args: {
51
+ message: string | {
52
+ raw: `0x${string}`;
53
+ };
54
+ }): Promise<`0x${string}`>;
55
+ signTransaction(tx: Record<string, unknown>): Promise<`0x${string}`>;
56
+ signTypedData(typedData: Record<string, unknown>): Promise<`0x${string}`>;
57
+ };
58
+ }
59
+ export interface Eip1193RequestArgs {
60
+ method: string;
61
+ params?: unknown[] | Record<string, unknown>;
62
+ }
63
+ export type Eip1193Provider = {
64
+ request(args: Eip1193RequestArgs): Promise<unknown>;
65
+ on?(event: string, handler: (...args: unknown[]) => void): void;
66
+ removeListener?(event: string, handler: (...args: unknown[]) => void): void;
67
+ isPdJWallet?: true;
68
+ };
69
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/wallet/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,aAAa,CAAA;AAE9C,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAG/C,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,SAAyB,CAAA;AAErD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,KAAK,EAAE,SAAS,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,CAAC,CAAA;IACV,OAAO,EAAE,KAAK,MAAM,EAAE,CAAA;IACtB,KAAK,EAAE,SAAS,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE;QACH,IAAI,EAAE,QAAQ,CAAA;QACd,IAAI,EAAE,SAAS,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,MAAM,EAAE;QACN,IAAI,EAAE,SAAS,CAAA;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AO,CAAC,KAAK,MAAM,EAAE,CAAC,CAAA;KAC1E,CAAA;CACF;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC7C;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,IAAI,CAAA;IAC/D,cAAc,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,GAAG,IAAI,CAAA;IAC3E,WAAW,CAAC,EAAE,IAAI,CAAA;CACnB,CAAA"}
@@ -0,0 +1,6 @@
1
+ export const CHAIN_IDS = {
2
+ celo: 42220,
3
+ celoSepolia: 11142220,
4
+ };
5
+ export const DEFAULT_CHAIN = 'celoSepolia';
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/wallet/types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,QAAQ;CACtB,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAc,aAAa,CAAA"}
@@ -0,0 +1,81 @@
1
+ import { accountFromPrivateKey, type PrivateKey } from './signer.js';
2
+ import { type ChainName, type CreateWalletOptions, type ImportWalletOptions, type StorageAdapter, type WalletInfo } from './types.js';
3
+ interface UnlockedState {
4
+ privateKey: PrivateKey;
5
+ account: ReturnType<typeof accountFromPrivateKey>;
6
+ info: WalletInfo;
7
+ }
8
+ /**
9
+ * Accepted secret (R-#251): a password/passphrase of at least 8 printable
10
+ * characters. Nothing is in production yet, so the old 6-digit PIN is not
11
+ * supported (discarded feature). `unlockWallet` does not validate: this guards
12
+ * creation, import, export and the biometric seal.
13
+ */
14
+ export declare function isValidPassword(password: string): boolean;
15
+ export declare function createWallet(options: CreateWalletOptions): Promise<{
16
+ walletInfo: WalletInfo;
17
+ mnemonic: string;
18
+ }>;
19
+ export declare function importWallet(options: ImportWalletOptions): Promise<WalletInfo>;
20
+ export declare function unlockWallet(password: string, storage?: StorageAdapter): Promise<WalletInfo>;
21
+ /**
22
+ * Layer L2 (https://github.com/pasosdeJesus/learn.tg/issues/246): registers a
23
+ * passkey and stores the private key **sealed with its PRF secret**, so the user
24
+ * can unlock with Face ID / fingerprint instead of typing the password. The
25
+ * password record is untouched and keeps working as fallback and recovery.
26
+ *
27
+ * Throws `no-webauthn`, `no-prf` or the WebAuthn error when the device cannot do
28
+ * it; callers degrade silently.
29
+ */
30
+ export declare function enableBiometricUnlock(password: string, storage?: StorageAdapter): Promise<{
31
+ address: string;
32
+ }>;
33
+ /** Whether this device has a sealed key waiting for a biometric unlock. */
34
+ export declare function hasBiometricUnlock(storage?: StorageAdapter): Promise<boolean>;
35
+ /**
36
+ * Unlocks with one user-verified WebAuthn gesture. Throws `auth-failed` when the
37
+ * assertion, the PRF result or the ciphertext does not check out, and
38
+ * `no-biometric` when there is nothing sealed for this wallet.
39
+ */
40
+ export declare function unlockWithBiometric(storage?: StorageAdapter): Promise<WalletInfo>;
41
+ /** Forgets the biometric unlock (the password keeps working). */
42
+ export declare function disableBiometricUnlock(): Promise<void>;
43
+ /**
44
+ * Generation bumped on every lock (R-#246 §14 item 3). The provider captures it
45
+ * before asking for the gesture and aborts the signature if it changed meanwhile:
46
+ * a transaction approved before the wallet locked must not be broadcast after.
47
+ */
48
+ export declare function currentLockEpoch(): number;
49
+ export declare function lockWallet(): Promise<void>;
50
+ export declare function deleteWallet(storage?: StorageAdapter): Promise<void>;
51
+ export declare function hasWallet(storage?: StorageAdapter): Promise<boolean>;
52
+ export declare function getWalletInfo(storage?: StorageAdapter): Promise<WalletInfo | null>;
53
+ /**
54
+ * Cambia la red de la billetera in-app (Celo Sepolia ↔ Celo).
55
+ *
56
+ * La llave es la misma en cualquier red: lo único que cambia es la red que la billetera
57
+ * declara (`eth_chainId`, `net_version` y el `chainId` de las transacciones). Antes la
58
+ * billetera quedaba atada a la red con la que se creó y `wallet_switchEthereumChain`
59
+ * respondía 4902, así que una billetera creada en el sitio de desarrollo (Celo Sepolia) no
60
+ * podía pagar en producción (Celo); reporte del operador, 2026-09-27.
61
+ *
62
+ * No toca el secreto cifrado (el sello biométrico sigue válido: solo cubre `cipher`/`kdf`).
63
+ */
64
+ export declare function setWalletChain(chain: ChainName, storage?: StorageAdapter): Promise<WalletInfo>;
65
+ /**
66
+ * password-protected export. Both read the stored record with the password and have no
67
+ * side effects on the session (the wallet may stay locked). The caller is
68
+ * responsible for whatever it does with the secret.
69
+ */
70
+ export declare function exportPrivateKey(password: string, storage?: StorageAdapter): Promise<`0x${string}`>;
71
+ export declare function exportMnemonic(password: string, storage?: StorageAdapter): Promise<string>;
72
+ export declare function isUnlocked(): boolean;
73
+ export declare function getUnlockedAccount(): UnlockedState['account'] | null;
74
+ export declare function getUnlockedInfo(): WalletInfo | null;
75
+ export declare function signMessage(message: string | {
76
+ raw: `0x${string}`;
77
+ }): Promise<`0x${string}`>;
78
+ export declare function signTypedData(typedData: Parameters<UnlockedState['account']['signTypedData']>[0]): Promise<`0x${string}`>;
79
+ export declare function signTransaction(transaction: Parameters<UnlockedState['account']['signTransaction']>[0]): Promise<`0x${string}`>;
80
+ export {};
81
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,qBAAqB,EAKrB,KAAK,UAAU,EAChB,MAAM,aAAa,CAAA;AACpB,OAAO,E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AAC,CAAC,CAAC,CAAC,GACtE,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC,CAExB"}
@@ -0,0 +1,358 @@
1
+ import { decryptSecret, encryptSecret, fromBase64, calibrateIterations, KDF_ITERATIONS_FLOOR } from './crypto.js';
2
+ import { IndexedDBStorage } from './storage/indexeddb.js';
3
+ import { forgetBiometricCredential, newPrfSalt, readBiometricRecord, sealWithPrfSecret, unsealWithPrfSecret, wipePrfSecret, writeBiometricRecord, } from './biometric.js';
4
+ import { clearUserVerification, createPrfCredential, detectPlatformSupport, evaluatePrf } from './web-authn.js';
5
+ import { accountFromPrivateKey, assertValidMnemonic, newMnemonic, normalizeMnemonic, privateKeyFromMnemonic, } from './signer.js';
6
+ import { CHAIN_IDS, DEFAULT_CHAIN, } from './types.js';
7
+ function serializeSecret(privateKey, mnemonic) {
8
+ const secret = mnemonic
9
+ ? { v: 1, privateKey, mnemonic }
10
+ : { v: 1, privateKey };
11
+ return JSON.stringify(secret);
12
+ }
13
+ function parseSecret(plaintext) {
14
+ // Compatibility: records created before this format stored the bare key.
15
+ if (!plaintext.trimStart().startsWith('{')) {
16
+ return { v: 1, privateKey: plaintext };
17
+ }
18
+ const parsed = JSON.parse(plaintext);
19
+ if (!parsed.privateKey)
20
+ throw new Error('Corrupted wallet data');
21
+ return { v: 1, privateKey: parsed.privateKey, mnemonic: parsed.mnemonic };
22
+ }
23
+ async function decryptRecord(record, password) {
24
+ const plaintext = await decryptSecret({ kdf: record.kdf, cipher: record.cipher }, password);
25
+ return parseSecret(plaintext);
26
+ }
27
+ let unlocked = null;
28
+ /**
29
+ * Work factor for this device, measured once per session (R-#251). The count is
30
+ * stored in the record, so it is only needed when writing one.
31
+ */
32
+ let calibratedIterations = null;
33
+ async function targetIterations() {
34
+ if (calibratedIterations !== null)
35
+ return calibratedIterations;
36
+ try {
37
+ calibratedIterations = await calibrateIterations();
38
+ }
39
+ catch {
40
+ calibratedIterations = KDF_ITERATIONS_FLOOR;
41
+ }
42
+ return calibratedIterations;
43
+ }
44
+ /**
45
+ * R-#251: si el registro quedó con un factor de trabajo por debajo del que este
46
+ * dispositivo puede sostener, se vuelve a cifrar al desbloquear (el texto plano está
47
+ * en memoria justo entonces). Nunca impide desbloquear.
48
+ */
49
+ async function upgradeRecordIfNeeded(adapter, record, secret, password) {
50
+ try {
51
+ const target = await targetIterations();
52
+ if (!Number.isFinite(record.kdf.iterations) || record.kdf.iterations >= target)
53
+ return;
54
+ const upgraded = await encryptSecret(serializeSecret(secret.privateKey, secret.mnemonic), password, target);
55
+ await adapter.set(buildRecord(record.address, record.chain, record.createdAt, upgraded));
56
+ }
57
+ catch {
58
+ // el registro anterior sigue siendo válido y desbloqueable
59
+ }
60
+ }
61
+ function browserStorage() {
62
+ const idb = globalThis.indexedDB;
63
+ if (!idb) {
64
+ throw new Error('No storage available: pass a StorageAdapter (IndexedDBStorage is only available in the browser)');
65
+ }
66
+ return new IndexedDBStorage();
67
+ }
68
+ function resolveStorage(storage) {
69
+ return storage ?? browserStorage();
70
+ }
71
+ /**
72
+ * Accepted secret (R-#251): a password/passphrase of at least 8 printable
73
+ * characters. Nothing is in production yet, so the old 6-digit PIN is not
74
+ * supported (discarded feature). `unlockWallet` does not validate: this guards
75
+ * creation, import, export and the biometric seal.
76
+ */
77
+ export function isValidPassword(password) {
78
+ if (typeof password !== 'string')
79
+ return false;
80
+ if (password.trim().length < 8)
81
+ return false;
82
+ // Sin caracteres de control.
83
+ return !/[\u0000-\u001f\u007f]/.test(password);
84
+ }
85
+ function assertPassword(password) {
86
+ if (!isValidPassword(password)) {
87
+ throw new Error('The password must have at least 8 characters');
88
+ }
89
+ }
90
+ function assertChain(chain) {
91
+ const value = chain ?? DEFAULT_CHAIN;
92
+ if (!(value in CHAIN_IDS))
93
+ throw new Error(`Unsupported chain: ${String(chain)}`);
94
+ return value;
95
+ }
96
+ function buildRecord(address, chain, createdAt, secret) {
97
+ return { version: 1, address, chain, createdAt, kdf: secret.kdf, cipher: secret.cipher };
98
+ }
99
+ async function persist(storage, privateKey, chain, password, mnemonic) {
100
+ const account = accountFromPrivateKey(privateKey);
101
+ const createdAt = Date.now();
102
+ const secret = await encryptSecret(serializeSecret(privateKey, mnemonic), password, await targetIterations());
103
+ const info = { address: account.address, chain, createdAt };
104
+ await storage.set(buildRecord(info.address, chain, createdAt, secret));
105
+ unlocked = { privateKey, account, info };
106
+ return info;
107
+ }
108
+ export async function createWallet(options) {
109
+ assertPassword(options.password);
110
+ const chain = assertChain(options.chain);
111
+ const storage = resolveStorage(options.storage);
112
+ const mnemonic = newMnemonic();
113
+ const privateKey = privateKeyFromMnemonic(mnemonic);
114
+ const walletInfo = await persist(storage, privateKey, chain, options.password, mnemonic);
115
+ return { walletInfo, mnemonic };
116
+ }
117
+ export async function importWallet(options) {
118
+ assertPassword(options.password);
119
+ if (!options.mnemonic && !options.privateKey) {
120
+ throw new Error('Provide a mnemonic or a private key');
121
+ }
122
+ const chain = assertChain(options.chain);
123
+ const storage = resolveStorage(options.storage);
124
+ const mnemonic = options.mnemonic ? normalizeMnemonic(options.mnemonic) : undefined;
125
+ // `mnemonicToSeedSync` does not validate: a phrase with a typo would become a
126
+ // different (and empty) wallet without any warning.
127
+ if (mnemonic)
128
+ await assertValidMnemonic(mnemonic);
129
+ const privateKey = mnemonic
130
+ ? privateKeyFromMnemonic(mnemonic)
131
+ : options.privateKey;
132
+ return persist(storage, privateKey, chain, options.password, mnemonic);
133
+ }
134
+ export async function unlockWallet(password, storage) {
135
+ const adapter = resolveStorage(storage);
136
+ const record = await adapter.get();
137
+ if (!record)
138
+ throw new Error('There is no in-app wallet to unlock');
139
+ const secret = await decryptRecord(record, password);
140
+ const privateKey = secret.privateKey;
141
+ const account = accountFromPrivateKey(privateKey);
142
+ if (account.address.toLowerCase() !== record.address.toLowerCase()) {
143
+ throw new Error('The stored wallet does not match the decrypted key');
144
+ }
145
+ const info = { address: record.address, chain: record.chain, createdAt: record.createdAt };
146
+ unlocked = { privateKey, account, info };
147
+ // R-#251: re-cifrado silencioso si el registro quedó por debajo del objetivo.
148
+ await upgradeRecordIfNeeded(adapter, record, secret, password);
149
+ return info;
150
+ }
151
+ /**
152
+ * Layer L2 (https://github.com/pasosdeJesus/learn.tg/issues/246): registers a
153
+ * passkey and stores the private key **sealed with its PRF secret**, so the user
154
+ * can unlock with Face ID / fingerprint instead of typing the password. The
155
+ * password record is untouched and keeps working as fallback and recovery.
156
+ *
157
+ * Throws `no-webauthn`, `no-prf` or the WebAuthn error when the device cannot do
158
+ * it; callers degrade silently.
159
+ */
160
+ export async function enableBiometricUnlock(password, storage) {
161
+ assertPassword(password);
162
+ const adapter = resolveStorage(storage);
163
+ const record = await adapter.get();
164
+ if (!record)
165
+ throw new Error('There is no in-app wallet to seal');
166
+ const support = await detectPlatformSupport();
167
+ if (!support.webauthn || !support.userVerifying)
168
+ throw new Error('no-webauthn');
169
+ // The password is required on purpose: the passkey must wrap a key the user owns.
170
+ const { privateKey } = await decryptRecord(record, password);
171
+ if (accountFromPrivateKey(privateKey).address.toLowerCase() !== record.address.toLowerCase()) {
172
+ throw new Error('The stored wallet does not match the decrypted key');
173
+ }
174
+ const credential = await createPrfCredential(record.address);
175
+ if (!credential.prfEnabled)
176
+ throw new Error('no-prf');
177
+ const prfSalt = newPrfSalt();
178
+ const prfSecret = await evaluatePrf(credential.credentialId, prfSalt);
179
+ if (!prfSecret) {
180
+ throw new Error('no-prf');
181
+ }
182
+ try {
183
+ const sealed = await sealWithPrfSecret(prfSecret, prfSalt, privateKey, {
184
+ address: record.address,
185
+ credentialId: credential.credentialId,
186
+ });
187
+ await writeBiometricRecord(sealed);
188
+ }
189
+ finally {
190
+ wipePrfSecret(prfSecret);
191
+ }
192
+ // El password ya se verificó: dejar la billetera lista evita pedirlo dos veces.
193
+ const account = accountFromPrivateKey(privateKey);
194
+ unlocked = {
195
+ privateKey,
196
+ account,
197
+ info: { address: record.address, chain: record.chain, createdAt: record.createdAt },
198
+ };
199
+ return { address: record.address };
200
+ }
201
+ /** Whether this device has a sealed key waiting for a biometric unlock. */
202
+ export async function hasBiometricUnlock(storage) {
203
+ const sealed = await readBiometricRecord().catch(() => null);
204
+ if (!sealed)
205
+ return false;
206
+ const adapter = resolveStorage(storage);
207
+ const record = await adapter.get().catch(() => null);
208
+ return !!record && record.address.toLowerCase() === sealed.address.toLowerCase();
209
+ }
210
+ /**
211
+ * Unlocks with one user-verified WebAuthn gesture. Throws `auth-failed` when the
212
+ * assertion, the PRF result or the ciphertext does not check out, and
213
+ * `no-biometric` when there is nothing sealed for this wallet.
214
+ */
215
+ export async function unlockWithBiometric(storage) {
216
+ const sealed = await readBiometricRecord().catch(() => null);
217
+ if (!sealed)
218
+ throw new Error('no-biometric');
219
+ const adapter = resolveStorage(storage);
220
+ const record = await adapter.get();
221
+ if (!record || record.address.toLowerCase() !== sealed.address.toLowerCase()) {
222
+ throw new Error('no-biometric');
223
+ }
224
+ const prfSecret = await evaluatePrf(sealed.credentialId, fromBase64(sealed.prfSalt));
225
+ if (!prfSecret)
226
+ throw new Error('auth-failed');
227
+ let privateKey;
228
+ try {
229
+ privateKey = await unsealWithPrfSecret(prfSecret, sealed);
230
+ }
231
+ finally {
232
+ wipePrfSecret(prfSecret);
233
+ }
234
+ const account = accountFromPrivateKey(privateKey);
235
+ if (account.address.toLowerCase() !== record.address.toLowerCase()) {
236
+ throw new Error('auth-failed');
237
+ }
238
+ const info = { address: record.address, chain: record.chain, createdAt: record.createdAt };
239
+ unlocked = { privateKey, account, info };
240
+ return info;
241
+ }
242
+ /** Forgets the biometric unlock (the password keeps working). */
243
+ export async function disableBiometricUnlock() {
244
+ // R-#246 §14 item 1: además de borrar el sello, se avisa al autenticador para que
245
+ // la passkey no quede huérfana en la lista del sistema.
246
+ await forgetBiometricCredential();
247
+ }
248
+ let lockEpoch = 0;
249
+ /**
250
+ * Generation bumped on every lock (R-#246 §14 item 3). The provider captures it
251
+ * before asking for the gesture and aborts the signature if it changed meanwhile:
252
+ * a transaction approved before the wallet locked must not be broadcast after.
253
+ */
254
+ export function currentLockEpoch() {
255
+ return lockEpoch;
256
+ }
257
+ export async function lockWallet() {
258
+ lockEpoch++;
259
+ unlocked = null;
260
+ // Un bloqueo vuelve a pedir el gesto en el próximo movimiento de fondos.
261
+ clearUserVerification();
262
+ }
263
+ export async function deleteWallet(storage) {
264
+ const adapter = resolveStorage(storage);
265
+ await adapter.delete();
266
+ lockEpoch++;
267
+ unlocked = null;
268
+ clearUserVerification();
269
+ // The sealed copy belongs to a wallet that no longer exists (and the passkey is
270
+ // signalled as gone, R-#246 §14 item 1).
271
+ await forgetBiometricCredential();
272
+ }
273
+ export async function hasWallet(storage) {
274
+ const adapter = resolveStorage(storage);
275
+ return adapter.has();
276
+ }
277
+ export async function getWalletInfo(storage) {
278
+ const adapter = resolveStorage(storage);
279
+ const record = await adapter.get();
280
+ if (!record)
281
+ return null;
282
+ return { address: record.address, chain: record.chain, createdAt: record.createdAt };
283
+ }
284
+ /**
285
+ * Cambia la red de la billetera in-app (Celo Sepolia ↔ Celo).
286
+ *
287
+ * La llave es la misma en cualquier red: lo único que cambia es la red que la billetera
288
+ * declara (`eth_chainId`, `net_version` y el `chainId` de las transacciones). Antes la
289
+ * billetera quedaba atada a la red con la que se creó y `wallet_switchEthereumChain`
290
+ * respondía 4902, así que una billetera creada en el sitio de desarrollo (Celo Sepolia) no
291
+ * podía pagar en producción (Celo); reporte del operador, 2026-09-27.
292
+ *
293
+ * No toca el secreto cifrado (el sello biométrico sigue válido: solo cubre `cipher`/`kdf`).
294
+ */
295
+ export async function setWalletChain(chain, storage) {
296
+ const adapter = resolveStorage(storage);
297
+ const record = await adapter.get();
298
+ if (!record)
299
+ throw new Error('There is no in-app wallet');
300
+ const nextChain = assertChain(chain);
301
+ const info = { address: record.address, chain: nextChain, createdAt: record.createdAt };
302
+ if (record.chain !== nextChain)
303
+ await adapter.set({ ...record, chain: nextChain });
304
+ // La sesión desbloqueada tiene que ver la red nueva sin volver a desbloquear.
305
+ if (unlocked)
306
+ unlocked = { ...unlocked, info };
307
+ return info;
308
+ }
309
+ /**
310
+ * password-protected export. Both read the stored record with the password and have no
311
+ * side effects on the session (the wallet may stay locked). The caller is
312
+ * responsible for whatever it does with the secret.
313
+ */
314
+ export async function exportPrivateKey(password, storage) {
315
+ assertPassword(password);
316
+ const adapter = resolveStorage(storage);
317
+ const record = await adapter.get();
318
+ if (!record)
319
+ throw new Error('There is no in-app wallet to export');
320
+ const secret = await decryptRecord(record, password);
321
+ return secret.privateKey;
322
+ }
323
+ export async function exportMnemonic(password, storage) {
324
+ assertPassword(password);
325
+ const adapter = resolveStorage(storage);
326
+ const record = await adapter.get();
327
+ if (!record)
328
+ throw new Error('There is no in-app wallet to export');
329
+ const secret = await decryptRecord(record, password);
330
+ if (!secret.mnemonic) {
331
+ throw new Error('This wallet was imported from a private key: it has no recovery phrase');
332
+ }
333
+ return secret.mnemonic;
334
+ }
335
+ export function isUnlocked() {
336
+ return unlocked !== null;
337
+ }
338
+ export function getUnlockedAccount() {
339
+ return unlocked?.account ?? null;
340
+ }
341
+ export function getUnlockedInfo() {
342
+ return unlocked?.info ?? null;
343
+ }
344
+ function requireUnlocked() {
345
+ if (!unlocked)
346
+ throw new Error('The in-app wallet is locked');
347
+ return unlocked;
348
+ }
349
+ export async function signMessage(message) {
350
+ return requireUnlocked().account.signMessage({ message });
351
+ }
352
+ export async function signTypedData(typedData) {
353
+ return requireUnlocked().account.signTypedData(typedData);
354
+ }
355
+ export async function signTransaction(transaction) {
356
+ return requireUnlocked().account.signTransaction(transaction);
357
+ }
358
+ //# sourceMappingURL=wallet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;A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