@interncom/diplomatic 0.14.0 → 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.
@@ -1,6 +1,10 @@
1
1
  import { Status } from "../consts.ts";
2
2
  import { type ValStat } from "../valstat.ts";
3
3
  export declare const WEBAUTHN_CHAL_LEN = 32;
4
+ /** Default RP name shown in the WebAuthn picker. */
5
+ export declare const DEFAULT_WEBAUTHN_RP_NAME = "DIPLOMATIC";
6
+ /** WebAuthn PublicKeyCredentialType. */
7
+ export declare const WEBAUTHN_CRED_TYPE: "public-key";
4
8
  /** COSE algorithm identifiers for WebAuthn `pubKeyCredParams`. */
5
9
  export declare const COSE_ALG_ES256 = -7;
6
10
  export declare const COSE_ALG_EDDSA = -8;
@@ -2,10 +2,13 @@ import { type ValStat } from "../valstat.ts";
2
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
- /** Seal salt (eval is on get, not create some UAs throw on create-time eval). */
11
+ /** PRF salt. Tried at create; some UAs only eval on get(). */
9
12
  salt?: Uint8Array;
10
13
  /** Already-bound cred ids so create does not assert an existing key. */
11
14
  excludeCredentials?: readonly Uint8Array[];
@@ -26,6 +29,8 @@ export type PrfCeremony = {
26
29
  };
27
30
  export type PrfCreateResult = PrfCeremony & {
28
31
  prfEnabled: boolean;
32
+ /** Present when the UA evaluated PRF during create (no second get). */
33
+ prf?: Uint8Array;
29
34
  };
30
35
  /** Internal: PRF output + cred id. For Enclave only — do not re-export to apps. */
31
36
  export type PrfEvalResult = PrfCeremony & {