@oxy.so/contracts 2.1.0 → 2.2.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/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/accountEmail.js +83 -0
- package/dist/cjs/identityLink.js +89 -0
- package/dist/cjs/identityProof.js +6 -29
- package/dist/cjs/index.js +35 -49
- package/dist/cjs/webauthn.js +50 -21
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/accountEmail.js +80 -0
- package/dist/esm/identityLink.js +84 -0
- package/dist/esm/identityProof.js +6 -29
- package/dist/esm/index.js +7 -10
- package/dist/esm/webauthn.js +49 -20
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/accountEmail.d.ts +98 -0
- package/dist/types/accountGraph.d.ts +4 -4
- package/dist/types/agency.d.ts +2 -2
- package/dist/types/deviceSession.d.ts +4 -4
- package/dist/types/externalIdentity.d.ts +8 -8
- package/dist/types/identityLink.d.ts +210 -0
- package/dist/types/identityProof.d.ts +15 -42
- package/dist/types/index.d.ts +6 -8
- package/dist/types/inference/accountBilling.d.ts +2 -2
- package/dist/types/inference/embeddings.d.ts +16 -16
- package/dist/types/inference/errors.d.ts +8 -8
- package/dist/types/inference/inbox.d.ts +8 -8
- package/dist/types/inference/providerConnection.d.ts +20 -20
- package/dist/types/inference/request.d.ts +16 -16
- package/dist/types/inference/streamEvents.d.ts +20 -20
- package/dist/types/keyRecovery.d.ts +4 -4
- package/dist/types/sessionStatus.d.ts +2 -2
- package/dist/types/userResponse.d.ts +4 -4
- package/dist/types/webauthn.d.ts +102 -214
- package/package.json +1 -1
- package/dist/cjs/identityMove.js +0 -156
- package/dist/cjs/identityRecovery.js +0 -51
- package/dist/cjs/webIdentityCarrier.js +0 -181
- package/dist/esm/identityMove.js +0 -148
- package/dist/esm/identityRecovery.js +0 -48
- package/dist/esm/webIdentityCarrier.js +0 -178
- package/dist/types/identityMove.d.ts +0 -185
- package/dist/types/identityRecovery.d.ts +0 -246
- package/dist/types/webIdentityCarrier.d.ts +0 -1130
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Identity move contract — give a web root to Commons (add it, or keep it only in
|
|
3
|
-
* Commons; ADR 0024 D6).
|
|
4
|
-
*
|
|
5
|
-
* The web (holding the root) shows a QR carrying only a move id; Commons scans.
|
|
6
|
-
* The relay in between must not be able to take the root, so:
|
|
7
|
-
*
|
|
8
|
-
* 1. `POST /identity/move { initiatorCommitment }` — the web publishes only
|
|
9
|
-
* `H(initiatorKey, nonce)`, never the key.
|
|
10
|
-
* 2. `POST /identity/move/:moveId/join { responderEphemeralPublicKey }` —
|
|
11
|
-
* Commons, having read the commitment first, joins with its own key.
|
|
12
|
-
* 3. `POST /identity/move/:moveId/reveal` — only then does the web reveal its
|
|
13
|
-
* key and nonce; Commons checks them against the commitment it read.
|
|
14
|
-
* 4. Both screens show a 6-digit code over `(moveId, both keys, commitment)`;
|
|
15
|
-
* the person confirms on the web that they match.
|
|
16
|
-
* 5. `POST /identity/move/:moveId/seal` — the web seals the phrase entropy under
|
|
17
|
-
* `HKDF(ECDH(both keys), moveId)`, authorized by a one-use root proof over the
|
|
18
|
-
* exact sealed bytes.
|
|
19
|
-
* 6. `POST /identity/move/:moveId/receipt` — Commons stores the root, reads it
|
|
20
|
-
* back from its keychain, and signs a receipt over the move, the root, both
|
|
21
|
-
* keys and the digest of the ciphertext it opened. The server verifies it; the
|
|
22
|
-
* web verifies it again from what IT sealed before removing anything.
|
|
23
|
-
*
|
|
24
|
-
* Why the commitment: without it the relay sees both keys before committing to
|
|
25
|
-
* anything and can grind a substituted key until the two codes agree (~10⁶
|
|
26
|
-
* tries, seconds). With it, the relay must fix the key it shows Commons before
|
|
27
|
-
* learning Commons' key, and the key it shows the web before the web reveals.
|
|
28
|
-
*
|
|
29
|
-
* The server holds a commitment, two ephemeral public keys, an opaque ciphertext
|
|
30
|
-
* and a receipt — nothing that decrypts the ciphertext.
|
|
31
|
-
*
|
|
32
|
-
* Platform-agnostic — zod only, ESM-safe (no `require()`).
|
|
33
|
-
*/
|
|
34
|
-
import { z } from 'zod';
|
|
35
|
-
/** A move lives this long: one interactive handoff. */
|
|
36
|
-
export declare const IDENTITY_MOVE_TTL_MS: number;
|
|
37
|
-
/** 128-bit move id, lowercase hex. */
|
|
38
|
-
export declare const identityMoveIdSchema: z.ZodString;
|
|
39
|
-
/** An ephemeral secp256k1 public key, uncompressed lowercase hex. */
|
|
40
|
-
export declare const identityMoveEphemeralKeySchema: z.ZodString;
|
|
41
|
-
export declare const IDENTITY_MOVE_STATUSES: readonly ["pending", "joined", "sealed", "completed", "cancelled", "expired"];
|
|
42
|
-
export type IdentityMoveStatus = (typeof IDENTITY_MOVE_STATUSES)[number];
|
|
43
|
-
/** The QR payload Commons scans. Carries the move id only. */
|
|
44
|
-
export declare const IDENTITY_MOVE_QR_PREFIX = "oxycommons://move?id=";
|
|
45
|
-
export declare const identityMoveCreateRequestSchema: z.ZodObject<{
|
|
46
|
-
/** `H(initiator ephemeral key, nonce)` — the key itself is revealed only after Commons joins. */
|
|
47
|
-
initiatorCommitment: z.ZodString;
|
|
48
|
-
}, "strict", z.ZodTypeAny, {
|
|
49
|
-
initiatorCommitment: string;
|
|
50
|
-
}, {
|
|
51
|
-
initiatorCommitment: string;
|
|
52
|
-
}>;
|
|
53
|
-
export interface IdentityMoveCreateResponse {
|
|
54
|
-
moveId: string;
|
|
55
|
-
expiresAt: string;
|
|
56
|
-
}
|
|
57
|
-
export declare const identityMoveCreateResponseSchema: z.ZodType<IdentityMoveCreateResponse>;
|
|
58
|
-
export declare const identityMoveJoinRequestSchema: z.ZodObject<{
|
|
59
|
-
responderEphemeralPublicKey: z.ZodString;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
responderEphemeralPublicKey: string;
|
|
62
|
-
}, {
|
|
63
|
-
responderEphemeralPublicKey: string;
|
|
64
|
-
}>;
|
|
65
|
-
/** After Commons joined: the committed key and its nonce. */
|
|
66
|
-
export declare const identityMoveRevealRequestSchema: z.ZodObject<{
|
|
67
|
-
initiatorEphemeralPublicKey: z.ZodString;
|
|
68
|
-
commitmentNonce: z.ZodString;
|
|
69
|
-
}, "strict", z.ZodTypeAny, {
|
|
70
|
-
initiatorEphemeralPublicKey: string;
|
|
71
|
-
commitmentNonce: string;
|
|
72
|
-
}, {
|
|
73
|
-
initiatorEphemeralPublicKey: string;
|
|
74
|
-
commitmentNonce: string;
|
|
75
|
-
}>;
|
|
76
|
-
export declare const identityMoveSealRequestSchema: z.ZodObject<{
|
|
77
|
-
/** 24-byte XChaCha20-Poly1305 nonce, hex. */
|
|
78
|
-
nonce: z.ZodString;
|
|
79
|
-
/** The 16–32-byte phrase entropy (12–24 words), tag appended, hex. */
|
|
80
|
-
ciphertext: z.ZodString;
|
|
81
|
-
/**
|
|
82
|
-
* Root proof (`identity_move_seal`), payload `{ moveId, nonce, ciphertext }`,
|
|
83
|
-
* over a one-use challenge from `POST /identity/proof-challenge`.
|
|
84
|
-
*/
|
|
85
|
-
proof: z.ZodObject<{
|
|
86
|
-
v: z.ZodLiteral<2>;
|
|
87
|
-
challenge: z.ZodString;
|
|
88
|
-
expiresAt: z.ZodNumber;
|
|
89
|
-
signature: z.ZodString;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
expiresAt: number;
|
|
92
|
-
signature: string;
|
|
93
|
-
v: 2;
|
|
94
|
-
challenge: string;
|
|
95
|
-
}, {
|
|
96
|
-
expiresAt: number;
|
|
97
|
-
signature: string;
|
|
98
|
-
v: 2;
|
|
99
|
-
challenge: string;
|
|
100
|
-
}>;
|
|
101
|
-
}, "strict", z.ZodTypeAny, {
|
|
102
|
-
proof: {
|
|
103
|
-
expiresAt: number;
|
|
104
|
-
signature: string;
|
|
105
|
-
v: 2;
|
|
106
|
-
challenge: string;
|
|
107
|
-
};
|
|
108
|
-
nonce: string;
|
|
109
|
-
ciphertext: string;
|
|
110
|
-
}, {
|
|
111
|
-
proof: {
|
|
112
|
-
expiresAt: number;
|
|
113
|
-
signature: string;
|
|
114
|
-
v: 2;
|
|
115
|
-
challenge: string;
|
|
116
|
-
};
|
|
117
|
-
nonce: string;
|
|
118
|
-
ciphertext: string;
|
|
119
|
-
}>;
|
|
120
|
-
export declare const identityMoveReceiptRequestSchema: z.ZodObject<{
|
|
121
|
-
/** Root signature over `buildMoveReceiptMessage(...)`. */
|
|
122
|
-
signature: z.ZodString;
|
|
123
|
-
}, "strict", z.ZodTypeAny, {
|
|
124
|
-
signature: string;
|
|
125
|
-
}, {
|
|
126
|
-
signature: string;
|
|
127
|
-
}>;
|
|
128
|
-
/** `GET /identity/move/:moveId` — everything either side needs, nothing that decrypts. */
|
|
129
|
-
export interface IdentityMoveState {
|
|
130
|
-
moveId: string;
|
|
131
|
-
status: IdentityMoveStatus;
|
|
132
|
-
/** The commitment Commons must read before joining. */
|
|
133
|
-
initiatorCommitment: string;
|
|
134
|
-
/** The commitment's nonce, published with the key at reveal. */
|
|
135
|
-
initiatorCommitmentNonce: string | null;
|
|
136
|
-
/** The identity being moved (so Commons can check the key it will import). */
|
|
137
|
-
publicKey: string;
|
|
138
|
-
/** `null` until the web reveals it, after Commons joined. */
|
|
139
|
-
initiatorEphemeralPublicKey: string | null;
|
|
140
|
-
responderEphemeralPublicKey: string | null;
|
|
141
|
-
nonce: string | null;
|
|
142
|
-
ciphertext: string | null;
|
|
143
|
-
receiptSignature: string | null;
|
|
144
|
-
expiresAt: string;
|
|
145
|
-
}
|
|
146
|
-
export declare const identityMoveStateSchema: z.ZodType<IdentityMoveState>;
|
|
147
|
-
export type IdentityMoveCreateRequest = z.infer<typeof identityMoveCreateRequestSchema>;
|
|
148
|
-
export type IdentityMoveJoinRequest = z.infer<typeof identityMoveJoinRequestSchema>;
|
|
149
|
-
export type IdentityMoveRevealRequest = z.infer<typeof identityMoveRevealRequestSchema>;
|
|
150
|
-
export type IdentityMoveSealRequest = z.infer<typeof identityMoveSealRequestSchema>;
|
|
151
|
-
export type IdentityMoveReceiptRequest = z.infer<typeof identityMoveReceiptRequestSchema>;
|
|
152
|
-
/**
|
|
153
|
-
* The initiator's commitment input, `canonicalJson({ v, purpose, key, nonce })`,
|
|
154
|
-
* which the caller hashes with SHA-256.
|
|
155
|
-
*/
|
|
156
|
-
export declare function buildMoveCommitmentInput(initiatorEphemeralPublicKey: string, nonce: string): string;
|
|
157
|
-
/** The bytes both sides hash for the 6-digit code. */
|
|
158
|
-
export declare function buildMoveSasInput(input: {
|
|
159
|
-
moveId: string;
|
|
160
|
-
initiatorEphemeralPublicKey: string;
|
|
161
|
-
responderEphemeralPublicKey: string;
|
|
162
|
-
initiatorCommitment: string;
|
|
163
|
-
}): string;
|
|
164
|
-
/** The ciphertext digest input the receipt binds: `canonicalJson({ nonce, ciphertext })`. */
|
|
165
|
-
export declare function buildMoveCiphertextDigestInput(sealed: {
|
|
166
|
-
nonce: string;
|
|
167
|
-
ciphertext: string;
|
|
168
|
-
}): string;
|
|
169
|
-
/** The payload a seal proof digests. */
|
|
170
|
-
export declare function buildMoveSealPayload(moveId: string, sealed: {
|
|
171
|
-
nonce: string;
|
|
172
|
-
ciphertext: string;
|
|
173
|
-
}): {
|
|
174
|
-
moveId: string;
|
|
175
|
-
nonce: string;
|
|
176
|
-
ciphertext: string;
|
|
177
|
-
};
|
|
178
|
-
/** The exact bytes a receipt signs. */
|
|
179
|
-
export declare function buildMoveReceiptMessage(input: {
|
|
180
|
-
moveId: string;
|
|
181
|
-
rootPublicKey: string;
|
|
182
|
-
initiatorEphemeralPublicKey: string;
|
|
183
|
-
responderEphemeralPublicKey: string;
|
|
184
|
-
ciphertextDigest: string;
|
|
185
|
-
}): string;
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Signed-out recovery contract (ADR 0024 D5) — get an EXISTING account back from
|
|
3
|
-
* its root alone, with no passkey, session or email.
|
|
4
|
-
*
|
|
5
|
-
* 1. `POST /identity/recovery/challenge` → a one-use challenge. It says nothing
|
|
6
|
-
* about any account.
|
|
7
|
-
* 2. The holder derives the root locally from recovery material (12/24 words or a
|
|
8
|
-
* raw key) and signs `recover_account_start` over that challenge:
|
|
9
|
-
* `POST /identity/recovery/start { publicKey, proof }`. Only a valid proof
|
|
10
|
-
* learns which account the root belongs to; the response carries passkey
|
|
11
|
-
* registration options for THAT account and a short-lived ticket.
|
|
12
|
-
* 3. The holder creates the passkey, seals the root under it (PRF), and signs
|
|
13
|
-
* `recover_account_complete` over the registration challenge and the envelope
|
|
14
|
-
* digest: `POST /identity/recovery/complete`. The passkey, the envelope and a
|
|
15
|
-
* session are created in one transaction.
|
|
16
|
-
*
|
|
17
|
-
* The recovery material and the root never leave the holder. Platform-agnostic —
|
|
18
|
-
* zod only, ESM-safe.
|
|
19
|
-
*/
|
|
20
|
-
import { z } from 'zod';
|
|
21
|
-
/** A recovery attempt lives this long between steps. */
|
|
22
|
-
export declare const IDENTITY_RECOVERY_TTL_MS: number;
|
|
23
|
-
export interface IdentityRecoveryChallengeResponse {
|
|
24
|
-
/** 32 bytes, lowercase hex. */
|
|
25
|
-
challenge: string;
|
|
26
|
-
/** Unix milliseconds. */
|
|
27
|
-
expiresAt: number;
|
|
28
|
-
}
|
|
29
|
-
export declare const identityRecoveryChallengeResponseSchema: z.ZodType<IdentityRecoveryChallengeResponse>;
|
|
30
|
-
export declare const identityRecoveryStartRequestSchema: z.ZodObject<{
|
|
31
|
-
publicKey: z.ZodString;
|
|
32
|
-
/** `recover_account_start`, subject `root:<publicKey>`, actor `anonymous`. */
|
|
33
|
-
proof: z.ZodObject<{
|
|
34
|
-
v: z.ZodLiteral<2>;
|
|
35
|
-
challenge: z.ZodString;
|
|
36
|
-
expiresAt: z.ZodNumber;
|
|
37
|
-
signature: z.ZodString;
|
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
expiresAt: number;
|
|
40
|
-
signature: string;
|
|
41
|
-
v: 2;
|
|
42
|
-
challenge: string;
|
|
43
|
-
}, {
|
|
44
|
-
expiresAt: number;
|
|
45
|
-
signature: string;
|
|
46
|
-
v: 2;
|
|
47
|
-
challenge: string;
|
|
48
|
-
}>;
|
|
49
|
-
}, "strict", z.ZodTypeAny, {
|
|
50
|
-
publicKey: string;
|
|
51
|
-
proof: {
|
|
52
|
-
expiresAt: number;
|
|
53
|
-
signature: string;
|
|
54
|
-
v: 2;
|
|
55
|
-
challenge: string;
|
|
56
|
-
};
|
|
57
|
-
}, {
|
|
58
|
-
publicKey: string;
|
|
59
|
-
proof: {
|
|
60
|
-
expiresAt: number;
|
|
61
|
-
signature: string;
|
|
62
|
-
v: 2;
|
|
63
|
-
challenge: string;
|
|
64
|
-
};
|
|
65
|
-
}>;
|
|
66
|
-
export type IdentityRecoveryStartRequest = z.infer<typeof identityRecoveryStartRequestSchema>;
|
|
67
|
-
export interface IdentityRecoveryStartResponse {
|
|
68
|
-
/** Opaque, one-use; presented once to `complete`. */
|
|
69
|
-
ticket: string;
|
|
70
|
-
accountId: string;
|
|
71
|
-
username: string | null;
|
|
72
|
-
/** `PublicKeyCredentialCreationOptionsJSON` for the account's new passkey. */
|
|
73
|
-
registrationOptions: Record<string, unknown>;
|
|
74
|
-
/** Unix milliseconds. */
|
|
75
|
-
expiresAt: number;
|
|
76
|
-
}
|
|
77
|
-
export declare const identityRecoveryCompleteRequestSchema: z.ZodObject<{
|
|
78
|
-
ticket: z.ZodString;
|
|
79
|
-
/** The browser `RegistrationResponseJSON`, verified by the API's WebAuthn library. */
|
|
80
|
-
response: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
81
|
-
/** The root sealed under the new passkey — exactly one wrap, for that credential. */
|
|
82
|
-
envelope: z.ZodEffects<z.ZodObject<{
|
|
83
|
-
version: z.ZodLiteral<2>;
|
|
84
|
-
algorithm: z.ZodLiteral<"xchacha20poly1305">;
|
|
85
|
-
publicKey: z.ZodString;
|
|
86
|
-
secretKind: z.ZodEnum<["mnemonic-entropy", "raw-private-key"]>;
|
|
87
|
-
secretNonce: z.ZodString;
|
|
88
|
-
sealedSecret: z.ZodString;
|
|
89
|
-
wraps: z.ZodArray<z.ZodObject<{
|
|
90
|
-
credentialId: z.ZodString;
|
|
91
|
-
nonce: z.ZodString;
|
|
92
|
-
wrappedKey: z.ZodString;
|
|
93
|
-
createdAt: z.ZodString;
|
|
94
|
-
rpId: z.ZodString;
|
|
95
|
-
verifiedAt: z.ZodOptional<z.ZodString>;
|
|
96
|
-
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
credentialId: string;
|
|
98
|
-
createdAt: string;
|
|
99
|
-
nonce: string;
|
|
100
|
-
wrappedKey: string;
|
|
101
|
-
rpId: string;
|
|
102
|
-
verifiedAt?: string | undefined;
|
|
103
|
-
}, {
|
|
104
|
-
credentialId: string;
|
|
105
|
-
createdAt: string;
|
|
106
|
-
nonce: string;
|
|
107
|
-
wrappedKey: string;
|
|
108
|
-
rpId: string;
|
|
109
|
-
verifiedAt?: string | undefined;
|
|
110
|
-
}>, "many">;
|
|
111
|
-
}, "strip", z.ZodTypeAny, {
|
|
112
|
-
version: 2;
|
|
113
|
-
publicKey: string;
|
|
114
|
-
algorithm: "xchacha20poly1305";
|
|
115
|
-
secretKind: "mnemonic-entropy" | "raw-private-key";
|
|
116
|
-
secretNonce: string;
|
|
117
|
-
sealedSecret: string;
|
|
118
|
-
wraps: {
|
|
119
|
-
credentialId: string;
|
|
120
|
-
createdAt: string;
|
|
121
|
-
nonce: string;
|
|
122
|
-
wrappedKey: string;
|
|
123
|
-
rpId: string;
|
|
124
|
-
verifiedAt?: string | undefined;
|
|
125
|
-
}[];
|
|
126
|
-
}, {
|
|
127
|
-
version: 2;
|
|
128
|
-
publicKey: string;
|
|
129
|
-
algorithm: "xchacha20poly1305";
|
|
130
|
-
secretKind: "mnemonic-entropy" | "raw-private-key";
|
|
131
|
-
secretNonce: string;
|
|
132
|
-
sealedSecret: string;
|
|
133
|
-
wraps: {
|
|
134
|
-
credentialId: string;
|
|
135
|
-
createdAt: string;
|
|
136
|
-
nonce: string;
|
|
137
|
-
wrappedKey: string;
|
|
138
|
-
rpId: string;
|
|
139
|
-
verifiedAt?: string | undefined;
|
|
140
|
-
}[];
|
|
141
|
-
}>, {
|
|
142
|
-
version: 2;
|
|
143
|
-
publicKey: string;
|
|
144
|
-
algorithm: "xchacha20poly1305";
|
|
145
|
-
secretKind: "mnemonic-entropy" | "raw-private-key";
|
|
146
|
-
secretNonce: string;
|
|
147
|
-
sealedSecret: string;
|
|
148
|
-
wraps: {
|
|
149
|
-
credentialId: string;
|
|
150
|
-
createdAt: string;
|
|
151
|
-
nonce: string;
|
|
152
|
-
wrappedKey: string;
|
|
153
|
-
rpId: string;
|
|
154
|
-
verifiedAt?: string | undefined;
|
|
155
|
-
}[];
|
|
156
|
-
}, {
|
|
157
|
-
version: 2;
|
|
158
|
-
publicKey: string;
|
|
159
|
-
algorithm: "xchacha20poly1305";
|
|
160
|
-
secretKind: "mnemonic-entropy" | "raw-private-key";
|
|
161
|
-
secretNonce: string;
|
|
162
|
-
sealedSecret: string;
|
|
163
|
-
wraps: {
|
|
164
|
-
credentialId: string;
|
|
165
|
-
createdAt: string;
|
|
166
|
-
nonce: string;
|
|
167
|
-
wrappedKey: string;
|
|
168
|
-
rpId: string;
|
|
169
|
-
verifiedAt?: string | undefined;
|
|
170
|
-
}[];
|
|
171
|
-
}>;
|
|
172
|
-
/** `recover_account_complete`, subject = account id, actor `credential:<id>`, challenge = registration challenge (hex). */
|
|
173
|
-
proof: z.ZodObject<{
|
|
174
|
-
v: z.ZodLiteral<2>;
|
|
175
|
-
challenge: z.ZodString;
|
|
176
|
-
expiresAt: z.ZodNumber;
|
|
177
|
-
signature: z.ZodString;
|
|
178
|
-
}, "strip", z.ZodTypeAny, {
|
|
179
|
-
expiresAt: number;
|
|
180
|
-
signature: string;
|
|
181
|
-
v: 2;
|
|
182
|
-
challenge: string;
|
|
183
|
-
}, {
|
|
184
|
-
expiresAt: number;
|
|
185
|
-
signature: string;
|
|
186
|
-
v: 2;
|
|
187
|
-
challenge: string;
|
|
188
|
-
}>;
|
|
189
|
-
deviceName: z.ZodOptional<z.ZodString>;
|
|
190
|
-
deviceFingerprint: z.ZodOptional<z.ZodString>;
|
|
191
|
-
}, "strict", z.ZodTypeAny, {
|
|
192
|
-
proof: {
|
|
193
|
-
expiresAt: number;
|
|
194
|
-
signature: string;
|
|
195
|
-
v: 2;
|
|
196
|
-
challenge: string;
|
|
197
|
-
};
|
|
198
|
-
envelope: {
|
|
199
|
-
version: 2;
|
|
200
|
-
publicKey: string;
|
|
201
|
-
algorithm: "xchacha20poly1305";
|
|
202
|
-
secretKind: "mnemonic-entropy" | "raw-private-key";
|
|
203
|
-
secretNonce: string;
|
|
204
|
-
sealedSecret: string;
|
|
205
|
-
wraps: {
|
|
206
|
-
credentialId: string;
|
|
207
|
-
createdAt: string;
|
|
208
|
-
nonce: string;
|
|
209
|
-
wrappedKey: string;
|
|
210
|
-
rpId: string;
|
|
211
|
-
verifiedAt?: string | undefined;
|
|
212
|
-
}[];
|
|
213
|
-
};
|
|
214
|
-
response: Record<string, unknown>;
|
|
215
|
-
ticket: string;
|
|
216
|
-
deviceName?: string | undefined;
|
|
217
|
-
deviceFingerprint?: string | undefined;
|
|
218
|
-
}, {
|
|
219
|
-
proof: {
|
|
220
|
-
expiresAt: number;
|
|
221
|
-
signature: string;
|
|
222
|
-
v: 2;
|
|
223
|
-
challenge: string;
|
|
224
|
-
};
|
|
225
|
-
envelope: {
|
|
226
|
-
version: 2;
|
|
227
|
-
publicKey: string;
|
|
228
|
-
algorithm: "xchacha20poly1305";
|
|
229
|
-
secretKind: "mnemonic-entropy" | "raw-private-key";
|
|
230
|
-
secretNonce: string;
|
|
231
|
-
sealedSecret: string;
|
|
232
|
-
wraps: {
|
|
233
|
-
credentialId: string;
|
|
234
|
-
createdAt: string;
|
|
235
|
-
nonce: string;
|
|
236
|
-
wrappedKey: string;
|
|
237
|
-
rpId: string;
|
|
238
|
-
verifiedAt?: string | undefined;
|
|
239
|
-
}[];
|
|
240
|
-
};
|
|
241
|
-
response: Record<string, unknown>;
|
|
242
|
-
ticket: string;
|
|
243
|
-
deviceName?: string | undefined;
|
|
244
|
-
deviceFingerprint?: string | undefined;
|
|
245
|
-
}>;
|
|
246
|
-
export type IdentityRecoveryCompleteRequest = z.infer<typeof identityRecoveryCompleteRequestSchema>;
|