@interncom/diplomatic 0.22.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.
- package/dist/cli/bun/src/crypto.d.ts +2 -3
- package/dist/cli/index.mjs +4 -5
- package/dist/cli/shared/api/peek.d.ts +9 -1
- package/dist/cli/shared/api/pull.d.ts +9 -1
- package/dist/cli/shared/api/push.d.ts +3 -1
- package/dist/cli/shared/api/user.d.ts +1 -1
- package/dist/cli/shared/auth.d.ts +2 -2
- package/dist/cli/shared/bag.d.ts +11 -6
- package/dist/cli/shared/client.d.ts +18 -9
- package/dist/cli/shared/codec.d.ts +4 -0
- package/dist/cli/shared/codecs/kdm.d.ts +7 -0
- package/dist/cli/shared/codecs/notifItem.d.ts +2 -0
- package/dist/cli/shared/crypto/bagman.d.ts +19 -0
- package/dist/cli/shared/crypto/binary.d.ts +1 -0
- package/dist/cli/shared/crypto/derivation.d.ts +45 -0
- package/dist/cli/shared/crypto/enclave.d.ts +31 -102
- package/dist/cli/shared/crypto/largeBlob.d.ts +8 -0
- package/dist/cli/shared/crypto/noble.d.ts +15 -22
- package/dist/cli/shared/crypto/pairing.d.ts +19 -2
- package/dist/cli/shared/crypto/prf.d.ts +52 -0
- package/dist/cli/shared/crypto/realms.d.ts +7 -0
- package/dist/cli/shared/endpoint.d.ts +4 -5
- package/dist/cli/shared/http.d.ts +12 -12
- package/dist/cli/shared/sync.d.ts +3 -3
- package/dist/cli/shared/types.d.ts +24 -16
- package/dist/cli/shared/webauthn/prf.d.ts +8 -0
- package/dist/cli/src/index.d.ts +6 -5
- package/dist/web/client.d.ts +18 -7
- package/dist/web/crypto.d.ts +2 -3
- package/dist/web/entdb/cached.d.ts +4 -0
- package/dist/web/entdb/entdb.d.ts +3 -0
- package/dist/web/entdb/idb.d.ts +8 -5
- package/dist/web/index.d.ts +11 -5
- package/dist/web/index.mjs +1 -1
- package/dist/web/objEq.d.ts +1 -0
- package/dist/web/passkey/prf-store.d.ts +26 -10
- package/dist/web/passkey/seed.d.ts +12 -6
- package/dist/web/shared/api/peek.d.ts +9 -1
- package/dist/web/shared/api/pull.d.ts +9 -1
- package/dist/web/shared/api/push.d.ts +3 -1
- package/dist/web/shared/api/user.d.ts +1 -1
- package/dist/web/shared/auth.d.ts +2 -2
- package/dist/web/shared/bag.d.ts +11 -6
- package/dist/web/shared/blobs.d.ts +25 -0
- package/dist/web/shared/client.d.ts +18 -9
- package/dist/web/shared/codec.d.ts +4 -0
- package/dist/web/shared/codecs/ent.d.ts +5 -0
- package/dist/web/shared/codecs/kdm.d.ts +7 -0
- package/dist/web/shared/codecs/notifItem.d.ts +2 -0
- package/dist/web/shared/crypto/bagman.d.ts +19 -0
- package/dist/web/shared/crypto/binary.d.ts +1 -0
- package/dist/web/shared/crypto/derivation.d.ts +45 -0
- package/dist/web/shared/crypto/enclave.d.ts +31 -102
- package/dist/web/shared/crypto/largeBlob.d.ts +8 -0
- package/dist/web/shared/crypto/noble.d.ts +15 -22
- package/dist/web/shared/crypto/pairing.d.ts +19 -2
- package/dist/web/shared/crypto/prf.d.ts +52 -0
- package/dist/web/shared/crypto/realms.d.ts +7 -0
- package/dist/web/shared/crypto/tty.d.ts +3 -0
- package/dist/web/shared/endpoint.d.ts +4 -5
- package/dist/web/shared/exim.d.ts +5 -5
- package/dist/web/shared/http.d.ts +12 -12
- package/dist/web/shared/storage/memory.d.ts +2 -2
- package/dist/web/shared/sync.d.ts +3 -3
- package/dist/web/shared/types.d.ts +24 -16
- package/dist/web/shared/webauthn/prf.d.ts +8 -0
- package/dist/web/state.d.ts +1 -2
- package/dist/web/stores/cursor.d.ts +30 -0
- package/dist/web/stores/idb/account.d.ts +58 -0
- package/dist/web/stores/idb/catalog.d.ts +1 -0
- package/dist/web/stores/idb/dnlds.d.ts +3 -2
- package/dist/web/stores/idb/hosts.d.ts +8 -7
- package/dist/web/stores/idb/idbutil.d.ts +2 -0
- package/dist/web/stores/idb/migrate.d.ts +2 -0
- package/dist/web/stores/idb/msgs.d.ts +1 -1
- package/dist/web/stores/idb/names.d.ts +13 -0
- package/dist/web/stores/idb/realms.d.ts +11 -0
- package/dist/web/stores/idb/store.d.ts +26 -19
- package/dist/web/stores/idb/uplds.d.ts +1 -1
- package/dist/web/stores/keyTag.d.ts +14 -0
- package/dist/web/stores/label.d.ts +3 -0
- package/dist/web/stores/memory/account.d.ts +14 -0
- package/dist/web/stores/memory/dnlds.d.ts +4 -2
- package/dist/web/stores/memory/hosts.d.ts +8 -6
- package/dist/web/stores/memory/realms.d.ts +10 -0
- package/dist/web/stores/memory/store.d.ts +6 -2
- package/dist/web/stores/realm.d.ts +35 -0
- package/dist/web/sync.d.ts +18 -16
- package/dist/web/types.d.ts +59 -18
- package/dist/web/worker/client.d.ts +7 -3
- package/dist/web/worker/protocol.d.ts +6 -0
- package/dist/web/worker/runtime.d.ts +4 -2
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -2
- package/dist/cli/bun/src/codec.d.ts +0 -3
- package/dist/web/stores/idb/seed.d.ts +0 -32
- package/dist/web/stores/identityPin.d.ts +0 -19
- package/dist/web/stores/memory/seed.d.ts +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interncom/diplomatic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Secure sync layer and CLI utilities for DIPLOMATIC",
|
|
6
6
|
"files": [
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"react": "^19.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@msgpack/msgpack": "3.1.3",
|
|
57
56
|
"@noble/ciphers": "1.2.0",
|
|
58
57
|
"@noble/hashes": "1.8.0"
|
|
59
58
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Enclave } from "../../shared/crypto/enclave";
|
|
2
|
-
import type { ICrypto } from "../../shared/types";
|
|
3
|
-
import type { ISeedStore, SetSeedOpts } from "../../types";
|
|
4
|
-
import { type Keyring, PrfSeedStore, type PrfSeedStoreOpts } from "../../passkey/prf-store";
|
|
5
|
-
export declare class IDBSeedStore implements ISeedStore {
|
|
6
|
-
#private;
|
|
7
|
-
db: IDBDatabase;
|
|
8
|
-
constructor(db: IDBDatabase, crypto: ICrypto);
|
|
9
|
-
/**
|
|
10
|
-
* Hold enclave in memory only. Durable identity is the keyring
|
|
11
|
-
* ({@link openPrfStore} / {@link persistKeyring}), never plain seed.
|
|
12
|
-
* Pins identity (nonce+hash) on first save; later saves must match
|
|
13
|
-
* (largeBlob / PRF unlock cannot switch masters under this DB).
|
|
14
|
-
* `opts.persist` is ignored (kept for API compatibility).
|
|
15
|
-
*
|
|
16
|
-
* TODO(passphrase): when PRF is missing, `persist: true` (or a dedicated
|
|
17
|
-
* bind API) should seal under a passphrase KDF and write sealed meta here —
|
|
18
|
-
* same shape as a keyring entry, not a return of raw seed.
|
|
19
|
-
*/
|
|
20
|
-
save(enclave: Enclave, _opts?: SetSeedOpts): Promise<Enclave>;
|
|
21
|
-
load(): Promise<Enclave | undefined>;
|
|
22
|
-
/**
|
|
23
|
-
* Drop in-memory enclave. Keeps {@link K_KEYRING} and {@link K_ID_PIN}
|
|
24
|
-
* so unlock / largeBlob restore still match this device.
|
|
25
|
-
*/
|
|
26
|
-
clearSession(): Promise<void>;
|
|
27
|
-
wipe(): Promise<void>;
|
|
28
|
-
loadKeyring(): Promise<Keyring | undefined>;
|
|
29
|
-
persistKeyring(ring: Keyring | undefined): Promise<void>;
|
|
30
|
-
hasKeyring(): Promise<boolean>;
|
|
31
|
-
openPrfStore(opts: Omit<PrfSeedStoreOpts, "persistKeyring" | "keyring">): Promise<PrfSeedStore>;
|
|
32
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Enclave } from "../shared/crypto/enclave";
|
|
2
|
-
import type { ICrypto } from "../shared/types";
|
|
3
|
-
/**
|
|
4
|
-
* Prefix so pin paths never collide with user host labels ("host", …).
|
|
5
|
-
* Full path: `diplomatic.pin/<hex(nonce)>`.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ID_PIN_PATH_PREFIX = "diplomatic.pin/";
|
|
8
|
-
/** Durable pin row: path-nonce + digest of path-scoped public key. */
|
|
9
|
-
export type IdPin = {
|
|
10
|
-
n: Uint8Array;
|
|
11
|
-
h: Uint8Array;
|
|
12
|
-
};
|
|
13
|
-
/** keyPath for deriveIdentity from the stored nonce. */
|
|
14
|
-
export declare function idPinPath(nonce: Uint8Array): string;
|
|
15
|
-
export declare function idPinDigest(crypto: ICrypto, enclave: Enclave, nonce: Uint8Array): Promise<Uint8Array>;
|
|
16
|
-
export declare function makeIdPin(crypto: ICrypto, enclave: Enclave): Promise<IdPin>;
|
|
17
|
-
export declare function idPinMatches(crypto: ICrypto, enclave: Enclave, pin: IdPin): Promise<boolean>;
|
|
18
|
-
export declare function decodeIdPin(raw: unknown): IdPin | undefined;
|
|
19
|
-
export declare function cloneIdPin(pin: IdPin): IdPin;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Enclave } from "../../shared/crypto/enclave";
|
|
2
|
-
import type { ICrypto } from "../../shared/types";
|
|
3
|
-
import type { ISeedStore, SetSeedOpts } from "../../types";
|
|
4
|
-
import { type IdPin } from "../identityPin";
|
|
5
|
-
export declare class MemorySeedStore implements ISeedStore {
|
|
6
|
-
#private;
|
|
7
|
-
constructor(crypto: ICrypto);
|
|
8
|
-
save(enclave: Enclave, _opts?: SetSeedOpts): Promise<Enclave>;
|
|
9
|
-
load(): Promise<Enclave | undefined>;
|
|
10
|
-
wipe(): Promise<void>;
|
|
11
|
-
/** Test helper: snapshot of durable pin (nonce+hash only). */
|
|
12
|
-
peekPin(): IdPin | undefined;
|
|
13
|
-
}
|