@interncom/diplomatic 0.13.2 → 0.13.4
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/consts.d.ts +2 -1
- package/dist/cli/shared/webauthn/common.d.ts +8 -0
- package/dist/cli/shared/webauthn/largeBlob.d.ts +1 -1
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.mjs +1 -1
- package/dist/web/passkey/prf-store.d.ts +1 -1
- package/dist/web/shared/consts.d.ts +2 -1
- package/dist/web/shared/webauthn/common.d.ts +8 -0
- package/dist/web/shared/webauthn/largeBlob.d.ts +1 -1
- package/dist/web/worker.mjs +1 -1
- package/package.json +1 -1
|
@@ -47,7 +47,7 @@ export declare class PrfSeedStore implements ISeedStore {
|
|
|
47
47
|
/**
|
|
48
48
|
* PRF UV inside Enclave, seal master, persist meta (no PRF leaves Enclave).
|
|
49
49
|
*/
|
|
50
|
-
wrapAndSave(enclave: Enclave, opts?: Pick<PasskeyPrfOpts, "salt" | "credId" | "createCredIfNeeded" | "authenticatorAttachment">): Promise<ValStat<Enclave>>;
|
|
50
|
+
wrapAndSave(enclave: Enclave, opts?: Pick<PasskeyPrfOpts, "salt" | "credId" | "createCredIfNeeded" | "authenticatorAttachment" | "hints">): Promise<ValStat<Enclave>>;
|
|
51
51
|
load(): Promise<Enclave | void>;
|
|
52
52
|
/** Passkey UV inside Enclave → new session enclave. */
|
|
53
53
|
unlock(): Promise<ValStat<Enclave>>;
|
|
@@ -7,9 +7,13 @@ export declare const COSE_ALG_EDDSA = -8;
|
|
|
7
7
|
export declare const COSE_ALG_RS256 = -257;
|
|
8
8
|
/** Prefer modern curves; include RS256 for broader authenticator coverage. */
|
|
9
9
|
export declare const WEBAUTHN_PUB_KEY_PARAMS: PublicKeyCredentialParameters[];
|
|
10
|
+
/** UA preference for the WebAuthn picker. Not exclusive; omit attachment to allow both. */
|
|
11
|
+
export type WebAuthnHint = "security-key" | "client-device" | "hybrid";
|
|
10
12
|
export type WebAuthnRp = {
|
|
11
13
|
rpId?: string;
|
|
12
14
|
rpName?: string;
|
|
15
|
+
/** Level 3 `hints`. Prefer `security-key` so Android offers USB. */
|
|
16
|
+
hints?: WebAuthnHint[];
|
|
13
17
|
};
|
|
14
18
|
/**
|
|
15
19
|
* Default WebAuthn RP ID: the full hostname (no eTLD+1 collapse).
|
|
@@ -35,6 +39,10 @@ export declare function copyToArrayBuffer(src: Uint8Array): ArrayBuffer;
|
|
|
35
39
|
export declare function bufferSourceToUint8(src: BufferSource): Uint8Array;
|
|
36
40
|
/** Resolve RP id from opts or `location.hostname`. */
|
|
37
41
|
export declare function resolveWebAuthnRpId(opts?: WebAuthnRp): ValStat<string>;
|
|
42
|
+
/** Last `credentials.create`/`get` throw (name + message). Empty if none. */
|
|
43
|
+
export declare function webAuthnLastError(): string;
|
|
44
|
+
/** Records a WebAuthn DOMException (or other throw) for {@link webAuthnLastError}. */
|
|
45
|
+
export declare function noteWebAuthnError(e: unknown): void;
|
|
38
46
|
/** Success if WebAuthn credentials API is available in this environment. */
|
|
39
47
|
export declare function checkWebAuthn(): Status;
|
|
40
48
|
export declare function asPublicKeyCredential(cred: Credential | null): ValStat<PublicKeyCredential>;
|
|
@@ -12,7 +12,7 @@ export declare function largeBlobCapable(): Promise<boolean>;
|
|
|
12
12
|
export declare function largeBlobCreateCred(opts?: LargeBlobCreateOpts): Promise<ValStat<Uint8Array>>;
|
|
13
13
|
/** UV write of opaque bytes to largeBlob. */
|
|
14
14
|
export declare function largeBlobWrite(credId: Uint8Array, data: Uint8Array, opts?: LargeBlobRp): Promise<Status>;
|
|
15
|
-
/** UV read from largeBlob; `credId` undefined = discoverable
|
|
15
|
+
/** UV read from largeBlob; `credId` undefined = discoverable then targeted read. */
|
|
16
16
|
export declare function largeBlobRead(credId: Uint8Array | undefined, opts?: LargeBlobRp): Promise<ValStat<{
|
|
17
17
|
blob: Uint8Array;
|
|
18
18
|
credId: Uint8Array;
|