@interncom/diplomatic 0.12.10 → 0.13.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.
@@ -3,7 +3,10 @@ import { type WebAuthnRp } from "./common.ts";
3
3
  export type PrfRp = WebAuthnRp;
4
4
  export type PrfCreateOpts = PrfRp & {
5
5
  userName?: string;
6
- authenticatorAttachment?: string;
6
+ /** Omit so the UA can offer roaming keys (YubiKey) and third-party providers. */
7
+ authenticatorAttachment?: "platform" | "cross-platform";
8
+ /** If set, request PRF eval at create so hmac-secret is actually enabled. */
9
+ salt?: Uint8Array;
7
10
  };
8
11
  /** Default salt for DIPLOMATIC PRF eval (UTF-8). */
9
12
  export declare const DEFAULT_PRF_SALT: Uint8Array<ArrayBufferLike>;
@@ -31,8 +31,9 @@ import { PrfSeedStore } from "./passkey/prf-store";
31
31
  import type { PersistPrfSeedMeta, PrfSeedMeta, PrfSeedStoreOpts } from "./passkey/prf-store";
32
32
  import type { PasskeySeedStoreOpts } from "./passkey/seed";
33
33
  import { type BundleHost } from "./shared/codecs/bundleHost";
34
- import { PairPackage } from "./identity/pairPackage";
35
- import type { OpenedPairPackage, PairPackageEnvelope } from "./identity/pairPackage";
34
+ import { asDHKEReq, asDHKEResp, PairRequest } from "./shared/crypto/pairing";
35
+ import type { DHKEReq, DHKEResp } from "./shared/crypto/pairing";
36
+ import type { PairPackagePlain } from "./shared/codecs/pairPackage";
36
37
  import { checksumEntRevs, checksumSet, cmpBytes, encodeEntRev } from "./shared/checksum";
37
38
  import { openDiplomaticClient, type OpenDiplomaticClientMainOptions, type OpenDiplomaticClientOptions, type OpenDiplomaticClientWorkerOptions, type OpenedDiplomaticClient } from "./openClient";
38
39
  import { WorkerClient } from "./worker/client";
@@ -40,5 +41,5 @@ import type { WorkerClientOptions } from "./worker/client";
40
41
  import type { WipeOpts } from "./types";
41
42
  /** Platform advertises largeBlob (not a guarantee the authenticator has it). */
42
43
  export declare function largeBlobCapable(): Promise<boolean>;
43
- export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, 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, PairPackage, PasskeySeedStore, prfCapable, PrfSeedStore, revFromEntity, revFromHead, SEALED_MASTER_KEY_LEN, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
44
- export type { ApldState, Applier, BundleHost, CachedEntDBOptions, 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, OpenedPairPackage, OpenEntDBOptions, PairPackageEnvelope, PasskeySeedStoreOpts, PersistPrfSeedMeta, PrfRp, PrfSeedMeta, PrfSeedStoreOpts, ReconcileOpts, ReconcileReport, SealedMasterKey, SetSeedOpts, SyncProgressEvent, WipeOpts, WorkerClientOptions, };
44
+ 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, };
45
+ 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, PersistPrfSeedMeta, PrfRp, PrfSeedMeta, PrfSeedStoreOpts, ReconcileOpts, ReconcileReport, SealedMasterKey, SetSeedOpts, SyncProgressEvent, WipeOpts, WorkerClientOptions, };