@seams/wallet-server 0.23.0 → 0.25.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/THIRD_PARTY_NOTICES.md +182 -5
- package/artifact-manifest.json +23 -13
- package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/deriver-b/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/local-tools/darwin-arm64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/local-tools/darwin-x64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/router/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/signing-worker/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/tenant-root-control-plane/build-stamp.json +1 -1
- package/dist/esm/authorization/voiceIdDeviceProof.js +32 -0
- package/dist/esm/core/ThresholdService/validation.js +17 -1
- package/dist/esm/core/d1WalletAuthMethodStore.js +42 -1
- package/dist/esm/core/deviceLinking/linkedDeviceManagement.js +5 -0
- package/dist/esm/core/signingLanes/WalletExecutionLaneProjection.js +11 -2
- package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +23 -6
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js +5 -5
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyEnvelopeStore.js +6 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1VoiceIdActivation.js +139 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1VoiceIdSessions.js +138 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1VoiceIdWalletSessionChallenges.js +88 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +12 -4
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorityStore.js +14 -0
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnRecords.js +1 -0
- package/dist/esm/router/cloudflare.js +576 -10
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +5 -0
- package/dist/esm/router/domains/passkeyCustody/walletRecoveryFinalization.js +1 -0
- package/dist/esm/router/domains/signingOperations/routerAbNormalSigningAdmissionCore.js +1 -0
- package/dist/esm/router/domains/signingOperations/walletExecutionAdmission.js +1 -0
- package/dist/esm/router/domains/voiceId/voiceIdActivation.js +12 -0
- package/dist/esm/router/domains/voiceId/voiceIdSessions.js +0 -0
- package/dist/esm/router/framework/routeDefinitions.js +13 -0
- package/dist/esm/router/transport/fetch/createFetchRouter.js +5 -0
- package/dist/esm/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.js +12 -1
- package/dist/esm/router/transport/fetch/routes/walletExecutionLanePreflight.js +1 -0
- package/dist/esm/router/transport/fetch/routes/walletVoiceIdActivation.js +139 -0
- package/dist/esm/router/transport/fetch/routes/walletVoiceIdNear.js +36 -0
- package/dist/esm/router/transport/fetch/routes/walletVoiceIdSessions.js +127 -0
- package/dist/esm/shared-ts/src/authorization/voiceIdDeviceAssertion.js +110 -0
- package/dist/esm/shared-ts/src/device-linking/authorityActivation.js +1 -0
- package/dist/esm/shared-ts/src/device-linking/committedSignerPackages.js +1 -1
- package/dist/esm/shared-ts/src/passkey-custody/custodyEnvelope.js +30 -3
- package/dist/esm/shared-ts/src/passkey-custody/custodySecretBinding.js +1 -1
- package/dist/esm/shared-ts/src/signing-lanes/recordParsers.js +15 -1
- package/dist/esm/shared-ts/src/threshold/sessionPolicy.js +2 -1
- package/dist/esm/shared-ts/src/utils/registrationIntent.js +1 -3
- package/dist/esm/shared-ts/src/utils/walletAuthAuthority.js +46 -2
- package/dist/esm/shared-ts/src/utils/walletAuthMethodRecord.js +116 -7
- package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryCommittedProjection.js +1 -0
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
- package/dist/types/shared-ts/src/authorization/voiceIdDeviceAssertion.d.ts +32 -0
- package/dist/types/shared-ts/src/device-linking/committedSignerPackages.d.ts +3 -1
- package/dist/types/shared-ts/src/device-linking/contracts.d.ts +8 -0
- package/dist/types/shared-ts/src/passkey-custody/custodyEnvelope.d.ts +29 -0
- package/dist/types/shared-ts/src/passkey-custody/custodySecretBinding.d.ts +1 -0
- package/dist/types/shared-ts/src/signing-lanes/execution.d.ts +2 -2
- package/dist/types/shared-ts/src/signing-lanes/recordParsers.d.ts +2 -1
- package/dist/types/shared-ts/src/signing-lanes/records.d.ts +10 -2
- package/dist/types/shared-ts/src/signing-lanes/rotation.d.ts +2 -2
- package/dist/types/shared-ts/src/threshold/sessionPolicy.d.ts +9 -0
- package/dist/types/shared-ts/src/utils/addWalletAuthMethod.d.ts +3 -3
- package/dist/types/shared-ts/src/utils/domainIds.d.ts +4 -5
- package/dist/types/shared-ts/src/utils/registrationIntent.d.ts +0 -1
- package/dist/types/shared-ts/src/utils/signerDomain.d.ts +3 -0
- package/dist/types/shared-ts/src/utils/walletAuthAuthority.d.ts +32 -2
- package/dist/types/shared-ts/src/utils/walletAuthMethodRecord.d.ts +15 -1
- package/dist/types/shared-ts/src/utils/walletCapabilityBindings.d.ts +20 -0
- package/dist/types/wallet-server/src/authorization/voiceIdDeviceProof.d.ts +29 -0
- package/dist/types/wallet-server/src/core/d1WalletAuthMethodStore.d.ts +13 -2
- package/dist/types/wallet-server/src/core/registrationContracts.d.ts +8 -0
- package/dist/types/wallet-server/src/core/signingLanes/WalletExecutionLaneProjection.d.ts +4 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyEnvelopeStore.d.ts +4 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1VoiceIdActivation.d.ts +14 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1VoiceIdSessions.d.ts +19 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1VoiceIdWalletSessionChallenges.d.ts +26 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodService.d.ts +1 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationOwner.d.ts +25 -0
- package/dist/types/wallet-server/src/router/domains/voiceId/voiceIdActivation.d.ts +29 -0
- package/dist/types/wallet-server/src/router/domains/voiceId/voiceIdSessions.d.ts +35 -0
- package/dist/types/wallet-server/src/router/framework/authServicePort.d.ts +3 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/walletVoiceIdActivation.d.ts +12 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/walletVoiceIdNear.d.ts +14 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/walletVoiceIdSessions.d.ts +19 -0
- package/migrations/d1-signer/0083_voiceid_wallet_session_challenges.sql +29 -0
- package/migrations/d1-signer/0084_voiceid_wallet_auth_methods.sql +373 -0
- package/package.json +1 -1
|
@@ -136,7 +136,21 @@ function buildOwnerEmailOtpSigningLaneRecord(args) {
|
|
|
136
136
|
lifecycle: args.lifecycle
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
+
function buildOwnerVoiceIdSigningLaneRecord(args) {
|
|
140
|
+
return {
|
|
141
|
+
kind: "signing_lane_reference_v1",
|
|
142
|
+
walletId: args.walletId,
|
|
143
|
+
walletKeyId: args.walletKeyId,
|
|
144
|
+
laneId: args.laneId,
|
|
145
|
+
laneKind: "owner_voiceid",
|
|
146
|
+
laneShareEpoch: args.laneShareEpoch,
|
|
147
|
+
participantBindingDigestB64u: args.participantBindingDigestB64u,
|
|
148
|
+
walletAuthMethodId: args.walletAuthMethodId,
|
|
149
|
+
ownerParticipantContinuity: args.ownerParticipantContinuity,
|
|
150
|
+
lifecycle: args.lifecycle
|
|
151
|
+
};
|
|
152
|
+
}
|
|
139
153
|
//#endregion
|
|
140
|
-
export { buildActiveSigningLaneLifecycle, buildActiveWalletKeyLifecycle, buildEd25519WalletKeyRecord, buildEvmFamilyWalletKeyRecord, buildOwnerEmailOtpSigningLaneRecord, buildOwnerPasskeySigningLaneRecord, parseWalletKeyVersion };
|
|
154
|
+
export { buildActiveSigningLaneLifecycle, buildActiveWalletKeyLifecycle, buildEd25519WalletKeyRecord, buildEvmFamilyWalletKeyRecord, buildOwnerEmailOtpSigningLaneRecord, buildOwnerPasskeySigningLaneRecord, buildOwnerVoiceIdSigningLaneRecord, parseWalletKeyVersion };
|
|
141
155
|
|
|
142
156
|
//# sourceMappingURL=recordParsers.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
//#region ../shared-ts/src/threshold/sessionPolicy.ts
|
|
2
2
|
const DEFAULT_WALLET_SESSION_TTL_MS = 1440 * 6e4;
|
|
3
3
|
const DEFAULT_WALLET_SESSION_REMAINING_USES = 3;
|
|
4
|
+
const LINKED_DEVICE_WALLET_SESSION_TTL_MS = 900 * 1e3;
|
|
4
5
|
const MAX_WALLET_SESSION_TTL_MS = 720 * 60 * 6e4;
|
|
5
6
|
const MAX_WALLET_SESSION_REMAINING_USES = 1e6;
|
|
6
7
|
//#endregion
|
|
7
|
-
export { DEFAULT_WALLET_SESSION_REMAINING_USES, DEFAULT_WALLET_SESSION_TTL_MS, MAX_WALLET_SESSION_REMAINING_USES, MAX_WALLET_SESSION_TTL_MS };
|
|
8
|
+
export { DEFAULT_WALLET_SESSION_REMAINING_USES, DEFAULT_WALLET_SESSION_TTL_MS, LINKED_DEVICE_WALLET_SESSION_TTL_MS, MAX_WALLET_SESSION_REMAINING_USES, MAX_WALLET_SESSION_TTL_MS };
|
|
8
9
|
|
|
9
10
|
//# sourceMappingURL=sessionPolicy.js.map
|
|
@@ -35,16 +35,14 @@ function normalizeAddAuthMethodIntentCaller(raw) {
|
|
|
35
35
|
if (!source) return null;
|
|
36
36
|
const walletAuthorityId = parseWalletAuthorityId("walletAuthorityId" in source ? source.walletAuthorityId : void 0);
|
|
37
37
|
const walletAuthMethodId = parseWalletAuthMethodId("walletAuthMethodId" in source ? source.walletAuthMethodId : void 0);
|
|
38
|
-
const walletSessionId = trimString("walletSessionId" in source ? source.walletSessionId : void 0);
|
|
39
38
|
const authorityDigestB64u = trimString("authorityDigestB64u" in source ? source.authorityDigestB64u : void 0);
|
|
40
39
|
const revocationEpoch = "revocationEpoch" in source ? source.revocationEpoch : void 0;
|
|
41
|
-
if (!walletAuthorityId.ok || !walletAuthMethodId.ok || !
|
|
40
|
+
if (!walletAuthorityId.ok || !walletAuthMethodId.ok || !authorityDigestB64u || typeof revocationEpoch !== "number" || !Number.isSafeInteger(revocationEpoch) || revocationEpoch < 0) return null;
|
|
42
41
|
return {
|
|
43
42
|
caller: "same_device_addition",
|
|
44
43
|
source: {
|
|
45
44
|
walletAuthorityId: walletAuthorityId.value,
|
|
46
45
|
walletAuthMethodId: walletAuthMethodId.value,
|
|
47
|
-
walletSessionId,
|
|
48
46
|
authorityDigestB64u,
|
|
49
47
|
revocationEpoch
|
|
50
48
|
}
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { parseEmailOtpProviderUserId, parseWalletAuthMethodId, parseWalletAuthorityBindingDigest, parseWalletId, parseWebAuthnCredentialIdB64u, parseWebAuthnRpId } from "./domainIds.js";
|
|
2
|
+
import { requireRecord } from "./validation.js";
|
|
3
|
+
import { rejectUnknownFields } from "./exactRecord.js";
|
|
2
4
|
import { base64UrlEncode } from "./base64.js";
|
|
3
5
|
import { alphabetizeStringify, sha256BytesUtf8 } from "./digests.js";
|
|
6
|
+
import { parseDigestB64u } from "./canonicalPrimitives.js";
|
|
4
7
|
//#region ../shared-ts/src/utils/walletAuthAuthority.ts
|
|
5
8
|
const WALLET_AUTHORITY_BINDING_DIGEST_DOMAIN = "seams:wallet-authority-binding:v1|";
|
|
9
|
+
function buildVoiceIdWalletAuthAuthority(input) {
|
|
10
|
+
return {
|
|
11
|
+
walletId: input.walletId,
|
|
12
|
+
bindingId: input.walletAuthMethodId,
|
|
13
|
+
factor: {
|
|
14
|
+
kind: "voiceid",
|
|
15
|
+
deviceKeyId: input.deviceKeyId
|
|
16
|
+
},
|
|
17
|
+
verifier: { kind: "device_signature" }
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function isVoiceIdWalletAuthAuthority(authority) {
|
|
21
|
+
return authority.factor.kind === "voiceid";
|
|
22
|
+
}
|
|
6
23
|
function isPasskeyWalletAuthAuthority(authority) {
|
|
7
24
|
return authority.factor.kind === "passkey";
|
|
8
25
|
}
|
|
@@ -19,6 +36,7 @@ function walletAuthAuthoritiesMatch(left, right) {
|
|
|
19
36
|
if (!isEmailOtpWalletAuthAuthority(right)) return false;
|
|
20
37
|
return left.factor.provider === right.factor.provider && left.factor.providerUserId === right.factor.providerUserId && left.verifier.emailHashHex === right.verifier.emailHashHex;
|
|
21
38
|
}
|
|
39
|
+
if (isVoiceIdWalletAuthAuthority(left)) return isVoiceIdWalletAuthAuthority(right) && left.factor.deviceKeyId === right.factor.deviceKeyId;
|
|
22
40
|
return false;
|
|
23
41
|
}
|
|
24
42
|
function parseWalletAuthAuthorityRef(raw) {
|
|
@@ -184,7 +202,33 @@ function parseEmailOtpWalletAuthAuthorityObject(obj) {
|
|
|
184
202
|
function parseWalletAuthAuthority(raw) {
|
|
185
203
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
186
204
|
const obj = raw;
|
|
187
|
-
return parsePasskeyWalletAuthAuthorityObject(obj) || parseEmailOtpWalletAuthAuthorityObject(obj);
|
|
205
|
+
return parsePasskeyWalletAuthAuthorityObject(obj) || parseEmailOtpWalletAuthAuthorityObject(obj) || parseVoiceIdWalletAuthAuthority(obj);
|
|
206
|
+
}
|
|
207
|
+
function parseVoiceIdWalletAuthAuthority(raw) {
|
|
208
|
+
try {
|
|
209
|
+
const record = requireRecord(raw, "device authority");
|
|
210
|
+
rejectUnknownFields(record, [
|
|
211
|
+
"walletId",
|
|
212
|
+
"bindingId",
|
|
213
|
+
"factor",
|
|
214
|
+
"verifier"
|
|
215
|
+
], "device authority");
|
|
216
|
+
const factor = requireRecord(record.factor, "device factor");
|
|
217
|
+
const verifier = requireRecord(record.verifier, "device verifier");
|
|
218
|
+
rejectUnknownFields(factor, ["kind", "deviceKeyId"], "device factor");
|
|
219
|
+
rejectUnknownFields(verifier, ["kind"], "device verifier");
|
|
220
|
+
if (factor.kind !== "voiceid" || verifier.kind !== "device_signature") return null;
|
|
221
|
+
const walletId = parseWalletId(record.walletId);
|
|
222
|
+
const method = parseWalletAuthMethodId(record.bindingId);
|
|
223
|
+
if (!walletId.ok || !method.ok) return null;
|
|
224
|
+
return buildVoiceIdWalletAuthAuthority({
|
|
225
|
+
walletId: walletId.value,
|
|
226
|
+
walletAuthMethodId: method.value,
|
|
227
|
+
deviceKeyId: parseDigestB64u(factor.deviceKeyId)
|
|
228
|
+
});
|
|
229
|
+
} catch {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
188
232
|
}
|
|
189
233
|
function canonicalWalletAuthorityBindingDigestInput(args) {
|
|
190
234
|
return `${WALLET_AUTHORITY_BINDING_DIGEST_DOMAIN}${alphabetizeStringify(args.authority)}`;
|
|
@@ -201,6 +245,6 @@ async function walletAuthAuthorityRef(args) {
|
|
|
201
245
|
};
|
|
202
246
|
}
|
|
203
247
|
//#endregion
|
|
204
|
-
export { buildEmailOtpWalletAuthAuthority, buildPasskeyWalletAuthAuthority, isEmailOtpWalletAuthAuthority, isPasskeyWalletAuthAuthority, parseWalletAuthAuthority, parseWalletAuthAuthorityRef, walletAuthAuthoritiesMatch, walletAuthAuthorityRef };
|
|
248
|
+
export { buildEmailOtpWalletAuthAuthority, buildPasskeyWalletAuthAuthority, buildVoiceIdWalletAuthAuthority, isEmailOtpWalletAuthAuthority, isPasskeyWalletAuthAuthority, isVoiceIdWalletAuthAuthority, parseWalletAuthAuthority, parseWalletAuthAuthorityRef, walletAuthAuthoritiesMatch, walletAuthAuthorityRef };
|
|
205
249
|
|
|
206
250
|
//# sourceMappingURL=walletAuthAuthority.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseWalletAuthMethodId, parseWalletAuthorityId, parseWalletId, parseWebAuthnCredentialIdB64u, parseWebAuthnRpId } from "./domainIds.js";
|
|
2
2
|
import { alphabetizeStringify } from "./digests.js";
|
|
3
|
-
import { sha256Utf8DigestB64u } from "./canonicalPrimitives.js";
|
|
3
|
+
import { parseDigestB64u, sha256Utf8DigestB64u } from "./canonicalPrimitives.js";
|
|
4
|
+
import { parseVoiceIdDevicePublicKeyB64u } from "../authorization/voiceIdDeviceAssertion.js";
|
|
4
5
|
import { inspectRawObject, trimString } from "./registrationAuthMethodInput.js";
|
|
5
6
|
//#region ../shared-ts/src/utils/walletAuthMethodRecord.ts
|
|
6
7
|
async function computeWalletAuthMethodRevokeOperationFingerprintV1(input) {
|
|
@@ -22,6 +23,10 @@ function sameWalletAuthMethodRecordV2(left, right) {
|
|
|
22
23
|
if (right.kind !== "email_otp") return false;
|
|
23
24
|
if (left.emailHashHex === right.emailHashHex && left.registrationAuthorityId === right.registrationAuthorityId) break;
|
|
24
25
|
return false;
|
|
26
|
+
case "voiceid":
|
|
27
|
+
if (right.kind !== "voiceid") return false;
|
|
28
|
+
if (left.deviceKeyId === right.deviceKeyId && left.devicePublicKeyB64u === right.devicePublicKeyB64u) break;
|
|
29
|
+
return false;
|
|
25
30
|
default: return assertNeverWalletAuthMethodRecordV2(left, "wallet auth method kind");
|
|
26
31
|
}
|
|
27
32
|
switch (left.status) {
|
|
@@ -83,6 +88,47 @@ function buildWalletAuthMethodRecordV2(input) {
|
|
|
83
88
|
revokedAtMs: input.revokedAtMs
|
|
84
89
|
};
|
|
85
90
|
}
|
|
91
|
+
if (input.kind === "voiceid") switch (input.status) {
|
|
92
|
+
case "pending_local_install": return {
|
|
93
|
+
version: "wallet_auth_method_v2",
|
|
94
|
+
walletAuthMethodId: input.walletAuthMethodId,
|
|
95
|
+
walletId: input.walletId,
|
|
96
|
+
walletAuthorityId: input.walletAuthorityId,
|
|
97
|
+
kind: "voiceid",
|
|
98
|
+
status: "pending_local_install",
|
|
99
|
+
deviceKeyId: input.deviceKeyId,
|
|
100
|
+
devicePublicKeyB64u: input.devicePublicKeyB64u,
|
|
101
|
+
createdAtMs: input.createdAtMs,
|
|
102
|
+
updatedAtMs: input.updatedAtMs
|
|
103
|
+
};
|
|
104
|
+
case "active": return {
|
|
105
|
+
version: "wallet_auth_method_v2",
|
|
106
|
+
walletAuthMethodId: input.walletAuthMethodId,
|
|
107
|
+
walletId: input.walletId,
|
|
108
|
+
walletAuthorityId: input.walletAuthorityId,
|
|
109
|
+
kind: "voiceid",
|
|
110
|
+
status: "active",
|
|
111
|
+
deviceKeyId: input.deviceKeyId,
|
|
112
|
+
devicePublicKeyB64u: input.devicePublicKeyB64u,
|
|
113
|
+
createdAtMs: input.createdAtMs,
|
|
114
|
+
updatedAtMs: input.updatedAtMs,
|
|
115
|
+
activatedAtMs: input.activatedAtMs
|
|
116
|
+
};
|
|
117
|
+
case "revoked": return {
|
|
118
|
+
version: "wallet_auth_method_v2",
|
|
119
|
+
walletAuthMethodId: input.walletAuthMethodId,
|
|
120
|
+
walletId: input.walletId,
|
|
121
|
+
walletAuthorityId: input.walletAuthorityId,
|
|
122
|
+
kind: "voiceid",
|
|
123
|
+
status: "revoked",
|
|
124
|
+
deviceKeyId: input.deviceKeyId,
|
|
125
|
+
devicePublicKeyB64u: input.devicePublicKeyB64u,
|
|
126
|
+
createdAtMs: input.createdAtMs,
|
|
127
|
+
updatedAtMs: input.updatedAtMs,
|
|
128
|
+
activatedAtMs: input.activatedAtMs,
|
|
129
|
+
revokedAtMs: input.revokedAtMs
|
|
130
|
+
};
|
|
131
|
+
}
|
|
86
132
|
switch (input.status) {
|
|
87
133
|
case "pending_local_install": return {
|
|
88
134
|
version: "wallet_auth_method_v2",
|
|
@@ -131,7 +177,7 @@ function parseWalletAuthMethodRecordV2(raw) {
|
|
|
131
177
|
const version = trimString(record.version);
|
|
132
178
|
const kind = trimString(record.kind);
|
|
133
179
|
const status = trimString(record.status);
|
|
134
|
-
if (version !== "wallet_auth_method_v2" || kind !== "passkey" && kind !== "email_otp") return null;
|
|
180
|
+
if (version !== "wallet_auth_method_v2" || kind !== "passkey" && kind !== "email_otp" && kind !== "voiceid") return null;
|
|
135
181
|
try {
|
|
136
182
|
const common = parseWalletAuthMethodRecordV2Common(record);
|
|
137
183
|
if (kind === "passkey") {
|
|
@@ -149,6 +195,16 @@ function parseWalletAuthMethodRecordV2(raw) {
|
|
|
149
195
|
counter: parseNonNegativeInteger(record.counter)
|
|
150
196
|
});
|
|
151
197
|
}
|
|
198
|
+
if (kind === "voiceid") {
|
|
199
|
+
if (!("deviceKeyId" in record) || !("devicePublicKeyB64u" in record)) return null;
|
|
200
|
+
exactWalletAuthMethodV2Fields(record, "voiceid", status);
|
|
201
|
+
return buildParsedVoiceIdWalletAuthMethodRecordV2({
|
|
202
|
+
common,
|
|
203
|
+
lifecycle: parseWalletAuthMethodLifecycle(record),
|
|
204
|
+
deviceKeyId: parseDigestB64u(record.deviceKeyId),
|
|
205
|
+
devicePublicKeyB64u: parseVoiceIdDevicePublicKeyB64u(record.devicePublicKeyB64u)
|
|
206
|
+
});
|
|
207
|
+
}
|
|
152
208
|
if (!("emailHashHex" in record) || !("registrationAuthorityId" in record)) return null;
|
|
153
209
|
exactWalletAuthMethodV2Fields(record, "email_otp", status);
|
|
154
210
|
const emailHashHex = trimString(record.emailHashHex);
|
|
@@ -180,10 +236,19 @@ function validateWalletAuthMethodRecordV2(value) {
|
|
|
180
236
|
if (!value.walletAuthMethodId || !value.walletId || !value.walletAuthorityId) throw new Error("wallet auth method record identities are required");
|
|
181
237
|
if (!Number.isSafeInteger(value.createdAtMs) || value.createdAtMs < 0) throw new Error("wallet auth method createdAtMs must be a non-negative safe integer");
|
|
182
238
|
if (!Number.isSafeInteger(value.updatedAtMs) || value.updatedAtMs < value.createdAtMs) throw new Error("wallet auth method updatedAtMs must follow createdAtMs");
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
239
|
+
switch (value.kind) {
|
|
240
|
+
case "passkey":
|
|
241
|
+
if (!value.rpId || !value.credentialIdB64u || !value.credentialPublicKeyB64u.trim()) throw new Error("passkey wallet auth method fields are required");
|
|
242
|
+
if (!Number.isSafeInteger(value.counter) || value.counter < 0) throw new Error("passkey authenticator counter must be non-negative");
|
|
243
|
+
break;
|
|
244
|
+
case "email_otp":
|
|
245
|
+
if (!value.emailHashHex.trim() || !value.registrationAuthorityId.trim()) throw new Error("email OTP wallet auth method fields are required");
|
|
246
|
+
break;
|
|
247
|
+
case "voiceid":
|
|
248
|
+
parseDigestB64u(value.deviceKeyId);
|
|
249
|
+
parseVoiceIdDevicePublicKeyB64u(value.devicePublicKeyB64u);
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
187
252
|
switch (value.status) {
|
|
188
253
|
case "pending_local_install": return;
|
|
189
254
|
case "active":
|
|
@@ -228,7 +293,8 @@ function exactWalletAuthMethodV2Fields(raw, kind, status) {
|
|
|
228
293
|
"updatedAtMs"
|
|
229
294
|
];
|
|
230
295
|
if (kind === "passkey") fields.push("rpId", "credentialIdB64u", "credentialPublicKeyB64u", "counter");
|
|
231
|
-
else fields.push("emailHashHex", "registrationAuthorityId");
|
|
296
|
+
else if (kind === "email_otp") fields.push("emailHashHex", "registrationAuthorityId");
|
|
297
|
+
else fields.push("deviceKeyId", "devicePublicKeyB64u");
|
|
232
298
|
if (status === "active") fields.push("activatedAtMs");
|
|
233
299
|
if (status === "revoked") fields.push("activatedAtMs", "revokedAtMs");
|
|
234
300
|
if (status !== "pending_local_install" && status !== "active" && status !== "revoked") throw new Error("wallet auth method status is unsupported");
|
|
@@ -329,6 +395,49 @@ function buildParsedEmailOtpWalletAuthMethodRecordV2(input) {
|
|
|
329
395
|
};
|
|
330
396
|
}
|
|
331
397
|
}
|
|
398
|
+
function buildParsedVoiceIdWalletAuthMethodRecordV2(input) {
|
|
399
|
+
switch (input.lifecycle.status) {
|
|
400
|
+
case "pending_local_install": return {
|
|
401
|
+
version: "wallet_auth_method_v2",
|
|
402
|
+
walletAuthMethodId: input.common.walletAuthMethodId,
|
|
403
|
+
walletId: input.common.walletId,
|
|
404
|
+
walletAuthorityId: input.common.walletAuthorityId,
|
|
405
|
+
kind: "voiceid",
|
|
406
|
+
status: "pending_local_install",
|
|
407
|
+
createdAtMs: input.common.createdAtMs,
|
|
408
|
+
updatedAtMs: input.common.updatedAtMs,
|
|
409
|
+
deviceKeyId: input.deviceKeyId,
|
|
410
|
+
devicePublicKeyB64u: input.devicePublicKeyB64u
|
|
411
|
+
};
|
|
412
|
+
case "active": return {
|
|
413
|
+
version: "wallet_auth_method_v2",
|
|
414
|
+
walletAuthMethodId: input.common.walletAuthMethodId,
|
|
415
|
+
walletId: input.common.walletId,
|
|
416
|
+
walletAuthorityId: input.common.walletAuthorityId,
|
|
417
|
+
kind: "voiceid",
|
|
418
|
+
status: "active",
|
|
419
|
+
createdAtMs: input.common.createdAtMs,
|
|
420
|
+
updatedAtMs: input.common.updatedAtMs,
|
|
421
|
+
deviceKeyId: input.deviceKeyId,
|
|
422
|
+
devicePublicKeyB64u: input.devicePublicKeyB64u,
|
|
423
|
+
activatedAtMs: input.lifecycle.activatedAtMs
|
|
424
|
+
};
|
|
425
|
+
case "revoked": return {
|
|
426
|
+
version: "wallet_auth_method_v2",
|
|
427
|
+
walletAuthMethodId: input.common.walletAuthMethodId,
|
|
428
|
+
walletId: input.common.walletId,
|
|
429
|
+
walletAuthorityId: input.common.walletAuthorityId,
|
|
430
|
+
kind: "voiceid",
|
|
431
|
+
status: "revoked",
|
|
432
|
+
createdAtMs: input.common.createdAtMs,
|
|
433
|
+
updatedAtMs: input.common.updatedAtMs,
|
|
434
|
+
deviceKeyId: input.deviceKeyId,
|
|
435
|
+
devicePublicKeyB64u: input.devicePublicKeyB64u,
|
|
436
|
+
activatedAtMs: input.lifecycle.activatedAtMs,
|
|
437
|
+
revokedAtMs: input.lifecycle.revokedAtMs
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
}
|
|
332
441
|
function parseWalletAuthMethodIdRequired(raw) {
|
|
333
442
|
const parsed = parseWalletAuthMethodId(raw);
|
|
334
443
|
if (!parsed.ok) throw new Error(parsed.error.message);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../authorization/capabilityKinds.js";
|
|
2
2
|
import { requireTrimmedString } from "../utils/validation.js";
|
|
3
|
+
import "../utils/walletAuthMethodRecord.js";
|
|
3
4
|
import "../authorization/walletAuthority.js";
|
|
4
5
|
//#region ../shared-ts/src/wallet-recovery/walletRecoveryCommittedProjection.ts
|
|
5
6
|
function buildWalletRecoveryCommittedProjectionV1(input) {
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type WalletSessionMintId } from './capabilityKinds';
|
|
2
|
+
import { type DigestB64u } from '../utils/canonicalPrimitives';
|
|
3
|
+
import { type WalletAuthMethodId, type WalletAuthorityId, type WalletId } from '../utils/domainIds';
|
|
4
|
+
declare const voiceIdDevicePublicKeyBrand: unique symbol;
|
|
5
|
+
export type VoiceIdDevicePublicKeyB64u = string & {
|
|
6
|
+
readonly [voiceIdDevicePublicKeyBrand]: true;
|
|
7
|
+
};
|
|
8
|
+
export declare function parseVoiceIdDevicePublicKeyB64u(value: unknown): VoiceIdDevicePublicKeyB64u;
|
|
9
|
+
export type VoiceIdWalletSessionChallenge = Readonly<{
|
|
10
|
+
kind: 'voiceid_wallet_session_challenge_v1';
|
|
11
|
+
walletId: WalletId;
|
|
12
|
+
walletAuthMethodId: WalletAuthMethodId;
|
|
13
|
+
walletAuthorityId: WalletAuthorityId;
|
|
14
|
+
deviceKeyId: DigestB64u;
|
|
15
|
+
challengeId: WalletSessionMintId;
|
|
16
|
+
nonce: DigestB64u;
|
|
17
|
+
requestOrigin: string;
|
|
18
|
+
audience: string;
|
|
19
|
+
issuedAtMs: number;
|
|
20
|
+
expiresAtMs: number;
|
|
21
|
+
}>;
|
|
22
|
+
export type VoiceIdDeviceAssertion = Readonly<{
|
|
23
|
+
kind: 'voiceid_device_assertion_v1';
|
|
24
|
+
challenge: VoiceIdWalletSessionChallenge;
|
|
25
|
+
signatureB64u: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function buildVoiceIdWalletSessionChallenge(fields: Omit<VoiceIdWalletSessionChallenge, 'kind'>): VoiceIdWalletSessionChallenge;
|
|
28
|
+
export declare function parseVoiceIdWalletSessionChallenge(raw: unknown): VoiceIdWalletSessionChallenge;
|
|
29
|
+
export declare function parseVoiceIdDeviceAssertion(raw: unknown): VoiceIdDeviceAssertion;
|
|
30
|
+
export declare function voiceIdWalletSessionChallengeBytes(challenge: VoiceIdWalletSessionChallenge): Uint8Array<ArrayBuffer>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=voiceIdDeviceAssertion.d.ts.map
|
|
@@ -41,7 +41,9 @@ export type CommittedSignerPackageSetV1 = ReadonlyExclusiveUnion<{
|
|
|
41
41
|
export type CommittedAuthorityPackagesV1 = {
|
|
42
42
|
readonly kind: 'committed_authority_packages_v1';
|
|
43
43
|
readonly authority: PendingWalletAuthorityV1;
|
|
44
|
-
readonly authMethod: PendingWalletAuthMethodRecordV2
|
|
44
|
+
readonly authMethod: Exclude<PendingWalletAuthMethodRecordV2, {
|
|
45
|
+
readonly kind: 'voiceid';
|
|
46
|
+
}>;
|
|
45
47
|
readonly signerPackages: CommittedSignerPackageSetV1;
|
|
46
48
|
readonly ed25519ExportRootPackage: LinkedDeviceEd25519ExportRootPackageV1 | null;
|
|
47
49
|
readonly packageSetDigestB64u: DigestB64u;
|
|
@@ -432,6 +432,14 @@ export type LinkedOwnerCredentialMetadataV1 = {
|
|
|
432
432
|
readonly email?: never;
|
|
433
433
|
readonly device?: never;
|
|
434
434
|
readonly credentialIdB64u?: never;
|
|
435
|
+
readonly deviceKeyId?: never;
|
|
436
|
+
} | {
|
|
437
|
+
readonly kind: 'voiceid';
|
|
438
|
+
readonly walletAuthMethodId: WalletAuthMethodId;
|
|
439
|
+
readonly deviceKeyId: DigestB64u;
|
|
440
|
+
readonly email?: never;
|
|
441
|
+
readonly device?: never;
|
|
442
|
+
readonly credentialIdB64u?: never;
|
|
435
443
|
};
|
|
436
444
|
/** Public wallet-scoped projection for linked-device management. */
|
|
437
445
|
export type LinkedDeviceSummaryV1 = {
|
|
@@ -6,9 +6,11 @@ import type { ExclusiveUnion } from '../utils/variant';
|
|
|
6
6
|
export declare const WALLET_CUSTODY_ENVELOPE_VERSION_V2: 'wallet_custody_envelope_v2';
|
|
7
7
|
declare const PASSKEY_PRF_KEK_VERSION_V1: 'passkey_prf_kek_hkdf_sha256_v1';
|
|
8
8
|
declare const EMAIL_OTP_FACTOR_KEK_VERSION_V1: 'email_otp_factor_kek_hkdf_sha256_v1';
|
|
9
|
+
declare const VOICEID_DEVICE_FACTOR_KEK_VERSION_V1: 'voiceid_device_factor_kek_hkdf_sha256_v1';
|
|
9
10
|
type WalletCustodyEnvelopeVersion = typeof WALLET_CUSTODY_ENVELOPE_VERSION_V2;
|
|
10
11
|
type PasskeyPrfKekVersion = typeof PASSKEY_PRF_KEK_VERSION_V1;
|
|
11
12
|
type EmailOtpFactorKekVersion = typeof EMAIL_OTP_FACTOR_KEK_VERSION_V1;
|
|
13
|
+
type VoiceIdFactorKekVersion = typeof VOICEID_DEVICE_FACTOR_KEK_VERSION_V1;
|
|
12
14
|
/**
|
|
13
15
|
* Which enrolled factor sealed this envelope.
|
|
14
16
|
*
|
|
@@ -45,6 +47,10 @@ export type WalletCustodyEnvelopeFactor = ExclusiveUnion<{
|
|
|
45
47
|
enrollmentId: string;
|
|
46
48
|
enrollmentSealKeyVersion: string;
|
|
47
49
|
kekVersion: EmailOtpFactorKekVersion;
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'voiceid';
|
|
52
|
+
deviceKeyId: DigestB64u;
|
|
53
|
+
kekVersion: VoiceIdFactorKekVersion;
|
|
48
54
|
}>;
|
|
49
55
|
export type PasskeyCustodyEnvelopeLifecycle = ExclusiveUnion<{
|
|
50
56
|
state: 'active';
|
|
@@ -86,6 +92,24 @@ export type PasskeyCustodyEnvelopeRecord = {
|
|
|
86
92
|
createdAtMs: number;
|
|
87
93
|
updatedAtMs: number;
|
|
88
94
|
};
|
|
95
|
+
export type ActiveMethodBoundWalletSeedEnvelope = PasskeyCustodyEnvelopeRecord & {
|
|
96
|
+
readonly ownership: Extract<WalletCustodyEnvelopeOwnership, {
|
|
97
|
+
readonly kind: 'method_bound';
|
|
98
|
+
}>;
|
|
99
|
+
readonly binding: Extract<PasskeyCustodySecretBinding, {
|
|
100
|
+
readonly kind: 'wallet_custody_seed_v1';
|
|
101
|
+
}>;
|
|
102
|
+
readonly lifecycle: Extract<PasskeyCustodyEnvelopeLifecycle, {
|
|
103
|
+
readonly state: 'active';
|
|
104
|
+
}>;
|
|
105
|
+
};
|
|
106
|
+
export type VoiceIdSeedEnvelope = ActiveMethodBoundWalletSeedEnvelope & {
|
|
107
|
+
readonly factor: Extract<WalletCustodyEnvelopeFactor, {
|
|
108
|
+
readonly kind: 'voiceid';
|
|
109
|
+
}>;
|
|
110
|
+
};
|
|
111
|
+
export declare function isActiveMethodBoundWalletSeedEnvelope(envelope: PasskeyCustodyEnvelopeRecord): envelope is ActiveMethodBoundWalletSeedEnvelope;
|
|
112
|
+
export declare function isVoiceIdSeedEnvelope(envelope: PasskeyCustodyEnvelopeRecord): envelope is VoiceIdSeedEnvelope;
|
|
89
113
|
/**
|
|
90
114
|
* The exact JSON `signer_core::PasskeyCustodyEnvelopeBindingV1` deserialises.
|
|
91
115
|
*
|
|
@@ -119,6 +143,11 @@ export declare function buildEmailOtpEnvelopeFactor(args: {
|
|
|
119
143
|
}): Extract<WalletCustodyEnvelopeFactor, {
|
|
120
144
|
readonly kind: 'email_otp';
|
|
121
145
|
}>;
|
|
146
|
+
export declare function buildVoiceIdEnvelopeFactor(args: {
|
|
147
|
+
deviceKeyId: DigestB64u;
|
|
148
|
+
}): Extract<WalletCustodyEnvelopeFactor, {
|
|
149
|
+
readonly kind: 'voiceid';
|
|
150
|
+
}>;
|
|
122
151
|
export declare function buildActiveEnvelopeLifecycle(args: {
|
|
123
152
|
activatedAtMs: number;
|
|
124
153
|
}): PasskeyCustodyEnvelopeLifecycle;
|
|
@@ -103,6 +103,7 @@ type PasskeyCustodySecretBindingOfKind<TKind extends PasskeyCustodySecretKind> =
|
|
|
103
103
|
}>;
|
|
104
104
|
/** True when this binding covers owner custody rather than one lane's share. */
|
|
105
105
|
export declare function isWalletCustodySeedBinding(binding: PasskeyCustodySecretBinding): binding is PasskeyCustodySecretBindingOfKind<'wallet_custody_seed_v1'>;
|
|
106
|
+
export declare function buildWalletCustodySeedBinding(): PasskeyCustodySecretBindingOfKind<'wallet_custody_seed_v1'>;
|
|
106
107
|
export declare function buildEd25519YaoClientRootBinding(args: {
|
|
107
108
|
linkSessionId: LinkDeviceSessionId;
|
|
108
109
|
walletKeyId: WalletKeyId;
|
|
@@ -7,7 +7,7 @@ export type OwnerWalletExecutionLaneProjectionV1 = {
|
|
|
7
7
|
readonly kind: 'active_owner_wallet_execution_lane_projection_v1';
|
|
8
8
|
readonly walletKey: WalletKeyRecord;
|
|
9
9
|
readonly lane: Extract<SigningLaneRecord, {
|
|
10
|
-
readonly laneKind: 'owner_passkey' | 'owner_email_otp';
|
|
10
|
+
readonly laneKind: 'owner_passkey' | 'owner_email_otp' | 'owner_voiceid';
|
|
11
11
|
}>;
|
|
12
12
|
readonly materialActivation: MpcMaterialActivationRef;
|
|
13
13
|
readonly verifiedActivationReceiptDigestB64u: DigestB64u;
|
|
@@ -24,7 +24,7 @@ type PreparedWalletExecutionBase = {
|
|
|
24
24
|
};
|
|
25
25
|
export type PreparedOwnerWalletExecution = PreparedWalletExecutionBase & {
|
|
26
26
|
readonly kind: 'prepared_owner_wallet_execution';
|
|
27
|
-
readonly laneKind: 'owner_passkey' | 'owner_email_otp' | 'recovery' | 'break_glass';
|
|
27
|
+
readonly laneKind: 'owner_passkey' | 'owner_email_otp' | 'owner_voiceid' | 'recovery' | 'break_glass';
|
|
28
28
|
readonly lane: ActiveSigningLaneReference & {
|
|
29
29
|
readonly laneKind: PreparedOwnerWalletExecution['laneKind'];
|
|
30
30
|
};
|
|
@@ -2,7 +2,7 @@ import type { WalletId } from '../utils/domainIds';
|
|
|
2
2
|
import { type EvmFamilySigningKeySlotId } from './evmFamilySigningKeySlotId';
|
|
3
3
|
import { type LaneHolderParticipantRecordV1, type LaneParticipantBindingDigestB64u, type SigningWorkerParticipantRecordV1 } from './participants';
|
|
4
4
|
import { type LaneShareEpoch, type LinkedDeviceId, type SigningLaneId, type WalletKeyId } from './ids';
|
|
5
|
-
import type { AgentCustodyBindingId, AgentIdentityKeyId, BreakGlassSigningLaneRecord, DelegatedExecutionSigningLaneRecord, DelegatedSpendAuthorizationId, Ed25519WalletKeyRecord, EvmFamilyWalletKeyRecord, LinkedDeviceSigningLaneRecord, OwnerEmailOtpSigningLaneRecord, OwnerPasskeySigningLaneRecord, RecoverySigningLaneRecord, SigningLaneLifecycle, SigningLaneRecord, WalletKeyLifecycle, WalletKeyRecord, WalletKeyVersion } from './records';
|
|
5
|
+
import type { AgentCustodyBindingId, AgentIdentityKeyId, BreakGlassSigningLaneRecord, DelegatedExecutionSigningLaneRecord, DelegatedSpendAuthorizationId, Ed25519WalletKeyRecord, EvmFamilyWalletKeyRecord, LinkedDeviceSigningLaneRecord, OwnerEmailOtpSigningLaneRecord, OwnerPasskeySigningLaneRecord, OwnerVoiceIdSigningLaneRecord, RecoverySigningLaneRecord, SigningLaneLifecycle, SigningLaneRecord, WalletKeyLifecycle, WalletKeyRecord, WalletKeyVersion } from './records';
|
|
6
6
|
import { type OwnerLaneParticipantContinuityV1 } from './ownerContinuity';
|
|
7
7
|
type ActiveSigningLaneLifecycle = Extract<SigningLaneLifecycle, {
|
|
8
8
|
readonly state: 'active';
|
|
@@ -64,6 +64,7 @@ export declare function buildActiveSigningLaneLifecycle(args: {
|
|
|
64
64
|
}): ActiveSigningLaneLifecycle;
|
|
65
65
|
export declare function buildOwnerPasskeySigningLaneRecord(args: OwnerAuthSigningLaneRecordBuilderArgs): OwnerPasskeySigningLaneRecord;
|
|
66
66
|
export declare function buildOwnerEmailOtpSigningLaneRecord(args: OwnerAuthSigningLaneRecordBuilderArgs): OwnerEmailOtpSigningLaneRecord;
|
|
67
|
+
export declare function buildOwnerVoiceIdSigningLaneRecord(args: OwnerAuthSigningLaneRecordBuilderArgs): OwnerVoiceIdSigningLaneRecord;
|
|
67
68
|
export declare function buildLinkedDeviceSigningLaneRecord(args: RotatableSigningLaneRecordBuilderArgs & {
|
|
68
69
|
readonly linkedDeviceId: LinkedDeviceId;
|
|
69
70
|
}): LinkedDeviceSigningLaneRecord;
|
|
@@ -46,7 +46,7 @@ export type EvmFamilyWalletKeyRecord = {
|
|
|
46
46
|
readonly registeredPublicKeyB64u?: never;
|
|
47
47
|
};
|
|
48
48
|
export type WalletKeyRecord = Ed25519WalletKeyRecord | EvmFamilyWalletKeyRecord;
|
|
49
|
-
export type SigningLaneKind = 'owner_passkey' | 'owner_email_otp' | 'linked_device' | 'delegated_execution' | 'recovery' | 'break_glass';
|
|
49
|
+
export type SigningLaneKind = 'owner_passkey' | 'owner_email_otp' | 'owner_voiceid' | 'linked_device' | 'delegated_execution' | 'recovery' | 'break_glass';
|
|
50
50
|
export type SigningLaneReference = {
|
|
51
51
|
readonly kind: 'signing_lane_reference_v1';
|
|
52
52
|
readonly walletId: WalletId;
|
|
@@ -119,6 +119,14 @@ export type OwnerEmailOtpSigningLaneRecord = OwnerAuthSigningLaneRecordBase & {
|
|
|
119
119
|
readonly custodyBindingId?: never;
|
|
120
120
|
readonly authorizationBindingDigestB64u?: never;
|
|
121
121
|
};
|
|
122
|
+
export type OwnerVoiceIdSigningLaneRecord = OwnerAuthSigningLaneRecordBase & {
|
|
123
|
+
readonly laneKind: 'owner_voiceid';
|
|
124
|
+
readonly linkedDeviceId?: never;
|
|
125
|
+
readonly authorizationId?: never;
|
|
126
|
+
readonly agentIdentityKeyId?: never;
|
|
127
|
+
readonly custodyBindingId?: never;
|
|
128
|
+
readonly authorizationBindingDigestB64u?: never;
|
|
129
|
+
};
|
|
122
130
|
export type LinkedDeviceSigningLaneRecord = RotatableSigningLaneRecordBase & {
|
|
123
131
|
readonly laneKind: 'linked_device';
|
|
124
132
|
readonly linkedDeviceId: LinkedDeviceId;
|
|
@@ -154,6 +162,6 @@ export type BreakGlassSigningLaneRecord = PrivilegedOwnerSigningLaneRecordBase &
|
|
|
154
162
|
readonly custodyBindingId?: never;
|
|
155
163
|
readonly authorizationBindingDigestB64u?: never;
|
|
156
164
|
};
|
|
157
|
-
export type SigningLaneRecord = OwnerPasskeySigningLaneRecord | OwnerEmailOtpSigningLaneRecord | LinkedDeviceSigningLaneRecord | DelegatedExecutionSigningLaneRecord | RecoverySigningLaneRecord | BreakGlassSigningLaneRecord;
|
|
165
|
+
export type SigningLaneRecord = OwnerPasskeySigningLaneRecord | OwnerEmailOtpSigningLaneRecord | OwnerVoiceIdSigningLaneRecord | LinkedDeviceSigningLaneRecord | DelegatedExecutionSigningLaneRecord | RecoverySigningLaneRecord | BreakGlassSigningLaneRecord;
|
|
158
166
|
export {};
|
|
159
167
|
//# sourceMappingURL=records.d.ts.map
|
|
@@ -13,7 +13,7 @@ type ActiveLaneProtocolSourceBaseV1 = {
|
|
|
13
13
|
/** Existing owner signer rows expose continuity, without linked-lane HPKE identities. */
|
|
14
14
|
type OwnerLaneProtocolSourceV1 = ActiveLaneProtocolSourceBaseV1 & {
|
|
15
15
|
sourceKind: 'owner_registration';
|
|
16
|
-
laneKind: 'owner_passkey' | 'owner_email_otp';
|
|
16
|
+
laneKind: 'owner_passkey' | 'owner_email_otp' | 'owner_voiceid';
|
|
17
17
|
ownerParticipantContinuity: OwnerLaneParticipantContinuityV1;
|
|
18
18
|
holderParticipantId?: never;
|
|
19
19
|
signingWorkerParticipantId?: never;
|
|
@@ -22,7 +22,7 @@ type OwnerLaneProtocolSourceV1 = ActiveLaneProtocolSourceBaseV1 & {
|
|
|
22
22
|
/** Independently provisioned lanes carry their durable holder/worker identities. */
|
|
23
23
|
type ProvisionedLaneProtocolSourceV1 = ActiveLaneProtocolSourceBaseV1 & {
|
|
24
24
|
sourceKind: 'provisioned_lane';
|
|
25
|
-
laneKind: Exclude<SigningLaneKind, 'owner_passkey' | 'owner_email_otp'>;
|
|
25
|
+
laneKind: Exclude<SigningLaneKind, 'owner_passkey' | 'owner_email_otp' | 'owner_voiceid'>;
|
|
26
26
|
holderParticipantId: LaneHolderParticipantId;
|
|
27
27
|
signingWorkerParticipantId: SigningWorkerParticipantId;
|
|
28
28
|
signingWorkerRecipientKeyId: SigningWorkerRecipientKeyId;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import type { WebAuthnRpId } from '../utils/domainIds';
|
|
2
|
+
import type { DigestB64u } from '../utils/canonicalPrimitives';
|
|
2
3
|
export declare const DEFAULT_WALLET_SESSION_TTL_MS: number;
|
|
3
4
|
export declare const DEFAULT_WALLET_SESSION_REMAINING_USES = 3;
|
|
5
|
+
export declare const LINKED_DEVICE_WALLET_SESSION_TTL_MS: number;
|
|
6
|
+
export declare const LINKED_DEVICE_WALLET_SESSION_REMAINING_USES = 100;
|
|
4
7
|
export declare const MAX_WALLET_SESSION_TTL_MS: number;
|
|
5
8
|
export declare const MAX_WALLET_SESSION_REMAINING_USES = 1000000;
|
|
6
9
|
export type Ed25519AuthorityScope = {
|
|
10
|
+
kind: 'voiceid';
|
|
11
|
+
deviceKeyId: DigestB64u;
|
|
12
|
+
rpId?: never;
|
|
13
|
+
provider?: never;
|
|
14
|
+
providerUserId?: never;
|
|
15
|
+
} | {
|
|
7
16
|
kind: 'passkey_rp';
|
|
8
17
|
rpId: WebAuthnRpId;
|
|
9
18
|
proofKind?: never;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* `already_configured` at admission — before any target verification or local
|
|
13
13
|
* write — rather than travelling through the operation as a rejected case.
|
|
14
14
|
*/
|
|
15
|
-
import type { ActiveWalletAuthMethodRecordV2 } from './walletAuthMethodRecord';
|
|
15
|
+
import type { ActiveEmailOtpWalletAuthMethodRecordV2, ActivePasskeyWalletAuthMethodRecordV2, ActiveWalletAuthMethodRecordV2 } from './walletAuthMethodRecord';
|
|
16
16
|
import type { WalletAuthMethod } from './signerDomain';
|
|
17
17
|
/**
|
|
18
18
|
* The factor family a method belongs to.
|
|
@@ -24,7 +24,7 @@ import type { WalletAuthMethod } from './signerDomain';
|
|
|
24
24
|
* addition — which family a branch fills in — and the assertion below keeps it
|
|
25
25
|
* from drifting from the canonical record's own discriminant.
|
|
26
26
|
*/
|
|
27
|
-
export type WalletAuthMethodFamilyV1 = WalletAuthMethod
|
|
27
|
+
export type WalletAuthMethodFamilyV1 = Exclude<WalletAuthMethod, 'voiceid'>;
|
|
28
28
|
/**
|
|
29
29
|
* The two exhaustive branches. The name reads source-to-target, which is the
|
|
30
30
|
* order every stage of the operation uses: resolve the source, then verify the
|
|
@@ -54,7 +54,7 @@ type AddWalletAuthMethodAdmissionV1 = {
|
|
|
54
54
|
* which is why the operation needs no same-family rejection of its own.
|
|
55
55
|
*/
|
|
56
56
|
export declare function admitAddWalletAuthMethod(input: {
|
|
57
|
-
readonly sourceMethod:
|
|
57
|
+
readonly sourceMethod: ActivePasskeyWalletAuthMethodRecordV2 | ActiveEmailOtpWalletAuthMethodRecordV2;
|
|
58
58
|
readonly targetFamily: WalletAuthMethodFamilyV1;
|
|
59
59
|
readonly activeMethodsOnAuthority: readonly ActiveWalletAuthMethodRecordV2[];
|
|
60
60
|
}): AddWalletAuthMethodAdmissionV1;
|
|
@@ -88,11 +88,10 @@ export declare function parsePasskeyEnvelopeId(raw: unknown): DomainIdParseResul
|
|
|
88
88
|
/**
|
|
89
89
|
* Mints a wallet auth-method id.
|
|
90
90
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* from the intent that allocated it.
|
|
91
|
+
* Registration allocates this identity on the server. Device-bound VoiceID
|
|
92
|
+
* activation allocates it in the Wallet before sealing its custody envelope.
|
|
93
|
+
* Both paths use this builder because the identity is authenticated data in
|
|
94
|
+
* the custody envelope's AAD.
|
|
96
95
|
*/
|
|
97
96
|
export declare function allocateWalletAuthMethodId(randomSuffix: string): WalletAuthMethodId;
|
|
98
97
|
export declare function parseWalletAuthMethodId(raw: unknown): DomainIdParseResult<WalletAuthMethodId>;
|
|
@@ -63,7 +63,6 @@ export type AddSignerIntentV1 = {
|
|
|
63
63
|
export type AddAuthMethodIntentSourceV1 = {
|
|
64
64
|
readonly walletAuthorityId: WalletAuthorityId;
|
|
65
65
|
readonly walletAuthMethodId: WalletAuthMethodId;
|
|
66
|
-
readonly walletSessionId: string;
|
|
67
66
|
readonly authorityDigestB64u: string;
|
|
68
67
|
readonly revocationEpoch: number;
|
|
69
68
|
};
|
|
@@ -6,12 +6,15 @@ export type SignerKind = (typeof SIGNER_KINDS)[keyof typeof SIGNER_KINDS];
|
|
|
6
6
|
export declare const SIGNER_AUTH_METHODS: {
|
|
7
7
|
readonly passkey: 'passkey';
|
|
8
8
|
readonly emailOtp: "email_otp";
|
|
9
|
+
readonly voiceId: 'voiceid';
|
|
9
10
|
};
|
|
10
11
|
/** Authentication methods that can authorize a signer capability. */
|
|
11
12
|
export type SignerAuthMethod = (typeof SIGNER_AUTH_METHODS)[keyof typeof SIGNER_AUTH_METHODS];
|
|
13
|
+
export declare function requirePersistedSignerAuthMethod(method: SignerAuthMethod): Exclude<SignerAuthMethod, 'voiceid'>;
|
|
12
14
|
export declare const WALLET_AUTH_METHODS: {
|
|
13
15
|
readonly passkey: 'passkey';
|
|
14
16
|
readonly emailOtp: "email_otp";
|
|
17
|
+
readonly voiceId: 'voiceid';
|
|
15
18
|
};
|
|
16
19
|
/** Authentication methods that can be enrolled on a wallet. */
|
|
17
20
|
export type WalletAuthMethod = (typeof WALLET_AUTH_METHODS)[keyof typeof WALLET_AUTH_METHODS];
|