@orbinum/sdk 2.1.0 → 3.0.1
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.
- package/README.md +15 -18
- package/dist/adapters/indexeddb/index.d.mts +10 -10
- package/dist/adapters/indexeddb/index.d.ts +10 -10
- package/dist/{chunk-VYKKBXOE.mjs → chunk-54HFH63J.mjs} +493 -256
- package/dist/{index-CLpM1984.d.mts → index-B-dbSIPN.d.mts} +209 -52
- package/dist/{index-CLpM1984.d.ts → index-B-dbSIPN.d.ts} +209 -52
- package/dist/index.d.mts +904 -485
- package/dist/index.d.ts +904 -485
- package/dist/index.js +958 -501
- package/dist/index.mjs +540 -302
- package/dist/{secretStore-CF6Nse__.d.ts → secretStore-CCYo4hna.d.mts} +15 -11
- package/dist/{secretStore-CF6Nse__.d.mts → secretStore-CCYo4hna.d.ts} +15 -11
- package/dist/wallet/worker/index.d.mts +1 -1
- package/dist/wallet/worker/index.d.ts +1 -1
- package/dist/wallet/worker/index.js +428 -111
- package/dist/wallet/worker/index.mjs +3 -1
- package/package.json +1 -1
|
@@ -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
|
|
230
|
-
* the platforms
|
|
231
|
-
*
|
|
232
|
-
*
|
|
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
|
|
230
|
-
* the platforms
|
|
231
|
-
*
|
|
232
|
-
*
|
|
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 {
|
|
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 {
|
|
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';
|