@interncom/diplomatic 0.13.6 → 0.14.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/dist/cli/index.mjs +2 -2
- package/dist/cli/shared/crypto/enclave.d.ts +28 -10
- package/dist/cli/shared/seed.d.ts +1 -1
- package/dist/cli/shared/webauthn/common.d.ts +15 -1
- package/dist/cli/shared/webauthn/prf.d.ts +22 -6
- package/dist/web/index.d.ts +5 -5
- package/dist/web/index.mjs +1 -1
- package/dist/web/passkey/prf-store.d.ts +65 -29
- package/dist/web/shared/crypto/enclave.d.ts +28 -10
- package/dist/web/shared/seed.d.ts +1 -1
- package/dist/web/shared/webauthn/common.d.ts +15 -1
- package/dist/web/shared/webauthn/prf.d.ts +22 -6
- package/dist/web/stores/idb/seed.d.ts +10 -12
- package/dist/web/types.d.ts +2 -2
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,44 @@
|
|
|
1
1
|
import { type ValStat } from "../valstat.ts";
|
|
2
|
-
import { type WebAuthnRp } from "./common.ts";
|
|
2
|
+
import { type AuthenticatorAttachmentName, type WebAuthnRp } from "./common.ts";
|
|
3
3
|
export type PrfRp = WebAuthnRp;
|
|
4
4
|
export type PrfCreateOpts = PrfRp & {
|
|
5
|
+
/** WebAuthn user.name — stable account id. */
|
|
5
6
|
userName?: string;
|
|
7
|
+
/** WebAuthn user.displayName — human nick. */
|
|
8
|
+
displayName?: string;
|
|
6
9
|
/** Omit so the UA can offer roaming keys (YubiKey) and third-party providers. */
|
|
7
10
|
authenticatorAttachment?: "platform" | "cross-platform";
|
|
8
|
-
/**
|
|
11
|
+
/** PRF salt. Tried at create; some UAs only eval on get(). */
|
|
9
12
|
salt?: Uint8Array;
|
|
13
|
+
/** Already-bound cred ids so create does not assert an existing key. */
|
|
14
|
+
excludeCredentials?: readonly Uint8Array[];
|
|
10
15
|
};
|
|
11
16
|
/** Default salt for DIPLOMATIC PRF eval (UTF-8). */
|
|
12
17
|
export declare const DEFAULT_PRF_SALT: Uint8Array<ArrayBufferLike>;
|
|
18
|
+
/** Default WebAuthn user.name / displayName when none is supplied. */
|
|
19
|
+
export declare const DEFAULT_PRF_USER_NAME = "diplomatic-prf";
|
|
13
20
|
/** Bytes of PRF output we consume (first N of `results.first`). */
|
|
14
21
|
export declare const PRF_OUTPUT_LEN = 32;
|
|
15
|
-
|
|
22
|
+
/** Public ceremony facts (no PRF bytes). */
|
|
23
|
+
export type PrfCeremony = {
|
|
16
24
|
credId: Uint8Array;
|
|
25
|
+
userId?: Uint8Array;
|
|
26
|
+
attachment?: AuthenticatorAttachmentName;
|
|
27
|
+
transports?: string[];
|
|
28
|
+
aaguid?: Uint8Array;
|
|
29
|
+
};
|
|
30
|
+
export type PrfCreateResult = PrfCeremony & {
|
|
17
31
|
prfEnabled: boolean;
|
|
32
|
+
/** Present when the UA evaluated PRF during create (no second get). */
|
|
33
|
+
prf?: Uint8Array;
|
|
18
34
|
};
|
|
19
35
|
/** Internal: PRF output + cred id. For Enclave only — do not re-export to apps. */
|
|
20
|
-
export type PrfEvalResult = {
|
|
36
|
+
export type PrfEvalResult = PrfCeremony & {
|
|
21
37
|
prf: Uint8Array;
|
|
22
|
-
credId: Uint8Array;
|
|
23
38
|
};
|
|
24
39
|
export type PrfEvalOpts = PrfRp & {
|
|
25
|
-
|
|
40
|
+
/** One id, or every bound id so a spare key can assert in one get(). */
|
|
41
|
+
credId?: Uint8Array | readonly Uint8Array[];
|
|
26
42
|
salt?: Uint8Array;
|
|
27
43
|
};
|
|
28
44
|
/** Best-effort: client advertises PRF extension. */
|
package/dist/web/index.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ import type { SyncProgressEvent } from "./progress";
|
|
|
27
27
|
import { defaultPeekProgressEvery, idleProgress, shouldEmitItemProgress } from "./progress";
|
|
28
28
|
import { defaultWebAuthnRpId, PasskeySeedStore } from "./passkey/seed";
|
|
29
29
|
import { DEFAULT_PRF_SALT, prfCapable, type PrfRp } from "./shared/webauthn/prf";
|
|
30
|
-
import { PrfSeedStore } from "./passkey/prf-store";
|
|
31
|
-
import type {
|
|
30
|
+
import { KEYRING_MAX, keyringCredIds, keyringKind, keyringLabel, PrfSeedStore } from "./passkey/prf-store";
|
|
31
|
+
import type { Keyring, KeyringEntry, KeyringRow, PersistKeyring, PrfSeedStoreOpts } from "./passkey/prf-store";
|
|
32
32
|
import type { PasskeySeedStoreOpts } from "./passkey/seed";
|
|
33
33
|
import { type BundleHost } from "./shared/codecs/bundleHost";
|
|
34
34
|
import { asDHKEReq, asDHKEResp, PairRequest } from "./shared/crypto/pairing";
|
|
@@ -39,8 +39,8 @@ import { openDiplomaticClient, type OpenDiplomaticClientMainOptions, type OpenDi
|
|
|
39
39
|
import { WorkerClient } from "./worker/client";
|
|
40
40
|
import type { WorkerClientOptions } from "./worker/client";
|
|
41
41
|
import type { WipeOpts } from "./types";
|
|
42
|
-
/** Platform advertises largeBlob (not a guarantee the
|
|
42
|
+
/** Platform advertises largeBlob (not a guarantee the binding key has it). */
|
|
43
43
|
export declare function largeBlobCapable(): Promise<boolean>;
|
|
44
44
|
export { webAuthnLastError } from "./shared/webauthn/common";
|
|
45
|
-
export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, asDHKEReq, asDHKEResp, asSealedMasterKey, b64tob, b64urltob, btob64, btob64url, btoh, CachedEntDB, checksumEntRevs, checksumSet, Clock, cmpBytes, crypto, Decoder, DEFAULT_PRF_SALT, defaultPeekProgressEvery, defaultWebAuthnRpId, eidCodec, Enclave, encodeEntRev, Encoder, EntDBMemory, EntIDB, EntitiesQuery, EntityID, entStateManager, genSingletonEID, GroupID, hostHTTPTransport, htob, HTTPTransport, IDBSeedStore, IDBStore, idleProgress, IEntDB, IEntity, isApldState, isLiveEnt, isPendingApply, isTerminalApplyFailure, isTombstone, IStore, MASTER_SEED_LEN, MemoryStore, normalizeTags, nullEntDB, nullStateManager, openDiplomaticClient, openEntDB, openIDBStore, PairRequest, PasskeySeedStore, prfCapable, PrfSeedStore, revFromEntity, revFromHead, SEALED_MASTER_KEY_LEN, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
|
|
46
|
-
export type { ApldState, Applier, BundleHost, CachedEntDBOptions, DHKEReq, DHKEResp, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IEntRow, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITombstone, ITransport, IUpdateParams, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, PairPackagePlain, PasskeySeedStoreOpts,
|
|
45
|
+
export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, asDHKEReq, asDHKEResp, asSealedMasterKey, b64tob, b64urltob, btob64, btob64url, btoh, CachedEntDB, checksumEntRevs, checksumSet, Clock, cmpBytes, crypto, Decoder, DEFAULT_PRF_SALT, defaultPeekProgressEvery, defaultWebAuthnRpId, eidCodec, Enclave, encodeEntRev, Encoder, EntDBMemory, EntIDB, EntitiesQuery, EntityID, entStateManager, genSingletonEID, GroupID, hostHTTPTransport, htob, HTTPTransport, IDBSeedStore, IDBStore, idleProgress, IEntDB, IEntity, isApldState, isLiveEnt, isPendingApply, isTerminalApplyFailure, isTombstone, IStore, KEYRING_MAX, keyringCredIds, keyringKind, keyringLabel, MASTER_SEED_LEN, MemoryStore, normalizeTags, nullEntDB, nullStateManager, openDiplomaticClient, openEntDB, openIDBStore, PairRequest, PasskeySeedStore, prfCapable, PrfSeedStore, revFromEntity, revFromHead, SEALED_MASTER_KEY_LEN, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
|
|
46
|
+
export type { ApldState, Applier, BundleHost, CachedEntDBOptions, DHKEReq, DHKEResp, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IEntRow, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITombstone, ITransport, IUpdateParams, Keyring, KeyringEntry, KeyringRow, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenEntDBOptions, PairPackagePlain, PasskeySeedStoreOpts, PersistKeyring, PrfRp, PrfSeedStoreOpts, ReconcileOpts, ReconcileReport, SealedMasterKey, SetSeedOpts, SyncProgressEvent, WipeOpts, WorkerClientOptions, };
|