@interncom/diplomatic 0.12.6 → 0.12.9
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/dist/cli/index.mjs +2 -2
- package/dist/cli/shared/crypto/enclave.d.ts +4 -2
- package/dist/cli/shared/crypto/noble.d.ts +0 -1
- package/dist/web/index.d.ts +8 -10
- package/dist/web/index.mjs +1 -1
- package/dist/web/shared/crypto/enclave.d.ts +4 -2
- package/dist/web/shared/crypto/noble.d.ts +0 -1
- package/dist/web/stores/idb/seed.d.ts +3 -4
- package/dist/web/stores/memory/seed.d.ts +0 -1
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -1
|
@@ -47,6 +47,8 @@ export type Identity = {
|
|
|
47
47
|
/** Per-bag KDM mixed with this identity's private key (see bag seal). */
|
|
48
48
|
kdmFor: (msgHeadEnc: Uint8Array) => Promise<Uint8Array>;
|
|
49
49
|
};
|
|
50
|
+
declare const SEAL_WRAP_DOMAIN: Uint8Array<ArrayBufferLike>;
|
|
51
|
+
declare const SEAL_PAIR_DOMAIN: Uint8Array<ArrayBufferLike>;
|
|
50
52
|
declare const SEAL_KEY_LEN = 32;
|
|
51
53
|
declare const SEAL_PRF_MIN_LEN = 16;
|
|
52
54
|
export declare class Enclave {
|
|
@@ -153,5 +155,5 @@ export declare class Enclave {
|
|
|
153
155
|
deriveIdentity(keyPath: string, idx?: number): Promise<Identity>;
|
|
154
156
|
}
|
|
155
157
|
/** Derive seal key from PRF output (domain-separated). Used by enclave seal/unseal. */
|
|
156
|
-
export declare function sealKeyFromPrf(crypto: ICrypto, prf: Uint8Array): Promise<ValStat<Uint8Array>>;
|
|
157
|
-
export { MASTER_SEED_LEN, SEAL_KEY_LEN, SEAL_PRF_MIN_LEN };
|
|
158
|
+
export declare function sealKeyFromPrf(crypto: ICrypto, prf: Uint8Array, domain?: Uint8Array): Promise<ValStat<Uint8Array>>;
|
|
159
|
+
export { MASTER_SEED_LEN, SEAL_KEY_LEN, SEAL_PAIR_DOMAIN, SEAL_PRF_MIN_LEN, SEAL_WRAP_DOMAIN, };
|
|
@@ -4,7 +4,6 @@ import type { DerivationSeed, Hash, ICrypto, KeyPair } from "../types.ts";
|
|
|
4
4
|
*/
|
|
5
5
|
export declare class NobleCrypto implements ICrypto {
|
|
6
6
|
private verifyKeys;
|
|
7
|
-
private signKeys;
|
|
8
7
|
genRandomBytes(bytes: number): Promise<Uint8Array>;
|
|
9
8
|
gen256BitSecureRandomSeed(): Promise<Uint8Array>;
|
|
10
9
|
encryptXSalsa20Poly1305Combined(data: Uint8Array, key: Uint8Array): Promise<Uint8Array>;
|
|
@@ -4,14 +4,13 @@ import type { ISeedStore, SetSeedOpts } from "../../types";
|
|
|
4
4
|
import { type PrfSeedMeta, PrfSeedStore, type PrfSeedStoreOpts } from "../../passkey/prf-store";
|
|
5
5
|
export declare class IDBSeedStore implements ISeedStore {
|
|
6
6
|
#private;
|
|
7
|
-
enclave?: Enclave;
|
|
8
7
|
db: IDBDatabase;
|
|
9
8
|
constructor(db: IDBDatabase, crypto: ICrypto);
|
|
10
9
|
/**
|
|
11
10
|
* Hold enclave in memory only. Durable identity is sealed meta
|
|
12
11
|
* ({@link openPrfStore} / {@link persistPrfMeta}), never plain seed.
|
|
13
12
|
* Pins identity (nonce+hash) on first save; later saves must match
|
|
14
|
-
* (largeBlob /
|
|
13
|
+
* (largeBlob / PRF unlock cannot switch masters under this DB).
|
|
15
14
|
* `opts.persist` is ignored (kept for API compatibility).
|
|
16
15
|
*
|
|
17
16
|
* TODO(passphrase): when PRF is missing, `persist: true` (or a dedicated
|
|
@@ -21,8 +20,8 @@ export declare class IDBSeedStore implements ISeedStore {
|
|
|
21
20
|
save(enclave: Enclave, _opts?: SetSeedOpts): Promise<Enclave>;
|
|
22
21
|
load(): Promise<Enclave | undefined>;
|
|
23
22
|
/**
|
|
24
|
-
* Drop in-memory enclave
|
|
25
|
-
*
|
|
23
|
+
* Drop in-memory enclave. Keeps {@link K_PRF_META} and {@link K_ID_PIN}
|
|
24
|
+
* so unlock / largeBlob restore still match this device.
|
|
26
25
|
*/
|
|
27
26
|
clearSession(): Promise<void>;
|
|
28
27
|
wipe(): Promise<void>;
|
|
@@ -4,7 +4,6 @@ import type { ISeedStore, SetSeedOpts } from "../../types";
|
|
|
4
4
|
import { type IdPin } from "../identityPin";
|
|
5
5
|
export declare class MemorySeedStore implements ISeedStore {
|
|
6
6
|
#private;
|
|
7
|
-
enclave?: Enclave;
|
|
8
7
|
constructor(crypto: ICrypto);
|
|
9
8
|
save(enclave: Enclave, _opts?: SetSeedOpts): Promise<Enclave>;
|
|
10
9
|
load(): Promise<Enclave | undefined>;
|