@orbinum/sdk 2.1.0 → 3.0.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.
@@ -79,6 +79,16 @@ interface VaultConfigRecord {
79
79
  nextIndex: number;
80
80
  addedAt: number;
81
81
  }>;
82
+ /**
83
+ * Next index in the OUTGOING sequence — the ephemerals this wallet publishes
84
+ * on the notes it sends.
85
+ *
86
+ * Monotonic for the same reason as the others. Unlike `pairwiseCounterparties`
87
+ * this one is recoverable from chain data (the sender can predict every
88
+ * ephPk they published), so a restore rebuilds it instead of degrading to a
89
+ * random ephemeral — see `reserveOutgoingIndex`.
90
+ */
91
+ outgoingEphCounter?: number;
82
92
  createdAt: number;
83
93
  updatedAt: number;
84
94
  }
@@ -226,11 +236,10 @@ interface VaultStorage extends NoteStorage, NullifierCache, TxHistoryStore {
226
236
  /**
227
237
  * A fresh AES-GCM-256 device key.
228
238
  *
229
- * `extractable` defaults to false and should stay that way. Passing true is for
230
- * the platforms described above the ones that cannot persist a key handle and
231
- * must export raw bytes into a secure enclave. Anywhere a handle survives a
232
- * restart, an extractable key is strictly worse: the material becomes readable
233
- * by any code in the context.
239
+ * `extractable` defaults to false and should stay that way true is only for
240
+ * the platforms above, which cannot persist a handle and must export bytes into
241
+ * an enclave. Where a handle survives a restart, extractable is strictly worse:
242
+ * the material becomes readable by any code in the context.
234
243
  */
235
244
  declare function generateDeviceKey(extractable?: boolean): Promise<CryptoKey>;
236
245
  /**
@@ -251,12 +260,7 @@ interface DeviceKeyStore {
251
260
  load(): Promise<CryptoKey | null>;
252
261
  save(key: CryptoKey): Promise<void>;
253
262
  }
254
- /**
255
- * The device key, generating and persisting it on first use.
256
- *
257
- * Cached in memory per process: generating a second key would silently orphan
258
- * every secret encrypted under the first.
259
- */
263
+ /** The device key, generating and persisting it on first use. */
260
264
  declare function createDeviceKeyProvider(store: DeviceKeyStore): () => Promise<CryptoKey>;
261
265
 
262
266
  /**
@@ -79,6 +79,16 @@ interface VaultConfigRecord {
79
79
  nextIndex: number;
80
80
  addedAt: number;
81
81
  }>;
82
+ /**
83
+ * Next index in the OUTGOING sequence — the ephemerals this wallet publishes
84
+ * on the notes it sends.
85
+ *
86
+ * Monotonic for the same reason as the others. Unlike `pairwiseCounterparties`
87
+ * this one is recoverable from chain data (the sender can predict every
88
+ * ephPk they published), so a restore rebuilds it instead of degrading to a
89
+ * random ephemeral — see `reserveOutgoingIndex`.
90
+ */
91
+ outgoingEphCounter?: number;
82
92
  createdAt: number;
83
93
  updatedAt: number;
84
94
  }
@@ -226,11 +236,10 @@ interface VaultStorage extends NoteStorage, NullifierCache, TxHistoryStore {
226
236
  /**
227
237
  * A fresh AES-GCM-256 device key.
228
238
  *
229
- * `extractable` defaults to false and should stay that way. Passing true is for
230
- * the platforms described above the ones that cannot persist a key handle and
231
- * must export raw bytes into a secure enclave. Anywhere a handle survives a
232
- * restart, an extractable key is strictly worse: the material becomes readable
233
- * by any code in the context.
239
+ * `extractable` defaults to false and should stay that way true is only for
240
+ * the platforms above, which cannot persist a handle and must export bytes into
241
+ * an enclave. Where a handle survives a restart, extractable is strictly worse:
242
+ * the material becomes readable by any code in the context.
234
243
  */
235
244
  declare function generateDeviceKey(extractable?: boolean): Promise<CryptoKey>;
236
245
  /**
@@ -251,12 +260,7 @@ interface DeviceKeyStore {
251
260
  load(): Promise<CryptoKey | null>;
252
261
  save(key: CryptoKey): Promise<void>;
253
262
  }
254
- /**
255
- * The device key, generating and persisting it on first use.
256
- *
257
- * Cached in memory per process: generating a second key would silently orphan
258
- * every secret encrypted under the first.
259
- */
263
+ /** The device key, generating and persisting it on first use. */
260
264
  declare function createDeviceKeyProvider(store: DeviceKeyStore): () => Promise<CryptoKey>;
261
265
 
262
266
  /**
@@ -1 +1 @@
1
- export { d as DECRYPT_YIELD_EVERY, e as DecryptBatchResult, b as DecryptPool, f as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, g as KnownEphWindow, M as MAX_WORKERS, h as MatchSource, P as PAIRWISE_EPH_WINDOW, j as SELF_EPH_WINDOW, c as ScanKeys, W as WORKER_CRASHED, k as WorkerFactory, l as WorkerLike, m as WorkerMessage, n as clearKnownEphWindow, o as createDecryptPool, p as createMainThreadPool, q as createWorkerPool, r as decryptHintBatch, s as getKnownEphWindow } from '../../index-CLpM1984.mjs';
1
+ export { e as DECRYPT_YIELD_EVERY, f as DecryptBatchResult, c as DecryptPool, g as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, h as KnownEphWindow, M as MAX_WORKERS, O as OUTGOING_EPH_WINDOW, P as PAIRWISE_EPH_WINDOW, j as SELF_EPH_WINDOW, d as ScanKeys, b as SentNoteMatch, U as UnmatchedSentHint, W as WORKER_CRASHED, l as WorkerFactory, m as WorkerLike, n as WorkerMessage, o as clearKnownEphWindow, p as createDecryptPool, q as createMainThreadPool, r as createWorkerPool, s as decryptHintBatch, t as getKnownEphWindow } from '../../index-B-dbSIPN.mjs';
@@ -1 +1 @@
1
- export { d as DECRYPT_YIELD_EVERY, e as DecryptBatchResult, b as DecryptPool, f as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, g as KnownEphWindow, M as MAX_WORKERS, h as MatchSource, P as PAIRWISE_EPH_WINDOW, j as SELF_EPH_WINDOW, c as ScanKeys, W as WORKER_CRASHED, k as WorkerFactory, l as WorkerLike, m as WorkerMessage, n as clearKnownEphWindow, o as createDecryptPool, p as createMainThreadPool, q as createWorkerPool, r as decryptHintBatch, s as getKnownEphWindow } from '../../index-CLpM1984.js';
1
+ export { e as DECRYPT_YIELD_EVERY, f as DecryptBatchResult, c as DecryptPool, g as DecryptRequest, E as EMPTY_BATCH_RESULT, K as KnownEphEntry, h as KnownEphWindow, M as MAX_WORKERS, O as OUTGOING_EPH_WINDOW, P as PAIRWISE_EPH_WINDOW, j as SELF_EPH_WINDOW, d as ScanKeys, b as SentNoteMatch, U as UnmatchedSentHint, W as WORKER_CRASHED, l as WorkerFactory, m as WorkerLike, n as WorkerMessage, o as clearKnownEphWindow, p as createDecryptPool, q as createMainThreadPool, r as createWorkerPool, s as decryptHintBatch, t as getKnownEphWindow } from '../../index-B-dbSIPN.js';