@seams/wallet-server 0.27.0 → 0.29.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/README.md +19 -4
- package/artifact-manifest.json +28 -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/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/application-auth.js +2 -0
- package/dist/esm/auth/applicationAuth.js +85 -0
- package/dist/esm/auth/externalAuthService.js +149 -0
- package/dist/esm/auth/externalAuthStore.js +353 -0
- package/dist/esm/auth/externalOwnerOperations.js +82 -0
- package/dist/esm/authorization/domain.js +2 -2
- package/dist/esm/authorization/factorEvidence.js +1 -1
- package/dist/esm/authorization/service.js +2 -2
- package/dist/esm/authorization/vaultProxyUse.js +1 -1
- package/dist/esm/cloud-host.js +12 -11
- package/dist/esm/core/ThresholdService/validation.js +1 -1
- package/dist/esm/core/WebAuthnCredentialBindingStore.js +1 -1
- package/dist/esm/core/authService/webauthn.js +1 -1
- package/dist/esm/core/d1EcdsaSignerRead.js +1 -1
- package/dist/esm/core/d1WalletAuthMethodStore.js +2 -2
- package/dist/esm/core/d1WalletStore.js +1 -1
- package/dist/esm/core/deviceLinking/linkedDeviceEmailOtpGrant.js +1 -1
- package/dist/esm/core/deviceLinking/linkedDeviceManagement.js +1 -1
- package/dist/esm/core/deviceLinking/linkedDeviceSessionRecord.js +2 -2
- package/dist/esm/core/nearRelayerAccountProvisioning.js +2 -2
- package/dist/esm/hosted-wallet-gateway.js +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/router/auth/webAuthnCredentialCodecs.js +1 -1
- package/dist/esm/router/cloudflare/d1/auth/d1AuthorizedOperationRouteService.js +2 -0
- package/dist/esm/router/cloudflare/d1/auth/d1RecordedOwnerOperation.js +43 -0
- package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +27 -3
- package/dist/esm/router/cloudflare/d1/authorization/d1AuthorizationStore.js +2 -2
- package/dist/esm/router/cloudflare/d1/authorization/d1VaultProxyStore.js +2 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js +3 -3
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEd25519ExportRootStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.js +2 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSourceContributionPreparationPlanner.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetAuthenticatorStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetPlanner.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceVerifiedLinkBuilder.js +2 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceVerifiedLinkSourceReader.js +1 -1
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeIssuer.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeService.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.js +2 -2
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.js +3 -3
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRegistrationEnrollmentFinalizer.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +3 -3
- package/dist/esm/router/cloudflare/d1/oidc/d1OidcBoundary.js +7 -1
- package/dist/esm/router/cloudflare/d1/oidc/d1OidcVerificationService.js +1 -1
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyRouteService.js +4 -4
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +4 -4
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpRecords.js +1 -1
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpService.js +3 -3
- package/dist/esm/router/cloudflare/d1/registration/d1EvmFamilyEcdsaRegistrationBranch.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +11 -2
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationIntentService.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletExecutionAuthority.js +9 -16
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +46 -4
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetup.js +12 -0
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.js +1 -0
- package/dist/esm/router/cloudflare/d1/registration/registrationCompletionWrite.js +1 -0
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.js +36 -1
- package/dist/esm/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/authorizationSnapshotLayout.js +1 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1VoiceIdWalletSessionChallenges.js +2 -2
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodBoundary.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodRevocationReplayStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +6 -5
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorityStore.js +2 -2
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationCleanup.js +2 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationIntake.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationSnapshot.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationChallenges.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationOwnerRequest.js +2 -2
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.js +2 -2
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnRecords.js +2 -2
- package/dist/esm/router/cloudflare/runtime/staticWalletConsoleBinding.js +9 -0
- package/dist/esm/router/cloudflare/runtime/walletConsoleOpsClient.js +6 -0
- package/dist/esm/router/cloudflare-adaptor.js +1 -1
- package/dist/esm/router/cloudflare.js +6139 -5567
- package/dist/esm/router/domains/ecdsa/routerAbEcdsaStrictRegistration.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +5 -5
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.js +2 -2
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryWalletSessionAuthorization.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.js +1 -1
- package/dist/esm/router/domains/emailOtp/emailOtpRouteHandlers.js +2 -2
- package/dist/esm/router/domains/passkeyCustody/walletCustodyRegistrationCommit.js +1 -1
- package/dist/esm/router/domains/signingOperations/routerAbEcdsaDerivationNormalSigningRoute.js +2 -2
- package/dist/esm/router/domains/signingOperations/routerAbEd25519NormalSigningRoute.js +37 -3
- package/dist/esm/router/domains/signingOperations/routerAbOperationStepUp.js +1 -1
- package/dist/esm/router/domains/tenantRoot/tenantRootIdentityResolution.js +1 -1
- package/dist/esm/router/domains/walletRegistration/walletRegistrationReservation.js +18 -3
- package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +12 -4
- package/dist/esm/router/domains/walletUnlock/walletUnlockRouteHandlers.js +3 -3
- package/dist/esm/router/framework/http.js +1 -1
- package/dist/esm/router/framework/routeDefinitions.js +2 -1
- package/dist/esm/router/transport/fetch/createFetchRouter.js +5 -3
- package/dist/esm/router/transport/fetch/routes/auth.js +1 -1
- package/dist/esm/router/transport/fetch/routes/deviceLinking.js +3 -3
- package/dist/esm/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.js +1 -1
- package/dist/esm/router/transport/fetch/routes/ecdsaOperationStepUpFactor.js +3 -3
- package/dist/esm/router/transport/fetch/routes/externalAuth.js +351 -0
- package/dist/esm/router/transport/fetch/routes/normalSigningRouterProxy.js +1 -1
- package/dist/esm/router/transport/fetch/routes/passkeyCustody.js +46 -306
- package/dist/esm/router/transport/fetch/routes/sessions.js +4 -4
- package/dist/esm/router/transport/fetch/routes/syncAccount.js +2 -2
- package/dist/esm/router/transport/fetch/routes/syncAccountBootstrap.js +1 -1
- package/dist/esm/router/transport/fetch/routes/thresholdEcdsa.js +4 -4
- package/dist/esm/router/transport/fetch/routes/thresholdEd25519.js +6 -6
- package/dist/esm/router/transport/fetch/routes/walletExecutionLanePreflight.js +2 -2
- package/dist/esm/router/transport/fetch/routes/walletRegistration.js +4 -4
- package/dist/esm/router/transport/fetch/walletOwnerOperationAuthorization.js +306 -0
- package/dist/esm/shared-ts/src/auth/externalAuth.js +118 -0
- package/dist/esm/shared-ts/src/authorization/index.js +1 -1
- package/dist/esm/shared-ts/src/authorization/voiceIdDeviceAssertion.js +1 -1
- package/dist/esm/shared-ts/src/authorization/walletAuthority.js +2 -2
- package/dist/esm/shared-ts/src/authorization/{walletCustodyOperation.js → walletOwnerOperation.js} +4 -4
- package/dist/esm/shared-ts/src/device-linking/delegatedActivationPlan.js +1 -1
- package/dist/esm/shared-ts/src/device-linking/digests.js +1 -1
- package/dist/esm/shared-ts/src/device-linking/ed25519ExportRoot.js +1 -1
- package/dist/esm/shared-ts/src/device-linking/parsers.js +2 -2
- package/dist/esm/shared-ts/src/device-linking/sourceContribution.js +1 -1
- package/dist/esm/shared-ts/src/device-linking/walletSessionCredentialDelivery.js +1 -1
- package/dist/esm/shared-ts/src/device-linking/wireFields.js +2 -2
- package/dist/esm/shared-ts/src/passkey-custody/custodyEnvelope.js +1 -1
- package/dist/esm/shared-ts/src/passkey-custody/custodySecretBinding.js +1 -1
- package/dist/esm/shared-ts/src/signing-lanes/ownerContinuity.js +1 -1
- package/dist/esm/shared-ts/src/utils/routerAbEcdsaDerivation.js +1 -1
- package/dist/esm/shared-ts/src/utils/walletAuthAuthority.js +1 -1
- package/dist/esm/shared-ts/src/wallet-recovery/index.js +3 -3
- package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryCommittedProjection.js +1 -1
- package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryEnvelopeSet.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/crypto/cipher.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/service.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/transport/fetch.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/transport/shared.js +1 -1
- package/dist/types/shared-ts/src/auth/externalAuth.d.ts +127 -0
- package/dist/types/shared-ts/src/authorization/index.d.ts +1 -1
- package/dist/types/shared-ts/src/authorization/walletOwnerOperation.d.ts +10 -0
- package/dist/types/shared-ts/src/utils/registrationEstablishedSession.d.ts +4 -0
- package/dist/types/shared-ts/src/utils/registrationIntent.d.ts +2 -0
- package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +1 -1
- package/dist/types/wallet-server/src/application-auth.d.ts +3 -0
- package/dist/types/wallet-server/src/auth/applicationAuth.d.ts +29 -0
- package/dist/types/wallet-server/src/auth/externalAuthService.d.ts +55 -0
- package/dist/types/wallet-server/src/auth/externalAuthStore.d.ts +115 -0
- package/dist/types/wallet-server/src/auth/externalOwnerOperations.d.ts +18 -0
- package/dist/types/wallet-server/src/cloud-host.d.ts +2 -1
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.d.ts +12 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1AuthorizedOperationRouteService.d.ts +5 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RecordedOwnerOperation.d.ts +16 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/oidc/d1OidcBoundary.d.ts +5 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.d.ts +1 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationSetup.d.ts +2 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.d.ts +7 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/authorizationSnapshotLayout.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodService.d.ts +1 -0
- package/dist/types/wallet-server/src/router/cloudflare/runtime/staticWalletConsoleBinding.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbEd25519NormalSigningRoute.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbOperationStepUp.d.ts +1 -1
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationInputs.d.ts +1 -0
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationReservation.d.ts +11 -6
- package/dist/types/wallet-server/src/router/framework/apiCredentialPorts.d.ts +1 -0
- package/dist/types/wallet-server/src/router/framework/authServicePort.d.ts +12 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/externalAuth.d.ts +5 -0
- package/dist/types/wallet-server/src/router/transport/fetch/walletOwnerOperationAuthorization.d.ts +23 -0
- package/migrations/d1-signer/0085_external_wallet_auth.sql +158 -0
- package/migrations/d1-signer/0086_application_auth.sql +67 -0
- package/migrations/d1-signer/0087_registration_without_session.sql +43 -0
- package/package.json +7 -2
- package/dist/types/shared-ts/src/authorization/walletCustodyOperation.d.ts +0 -10
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { requireCanonicalString } from "../shared-ts/src/utils/validation.js";
|
|
2
|
+
import { parseUnixMs } from "../shared-ts/src/passkey-custody/primitives.js";
|
|
3
|
+
import { parseExternalWalletAuthentication, parseStoredExternalIdentity, serializeExternalIdentity } from "../shared-ts/src/auth/externalAuth.js";
|
|
4
|
+
import { d1ChangedRows } from "../storage/d1Sql.js";
|
|
5
|
+
import { prepareD1TenantStatement } from "../core/d1TenantStore.js";
|
|
6
|
+
//#region src/auth/externalAuthStore.ts
|
|
7
|
+
const SCOPE = "namespace = ?1 AND org_id = ?2 AND project_id = ?3 AND env_id = ?4";
|
|
8
|
+
const ACTIVE_HOME = `EXISTS (SELECT 1 FROM wallet_execution_generations home
|
|
9
|
+
WHERE home.namespace = a.namespace AND home.org_id = a.org_id
|
|
10
|
+
AND home.project_id = a.project_id AND home.env_id = a.env_id
|
|
11
|
+
AND home.wallet_id = a.wallet_id AND home.state = 'active'
|
|
12
|
+
AND NOT EXISTS (SELECT 1 FROM wallet_relocation_write_blocks block
|
|
13
|
+
WHERE block.namespace = home.namespace AND block.org_id = home.org_id
|
|
14
|
+
AND block.project_id = home.project_id AND block.env_id = home.env_id
|
|
15
|
+
AND block.wallet_id = home.wallet_id AND block.source_generation = home.generation
|
|
16
|
+
AND block.state != 'released'))`;
|
|
17
|
+
const LIVE_ASSOCIATION = `EXISTS (
|
|
18
|
+
SELECT 1 FROM external_auth_associations a
|
|
19
|
+
JOIN wallet_authorities w ON w.namespace = a.namespace AND w.org_id = a.org_id
|
|
20
|
+
AND w.project_id = a.project_id AND w.env_id = a.env_id
|
|
21
|
+
AND w.authority_id = a.authority_id AND w.wallet_id = a.wallet_id
|
|
22
|
+
WHERE a.namespace = external_auth_attempts.namespace
|
|
23
|
+
AND a.org_id = external_auth_attempts.org_id
|
|
24
|
+
AND a.project_id = external_auth_attempts.project_id
|
|
25
|
+
AND a.env_id = external_auth_attempts.env_id
|
|
26
|
+
AND a.association_id = external_auth_attempts.association_id
|
|
27
|
+
AND a.wallet_id = external_auth_attempts.wallet_id AND a.status = 'active'
|
|
28
|
+
AND w.lifecycle_state = 'active' AND w.revocation_epoch = a.authority_epoch
|
|
29
|
+
AND ${ACTIVE_HOME}
|
|
30
|
+
)`;
|
|
31
|
+
const AUTHENTICATION_COLUMNS = `attempt_id, association_id, wallet_id, session_expires_at_ms,
|
|
32
|
+
(SELECT a.provider_subject FROM external_auth_associations a
|
|
33
|
+
WHERE a.namespace = external_auth_attempts.namespace AND a.org_id = external_auth_attempts.org_id
|
|
34
|
+
AND a.project_id = external_auth_attempts.project_id AND a.env_id = external_auth_attempts.env_id
|
|
35
|
+
AND a.association_id = external_auth_attempts.association_id) AS provider_subject`;
|
|
36
|
+
var ExternalAuthStore = class {
|
|
37
|
+
constructor(database, scope) {
|
|
38
|
+
this.database = database;
|
|
39
|
+
this.scope = scope;
|
|
40
|
+
}
|
|
41
|
+
prepare(sql, values = []) {
|
|
42
|
+
return prepareD1TenantStatement(this.database, this.scope, sql, values);
|
|
43
|
+
}
|
|
44
|
+
async consumeAuthenticationAllowance(rateKey, nowMs) {
|
|
45
|
+
return d1ChangedRows(await this.prepare(`INSERT INTO external_auth_rate_limits
|
|
46
|
+
(namespace, org_id, project_id, env_id, rate_key, consumed_count, reset_at_ms)
|
|
47
|
+
VALUES (?1, ?2, ?3, ?4, ?5, 1, ?7)
|
|
48
|
+
ON CONFLICT(namespace, org_id, project_id, env_id, rate_key) DO UPDATE SET
|
|
49
|
+
consumed_count = CASE WHEN reset_at_ms <= ?6 THEN 1 ELSE consumed_count + 1 END,
|
|
50
|
+
reset_at_ms = CASE WHEN reset_at_ms <= ?6 THEN ?7 ELSE reset_at_ms END
|
|
51
|
+
WHERE reset_at_ms <= ?6 OR consumed_count < 120`, [
|
|
52
|
+
rateKey,
|
|
53
|
+
nowMs,
|
|
54
|
+
nowMs + 6e4
|
|
55
|
+
]).run()) === 1;
|
|
56
|
+
}
|
|
57
|
+
async associate(input) {
|
|
58
|
+
const subject = serializeExternalIdentity(input.identity);
|
|
59
|
+
const revokePriorAuthority = this.prepare(`UPDATE external_auth_associations SET status = 'revoked'
|
|
60
|
+
WHERE ${SCOPE} AND wallet_id = ?5 AND provider_subject = ?6 AND status = 'active'
|
|
61
|
+
AND (authority_id != ?7 OR authority_epoch != ?8)
|
|
62
|
+
AND EXISTS (SELECT 1 FROM wallet_authorities WHERE ${SCOPE}
|
|
63
|
+
AND wallet_id = ?5 AND authority_id = ?7 AND lifecycle_state = 'active'
|
|
64
|
+
AND revocation_epoch = ?8)`, [
|
|
65
|
+
input.walletId,
|
|
66
|
+
subject,
|
|
67
|
+
input.authorityId,
|
|
68
|
+
input.authorityEpoch
|
|
69
|
+
]);
|
|
70
|
+
const createAssociation = this.prepare(`INSERT INTO external_auth_associations
|
|
71
|
+
(namespace, org_id, project_id, env_id, association_id, wallet_id,
|
|
72
|
+
provider_subject, authority_id, authority_epoch, status)
|
|
73
|
+
SELECT ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, 'active'
|
|
74
|
+
WHERE EXISTS (SELECT 1 FROM wallet_authorities WHERE ${SCOPE}
|
|
75
|
+
AND authority_id = ?8 AND wallet_id = ?6 AND lifecycle_state = 'active'
|
|
76
|
+
AND revocation_epoch = ?9)
|
|
77
|
+
ON CONFLICT(namespace, org_id, project_id, env_id, wallet_id, provider_subject)
|
|
78
|
+
WHERE status = 'active' DO NOTHING`, [
|
|
79
|
+
crypto.randomUUID(),
|
|
80
|
+
input.walletId,
|
|
81
|
+
subject,
|
|
82
|
+
input.authorityId,
|
|
83
|
+
input.authorityEpoch
|
|
84
|
+
]);
|
|
85
|
+
const [revoked, inserted] = await this.database.batch([revokePriorAuthority, createAssociation]);
|
|
86
|
+
if (!revoked?.success || !inserted?.success) throw new Error("Association update failed");
|
|
87
|
+
if (d1ChangedRows(inserted) === 1) return true;
|
|
88
|
+
return await this.prepare(`SELECT association_id FROM external_auth_associations WHERE ${SCOPE}
|
|
89
|
+
AND wallet_id = ?5 AND provider_subject = ?6 AND authority_id = ?7
|
|
90
|
+
AND authority_epoch = ?8 AND status = 'active'
|
|
91
|
+
AND EXISTS (SELECT 1 FROM wallet_authorities WHERE ${SCOPE}
|
|
92
|
+
AND wallet_id = ?5 AND authority_id = ?7 AND lifecycle_state = 'active'
|
|
93
|
+
AND revocation_epoch = ?8)`, [
|
|
94
|
+
input.walletId,
|
|
95
|
+
subject,
|
|
96
|
+
input.authorityId,
|
|
97
|
+
input.authorityEpoch
|
|
98
|
+
]).first() !== null;
|
|
99
|
+
}
|
|
100
|
+
async revokeAssociation(input) {
|
|
101
|
+
await this.prepare(`UPDATE external_auth_associations SET status = 'revoked'
|
|
102
|
+
WHERE ${SCOPE} AND wallet_id = ?5 AND association_id = ?6
|
|
103
|
+
AND EXISTS (SELECT 1 FROM wallet_authorities WHERE ${SCOPE}
|
|
104
|
+
AND wallet_id = ?5 AND authority_id = ?7 AND revocation_epoch = ?8 AND lifecycle_state = 'active')`, [
|
|
105
|
+
input.walletId,
|
|
106
|
+
input.associationId,
|
|
107
|
+
input.owner.authorityId,
|
|
108
|
+
input.owner.revocationEpoch
|
|
109
|
+
]).run();
|
|
110
|
+
}
|
|
111
|
+
async prepareUnlink(input) {
|
|
112
|
+
return d1ChangedRows(await this.prepare(`INSERT INTO external_auth_attempts
|
|
113
|
+
(namespace, org_id, project_id, env_id, attempt_id, wallet_id, origin, binding_hash,
|
|
114
|
+
session_token_hash, expires_at_ms, status, purpose, association_id, identity_subject, code_hash, trust_revision)
|
|
115
|
+
SELECT ?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, 'verified', 'unlink', ?11, provider_subject, ?12, ?13
|
|
116
|
+
FROM external_auth_associations WHERE ${SCOPE} AND wallet_id = ?6 AND association_id = ?11`, [
|
|
117
|
+
input.attemptId,
|
|
118
|
+
input.walletId,
|
|
119
|
+
input.originBinding,
|
|
120
|
+
input.bindingHash,
|
|
121
|
+
input.sessionTokenHash,
|
|
122
|
+
input.expiresAtMs,
|
|
123
|
+
input.associationId,
|
|
124
|
+
input.codeHash,
|
|
125
|
+
input.trustRevision
|
|
126
|
+
]).run()) === 1;
|
|
127
|
+
}
|
|
128
|
+
async readOwnerAttempt(input) {
|
|
129
|
+
const row = await this.prepare(`SELECT purpose, status, identity_subject, association_id, expires_at_ms, owner_challenge_expires_at_ms
|
|
130
|
+
FROM external_auth_attempts WHERE ${SCOPE} AND wallet_id = ?5 AND attempt_id = ?6
|
|
131
|
+
AND origin = ?7 AND binding_hash = ?8 AND session_token_hash = ?9 AND code_hash = ?10
|
|
132
|
+
AND trust_revision = ?11 AND expires_at_ms > ?12 AND status IN ('verified', 'consumed')
|
|
133
|
+
AND purpose IN ('associate', 'unlink')`, [
|
|
134
|
+
input.walletId,
|
|
135
|
+
input.attemptId,
|
|
136
|
+
input.originBinding,
|
|
137
|
+
input.bindingHash,
|
|
138
|
+
input.sessionTokenHash,
|
|
139
|
+
input.codeHash,
|
|
140
|
+
input.trustRevision,
|
|
141
|
+
input.nowMs
|
|
142
|
+
]).first();
|
|
143
|
+
if (!row) return null;
|
|
144
|
+
if (row.status !== "verified" && row.status !== "consumed") throw new Error("Invalid owner attempt state");
|
|
145
|
+
const status = row.status;
|
|
146
|
+
const identity = parseStoredExternalIdentity(requireCanonicalString(row.identity_subject, "identity_subject"));
|
|
147
|
+
const expiresAtMs = parseUnixMs(row.expires_at_ms, "attempt expiry");
|
|
148
|
+
const challenge = row.owner_challenge_expires_at_ms === null ? { kind: "unprepared" } : {
|
|
149
|
+
kind: "ready",
|
|
150
|
+
expiresAtMs: parseUnixMs(row.owner_challenge_expires_at_ms, "owner challenge expiry")
|
|
151
|
+
};
|
|
152
|
+
switch (row.purpose) {
|
|
153
|
+
case "associate": return {
|
|
154
|
+
purpose: "associate",
|
|
155
|
+
walletId: input.walletId,
|
|
156
|
+
attemptId: input.attemptId,
|
|
157
|
+
identity,
|
|
158
|
+
originBinding: input.originBinding,
|
|
159
|
+
trustRevision: input.trustRevision,
|
|
160
|
+
expiresAtMs,
|
|
161
|
+
status,
|
|
162
|
+
challenge
|
|
163
|
+
};
|
|
164
|
+
case "unlink": return {
|
|
165
|
+
purpose: "unlink",
|
|
166
|
+
walletId: input.walletId,
|
|
167
|
+
attemptId: input.attemptId,
|
|
168
|
+
identity,
|
|
169
|
+
originBinding: input.originBinding,
|
|
170
|
+
trustRevision: input.trustRevision,
|
|
171
|
+
expiresAtMs,
|
|
172
|
+
status,
|
|
173
|
+
challenge,
|
|
174
|
+
associationId: requireCanonicalString(row.association_id, "association_id")
|
|
175
|
+
};
|
|
176
|
+
default: throw new Error("Invalid owner attempt purpose");
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async prepareOwnerChallenge(input) {
|
|
180
|
+
await this.prepare(`UPDATE external_auth_attempts
|
|
181
|
+
SET owner_challenge_expires_at_ms = COALESCE(owner_challenge_expires_at_ms, MIN(expires_at_ms, ?13))
|
|
182
|
+
WHERE ${SCOPE} AND wallet_id = ?5 AND attempt_id = ?6 AND origin = ?7
|
|
183
|
+
AND binding_hash = ?8 AND session_token_hash = ?9 AND code_hash = ?10
|
|
184
|
+
AND trust_revision = ?11 AND expires_at_ms > ?12 AND status = 'verified'
|
|
185
|
+
AND purpose IN ('associate', 'unlink')`, [
|
|
186
|
+
input.walletId,
|
|
187
|
+
input.attemptId,
|
|
188
|
+
input.originBinding,
|
|
189
|
+
input.bindingHash,
|
|
190
|
+
input.sessionTokenHash,
|
|
191
|
+
input.codeHash,
|
|
192
|
+
input.trustRevision,
|
|
193
|
+
input.nowMs,
|
|
194
|
+
input.nowMs + 6e4
|
|
195
|
+
]).run();
|
|
196
|
+
return this.readOwnerAttempt(input);
|
|
197
|
+
}
|
|
198
|
+
async consumeOwnerAttempt(input, owner) {
|
|
199
|
+
return d1ChangedRows(await this.prepare(`UPDATE external_auth_attempts SET status = 'consumed'
|
|
200
|
+
WHERE ${SCOPE} AND wallet_id = ?5 AND attempt_id = ?6 AND origin = ?7
|
|
201
|
+
AND binding_hash = ?8 AND session_token_hash = ?9 AND code_hash = ?10
|
|
202
|
+
AND trust_revision = ?11 AND expires_at_ms > ?12 AND owner_challenge_expires_at_ms > ?12
|
|
203
|
+
AND status = 'verified' AND purpose IN ('associate', 'unlink')
|
|
204
|
+
AND EXISTS (SELECT 1 FROM wallet_authorities WHERE ${SCOPE}
|
|
205
|
+
AND wallet_id = ?5 AND authority_id = ?13 AND revocation_epoch = ?14 AND lifecycle_state = 'active')`, [
|
|
206
|
+
input.walletId,
|
|
207
|
+
input.attemptId,
|
|
208
|
+
input.originBinding,
|
|
209
|
+
input.bindingHash,
|
|
210
|
+
input.sessionTokenHash,
|
|
211
|
+
input.codeHash,
|
|
212
|
+
input.trustRevision,
|
|
213
|
+
input.nowMs,
|
|
214
|
+
owner.authorityId,
|
|
215
|
+
owner.revocationEpoch
|
|
216
|
+
]).run()) === 1;
|
|
217
|
+
}
|
|
218
|
+
async prepareAttempt(input) {
|
|
219
|
+
const nowMs = Date.now();
|
|
220
|
+
await this.database.batch([this.database.prepare(`DELETE FROM external_auth_attempts WHERE rowid IN (
|
|
221
|
+
SELECT rowid FROM external_auth_attempts
|
|
222
|
+
WHERE expires_at_ms <= ? AND (session_expires_at_ms IS NULL OR session_expires_at_ms <= ?) LIMIT 100
|
|
223
|
+
)`).bind(nowMs, nowMs), this.database.prepare(`DELETE FROM external_auth_rate_limits WHERE rowid IN (
|
|
224
|
+
SELECT rowid FROM external_auth_rate_limits WHERE reset_at_ms <= ? LIMIT 100
|
|
225
|
+
)`).bind(nowMs)]);
|
|
226
|
+
await this.prepare(`INSERT INTO external_auth_attempts
|
|
227
|
+
(namespace, org_id, project_id, env_id, attempt_id, wallet_id, origin,
|
|
228
|
+
binding_hash, session_token_hash, expires_at_ms, status, purpose)
|
|
229
|
+
VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10, 'prepared', ?11)`, [
|
|
230
|
+
input.attemptId,
|
|
231
|
+
input.walletId,
|
|
232
|
+
input.originBinding,
|
|
233
|
+
input.bindingHash,
|
|
234
|
+
input.sessionTokenHash,
|
|
235
|
+
input.expiresAtMs,
|
|
236
|
+
input.purpose
|
|
237
|
+
]).run();
|
|
238
|
+
}
|
|
239
|
+
async readPreparedPurpose(walletId, attemptId, nowMs) {
|
|
240
|
+
const row = await this.prepare(`SELECT purpose FROM external_auth_attempts WHERE ${SCOPE} AND wallet_id = ?5
|
|
241
|
+
AND attempt_id = ?6 AND status = 'prepared' AND expires_at_ms > ?7`, [
|
|
242
|
+
walletId,
|
|
243
|
+
attemptId,
|
|
244
|
+
nowMs
|
|
245
|
+
]).first();
|
|
246
|
+
if (!row) return null;
|
|
247
|
+
switch (row.purpose) {
|
|
248
|
+
case "authenticate":
|
|
249
|
+
case "associate": return row.purpose;
|
|
250
|
+
default: return null;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
async verifyAttempt(input) {
|
|
254
|
+
return d1ChangedRows(await this.prepare(`UPDATE external_auth_attempts SET status = 'verified',
|
|
255
|
+
association_id = (SELECT a.association_id FROM external_auth_associations a
|
|
256
|
+
JOIN wallet_authorities w ON w.namespace = a.namespace AND w.org_id = a.org_id
|
|
257
|
+
AND w.project_id = a.project_id AND w.env_id = a.env_id
|
|
258
|
+
AND w.authority_id = a.authority_id AND w.wallet_id = a.wallet_id
|
|
259
|
+
WHERE a.namespace = ?1 AND a.org_id = ?2 AND a.project_id = ?3 AND a.env_id = ?4
|
|
260
|
+
AND a.wallet_id = ?6 AND a.provider_subject = ?7 AND a.status = 'active'
|
|
261
|
+
AND w.lifecycle_state = 'active' AND w.revocation_epoch = a.authority_epoch
|
|
262
|
+
AND ${ACTIVE_HOME}),
|
|
263
|
+
trust_revision = ?8, code_hash = ?9, session_expires_at_ms = ?11, identity_subject = ?7
|
|
264
|
+
WHERE ${SCOPE} AND attempt_id = ?5 AND wallet_id = ?6
|
|
265
|
+
AND status = 'prepared' AND expires_at_ms > ?10 AND purpose = ?12
|
|
266
|
+
AND (purpose = 'associate' OR EXISTS (SELECT 1 FROM external_auth_associations a
|
|
267
|
+
JOIN wallet_authorities w ON w.namespace = a.namespace AND w.org_id = a.org_id
|
|
268
|
+
AND w.project_id = a.project_id AND w.env_id = a.env_id
|
|
269
|
+
AND w.authority_id = a.authority_id AND w.wallet_id = a.wallet_id
|
|
270
|
+
WHERE a.namespace = ?1 AND a.org_id = ?2 AND a.project_id = ?3 AND a.env_id = ?4
|
|
271
|
+
AND a.wallet_id = ?6 AND a.provider_subject = ?7 AND a.status = 'active'
|
|
272
|
+
AND w.lifecycle_state = 'active' AND w.revocation_epoch = a.authority_epoch
|
|
273
|
+
AND ${ACTIVE_HOME}))`, [
|
|
274
|
+
input.attemptId,
|
|
275
|
+
input.walletId,
|
|
276
|
+
serializeExternalIdentity(input.identity),
|
|
277
|
+
input.trust.revision,
|
|
278
|
+
input.codeHash,
|
|
279
|
+
input.nowMs,
|
|
280
|
+
input.sessionExpiresAtMs,
|
|
281
|
+
input.purpose
|
|
282
|
+
]).run()) === 1;
|
|
283
|
+
}
|
|
284
|
+
async redeem(input) {
|
|
285
|
+
await this.prepare(`UPDATE external_auth_attempts SET status = 'consumed'
|
|
286
|
+
WHERE ${SCOPE} AND attempt_id = ?5 AND wallet_id = ?6 AND origin = ?7
|
|
287
|
+
AND binding_hash = ?8 AND session_token_hash = ?9 AND code_hash = ?10
|
|
288
|
+
AND purpose = 'authenticate' AND status = 'verified' AND expires_at_ms > ?11 AND session_expires_at_ms > ?11
|
|
289
|
+
AND trust_revision = ?12 AND ${LIVE_ASSOCIATION}`, [
|
|
290
|
+
input.attemptId,
|
|
291
|
+
input.walletId,
|
|
292
|
+
input.originBinding,
|
|
293
|
+
input.bindingHash,
|
|
294
|
+
input.sessionTokenHash,
|
|
295
|
+
input.codeHash,
|
|
296
|
+
input.nowMs,
|
|
297
|
+
input.trustRevision
|
|
298
|
+
]).run();
|
|
299
|
+
const row = await this.prepare(`SELECT ${AUTHENTICATION_COLUMNS}
|
|
300
|
+
FROM external_auth_attempts WHERE ${SCOPE} AND attempt_id = ?5 AND wallet_id = ?6
|
|
301
|
+
AND origin = ?7 AND binding_hash = ?8 AND session_token_hash = ?9 AND code_hash = ?10
|
|
302
|
+
AND purpose = 'authenticate' AND status = 'consumed' AND session_expires_at_ms > ?11 AND trust_revision = ?12 AND ${LIVE_ASSOCIATION}`, [
|
|
303
|
+
input.attemptId,
|
|
304
|
+
input.walletId,
|
|
305
|
+
input.originBinding,
|
|
306
|
+
input.bindingHash,
|
|
307
|
+
input.sessionTokenHash,
|
|
308
|
+
input.codeHash,
|
|
309
|
+
input.nowMs,
|
|
310
|
+
input.trustRevision
|
|
311
|
+
]).first();
|
|
312
|
+
return row ? this.authentication(row) : null;
|
|
313
|
+
}
|
|
314
|
+
async readSession(input) {
|
|
315
|
+
const row = await this.prepare(`SELECT ${AUTHENTICATION_COLUMNS}
|
|
316
|
+
FROM external_auth_attempts WHERE ${SCOPE} AND session_token_hash = ?5 AND origin = ?6
|
|
317
|
+
AND purpose = 'authenticate' AND status = 'consumed' AND session_expires_at_ms > ?7
|
|
318
|
+
AND trust_revision = ?8 AND ${LIVE_ASSOCIATION}`, [
|
|
319
|
+
input.tokenHash,
|
|
320
|
+
input.originBinding,
|
|
321
|
+
input.nowMs,
|
|
322
|
+
input.trustRevision
|
|
323
|
+
]).first();
|
|
324
|
+
return row ? this.authentication(row) : null;
|
|
325
|
+
}
|
|
326
|
+
async revokeSession(tokenHash, originBinding) {
|
|
327
|
+
await this.prepare(`UPDATE external_auth_attempts SET status = 'revoked'
|
|
328
|
+
WHERE ${SCOPE} AND session_token_hash = ?5 AND origin = ?6`, [tokenHash, originBinding]).run();
|
|
329
|
+
}
|
|
330
|
+
async devices(walletId) {
|
|
331
|
+
const result = await this.prepare(`SELECT DISTINCT device_id FROM wallet_authorities WHERE ${SCOPE}
|
|
332
|
+
AND wallet_id = ?5 AND lifecycle_state = 'active' ORDER BY device_id`, [walletId]).all();
|
|
333
|
+
const devices = [];
|
|
334
|
+
for (const row of result.results || []) devices.push({ id: requireCanonicalString(row.device_id, "device_id") });
|
|
335
|
+
return devices;
|
|
336
|
+
}
|
|
337
|
+
authentication(row) {
|
|
338
|
+
return parseExternalWalletAuthentication({
|
|
339
|
+
kind: "external_authenticated",
|
|
340
|
+
walletId: row.wallet_id,
|
|
341
|
+
sessionId: row.attempt_id,
|
|
342
|
+
associationId: row.association_id,
|
|
343
|
+
environmentId: this.scope.envId,
|
|
344
|
+
provider: parseStoredExternalIdentity(requireCanonicalString(row.provider_subject, "provider_subject")).provider,
|
|
345
|
+
permission: "wallet_settings_read",
|
|
346
|
+
expiresAtMs: parseUnixMs(row.session_expires_at_ms, "session expiry")
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
//#endregion
|
|
351
|
+
export { ExternalAuthStore };
|
|
352
|
+
|
|
353
|
+
//# sourceMappingURL=externalAuthStore.js.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { externalAuthFailure, serializeExternalIdentity } from "../shared-ts/src/auth/externalAuth.js";
|
|
2
|
+
import { computeWalletOwnerAdminChallengeDigest } from "../shared-ts/src/authorization/walletOwnerOperation.js";
|
|
3
|
+
//#region src/auth/externalOwnerOperations.ts
|
|
4
|
+
async function readExternalOwnerOperation(input) {
|
|
5
|
+
const attempt = input.phase === "prepare" ? await input.store.prepareOwnerChallenge(input.binding) : await input.store.readOwnerAttempt(input.binding);
|
|
6
|
+
if (!attempt) return externalAuthFailure("access_denied");
|
|
7
|
+
if (attempt.challenge.kind !== "ready") return externalAuthFailure("access_denied");
|
|
8
|
+
if (attempt.status === "verified" && attempt.challenge.expiresAtMs <= input.binding.nowMs) return externalAuthFailure("expired");
|
|
9
|
+
const identity = serializeExternalIdentity(attempt.identity);
|
|
10
|
+
let operation;
|
|
11
|
+
let payload;
|
|
12
|
+
switch (attempt.purpose) {
|
|
13
|
+
case "associate":
|
|
14
|
+
operation = "external_identity_associate";
|
|
15
|
+
payload = {
|
|
16
|
+
attemptId: attempt.attemptId,
|
|
17
|
+
identity,
|
|
18
|
+
originBinding: attempt.originBinding,
|
|
19
|
+
revision: attempt.trustRevision,
|
|
20
|
+
expiresAtMs: attempt.challenge.expiresAtMs
|
|
21
|
+
};
|
|
22
|
+
break;
|
|
23
|
+
case "unlink":
|
|
24
|
+
operation = "external_identity_unlink";
|
|
25
|
+
payload = {
|
|
26
|
+
attemptId: attempt.attemptId,
|
|
27
|
+
associationId: attempt.associationId,
|
|
28
|
+
identity,
|
|
29
|
+
originBinding: attempt.originBinding,
|
|
30
|
+
revision: attempt.trustRevision,
|
|
31
|
+
expiresAtMs: attempt.challenge.expiresAtMs
|
|
32
|
+
};
|
|
33
|
+
break;
|
|
34
|
+
default: return assertNever(attempt);
|
|
35
|
+
}
|
|
36
|
+
const challengeB64u = await computeWalletOwnerAdminChallengeDigest({
|
|
37
|
+
walletId: attempt.walletId,
|
|
38
|
+
operation,
|
|
39
|
+
payload,
|
|
40
|
+
requestOrigin: input.requestOrigin
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
ok: true,
|
|
44
|
+
value: {
|
|
45
|
+
attempt,
|
|
46
|
+
operation,
|
|
47
|
+
payload,
|
|
48
|
+
challengeB64u
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function externalOwnerChallenge(operation) {
|
|
53
|
+
const attempt = operation.attempt;
|
|
54
|
+
if (attempt.challenge.kind !== "ready") throw new Error("Owner challenge is not prepared");
|
|
55
|
+
switch (attempt.purpose) {
|
|
56
|
+
case "associate": return {
|
|
57
|
+
kind: "associate",
|
|
58
|
+
walletId: attempt.walletId,
|
|
59
|
+
attemptId: attempt.attemptId,
|
|
60
|
+
identity: attempt.identity,
|
|
61
|
+
challengeB64u: operation.challengeB64u,
|
|
62
|
+
expiresAtMs: attempt.challenge.expiresAtMs
|
|
63
|
+
};
|
|
64
|
+
case "unlink": return {
|
|
65
|
+
kind: "unlink",
|
|
66
|
+
walletId: attempt.walletId,
|
|
67
|
+
attemptId: attempt.attemptId,
|
|
68
|
+
associationId: attempt.associationId,
|
|
69
|
+
identity: attempt.identity,
|
|
70
|
+
challengeB64u: operation.challengeB64u,
|
|
71
|
+
expiresAtMs: attempt.challenge.expiresAtMs
|
|
72
|
+
};
|
|
73
|
+
default: return assertNever(attempt);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function assertNever(value) {
|
|
77
|
+
throw new Error(`Unsupported external owner operation: ${String(value)}`);
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { externalOwnerChallenge, readExternalOwnerOperation };
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=externalOwnerOperations.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { mpcMaterialActivationRefsEqual, parseMpcMaterialActivationRef, parseWalletAuthMethodId, parseWalletAuthorityId, parseWalletId } from "../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { parseMpcWalletSigningQuotaId, parsePrincipalId, parseTenantId, parseWalletSessionAuthorizationId, parseWalletSessionId, parseWalletSessionMintId } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { base64UrlEncode } from "../shared-ts/src/utils/base64.js";
|
|
4
3
|
import { alphabetizeStringify, sha256BytesUtf8 } from "../shared-ts/src/utils/digests.js";
|
|
5
4
|
import { parseDigestB64u } from "../shared-ts/src/utils/canonicalPrimitives.js";
|
|
5
|
+
import "../shared-ts/src/utils/encoders.js";
|
|
6
|
+
import { parseMpcWalletSigningQuotaId, parsePrincipalId, parseTenantId, parseWalletSessionAuthorizationId, parseWalletSessionId, parseWalletSessionMintId } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
6
7
|
import { parseActiveWalletSessionV1, parseWalletSessionHome } from "../shared-ts/src/device-linking/activeWalletSession.js";
|
|
7
8
|
import { computeCapabilityOperationFingerprintDigest } from "../shared-ts/src/authorization/operationFingerprint.js";
|
|
8
|
-
import "../shared-ts/src/utils/encoders.js";
|
|
9
9
|
import "../shared-ts/src/device-linking/index.js";
|
|
10
10
|
//#region src/authorization/domain.ts
|
|
11
11
|
function buildExactWalletSessionQuotaProjectionV1(fields) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseProviderSubject } from "../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { AUTHORIZATION_EVIDENCE_KINDS } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { alphabetizeStringify } from "../shared-ts/src/utils/digests.js";
|
|
4
3
|
import { sha256Utf8DigestB64u } from "../shared-ts/src/utils/canonicalPrimitives.js";
|
|
4
|
+
import { AUTHORIZATION_EVIDENCE_KINDS } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
5
5
|
import { computeCapabilityOperationFingerprintDigest } from "../shared-ts/src/authorization/operationFingerprint.js";
|
|
6
6
|
//#region src/authorization/factorEvidence.ts
|
|
7
7
|
const FACTOR_EVIDENCE_DIGEST_DOMAIN_V1 = "seams:authorization:factor-evidence:v1";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { parseHostedWalletSessionExchangeCodeId, parseMpcWalletSigningQuotaId, parseWalletSessionAuthorizationId, parseWalletSessionId } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
2
1
|
import { base64UrlEncode } from "../shared-ts/src/utils/base64.js";
|
|
3
2
|
import { sha256BytesUtf8 } from "../shared-ts/src/utils/digests.js";
|
|
4
3
|
import { parseDigestB64u } from "../shared-ts/src/utils/canonicalPrimitives.js";
|
|
5
|
-
import { parseWalletSessionOperationCredentialV1 } from "../shared-ts/src/device-linking/activeWalletSession.js";
|
|
6
4
|
import "../shared-ts/src/utils/encoders.js";
|
|
5
|
+
import { parseHostedWalletSessionExchangeCodeId, parseMpcWalletSigningQuotaId, parseWalletSessionAuthorizationId, parseWalletSessionId } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
6
|
+
import { parseWalletSessionOperationCredentialV1 } from "../shared-ts/src/device-linking/activeWalletSession.js";
|
|
7
7
|
import { buildActiveWalletSessionQuota, buildPersistedActiveWalletSessionAuthorizationV2, buildWalletSessionAuthorizationV2, buildWalletSessionCapabilitySubjectsV1, parseHostedWalletSeamsSessionExchangeCode, parseHostedWalletSeamsSessionExchangeNonce, parseHostedWalletSessionCredentialId, parseHostedWalletSessionOperationCredentialV1, parsePrimaryWalletSessionOperationCredentialToken, walletSessionCapabilitySubjectsV1Equal } from "./domain.js";
|
|
8
8
|
import { buildVerifiedOwnerProof, buildVerifiedWalletOperationFactorEvidenceSet } from "./factorEvidence.js";
|
|
9
9
|
import { secureRandomBase64Url } from "../shared-ts/src/utils/secureRandomId.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { buildVaultOperationRef, parseAuthorizationAuditEventId, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId, parsePrincipalId, parseTenantId, parseVaultId, parseVaultItemId } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
2
1
|
import { alphabetizeStringify } from "../shared-ts/src/utils/digests.js";
|
|
3
2
|
import { parseDigestB64u, sha256Utf8DigestB64u } from "../shared-ts/src/utils/canonicalPrimitives.js";
|
|
3
|
+
import { buildVaultOperationRef, parseAuthorizationAuditEventId, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId, parsePrincipalId, parseTenantId, parseVaultId, parseVaultItemId } from "../shared-ts/src/authorization/capabilityKinds.js";
|
|
4
4
|
import { buildCapabilityOperationEnvelope } from "../shared-ts/src/authorization/operationFingerprint.js";
|
|
5
5
|
import { AUTHORIZED_OPERATION_REPLAY_BODY_MAX_BYTES, authorizedOperationReplayBodyInit } from "./domain.js";
|
|
6
6
|
import { hasExactKeys } from "../shared-ts/src/utils/exactKeys.js";
|
package/dist/esm/cloud-host.js
CHANGED
|
@@ -3,22 +3,30 @@ import { ensureLeadingSlash, normalizeBoundedPositiveInteger, normalizeLowercase
|
|
|
3
3
|
import { isObject, isPlainObject } from "./shared-ts/src/utils/validation.js";
|
|
4
4
|
import { base64UrlDecode, base64UrlEncode } from "./shared-ts/src/utils/base64.js";
|
|
5
5
|
import { sha256Bytes } from "./shared-ts/src/utils/digests.js";
|
|
6
|
+
import { parseExternalAuthConfiguration, parseExternalAuthProvider } from "./shared-ts/src/auth/externalAuth.js";
|
|
6
7
|
import "./shared-ts/src/utils/encoders.js";
|
|
8
|
+
import { CloudflareD1OidcJwksCache, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseGoogleJwks, parseJwtAud, parseRs256JwtForVerification, validateGoogleIdTokenClaims, verifyRs256JwtSignature } from "./router/cloudflare/d1/oidc/d1OidcBoundary.js";
|
|
9
|
+
import { verifyGoogleOidcToken } from "./router/cloudflare/d1/oidc/googleOidcToken.js";
|
|
10
|
+
import { D1_BATCH_CAS_GUARD_SQL, d1ChangedRows, d1Integer, d1Number, formatD1ExecStatement, isD1DatabaseLike, parseD1JsonArrayColumn, parseD1JsonColumn, parseD1JsonObjectColumn, queryD1All, queryD1One } from "./storage/d1Sql.js";
|
|
11
|
+
import { prepareD1TenantStatement } from "./core/d1TenantStore.js";
|
|
7
12
|
import { ROUTER_AB_PUBLIC_KEYSET_PATH, ROUTER_AB_PUBLIC_KEYSET_VERSION_V2, ROUTER_AB_PUBLIC_KEYSET_WELL_KNOWN_PATH, parseRouterAbPublicKeysetV2 } from "./shared-ts/src/utils/routerAbPublicKeyset.js";
|
|
8
13
|
import { ROUTER_AB_ED25519_YAO_EXPORT_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_EXPORT_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ACTIVATE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_STATUS_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_WARM_RECOVERY_BOOTSTRAP_PATH_V1 } from "./shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
9
14
|
import { computeLinkedDeviceSessionClaimDigestV1 } from "./shared-ts/src/device-linking/digests.js";
|
|
10
15
|
import { WalletLifecycleLocator } from "./authorization/lifecycleRouting.js";
|
|
11
16
|
import { secureRandomBase36, secureRandomBase64Url } from "./shared-ts/src/utils/secureRandomId.js";
|
|
12
17
|
import { digestOpaqueValue } from "./authorization/service.js";
|
|
18
|
+
import { webAuthnCredentialIdB64uFromCredential } from "./router/auth/webAuthnCredentialCodecs.js";
|
|
19
|
+
import { routeError, routeJson, toFetchRouteResponse } from "./router/framework/routeResponses.js";
|
|
20
|
+
import { extractBearerCredential, extractRouterApiEnvironmentId, normalizeSourceIp, resolveRequestOriginRateLimitKeyFromFetchHeaders, resolveSourceIpFromFetchHeaders } from "./router/auth/routerApiKeyAuth.js";
|
|
21
|
+
import { SessionService, buildCorsOrigins, normalizeCorsOrigin, parseCsvList } from "./core/SessionService.js";
|
|
22
|
+
import { ROUTER_AB_TRACE_ID_HEADER_V1 } from "./shared-ts/src/utils/routerAbTraceContext.js";
|
|
23
|
+
import { headersToRecord, json, jsonFailure, readJson, toResponse, withCors } from "./router/framework/http.js";
|
|
13
24
|
import { ROUTER_API_CREDENTIAL_SCOPES } from "./router/framework/apiCredentialPorts.js";
|
|
14
25
|
import { API_CREDENTIAL_ROUTE_SCOPES, API_CREDENTIAL_TYPES, PUBLIC_PROOF_TYPES } from "./router/framework/routeAuthPolicy.js";
|
|
15
26
|
import { ROUTE_SERVICE_KEYS } from "./router/framework/routeExecutionContext.js";
|
|
16
27
|
import { createRouterApiRouteDefinitions, defineRoute, defineRouteExtension, findRouteDefinitionById, findRouteDefinitionForRequest, matchesRouteDefinitionRequest } from "./router/framework/routeDefinitions.js";
|
|
17
|
-
import { SessionService, buildCorsOrigins, normalizeCorsOrigin, parseCsvList } from "./core/SessionService.js";
|
|
18
28
|
import { addSecp256k1PublicKeys33, computeEip1559TxHash, encodeEip1559SignedTxFromSignature65, ensureEvmCryptoWasm, secp256k1PrivateKey32ToPublicKey33, secp256k1PublicKey33ToEthereumAddress, sha256BytesSync, signSecp256k1Recoverable, validateSecp256k1PublicKey33, verifySecp256k1Bip340SignatureAgainstPublicKey33, verifySecp256k1RecoverableSignatureAgainstPublicKey33 } from "./core/ThresholdService/evmCryptoWasm.js";
|
|
19
|
-
import { D1_BATCH_CAS_GUARD_SQL, d1ChangedRows, d1Integer, d1Number, formatD1ExecStatement, isD1DatabaseLike, parseD1JsonArrayColumn, parseD1JsonColumn, parseD1JsonObjectColumn, queryD1All, queryD1One } from "./storage/d1Sql.js";
|
|
20
29
|
import { D1WalletStore, ED25519_SIGNER_ACTIVATION_ID_PATH, WALLET_STORE_D1_SCHEMA_SQL, buildWalletEcdsaSignerRecord, ensureWalletStoreD1Schema, parseWalletEd25519SignerRecord, prepareD1WalletPutSignerStatement, prepareD1WalletPutSubjectStatement, selectWalletEd25519Signer } from "./core/d1WalletStore.js";
|
|
21
|
-
import { prepareD1TenantStatement } from "./core/d1TenantStore.js";
|
|
22
30
|
import { D1WalletAuthMethodStore, WALLET_AUTH_METHOD_D1_STORE, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_SQL, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_V2_SQL, bindWalletAuthMethodIdentity, bindWalletAuthMethodIdentityV2, ensureWalletAuthMethodStoreD1Schema, normalizeWalletAuthMethod, normalizeWalletAuthMethodV2, prepareD1WalletAuthMethodInsertStatement, prepareD1WalletAuthMethodPutStatement, prepareD1WalletAuthMethodV2PutStatement, walletAuthMethodId, walletAuthMethodV2Id } from "./core/d1WalletAuthMethodStore.js";
|
|
23
31
|
import { coerceLogger, normalizeLogger } from "./core/logger.js";
|
|
24
32
|
import { WalletObjectAddressSnapshot, walletObjectIdentity } from "./router/cloudflare/runtime/walletObjectAddresses.js";
|
|
@@ -29,11 +37,8 @@ import { enforceDelegatePolicy, executeSignedDelegateWithRelayer, normalizeHashT
|
|
|
29
37
|
import { parseWalletRegistrationSetupReservation, proposeWalletRegistrationSetup, walletRegistrationSetupRequestDigest } from "./router/domains/walletRegistration/walletRegistrationReservation.js";
|
|
30
38
|
import { LocalRegistrationSetupAuthority } from "./localRegistrationSetupAuthority.js";
|
|
31
39
|
import { createWalletRegistrationContextResolver, unavailableRegistrationContext, walletRegistrationContext } from "./router/auth/walletRegistrationContext.js";
|
|
32
|
-
import { extractBearerCredential, extractRouterApiEnvironmentId, normalizeSourceIp, resolveRequestOriginRateLimitKeyFromFetchHeaders, resolveSourceIpFromFetchHeaders } from "./router/auth/routerApiKeyAuth.js";
|
|
33
40
|
import { publishableKeyRoutePrincipal, resolvePublishableKeyApiCredentialAuth, resolveSecretKeyApiCredentialAuth, resolveWalletRegistrationContext } from "./router/auth/routerApiCredentialAuth.js";
|
|
34
41
|
import { enforceRoutePolicy } from "./router/framework/enforceRoutePolicy.js";
|
|
35
|
-
import { routeError, routeJson, toFetchRouteResponse } from "./router/framework/routeResponses.js";
|
|
36
|
-
import { ROUTER_AB_TRACE_ID_HEADER_V1 } from "./shared-ts/src/utils/routerAbTraceContext.js";
|
|
37
42
|
import { parseWalletRegistrationSetupRequest } from "./router/domains/walletRegistration/walletRegistrationRoutes.js";
|
|
38
43
|
import { applyRouteMetering } from "./router/framework/applyRouteMetering.js";
|
|
39
44
|
import { InMemoryRouterAbNormalSigningAdmissionStore, abusePrincipalKey, createInMemoryRouterAbNormalSigningAdmissionAdapter, createInMemoryRouterAbNormalSigningAdmissionStore, createRouterAbNormalSigningAdmissionAdapter, runtimePolicyScopeKey } from "./router/domains/signingOperations/routerAbNormalSigningAdmissionCore.js";
|
|
@@ -43,8 +48,6 @@ import { coerceRouterLogger } from "./router/framework/logger.js";
|
|
|
43
48
|
import { buildTenantRootIdentityFromAuthenticatedDeploymentV1, encodeTenantRootIdentityV1 } from "./shared-ts/src/tenant-root/tenantRootIdentity.js";
|
|
44
49
|
import { WALLET_CONSOLE_OPS_BASE_PATH_V1, WALLET_CONSOLE_OP_PATHS_V1, WALLET_CONSOLE_SERVICE_ORIGIN_V1, decodeWalletConsoleTenantRootActiveLineageRequestV1, decodeWalletConsoleTenantRootActiveLineageResponseV1 } from "./router/cloudflare/runtime/walletConsoleOps.js";
|
|
45
50
|
import { createWalletConsoleOpsClient, parseWalletRegistrationContextResponse } from "./router/cloudflare/runtime/walletConsoleOpsClient.js";
|
|
46
|
-
import { headersToRecord, json, jsonFailure, readJson, toResponse, withCors } from "./router/framework/http.js";
|
|
47
|
-
import { webAuthnCredentialIdB64uFromCredential } from "./router/auth/webAuthnCredentialCodecs.js";
|
|
48
51
|
import { deriveRecoveryCodeLocatorV1FromBytes, parseRecoveryCodeLocatorV1 } from "./shared-ts/src/wallet-recovery/recoveryCodeLocator.js";
|
|
49
52
|
import { evaluateRouterAbNormalSigningAdmission } from "./router/domains/signingOperations/routerAbNormalSigningAdmission.js";
|
|
50
53
|
import { authenticateRouterAbWalletOperationStepUpIdentity } from "./router/domains/signingOperations/routerAbOperationStepUp.js";
|
|
@@ -100,7 +103,6 @@ import { runRouterAbEd25519YaoRegistrationSideEffectV1 } from "./router/domains/
|
|
|
100
103
|
import { CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_RESERVE_INACTIVE_SOURCE_PRESERVING_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1, CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1, CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialDeactivationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1, createUnavailableOrdinaryInactiveSignerMaterialDeactivationPortV1, createUnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1 } from "./router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.js";
|
|
101
104
|
import "./router/cloudflare-adaptor.js";
|
|
102
105
|
import { CloudflareD1RouterAbEd25519YaoCapabilityPersistence, ROUTER_AB_ED25519_YAO_CAPABILITY_REPLACEMENT_TABLE_V1 } from "./router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js";
|
|
103
|
-
import { CloudflareD1OidcJwksCache, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseGoogleJwks, parseJwtAud, parseRs256JwtForVerification, validateGoogleIdTokenClaims, verifyRs256JwtSignature } from "./router/cloudflare/d1/oidc/d1OidcBoundary.js";
|
|
104
106
|
import { createSigningSessionSealOptions, parseSigningSessionSealRootConfig } from "./threshold/session/signingSessionSeal/options.js";
|
|
105
107
|
import { normalizeD1RouterApiAuthOptions, normalizeLinkedDevicePasskeyTargetConfigurationV1, parseBooleanFlag, requireD1RouterApiAuthScopeString } from "./router/cloudflare/d1/auth/d1RouterApiAuthConfig.js";
|
|
106
108
|
import { decodeJsonRpcEnvelope } from "./shared-ts/src/utils/jsonRpc.js";
|
|
@@ -108,7 +110,6 @@ import { createRouterAbEcdsaEd25519CeremonyTokenIssuer, createRouterAbEcdsaStric
|
|
|
108
110
|
import { parseGoogleEmailOtpRegistrationAttemptRecord, parseGoogleEmailOtpRegistrationOfferCandidates, requireRuntimePolicyScope } from "./router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationRecords.js";
|
|
109
111
|
import { CloudflareD1GoogleEmailOtpRegistrationAttemptStore } from "./router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js";
|
|
110
112
|
import { D1IdentityStore } from "./core/d1IdentityStore.js";
|
|
111
|
-
import { verifyGoogleOidcToken } from "./router/cloudflare/d1/oidc/googleOidcToken.js";
|
|
112
113
|
import { D1LinkedDeviceEd25519ExportRootStoreV1 } from "./router/cloudflare/d1/deviceLinking/d1LinkedDeviceEd25519ExportRootStore.js";
|
|
113
114
|
import { D1LinkedDeviceRequestProofNonceStoreV1 } from "./router/cloudflare/d1/deviceLinking/d1LinkedDeviceRequestProofNonceStore.js";
|
|
114
115
|
import { createD1LinkedDeviceSessionServiceV1 } from "./router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionService.js";
|
|
@@ -131,4 +132,4 @@ import { handleRouterAbEd25519YaoRecoveryRequestScopedCloudflareV1 } from "./rou
|
|
|
131
132
|
import { RouterAbEd25519YaoRecoveryWalletSessionAuthorizationAdapter } from "./router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryWalletSessionAuthorization.js";
|
|
132
133
|
import { keccak256Bytes } from "./shared-ts/src/utils/keccak.js";
|
|
133
134
|
import { decodeEvmBlockHeader, decodeEvmTransactionByHash, decodeEvmTransactionCall, decodeEvmTransactionReceipt, parseRpcHexQuantity } from "./shared-ts/src/utils/evmRpcResults.js";
|
|
134
|
-
export { API_CREDENTIAL_ROUTE_SCOPES, API_CREDENTIAL_TYPES, ActionType, CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_RESERVE_INACTIVE_SOURCE_PRESERVING_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1, CloudflareD1AuthorizationStore, CloudflareD1GoogleEmailOtpRegistrationAttemptStore, CloudflareD1OidcJwksCache, CloudflareD1RouterAbEd25519YaoCapabilityPersistence, CloudflareD1RouterAbNormalSigningAdmissionStore, CloudflareD1VaultProxyStore, CloudflareD1VersionedJsonRecordStore, CloudflareD1VersionedJsonRecordStoreError, CloudflareD1WebAuthnAuthService, CloudflareD1WebAuthnStore, CloudflareDurableObjectVersionedJsonRecordStore, CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1, CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1, CloudflareVersionedJsonRecordStoreError, CrossSiteSessionCookieAdapter, D1IdentityStore, D1LinkedDeviceAuthorityInstallServiceV1, D1LinkedDeviceEd25519ExportRootStoreV1, D1LinkedDeviceRequestProofNonceStoreV1, D1LinkedDeviceSessionStoreV1, D1LinkedDeviceSourceContributionPreparationPlannerV1, D1LinkedDeviceTargetAuthenticatorStoreV1, D1LinkedDeviceTargetCredentialProviderV1, D1LinkedDeviceTargetPlannerV1, D1WalletAuthMethodStore, D1WalletObjectAddresses, D1WalletStore, D1_BATCH_CAS_GUARD_SQL, DEFAULT_SESSION_COOKIE_NAME, DEFAULT_WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_V1, DEFAULT_WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_V1, DEFAULT_WALLET_SESSION_REMAINING_USES, DEFAULT_WALLET_SESSION_TTL_MS, ED25519_SIGNER_ACTIVATION_ID_PATH, InMemoryRouterAbEd25519YaoExportService, InMemoryRouterAbEd25519YaoExportStateV1, InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationAdapter, InMemoryRouterAbEd25519YaoRegistrationService, InMemoryRouterAbNormalSigningAdmissionStore, LINKED_DEVICE_OWNER_AUTHORIZATION_PATH_V1, LinkedDeviceRetiredTargetRegistrationShapeErrorV1, LinkedDeviceSourceFamilyUnavailableErrorV1, LinkedDeviceWebAuthnRegistrationVerifierV1, LocalRegistrationSetupAuthority, MAX_WALLET_SESSION_REMAINING_USES, MAX_WALLET_SESSION_TTL_MS, PUBLIC_PROOF_TYPES, ROUTER_AB_ECDSA_DERIVATION_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_YAO_CAPABILITY_REPLACEMENT_TABLE_V1, ROUTER_AB_ED25519_YAO_EXPORT_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_EXPORT_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ACTIVATE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_STATUS_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, ROUTER_AB_ED25519_YAO_WARM_RECOVERY_BOOTSTRAP_PATH_V1, ROUTER_AB_MPC_ROUTER_ORIGIN, ROUTER_AB_PUBLIC_KEYSET_PATH, ROUTER_AB_PUBLIC_KEYSET_VERSION_V2, ROUTER_AB_PUBLIC_KEYSET_WELL_KNOWN_PATH, ROUTER_AB_SIGNING_WORKER_ORIGIN, ROUTER_AB_TRACE_ID_HEADER_V1, ROUTER_API_CREDENTIAL_SCOPES, ROUTE_SERVICE_KEYS, RouterAbEcdsaPresignRuntime, RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter, RouterAbEd25519YaoHttpRegistrationBackend, RouterAbEd25519YaoRecoveryWalletSessionAuthorizationAdapter, SESSION_CAS_GUARD_SQL, SessionService, StaticCloudflareTenantStorageRouteResolver, UnavailableOrdinaryInactiveSignerMaterialDeactivationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, WALLET_AUTH_METHOD_D1_STORE, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_SQL, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_V2_SQL, WALLET_CONSOLE_API_WALLET_DETAIL_PREFIX_V1, WALLET_CONSOLE_OPS_BASE_PATH_V1, WALLET_CONSOLE_OP_PATHS_V1, WALLET_CONSOLE_SERVICE_ORIGIN_V1, WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_ID_V1, WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_ID_V1, WALLET_CONTROL_AUTH_MARKER_V1, WALLET_CONTROL_BASE_PATH_V1, WALLET_CONTROL_SERVICE_ORIGIN_V1, WALLET_RUNTIME_OPS_BASE_PATH_V1, WALLET_RUNTIME_OP_PATHS_V1, WALLET_RUNTIME_SERVICE_ORIGIN_V1, WALLET_STORE_D1_SCHEMA_SQL, WalletHomeCustodyBinding, WalletLifecycleLocator, WalletObjectAddressSnapshot, WalletPlacementRoutes, abusePrincipalKey, addSecp256k1PublicKeys33, admitD1EstablishedWalletHome, admitRouterAbEcdsaReusableWalletSessionOperation, applyRouteMetering, assertUniqueRouterApiRouteDefinitions, authenticateDeviceLinkingOwnerWalletSessionRequestV1, authenticateRouterAbEcdsaOperationStepUp, authenticateRouterAbWalletOperationStepUp, authenticateRouterAbWalletOperationStepUpIdentity, authorizeRouterAbEcdsaDerivationNormalSigningRoute, authorizeRouterAbEd25519NormalSigningRoute, base64UrlDecode, base64UrlEncode, bindWalletAuthMethodIdentity, bindWalletAuthMethodIdentityV2, buildCorsOrigins, buildRouterAbEcdsaDerivationPrivateSigningWorkerBody, buildRouterAbEcdsaOwnerOperationStepUpPreparation, buildRouterAbEd25519OwnerOperationStepUpPreparation, buildRouterAbEd25519PrivateSigningWorkerBody, buildRouterAbEd25519YaoAddSignerAdmissionRequestV1, buildRouterAbEd25519YaoProductAdmissionRequestV1, buildTenantRootIdentityFromAuthenticatedDeploymentV1, buildVerifiedLinkInputV1, buildVerifiedTargetFactorV1, buildWalletEcdsaSignerRecord, claimRouterAbEcdsaOperationStepUp, coerceLogger, coerceRouterLogger, completeRouterAbEcdsaOperation, computeEip1559TxHash, computeLinkedDeviceSessionClaimDigestV1, computeRouterAbEd25519NormalSigningAdmissionMaterial, computeVerifiedTargetFactorVerificationDigestV1, createCloudflareD1RouterAbNormalSigningAdmissionStore, createCloudflareD1RouterApiAuthService, createCloudflareD1VersionedJsonRecordStore, createCloudflareDurableObjectVersionedJsonRecordStore, createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1, createCloudflareRouter, createCloudflareTenantStorageRoute, createCloudflareWalletGatewayRouterV1, createD1LinkedDeviceOwnerAuthorizationMetadataSourceV1, createD1LinkedDeviceOwnerAuthorizationProviderV1, createD1LinkedDeviceOwnerSourceChildReaderV1, createD1LinkedDeviceRouteServiceV1, createD1LinkedDeviceSessionServiceV1, createD1LinkedDeviceSourceContributionPreparationPlannerV1, createD1LinkedDeviceVerifiedLinkSourceReaderV1, createDeviceLinkingOwnerRequestAuthenticatorV1, createEd25519SessionAdapter, createInMemoryRouterAbNormalSigningAdmissionAdapter, createInMemoryRouterAbNormalSigningAdmissionStore, createInMemoryRouterApiRuntimeSnapshotConsumer, createRouterAbEcdsaEd25519CeremonyTokenIssuer, createRouterAbEcdsaStrictPostRegistrationPort, createRouterAbEcdsaStrictRegistrationPort, createRouterAbEd25519YaoCeremonyStateStoreV1, createRouterAbEd25519YaoExportModule, createRouterAbEd25519YaoHttpRegistrationBackendFromEnv, createRouterAbEd25519YaoMaterialActivationRefV1, createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1, createRouterAbEd25519YaoProductRegistrationRuntimeV1, createRouterAbEd25519YaoProductRegistrationStateFromPartsV1, createRouterAbEd25519YaoProductRegistrationStateV1, createRouterAbEd25519YaoRegistrationModule, createRouterAbNormalSigningAdmissionAdapter, createRouterAbServiceBindingFetch, createRouterApiModule, createRouterApiRouteDefinitions, createSignerD1DoStorageTarget, createSigningSessionSealOptions, createStaticCloudflareTenantStorageRouteResolver, createStaticCloudflareTenantStorageRouteResolverFromBindings, createStaticWalletConsoleBindingV1, createUnavailableOrdinaryInactiveSignerMaterialDeactivationPortV1, createUnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, createWalletConsoleOpsClient, createWalletConsoleRelayProxyExtensionV1, createWalletControlClientBindings, createWalletRegistrationContextResolver, createWalletRuntimeOpsHandler, d1ChangedRows, d1Integer, d1Number, decideRouterAbEcdsaOwnerOperationAuthorization, decideRouterAbEd25519OwnerOperationAuthorization, decodeEvmBlockHeader, decodeEvmTransactionByHash, decodeEvmTransactionCall, decodeEvmTransactionReceipt, decodeJsonRpcEnvelope, decodeWalletConsoleTenantRootActiveLineageRequestV1, decodeWalletConsoleTenantRootActiveLineageResponseV1, defineRoute, defineRouteExtension, deriveJwtExpiresAtIso, deriveRecoveryCodeLocatorV1FromBytes, digestOpaqueValue, encodeEip1559SignedTxFromSignature65, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, encodeRouterAbEd25519YaoProductRegistrationStateV1, encodeSessionJsonSegment, encodeTenantRootIdentityV1, enforceDelegatePolicy, enforceRoutePolicy, ensureEvmCryptoWasm, ensureLeadingSlash, ensureWalletAuthMethodStoreD1Schema, ensureWalletStoreD1Schema, evaluateRouterAbNormalSigningAdmission, executeRouterAbEd25519YaoAdmittedRegistrationV1, executeSignedDelegateWithRelayer, extractBearerCredential, extractRouterApiEnvironmentId, findRouteDefinitionById, findRouteDefinitionForRequest, formatD1ExecStatement, getRouterApiRouteExtensionDefinitions, getRouterApiRouteExtensionRoutes, getRouterApiRouteExtensionsForTransport, handleRouterAbEcdsaDerivationNormalSigningRouteCore, handleRouterAbEd25519YaoExportRequestScopedCloudflareV1, handleRouterAbEd25519YaoRecoveryRequestScopedCloudflareV1, handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1, handleStaticWalletConsoleRequestV1, handleWalletControlRequest, headersToRecord, isD1DatabaseLike, isObject, isPlainObject, json, jsonFailure, keccak256Bytes, linkedDeviceSignerManifestsEqualV1, linkedDeviceX25519RecipientPublicKeyB64uV1, loadCloudflareSignerWasmModule, matchesRouteDefinitionRequest, mergeRouterAbEd25519YaoProductRegistrationStatePartitionV1, mintRouterAbEd25519YaoRegistrationIdentityV1, normalizeBoundedPositiveInteger, normalizeCorsOrigin, normalizeD1RouterApiAuthOptions, normalizeHashToBytes, normalizeLinkedDevicePasskeyTargetConfigurationV1, normalizeLogger, normalizeLowercaseString, normalizeSessionString, normalizeSessionTtlSeconds, normalizeSourceIp, normalizeTrimmedString, normalizeWalletAuthMethod, normalizeWalletAuthMethodV2, parseBooleanFlag, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseCsvList, parseD1JsonArrayColumn, parseD1JsonColumn, parseD1JsonObjectColumn, parseD1LinkedDeviceSessionRowV1, parseD1LinkedDeviceSessionTranscriptRowV1, parseGoogleEmailOtpRegistrationAttemptRecord, parseGoogleEmailOtpRegistrationOfferCandidates, parseGoogleJwks, parseGoogleLoginVerifyRequest, parseInstalledEcdsaCustodySnapshotV1, parseJwtAud, parseLinkedDeviceSessionRecordV1, parseOrgId, parseRecoveryCodeLocatorV1, parseRouterAbEcdsaEd25519PrivateJwk, parseRouterAbEcdsaPresignRuntimeConfig, parseRouterAbEcdsaStrictRegistrationTopology, parseRouterAbEd25519NormalSigningScopeV2, parseRouterAbEd25519OperationStepUpScope, parseRouterAbEd25519YaoActivationKeysetFromEnvV1, parseRouterAbEd25519YaoCeremonyKeyV1, parseRouterAbEd25519YaoExportAdmissionEnvelopeV1, parseRouterAbEd25519YaoExportExecuteEnvelopeV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationStateJsonV1, parseRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoRegistrationAdmissionReadV1, parseRouterAbEd25519YaoRegistrationRouterAnswerV1, parseRouterAbEd25519YaoTenantRootWireV1, parseRouterAbOperationStepUpOperation, parseRouterAbPublicKeysetV2, parseRpcHexQuantity, parseRs256JwtForVerification, parseSessionJwt, parseSigningSessionSealRootConfig, parseStaticWalletConsoleBindingConfigV1, parseStoredRouterAbEcdsaPendingActivationV1, parseWalletEd25519SignerRecord, parseWalletId, parseWalletRecoveryOperationId, parseWalletRegistrationContextResponse, parseWalletRegistrationSetupRequest, parseWalletRegistrationSetupReservation, parseWalletRuntimeExecuteSignedDelegateRequest, parseWalletRuntimeExecuteSignedDelegateResponse, parseWalletRuntimeExecuteSignedDelegateResult, parseWalletRuntimeRelayerAccount, parseWalletRuntimeWalletIdentitiesResult, parseWalletRuntimeWalletIdentityRequest, parseWebAuthnRpId, parseWebAuthnSyncChallengeRecord, partitionRouterAbEd25519YaoProductRegistrationStateV1, postRouterAbSigningWorkerJson, prepareD1TenantStatement, prepareD1WalletAuthMethodInsertStatement, prepareD1WalletAuthMethodPutStatement, prepareD1WalletAuthMethodV2PutStatement, prepareD1WalletPutSignerStatement, prepareD1WalletPutSubjectStatement, prepareD1WebAuthnAuthenticatorInsertStatement, prepareD1WebAuthnAuthenticatorPutStatement, projectRouterAbEd25519YaoExactWalletSession, proposeWalletRegistrationSetup, publishableKeyRoutePrincipal, queryD1All, queryD1One, randomTenantRootCreationGrantBytesV1, readD1LinkedDeviceEcdsaSourceV1, readD1LinkedDeviceEd25519SourceV1, readEnvironmentCsv, readEnvironmentString, readJson, registrationPreparationIdFromString, requireD1RouterApiAuthScopeString, requireEnvironmentString, requireNormalizedSessionString, requireRuntimePolicyScope, resolveFreshRouterAbEcdsaMaterialActivation, resolvePublishableKeyApiCredentialAuth, resolveRequestOriginRateLimitKeyFromFetchHeaders, resolveRouterAbEd25519YaoCeremonyKeyFromRequestV1, resolveRuntimeTenantRootLineage, resolveSecretKeyApiCredentialAuth, resolveSourceIpFromFetchHeaders, resolveWalletRegistrationContext, resumeRegistrationDirectoryPublicationsV1, routeError, routeJson, routerAbEcdsaAtomicAuthorizationConfigured, routerAbEcdsaOperationInProgressResult, routerAbEcdsaOwnerOperationFailureResult, routerAbEcdsaRecordedResponse, routerAbEcdsaReplayHttpResponse, routerAbEcdsaReplayResult, routerAbEcdsaReplayUnavailableResult, routerAbEcdsaStrictRegistrationFactsBindingJson, routerAbEcdsaStrictRegistrationRequestBindingJson, routerAbEcdsaStrictRegistrationRequestMatchesFacts, routerAbEd25519OwnerOperationFailureResult, routerAbEd25519YaoAdmittedRegistrationAuthorityV1, routerAbEd25519YaoPartitionedStateAfterStoredCommitV1, routerAbEd25519YaoPersistedCapabilityMatchesLookupV1, routerAbEd25519YaoRegistrationExecutionTimingEntriesV1, routerAbEd25519YaoRegistrationSigningRootIdV1, routerAbEd25519YaoTenantRootWireV1, runRouterAbEd25519YaoProductRegistrationRequestScopedV1, runRouterAbEd25519YaoRegistrationSideEffectV1, runRouterAbEd25519YaoRegistrationTwoPhaseV1, runRouterAbPrewarmScheduledV1, runtimePolicyScopeKey, sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1, secp256k1PrivateKey32ToPublicKey33, secp256k1PublicKey33ToEthereumAddress, secureRandomBase36, secureRandomBase64Url, selectWalletEd25519Signer, sessionJwtTimeClaims, sha256Bytes, sha256BytesSync, signSecp256k1Recoverable, signTenantRootCreationGrantV1, tenantRootIdentityDigestB64uV1, tenantStorageRouteBackendFamily, tenantStorageRouteDiagnostic, toFetchRouteResponse, normalizeOptionalTrimmedString as toOptionalTrimmedString, toResponse, toSessionArrayBufferCopy, unavailableRegistrationContext, validateDelegateExpiryAndNonce, validateGoogleIdTokenClaims, validateRuntimeSnapshotExpectation, validateSecp256k1PublicKey33, verifyGoogleOidcToken, verifyRs256JwtSignature, verifySecp256k1Bip340SignatureAgainstPublicKey33, verifySecp256k1RecoverableSignatureAgainstPublicKey33, walletAuthMethodId, walletAuthMethodV2Id, walletConsoleApiWalletGetRouteDefinitionV1, walletConsoleApiWalletListRouteDefinitionV1, walletConsoleApiWalletSearchRouteDefinitionV1, walletConsoleRelayRouteDefinitionsV1, walletConsoleSignedDelegateRouteDefinitionV1, walletConsoleSponsoredEvmCallRouteDefinitionV1, walletObjectIdentity, walletRegistrationContext, walletRegistrationSetupRequestDigest, webAuthnCredentialIdB64uFromCredential, withCors };
|
|
135
|
+
export { API_CREDENTIAL_ROUTE_SCOPES, API_CREDENTIAL_TYPES, ActionType, CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_RESERVE_INACTIVE_SOURCE_PRESERVING_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1, CloudflareD1AuthorizationStore, CloudflareD1GoogleEmailOtpRegistrationAttemptStore, CloudflareD1OidcJwksCache, CloudflareD1RouterAbEd25519YaoCapabilityPersistence, CloudflareD1RouterAbNormalSigningAdmissionStore, CloudflareD1VaultProxyStore, CloudflareD1VersionedJsonRecordStore, CloudflareD1VersionedJsonRecordStoreError, CloudflareD1WebAuthnAuthService, CloudflareD1WebAuthnStore, CloudflareDurableObjectVersionedJsonRecordStore, CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1, CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1, CloudflareVersionedJsonRecordStoreError, CrossSiteSessionCookieAdapter, D1IdentityStore, D1LinkedDeviceAuthorityInstallServiceV1, D1LinkedDeviceEd25519ExportRootStoreV1, D1LinkedDeviceRequestProofNonceStoreV1, D1LinkedDeviceSessionStoreV1, D1LinkedDeviceSourceContributionPreparationPlannerV1, D1LinkedDeviceTargetAuthenticatorStoreV1, D1LinkedDeviceTargetCredentialProviderV1, D1LinkedDeviceTargetPlannerV1, D1WalletAuthMethodStore, D1WalletObjectAddresses, D1WalletStore, D1_BATCH_CAS_GUARD_SQL, DEFAULT_SESSION_COOKIE_NAME, DEFAULT_WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_V1, DEFAULT_WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_V1, DEFAULT_WALLET_SESSION_REMAINING_USES, DEFAULT_WALLET_SESSION_TTL_MS, ED25519_SIGNER_ACTIVATION_ID_PATH, InMemoryRouterAbEd25519YaoExportService, InMemoryRouterAbEd25519YaoExportStateV1, InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationAdapter, InMemoryRouterAbEd25519YaoRegistrationService, InMemoryRouterAbNormalSigningAdmissionStore, LINKED_DEVICE_OWNER_AUTHORIZATION_PATH_V1, LinkedDeviceRetiredTargetRegistrationShapeErrorV1, LinkedDeviceSourceFamilyUnavailableErrorV1, LinkedDeviceWebAuthnRegistrationVerifierV1, LocalRegistrationSetupAuthority, MAX_WALLET_SESSION_REMAINING_USES, MAX_WALLET_SESSION_TTL_MS, PUBLIC_PROOF_TYPES, ROUTER_AB_ECDSA_DERIVATION_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_YAO_CAPABILITY_REPLACEMENT_TABLE_V1, ROUTER_AB_ED25519_YAO_EXPORT_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_EXPORT_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ACTIVATE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_STATUS_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, ROUTER_AB_ED25519_YAO_WARM_RECOVERY_BOOTSTRAP_PATH_V1, ROUTER_AB_MPC_ROUTER_ORIGIN, ROUTER_AB_PUBLIC_KEYSET_PATH, ROUTER_AB_PUBLIC_KEYSET_VERSION_V2, ROUTER_AB_PUBLIC_KEYSET_WELL_KNOWN_PATH, ROUTER_AB_SIGNING_WORKER_ORIGIN, ROUTER_AB_TRACE_ID_HEADER_V1, ROUTER_API_CREDENTIAL_SCOPES, ROUTE_SERVICE_KEYS, RouterAbEcdsaPresignRuntime, RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter, RouterAbEd25519YaoHttpRegistrationBackend, RouterAbEd25519YaoRecoveryWalletSessionAuthorizationAdapter, SESSION_CAS_GUARD_SQL, SessionService, StaticCloudflareTenantStorageRouteResolver, UnavailableOrdinaryInactiveSignerMaterialDeactivationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, WALLET_AUTH_METHOD_D1_STORE, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_SQL, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_V2_SQL, WALLET_CONSOLE_API_WALLET_DETAIL_PREFIX_V1, WALLET_CONSOLE_OPS_BASE_PATH_V1, WALLET_CONSOLE_OP_PATHS_V1, WALLET_CONSOLE_SERVICE_ORIGIN_V1, WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_ID_V1, WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_ID_V1, WALLET_CONTROL_AUTH_MARKER_V1, WALLET_CONTROL_BASE_PATH_V1, WALLET_CONTROL_SERVICE_ORIGIN_V1, WALLET_RUNTIME_OPS_BASE_PATH_V1, WALLET_RUNTIME_OP_PATHS_V1, WALLET_RUNTIME_SERVICE_ORIGIN_V1, WALLET_STORE_D1_SCHEMA_SQL, WalletHomeCustodyBinding, WalletLifecycleLocator, WalletObjectAddressSnapshot, WalletPlacementRoutes, abusePrincipalKey, addSecp256k1PublicKeys33, admitD1EstablishedWalletHome, admitRouterAbEcdsaReusableWalletSessionOperation, applyRouteMetering, assertUniqueRouterApiRouteDefinitions, authenticateDeviceLinkingOwnerWalletSessionRequestV1, authenticateRouterAbEcdsaOperationStepUp, authenticateRouterAbWalletOperationStepUp, authenticateRouterAbWalletOperationStepUpIdentity, authorizeRouterAbEcdsaDerivationNormalSigningRoute, authorizeRouterAbEd25519NormalSigningRoute, base64UrlDecode, base64UrlEncode, bindWalletAuthMethodIdentity, bindWalletAuthMethodIdentityV2, buildCorsOrigins, buildRouterAbEcdsaDerivationPrivateSigningWorkerBody, buildRouterAbEcdsaOwnerOperationStepUpPreparation, buildRouterAbEd25519OwnerOperationStepUpPreparation, buildRouterAbEd25519PrivateSigningWorkerBody, buildRouterAbEd25519YaoAddSignerAdmissionRequestV1, buildRouterAbEd25519YaoProductAdmissionRequestV1, buildTenantRootIdentityFromAuthenticatedDeploymentV1, buildVerifiedLinkInputV1, buildVerifiedTargetFactorV1, buildWalletEcdsaSignerRecord, claimRouterAbEcdsaOperationStepUp, coerceLogger, coerceRouterLogger, completeRouterAbEcdsaOperation, computeEip1559TxHash, computeLinkedDeviceSessionClaimDigestV1, computeRouterAbEd25519NormalSigningAdmissionMaterial, computeVerifiedTargetFactorVerificationDigestV1, createCloudflareD1RouterAbNormalSigningAdmissionStore, createCloudflareD1RouterApiAuthService, createCloudflareD1VersionedJsonRecordStore, createCloudflareDurableObjectVersionedJsonRecordStore, createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1, createCloudflareRouter, createCloudflareTenantStorageRoute, createCloudflareWalletGatewayRouterV1, createD1LinkedDeviceOwnerAuthorizationMetadataSourceV1, createD1LinkedDeviceOwnerAuthorizationProviderV1, createD1LinkedDeviceOwnerSourceChildReaderV1, createD1LinkedDeviceRouteServiceV1, createD1LinkedDeviceSessionServiceV1, createD1LinkedDeviceSourceContributionPreparationPlannerV1, createD1LinkedDeviceVerifiedLinkSourceReaderV1, createDeviceLinkingOwnerRequestAuthenticatorV1, createEd25519SessionAdapter, createInMemoryRouterAbNormalSigningAdmissionAdapter, createInMemoryRouterAbNormalSigningAdmissionStore, createInMemoryRouterApiRuntimeSnapshotConsumer, createRouterAbEcdsaEd25519CeremonyTokenIssuer, createRouterAbEcdsaStrictPostRegistrationPort, createRouterAbEcdsaStrictRegistrationPort, createRouterAbEd25519YaoCeremonyStateStoreV1, createRouterAbEd25519YaoExportModule, createRouterAbEd25519YaoHttpRegistrationBackendFromEnv, createRouterAbEd25519YaoMaterialActivationRefV1, createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1, createRouterAbEd25519YaoProductRegistrationRuntimeV1, createRouterAbEd25519YaoProductRegistrationStateFromPartsV1, createRouterAbEd25519YaoProductRegistrationStateV1, createRouterAbEd25519YaoRegistrationModule, createRouterAbNormalSigningAdmissionAdapter, createRouterAbServiceBindingFetch, createRouterApiModule, createRouterApiRouteDefinitions, createSignerD1DoStorageTarget, createSigningSessionSealOptions, createStaticCloudflareTenantStorageRouteResolver, createStaticCloudflareTenantStorageRouteResolverFromBindings, createStaticWalletConsoleBindingV1, createUnavailableOrdinaryInactiveSignerMaterialDeactivationPortV1, createUnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, createWalletConsoleOpsClient, createWalletConsoleRelayProxyExtensionV1, createWalletControlClientBindings, createWalletRegistrationContextResolver, createWalletRuntimeOpsHandler, d1ChangedRows, d1Integer, d1Number, decideRouterAbEcdsaOwnerOperationAuthorization, decideRouterAbEd25519OwnerOperationAuthorization, decodeEvmBlockHeader, decodeEvmTransactionByHash, decodeEvmTransactionCall, decodeEvmTransactionReceipt, decodeJsonRpcEnvelope, decodeWalletConsoleTenantRootActiveLineageRequestV1, decodeWalletConsoleTenantRootActiveLineageResponseV1, defineRoute, defineRouteExtension, deriveJwtExpiresAtIso, deriveRecoveryCodeLocatorV1FromBytes, digestOpaqueValue, encodeEip1559SignedTxFromSignature65, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, encodeRouterAbEd25519YaoProductRegistrationStateV1, encodeSessionJsonSegment, encodeTenantRootIdentityV1, enforceDelegatePolicy, enforceRoutePolicy, ensureEvmCryptoWasm, ensureLeadingSlash, ensureWalletAuthMethodStoreD1Schema, ensureWalletStoreD1Schema, evaluateRouterAbNormalSigningAdmission, executeRouterAbEd25519YaoAdmittedRegistrationV1, executeSignedDelegateWithRelayer, extractBearerCredential, extractRouterApiEnvironmentId, findRouteDefinitionById, findRouteDefinitionForRequest, formatD1ExecStatement, getRouterApiRouteExtensionDefinitions, getRouterApiRouteExtensionRoutes, getRouterApiRouteExtensionsForTransport, handleRouterAbEcdsaDerivationNormalSigningRouteCore, handleRouterAbEd25519YaoExportRequestScopedCloudflareV1, handleRouterAbEd25519YaoRecoveryRequestScopedCloudflareV1, handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1, handleStaticWalletConsoleRequestV1, handleWalletControlRequest, headersToRecord, isD1DatabaseLike, isObject, isPlainObject, json, jsonFailure, keccak256Bytes, linkedDeviceSignerManifestsEqualV1, linkedDeviceX25519RecipientPublicKeyB64uV1, loadCloudflareSignerWasmModule, matchesRouteDefinitionRequest, mergeRouterAbEd25519YaoProductRegistrationStatePartitionV1, mintRouterAbEd25519YaoRegistrationIdentityV1, normalizeBoundedPositiveInteger, normalizeCorsOrigin, normalizeD1RouterApiAuthOptions, normalizeHashToBytes, normalizeLinkedDevicePasskeyTargetConfigurationV1, normalizeLogger, normalizeLowercaseString, normalizeSessionString, normalizeSessionTtlSeconds, normalizeSourceIp, normalizeTrimmedString, normalizeWalletAuthMethod, normalizeWalletAuthMethodV2, parseBooleanFlag, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseCsvList, parseD1JsonArrayColumn, parseD1JsonColumn, parseD1JsonObjectColumn, parseD1LinkedDeviceSessionRowV1, parseD1LinkedDeviceSessionTranscriptRowV1, parseExternalAuthConfiguration, parseExternalAuthProvider, parseGoogleEmailOtpRegistrationAttemptRecord, parseGoogleEmailOtpRegistrationOfferCandidates, parseGoogleJwks, parseGoogleLoginVerifyRequest, parseInstalledEcdsaCustodySnapshotV1, parseJwtAud, parseLinkedDeviceSessionRecordV1, parseOrgId, parseRecoveryCodeLocatorV1, parseRouterAbEcdsaEd25519PrivateJwk, parseRouterAbEcdsaPresignRuntimeConfig, parseRouterAbEcdsaStrictRegistrationTopology, parseRouterAbEd25519NormalSigningScopeV2, parseRouterAbEd25519OperationStepUpScope, parseRouterAbEd25519YaoActivationKeysetFromEnvV1, parseRouterAbEd25519YaoCeremonyKeyV1, parseRouterAbEd25519YaoExportAdmissionEnvelopeV1, parseRouterAbEd25519YaoExportExecuteEnvelopeV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationStateJsonV1, parseRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoRegistrationAdmissionReadV1, parseRouterAbEd25519YaoRegistrationRouterAnswerV1, parseRouterAbEd25519YaoTenantRootWireV1, parseRouterAbOperationStepUpOperation, parseRouterAbPublicKeysetV2, parseRpcHexQuantity, parseRs256JwtForVerification, parseSessionJwt, parseSigningSessionSealRootConfig, parseStaticWalletConsoleBindingConfigV1, parseStoredRouterAbEcdsaPendingActivationV1, parseWalletEd25519SignerRecord, parseWalletId, parseWalletRecoveryOperationId, parseWalletRegistrationContextResponse, parseWalletRegistrationSetupRequest, parseWalletRegistrationSetupReservation, parseWalletRuntimeExecuteSignedDelegateRequest, parseWalletRuntimeExecuteSignedDelegateResponse, parseWalletRuntimeExecuteSignedDelegateResult, parseWalletRuntimeRelayerAccount, parseWalletRuntimeWalletIdentitiesResult, parseWalletRuntimeWalletIdentityRequest, parseWebAuthnRpId, parseWebAuthnSyncChallengeRecord, partitionRouterAbEd25519YaoProductRegistrationStateV1, postRouterAbSigningWorkerJson, prepareD1TenantStatement, prepareD1WalletAuthMethodInsertStatement, prepareD1WalletAuthMethodPutStatement, prepareD1WalletAuthMethodV2PutStatement, prepareD1WalletPutSignerStatement, prepareD1WalletPutSubjectStatement, prepareD1WebAuthnAuthenticatorInsertStatement, prepareD1WebAuthnAuthenticatorPutStatement, projectRouterAbEd25519YaoExactWalletSession, proposeWalletRegistrationSetup, publishableKeyRoutePrincipal, queryD1All, queryD1One, randomTenantRootCreationGrantBytesV1, readD1LinkedDeviceEcdsaSourceV1, readD1LinkedDeviceEd25519SourceV1, readEnvironmentCsv, readEnvironmentString, readJson, registrationPreparationIdFromString, requireD1RouterApiAuthScopeString, requireEnvironmentString, requireNormalizedSessionString, requireRuntimePolicyScope, resolveFreshRouterAbEcdsaMaterialActivation, resolvePublishableKeyApiCredentialAuth, resolveRequestOriginRateLimitKeyFromFetchHeaders, resolveRouterAbEd25519YaoCeremonyKeyFromRequestV1, resolveRuntimeTenantRootLineage, resolveSecretKeyApiCredentialAuth, resolveSourceIpFromFetchHeaders, resolveWalletRegistrationContext, resumeRegistrationDirectoryPublicationsV1, routeError, routeJson, routerAbEcdsaAtomicAuthorizationConfigured, routerAbEcdsaOperationInProgressResult, routerAbEcdsaOwnerOperationFailureResult, routerAbEcdsaRecordedResponse, routerAbEcdsaReplayHttpResponse, routerAbEcdsaReplayResult, routerAbEcdsaReplayUnavailableResult, routerAbEcdsaStrictRegistrationFactsBindingJson, routerAbEcdsaStrictRegistrationRequestBindingJson, routerAbEcdsaStrictRegistrationRequestMatchesFacts, routerAbEd25519OwnerOperationFailureResult, routerAbEd25519YaoAdmittedRegistrationAuthorityV1, routerAbEd25519YaoPartitionedStateAfterStoredCommitV1, routerAbEd25519YaoPersistedCapabilityMatchesLookupV1, routerAbEd25519YaoRegistrationExecutionTimingEntriesV1, routerAbEd25519YaoRegistrationSigningRootIdV1, routerAbEd25519YaoTenantRootWireV1, runRouterAbEd25519YaoProductRegistrationRequestScopedV1, runRouterAbEd25519YaoRegistrationSideEffectV1, runRouterAbEd25519YaoRegistrationTwoPhaseV1, runRouterAbPrewarmScheduledV1, runtimePolicyScopeKey, sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1, secp256k1PrivateKey32ToPublicKey33, secp256k1PublicKey33ToEthereumAddress, secureRandomBase36, secureRandomBase64Url, selectWalletEd25519Signer, sessionJwtTimeClaims, sha256Bytes, sha256BytesSync, signSecp256k1Recoverable, signTenantRootCreationGrantV1, tenantRootIdentityDigestB64uV1, tenantStorageRouteBackendFamily, tenantStorageRouteDiagnostic, toFetchRouteResponse, normalizeOptionalTrimmedString as toOptionalTrimmedString, toResponse, toSessionArrayBufferCopy, unavailableRegistrationContext, validateDelegateExpiryAndNonce, validateGoogleIdTokenClaims, validateRuntimeSnapshotExpectation, validateSecp256k1PublicKey33, verifyGoogleOidcToken, verifyRs256JwtSignature, verifySecp256k1Bip340SignatureAgainstPublicKey33, verifySecp256k1RecoverableSignatureAgainstPublicKey33, walletAuthMethodId, walletAuthMethodV2Id, walletConsoleApiWalletGetRouteDefinitionV1, walletConsoleApiWalletListRouteDefinitionV1, walletConsoleApiWalletSearchRouteDefinitionV1, walletConsoleRelayRouteDefinitionsV1, walletConsoleSignedDelegateRouteDefinitionV1, walletConsoleSponsoredEvmCallRouteDefinitionV1, walletObjectIdentity, walletRegistrationContext, walletRegistrationSetupRequestDigest, webAuthnCredentialIdB64uFromCredential, withCors };
|