@interncom/diplomatic 0.11.5 → 0.12.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/index.mjs +2 -2
- package/dist/cli/shared/binary.d.ts +4 -0
- package/dist/cli/shared/codecs/bundleHost.d.ts +11 -0
- package/dist/cli/shared/codecs/identityBundle.d.ts +25 -0
- package/dist/cli/shared/codecs/pairPackage.d.ts +15 -0
- package/dist/cli/shared/crypto/enclave.d.ts +113 -2
- package/dist/cli/shared/crypto/entropy.d.ts +11 -0
- package/dist/cli/shared/seed.d.ts +25 -0
- package/dist/cli/shared/types.d.ts +4 -6
- package/dist/cli/shared/webauthn/common.d.ts +38 -0
- package/dist/cli/shared/webauthn/largeBlob.d.ts +19 -0
- package/dist/cli/shared/webauthn/prf.d.ts +33 -0
- package/dist/cli/shared/worker/embeddedWorkerSource.d.ts +1 -0
- package/dist/cli/shared/worker/spawn.d.ts +5 -0
- package/dist/cli/src/index.d.ts +10 -8
- package/dist/web/client.d.ts +3 -2
- package/dist/web/identity/pairPackage.d.ts +31 -0
- package/dist/web/index.d.ts +18 -6
- package/dist/web/index.mjs +1 -1
- package/dist/web/openClient.d.ts +14 -109
- package/dist/web/passkey/largeBlob.d.ts +17 -0
- package/dist/web/passkey/prf-store.d.ts +62 -0
- package/dist/web/passkey/seed.d.ts +13 -77
- package/dist/web/passkey/webauthn.d.ts +1 -0
- package/dist/web/react/useClient.d.ts +13 -20
- package/dist/web/shared/binary.d.ts +4 -0
- package/dist/web/shared/codecs/bundleHost.d.ts +11 -0
- package/dist/web/shared/codecs/identityBundle.d.ts +25 -0
- package/dist/web/shared/codecs/pairPackage.d.ts +15 -0
- package/dist/web/shared/codecs/pairPackageEnvelope.d.ts +18 -0
- package/dist/web/shared/crypto/enclave.d.ts +113 -2
- package/dist/web/shared/crypto/entropy.d.ts +11 -0
- package/dist/web/shared/seed.d.ts +25 -0
- package/dist/web/shared/types.d.ts +4 -6
- package/dist/web/shared/webauthn/common.d.ts +38 -0
- package/dist/web/shared/webauthn/largeBlob.d.ts +19 -0
- package/dist/web/shared/webauthn/prf.d.ts +33 -0
- package/dist/web/shared/worker/embeddedWorkerSource.d.ts +1 -0
- package/dist/web/shared/worker/spawn.d.ts +5 -0
- package/dist/web/stores/idb/seed.d.ts +24 -6
- package/dist/web/stores/memory/seed.d.ts +3 -4
- package/dist/web/types.d.ts +13 -7
- package/dist/web/worker/client.d.ts +26 -48
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ValStat } from "./valstat.ts";
|
|
2
|
+
declare const masterSeedSymbol: unique symbol;
|
|
3
|
+
declare const sealedMasterKeySymbol: unique symbol;
|
|
4
|
+
/** Master seed length in bytes (Ed25519 seed / PRF material). */
|
|
5
|
+
export declare const MASTER_SEED_LEN = 32;
|
|
6
|
+
/**
|
|
7
|
+
* AEAD-sealed master (libsodium secretbox combined layout):
|
|
8
|
+
* 24-byte nonce + 32-byte ciphertext + 16-byte MAC.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SEALED_MASTER_KEY_LEN: number;
|
|
11
|
+
export type MasterSeed = Uint8Array & {
|
|
12
|
+
readonly [masterSeedSymbol]: true;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Master seed sealed under KDF(PRF) (nonce‖ciphertext‖tag).
|
|
16
|
+
* Useless without the PRF output that derives the wrap key.
|
|
17
|
+
*/
|
|
18
|
+
export type SealedMasterKey = Uint8Array & {
|
|
19
|
+
readonly [sealedMasterKeySymbol]: true;
|
|
20
|
+
};
|
|
21
|
+
/** Brand `bytes` as {@link MasterSeed} only if length is {@link MASTER_SEED_LEN}. */
|
|
22
|
+
export declare function asMasterSeed(bytes: Uint8Array): ValStat<MasterSeed>;
|
|
23
|
+
/** Brand `bytes` as {@link SealedMasterKey} only if length is {@link SEALED_MASTER_KEY_LEN}. */
|
|
24
|
+
export declare function asSealedMasterKey(bytes: Uint8Array): ValStat<SealedMasterKey>;
|
|
25
|
+
export {};
|
|
@@ -4,7 +4,10 @@ import { IAuthTimestamp } from "./codecs/authTimestamp.ts";
|
|
|
4
4
|
import type { IBagPeekItem } from "./codecs/peekItem.ts";
|
|
5
5
|
import { IUsageQuota } from "./codecs/usageQuota.ts";
|
|
6
6
|
import { APICallName, Status } from "./consts.ts";
|
|
7
|
-
import { ValStat } from "./valstat.ts";
|
|
7
|
+
import type { ValStat } from "./valstat.ts";
|
|
8
|
+
/** Identity seed brands — defined in seed.ts; re-exported for convenience. */
|
|
9
|
+
export type { MasterSeed, SealedMasterKey } from "./seed.ts";
|
|
10
|
+
export { asMasterSeed, asSealedMasterKey, MASTER_SEED_LEN, SEALED_MASTER_KEY_LEN, } from "./seed.ts";
|
|
8
11
|
export type GroupID = string;
|
|
9
12
|
declare const entityIDSymbol: unique symbol;
|
|
10
13
|
export type EntityID = Uint8Array & {
|
|
@@ -98,15 +101,11 @@ export interface KeyPair {
|
|
|
98
101
|
privateKey: PrivateKey;
|
|
99
102
|
publicKey: PublicKey;
|
|
100
103
|
}
|
|
101
|
-
declare const masterSeedSymbol: unique symbol;
|
|
102
104
|
declare const derivationSeedSymbol: unique symbol;
|
|
103
105
|
declare const publicKeySymbol: unique symbol;
|
|
104
106
|
declare const privateKeySymbol: unique symbol;
|
|
105
107
|
declare const hostSpecificKeyPairSymbol: unique symbol;
|
|
106
108
|
declare const hashSymbol: unique symbol;
|
|
107
|
-
export type MasterSeed = Uint8Array & {
|
|
108
|
-
readonly [masterSeedSymbol]: true;
|
|
109
|
-
};
|
|
110
109
|
export type DerivationSeed = Uint8Array & {
|
|
111
110
|
readonly [derivationSeedSymbol]: true;
|
|
112
111
|
};
|
|
@@ -214,4 +213,3 @@ export interface IUpsertMessage extends IMessage {
|
|
|
214
213
|
export interface IDeleteMessage extends Omit<IMessage, "bod"> {
|
|
215
214
|
len: 0;
|
|
216
215
|
}
|
|
217
|
-
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Status } from "../consts.ts";
|
|
2
|
+
import { type ValStat } from "../valstat.ts";
|
|
3
|
+
export declare const WEBAUTHN_CHAL_LEN = 32;
|
|
4
|
+
/** COSE algorithm identifiers for WebAuthn `pubKeyCredParams`. */
|
|
5
|
+
export declare const COSE_ALG_ES256 = -7;
|
|
6
|
+
export declare const COSE_ALG_EDDSA = -8;
|
|
7
|
+
export declare const COSE_ALG_RS256 = -257;
|
|
8
|
+
/** Prefer modern curves; include RS256 for broader authenticator coverage. */
|
|
9
|
+
export declare const WEBAUTHN_PUB_KEY_PARAMS: PublicKeyCredentialParameters[];
|
|
10
|
+
export type WebAuthnRp = {
|
|
11
|
+
rpId?: string;
|
|
12
|
+
rpName?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Default WebAuthn RP ID: the full hostname (no eTLD+1 collapse).
|
|
16
|
+
*
|
|
17
|
+
* Credentials are scoped to this exact host. That is deliberate and simple —
|
|
18
|
+
* no Public Suffix List, no multi-part-suffix guesses. Apps that want a shared
|
|
19
|
+
* RP across subdomains (e.g. `app.example.com` + `www.example.com` →
|
|
20
|
+
* `example.com`) must pass an explicit `rpId` that is a valid suffix of the
|
|
21
|
+
* origin (WebAuthn requires the RP ID equal the effective domain or a
|
|
22
|
+
* registrable suffix of it).
|
|
23
|
+
*
|
|
24
|
+
* Normalizes case and trailing dots. Empty → `"localhost"`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function defaultWebAuthnRpId(hostname: string): string;
|
|
27
|
+
/** Copy into a fresh ArrayBuffer-backed view (DOM BufferSource typing). */
|
|
28
|
+
export declare function copyToArrayBuffer(src: Uint8Array): Uint8Array;
|
|
29
|
+
/** Resolve RP id from opts or `location.hostname`. */
|
|
30
|
+
export declare function resolveWebAuthnRpId(opts?: WebAuthnRp): ValStat<string>;
|
|
31
|
+
/** Success if WebAuthn credentials API is available in this environment. */
|
|
32
|
+
export declare function checkWebAuthn(): Status;
|
|
33
|
+
export declare function asPublicKeyCredential(cred: Credential | null): ValStat<PublicKeyCredential>;
|
|
34
|
+
/**
|
|
35
|
+
* Best-effort capability probe (not all UAs expose this).
|
|
36
|
+
* `extKey` e.g. `"extension:largeBlob"`, `"extension:prf"`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function webAuthnExtensionCapable(extKey: string): Promise<boolean>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Status } from "../consts.ts";
|
|
2
|
+
import { type ValStat } from "../valstat.ts";
|
|
3
|
+
import { type WebAuthnRp } from "./common.ts";
|
|
4
|
+
export type LargeBlobRp = WebAuthnRp;
|
|
5
|
+
export type LargeBlobCreateOpts = LargeBlobRp & {
|
|
6
|
+
userName?: string;
|
|
7
|
+
authenticatorAttachment?: string;
|
|
8
|
+
};
|
|
9
|
+
/** Best-effort capability probe. */
|
|
10
|
+
export declare function largeBlobCapable(): Promise<boolean>;
|
|
11
|
+
/** Create discoverable largeBlob-capable credential; returns credential id. */
|
|
12
|
+
export declare function largeBlobCreateCred(opts?: LargeBlobCreateOpts): Promise<ValStat<Uint8Array>>;
|
|
13
|
+
/** UV write of opaque bytes to largeBlob. */
|
|
14
|
+
export declare function largeBlobWrite(credId: Uint8Array, data: Uint8Array, opts?: LargeBlobRp): Promise<Status>;
|
|
15
|
+
/** UV read from largeBlob; `credId` undefined = discoverable assertion. */
|
|
16
|
+
export declare function largeBlobRead(credId: Uint8Array | undefined, opts?: LargeBlobRp): Promise<ValStat<{
|
|
17
|
+
blob: Uint8Array;
|
|
18
|
+
credId: Uint8Array;
|
|
19
|
+
}>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ValStat } from "../valstat.ts";
|
|
2
|
+
import { type WebAuthnRp } from "./common.ts";
|
|
3
|
+
export type PrfRp = WebAuthnRp;
|
|
4
|
+
export type PrfCreateOpts = PrfRp & {
|
|
5
|
+
userName?: string;
|
|
6
|
+
authenticatorAttachment?: string;
|
|
7
|
+
};
|
|
8
|
+
/** Default salt for DIPLOMATIC PRF eval (UTF-8). */
|
|
9
|
+
export declare const DEFAULT_PRF_SALT: Uint8Array<ArrayBufferLike>;
|
|
10
|
+
/** Bytes of PRF output we consume (first N of `results.first`). */
|
|
11
|
+
export declare const PRF_OUTPUT_LEN = 32;
|
|
12
|
+
export type PrfCreateResult = {
|
|
13
|
+
credId: Uint8Array;
|
|
14
|
+
prfEnabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Internal: PRF output + cred id. For Enclave only — do not re-export to apps. */
|
|
17
|
+
export type PrfEvalResult = {
|
|
18
|
+
prf: Uint8Array;
|
|
19
|
+
credId: Uint8Array;
|
|
20
|
+
};
|
|
21
|
+
export type PrfEvalOpts = PrfRp & {
|
|
22
|
+
credId?: Uint8Array;
|
|
23
|
+
salt?: Uint8Array;
|
|
24
|
+
};
|
|
25
|
+
/** Best-effort: client advertises PRF extension. */
|
|
26
|
+
export declare function prfCapable(): Promise<boolean>;
|
|
27
|
+
/** Create a discoverable credential that enables PRF. */
|
|
28
|
+
export declare function createPrfCred(opts?: PrfCreateOpts): Promise<ValStat<PrfCreateResult>>;
|
|
29
|
+
/**
|
|
30
|
+
* Evaluate PRF (UV). Returns PRF bytes — only Enclave should call this and must
|
|
31
|
+
* zero/drop PRF after seal/unseal. Apps must not hold PRF alongside sealed meta.
|
|
32
|
+
*/
|
|
33
|
+
export declare function evalPrf(opts?: PrfEvalOpts): Promise<ValStat<PrfEvalResult>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DIPLOMATIC_WORKER_SOURCE = "";
|
package/dist/cli/src/index.d.ts
CHANGED
|
@@ -4,14 +4,15 @@ import type { IBagPeekItem } from "../shared/codecs/peekItem.ts";
|
|
|
4
4
|
import { IBagPullItem } from "../shared/codecs/pullItem.ts";
|
|
5
5
|
import { IBagPushItem } from "../shared/codecs/pushItem.ts";
|
|
6
6
|
import { Status } from "../shared/consts.ts";
|
|
7
|
-
import {
|
|
7
|
+
import { Enclave } from "../shared/crypto/enclave.ts";
|
|
8
|
+
import { HostHandle, IHostConnectionInfo, IMessage, ITransport } from "../shared/types.ts";
|
|
8
9
|
import { ValStat } from "../shared/valstat.ts";
|
|
9
10
|
export declare class CLIClient<Handle extends HostHandle> {
|
|
10
11
|
private enclave;
|
|
11
12
|
private conn?;
|
|
12
13
|
private clock;
|
|
13
|
-
constructor({
|
|
14
|
-
|
|
14
|
+
constructor({ enclave, clock }: {
|
|
15
|
+
enclave: Enclave;
|
|
15
16
|
clock?: IClock;
|
|
16
17
|
});
|
|
17
18
|
connect(host: IHostConnectionInfo<Handle>, transport: ITransport): Promise<Status>;
|
|
@@ -23,17 +24,18 @@ export declare class CLIClient<Handle extends HostHandle> {
|
|
|
23
24
|
listen(onNotification: (bytes: Uint8Array) => Promise<Status>, onDisconnect?: () => void, onConnect?: () => void): Promise<Status>;
|
|
24
25
|
isConnected(): boolean;
|
|
25
26
|
}
|
|
26
|
-
export declare function initCLI<Handle extends URL>({
|
|
27
|
-
|
|
27
|
+
export declare function initCLI<Handle extends URL>({ enclave, host, transport }: {
|
|
28
|
+
enclave: Enclave;
|
|
28
29
|
host: IHostConnectionInfo<Handle>;
|
|
29
30
|
transport: ITransport;
|
|
30
31
|
}): Promise<[CLIClient<Handle>, Status]>;
|
|
31
|
-
export declare function initCLIOrPanic<Handle extends URL>({
|
|
32
|
-
|
|
32
|
+
export declare function initCLIOrPanic<Handle extends URL>({ enclave, host, transport }: {
|
|
33
|
+
enclave: Enclave;
|
|
33
34
|
host: IHostConnectionInfo<Handle>;
|
|
34
35
|
transport?: ITransport;
|
|
35
36
|
}): Promise<CLIClient<Handle>>;
|
|
36
|
-
|
|
37
|
+
/** Load master seed hex from env and construct an Enclave immediately. */
|
|
38
|
+
export declare function loadEnclaveOrPanic(envVar: string): Enclave;
|
|
37
39
|
export declare function loadHostOrPanic(envVar: string): IHostConnectionInfo<URL>;
|
|
38
40
|
export { default as msgpack } from "../bun/src/codec.ts";
|
|
39
41
|
export { Decoder } from "../shared/codec.ts";
|
package/dist/web/client.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import DiplomaticClientAPI from "./shared/client";
|
|
|
2
2
|
import { IClock } from "./shared/clock";
|
|
3
3
|
import { Status } from "./shared/consts";
|
|
4
4
|
import { EncodedMessage } from "./shared/message";
|
|
5
|
-
import {
|
|
5
|
+
import type { Enclave } from "./shared/crypto/enclave";
|
|
6
|
+
import { EntityID, Hash, HostHandle, ICrypto, IDeleteParams, IEntRev, IHostConnectionInfo, IInsertParams, IMessageHead, IStateManager, ITransport, IUpdateParams } from "./shared/types";
|
|
6
7
|
import { ValStat } from "./shared/valstat";
|
|
7
8
|
import { ApldState, IClient, IDiplomaticClientState, IDiplomaticClientXferState, IHostRow, IStateEmitter, IStore, IStoredMessage, ListMsgsOpts, ReconcileOpts, ReconcileReport, SetSeedOpts, WipeOpts } from "./types";
|
|
8
9
|
export declare class SyncClient<Handle extends HostHandle> implements IClient<Handle> {
|
|
@@ -54,7 +55,7 @@ export declare class SyncClient<Handle extends HostHandle> implements IClient<Ha
|
|
|
54
55
|
onScheduleSync?: (() => void) | undefined);
|
|
55
56
|
/** Record phase progress and notify xferState listeners. */
|
|
56
57
|
private emitProgress;
|
|
57
|
-
setSeed(
|
|
58
|
+
setSeed(enclave: Enclave, opts?: SetSeedOpts): Promise<void>;
|
|
58
59
|
private getClientState;
|
|
59
60
|
private getXferState;
|
|
60
61
|
/**
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Enclave, type PasskeyPrfOpts } from "../shared/crypto/enclave";
|
|
2
|
+
import type { SealedMasterKey } from "../shared/seed";
|
|
3
|
+
import type { ICrypto } from "../shared/types";
|
|
4
|
+
import { type ValStat } from "../shared/valstat";
|
|
5
|
+
import type { BundleHost } from "../shared/codecs/bundleHost";
|
|
6
|
+
import type { PrfRp } from "../shared/webauthn/prf";
|
|
7
|
+
export { type PairPackagePlain, pairPackagePlainCodec, } from "../shared/codecs/pairPackage";
|
|
8
|
+
export { PAIR_PACKAGE_VERSION, type PairPackageEnvelope, pairPackageEnvelopeCodec, } from "../shared/codecs/pairPackageEnvelope";
|
|
9
|
+
export type OpenedPairPackage = {
|
|
10
|
+
enclave: Enclave;
|
|
11
|
+
hosts: BundleHost[];
|
|
12
|
+
salt: Uint8Array;
|
|
13
|
+
credId?: Uint8Array;
|
|
14
|
+
/** Sealed master for protocol IDB, under same PRF (single ceremony). */
|
|
15
|
+
sealedMaster: SealedMasterKey;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Pair package seal/open under PRF.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PairPackage: {
|
|
21
|
+
readonly PREFIX: "dip1:";
|
|
22
|
+
readonly VERSION: 1;
|
|
23
|
+
/**
|
|
24
|
+
* Seal enclave seed + hosts: Enclave runs PRF UV, then AEAD → `dip1:` string.
|
|
25
|
+
*/
|
|
26
|
+
readonly seal: (_crypto: ICrypto, enclave: Enclave, hosts: BundleHost[], opts?: PasskeyPrfOpts) => Promise<ValStat<string>>;
|
|
27
|
+
/**
|
|
28
|
+
* Open pair package: decode envelope, Enclave runs PRF UV + decrypt + enclave.
|
|
29
|
+
*/
|
|
30
|
+
readonly open: (crypto: ICrypto, pairPkg: string, rp: PrfRp) => Promise<ValStat<OpenedPairPackage>>;
|
|
31
|
+
};
|
package/dist/web/index.d.ts
CHANGED
|
@@ -6,15 +6,18 @@ import { EntIDB } from "./entdb/idb";
|
|
|
6
6
|
import { EntDBMemory, type EntDBMemoryOptions } from "./entdb/memory";
|
|
7
7
|
import { useClient, useClientState, useClientXferState, useSyncOnResume } from "./react/useClient";
|
|
8
8
|
import useStateWatcher, { useStateWatcherSuspense } from "./react/useStateWatcher";
|
|
9
|
-
import { b64tob, btob64, btoh, htob } from "./shared/binary";
|
|
9
|
+
import { b64tob, b64urltob, btob64, btob64url, btoh, htob } from "./shared/binary";
|
|
10
10
|
import { Clock } from "./shared/clock";
|
|
11
11
|
import { Decoder, Encoder } from "./shared/codec";
|
|
12
12
|
import { eidCodec, genSingletonEID } from "./shared/codecs/eid";
|
|
13
13
|
import { Status } from "./shared/consts";
|
|
14
14
|
import { hostHTTPTransport, HTTPTransport } from "./shared/http";
|
|
15
15
|
import { TypedEventEmitter } from "./shared/events";
|
|
16
|
-
import {
|
|
16
|
+
import { asMasterSeed, asSealedMasterKey, MASTER_SEED_LEN, type MasterSeed, SEALED_MASTER_KEY_LEN, type SealedMasterKey } from "./shared/seed";
|
|
17
|
+
import { EntityID, GroupID, HostHandle, ICrypto, IDeleteParams, IEntRev, IHostConnectionInfo, IMessage, IMutateOp, type IOp, IStateManager, ITransport, IUpdateParams } from "./shared/types";
|
|
18
|
+
import { Enclave, sealKeyFromPrf } from "./shared/crypto/enclave";
|
|
17
19
|
import { nullStateManager, StateManager } from "./state";
|
|
20
|
+
import { IDBSeedStore } from "./stores/idb/seed";
|
|
18
21
|
import { IDBStore, openIDBStore } from "./stores/idb/store";
|
|
19
22
|
import { MemoryStore } from "./stores/memory/store";
|
|
20
23
|
import { SingletonStateManager } from "./shared/singleton";
|
|
@@ -22,8 +25,17 @@ import type { ApldState, Applier, HostStatsUpdate, IClient, IDiplomaticClientSta
|
|
|
22
25
|
import { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, isApldState, isPendingApply, isTerminalApplyFailure, setApld } from "./types";
|
|
23
26
|
import type { SyncProgressEvent } from "./progress";
|
|
24
27
|
import { defaultPeekProgressEvery, idleProgress, shouldEmitItemProgress } from "./progress";
|
|
25
|
-
import {
|
|
26
|
-
import type {
|
|
28
|
+
import { defaultWebAuthnRpId, LargeBlob, PasskeySeedStore } from "./passkey/seed";
|
|
29
|
+
import type { LargeBlobCreateOpts, LargeBlobRp } from "./passkey/seed";
|
|
30
|
+
import { createPrfCred, DEFAULT_PRF_SALT, evalPrf, prfCapable, type PrfCreateOpts, type PrfEvalResult, type PrfRp } from "./shared/webauthn/prf";
|
|
31
|
+
import { PrfSeedStore } from "./passkey/prf-store";
|
|
32
|
+
import type { PersistPrfSeedMeta, PrfSeedMeta, PrfSeedStoreOpts } from "./passkey/prf-store";
|
|
33
|
+
import type { PasskeySeedStoreOpts } from "./passkey/seed";
|
|
34
|
+
import { type BundleHost, bundleHostCodec } from "./shared/codecs/bundleHost";
|
|
35
|
+
import { createIdentityBundle, IDENTITY_BUNDLE_VERSION, identityBundleCodec } from "./shared/codecs/identityBundle";
|
|
36
|
+
import type { IdentityBundle } from "./shared/codecs/identityBundle";
|
|
37
|
+
import { PAIR_PACKAGE_VERSION, PairPackage, pairPackageEnvelopeCodec, pairPackagePlainCodec } from "./identity/pairPackage";
|
|
38
|
+
import type { OpenedPairPackage, PairPackageEnvelope, PairPackagePlain } from "./identity/pairPackage";
|
|
27
39
|
import { checksumEntRevs, checksumSet, cmpBytes, encodeEntRev } from "./shared/checksum";
|
|
28
40
|
import { openDiplomaticClient, type OpenDiplomaticClientMainOptions, type OpenDiplomaticClientOptions, type OpenDiplomaticClientWorkerOptions, type OpenedDiplomaticClient } from "./openClient";
|
|
29
41
|
import { WorkerClient } from "./worker/client";
|
|
@@ -33,5 +45,5 @@ export declare function genWebClient(stateMgr: IStateManager, url: URL): Promise
|
|
|
33
45
|
client: SyncClient<URL>;
|
|
34
46
|
setSeed: (seedHex: string) => Promise<void>;
|
|
35
47
|
}>;
|
|
36
|
-
export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, b64tob, btob64, btoh, CachedEntDB, checksumEntRevs, checksumSet,
|
|
37
|
-
export type { ApldState, Applier, CachedEntDBOptions, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IDiplomaticClientState, IEntRev, IEntRow, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITombstone, ITransport, IUpdateParams,
|
|
48
|
+
export { APLD_APPLIED, APLD_ERROR, APLD_PENDING, apldFromStored, asMasterSeed, asSealedMasterKey, b64tob, b64urltob, btob64, btob64url, btoh, bundleHostCodec, CachedEntDB, checksumEntRevs, checksumSet, Clock, cmpBytes, createIdentityBundle, createPrfCred, crypto, Decoder, DEFAULT_PRF_SALT, defaultPeekProgressEvery, defaultWebAuthnRpId, eidCodec, encodeEntRev, Encoder, Enclave, EntDBMemory, EntIDB, EntitiesQuery, EntityID, entStateManager, evalPrf, genSingletonEID, GroupID, hostHTTPTransport, htob, HTTPTransport, IDBSeedStore, IDBStore, IDENTITY_BUNDLE_VERSION, identityBundleCodec, idleProgress, IEntDB, IEntity, isApldState, isLiveEnt, isPendingApply, isTerminalApplyFailure, isTombstone, IStore, LargeBlob, MASTER_SEED_LEN, MasterSeed, MemoryStore, normalizeTags, nullEntDB, nullStateManager, openDiplomaticClient, openEntDB, openIDBStore, PAIR_PACKAGE_VERSION, PairPackage, pairPackageEnvelopeCodec, pairPackagePlainCodec, PasskeySeedStore, prfCapable, PrfSeedStore, revFromEntity, revFromHead, SEALED_MASTER_KEY_LEN, setApld, shouldEmitItemProgress, SingletonStateManager, StateManager, Status, SyncClient, TypedEventEmitter, sealKeyFromPrf, useClient, useClientState, useClientXferState, useStateWatcher, useStateWatcherSuspense, useSyncOnResume, WorkerClient, };
|
|
49
|
+
export type { ApldState, Applier, BundleHost, CachedEntDBOptions, EntDBMemoryOptions, HostHandle, HostStatsUpdate, IClient, ICrypto, IDeleteParams, IdentityBundle, IDiplomaticClientState, IEntRev, IEntRow, IHostConnectionInfo, IHostRow, IMessage, IMutateOp, IOp, IStateManager, IStoredMessage, IStoredMessageData, IStoredMessageWrite, ITombstone, ITransport, IUpdateParams, LargeBlobCreateOpts, LargeBlobRp, ListMsgsOpts, OpenDiplomaticClientMainOptions, OpenDiplomaticClientOptions, OpenDiplomaticClientWorkerOptions, OpenedDiplomaticClient, OpenedPairPackage, OpenEntDBOptions, PairPackageEnvelope, PairPackagePlain, PasskeySeedStoreOpts, PersistPrfSeedMeta, PrfCreateOpts, PrfEvalResult, PrfRp, PrfSeedMeta, PrfSeedStoreOpts, ReconcileOpts, ReconcileReport, SealedMasterKey, SetSeedOpts, SyncProgressEvent, WipeOpts, WorkerClientOptions, };
|