@seams/wallet-server 0.26.0 → 0.28.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/artifact-manifest.json +18 -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/auth/externalAuthService.js +98 -0
- package/dist/esm/auth/externalAuthStore.js +217 -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 +10 -9
- 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 +1 -1
- 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/d1RouterApiAuthService.js +5 -2
- 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 +2 -2
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +2 -2
- 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 +2 -2
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +2 -2
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpRecords.js +1 -1
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpService.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1EvmFamilyEcdsaRegistrationBranch.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +2 -2
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationIntentService.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +3 -3
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.js +1 -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/d1WalletAuthMethodRevocationReplayStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +2 -2
- 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 +4635 -4359
- package/dist/esm/router/domains/ecdsa/routerAbEcdsaStrictRegistration.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +3 -3
- 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 +1 -1
- package/dist/esm/router/domains/signingOperations/routerAbEcdsaDerivationNormalSigningRoute.js +2 -2
- package/dist/esm/router/domains/signingOperations/routerAbEd25519NormalSigningRoute.js +2 -2
- 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 +1 -1
- package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +3 -3
- package/dist/esm/router/domains/walletUnlock/walletUnlockRouteHandlers.js +2 -2
- 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 +1 -1
- package/dist/esm/router/transport/fetch/routes/externalAuth.js +244 -0
- package/dist/esm/router/transport/fetch/routes/normalSigningRouterProxy.js +1 -1
- package/dist/esm/router/transport/fetch/routes/passkeyCustody.js +4 -4
- package/dist/esm/router/transport/fetch/routes/sessions.js +2 -2
- 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 +4 -4
- package/dist/esm/router/transport/fetch/routes/walletExecutionLanePreflight.js +2 -2
- package/dist/esm/router/transport/fetch/routes/walletRegistration.js +3 -3
- package/dist/esm/shared-ts/src/auth/externalAuth.js +45 -0
- 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/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/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 +84 -0
- package/dist/types/wallet-server/src/auth/externalAuthService.d.ts +36 -0
- package/dist/types/wallet-server/src/auth/externalAuthStore.d.ts +61 -0
- package/dist/types/wallet-server/src/cloud-host.d.ts +2 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/oidc/d1OidcBoundary.d.ts +5 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/authorizationSnapshotLayout.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/runtime/staticWalletConsoleBinding.d.ts +2 -0
- package/dist/types/wallet-server/src/router/framework/apiCredentialPorts.d.ts +1 -0
- package/dist/types/wallet-server/src/router/framework/authServicePort.d.ts +1 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/externalAuth.d.ts +5 -0
- package/migrations/d1-signer/0085_external_wallet_auth.sql +158 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseRouterAbEcdsaDerivationActivationRefreshCommitRequestV1, parseRouterAbEcdsaDerivationActivationRefreshResponseV1, parseRouterAbEcdsaDerivationExplicitExportRequestV1, parseRouterAbEcdsaExplicitExportProtocolForwardedResponseV1, parseRouterAbEcdsaRegistrationActivationReceiptV1, parseRouterAbEcdsaStrictForwardedRegistrationResponseV1, projectRouterAbEcdsaDerivationExplicitExportRequestToProtocolV1 } from "../../../shared-ts/src/utils/routerAbEcdsaDerivation.js";
|
|
2
|
+
import { ROUTER_AB_TRACE_ID_HEADER_V1 } from "../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
2
3
|
import { walletObjectIdentity, walletObjectIdentityHeaders } from "../../cloudflare/runtime/walletObjectAddresses.js";
|
|
3
4
|
import { ROUTER_AB_INTERNAL_SERVICE_AUTH_HEADER_V1, normalizeRouterAbInternalServiceAuthSecret } from "../../../core/ThresholdService/routerAb/internalServiceHttp.js";
|
|
4
|
-
import { ROUTER_AB_TRACE_ID_HEADER_V1 } from "../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
5
5
|
//#region src/router/domains/ecdsa/routerAbEcdsaStrictRegistration.ts
|
|
6
6
|
const STRICT_ECDSA_REGISTRATION_PATH = "/router-ab/ecdsa-derivation/register";
|
|
7
7
|
const STRICT_ECDSA_ADD_SIGNER_PATH = "/router-ab/ecdsa-derivation/add-signer";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { parseEmailOtpChallengeId, parseThresholdEd25519SessionId, parseWalletId, parseWebAuthnCredentialIdB64u, parseWebAuthnRpId } from "../../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { parseAuthFactorId, parseAuthorizationAuditEventId, parseAuthorizationEvidenceId, parseAuthorizationEvidenceSetId, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId, parsePrincipalId } from "../../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { isPlainObject } from "../../../../shared-ts/src/utils/validation.js";
|
|
4
3
|
import { base64UrlEncode } from "../../../../shared-ts/src/utils/base64.js";
|
|
5
4
|
import { alphabetizeStringify, sha256BytesUtf8 } from "../../../../shared-ts/src/utils/digests.js";
|
|
6
5
|
import { parseDigestB64u } from "../../../../shared-ts/src/utils/canonicalPrimitives.js";
|
|
7
|
-
import { buildCapabilityOperationEnvelope } from "../../../../shared-ts/src/authorization/operationFingerprint.js";
|
|
8
6
|
import "../../../../shared-ts/src/utils/encoders.js";
|
|
7
|
+
import { parseAuthFactorId, parseAuthorizationAuditEventId, parseAuthorizationEvidenceId, parseAuthorizationEvidenceSetId, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId, parsePrincipalId } from "../../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
8
|
+
import { buildCapabilityOperationEnvelope } from "../../../../shared-ts/src/authorization/operationFingerprint.js";
|
|
9
9
|
import { sameRouterAbMpcMaterialActivationRef } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
10
10
|
import { deriveRouterAbEd25519YaoExportAuthorizationDigestV1, deriveRouterAbEd25519YaoExportConfirmationDigestV1, deriveRouterAbEd25519YaoRuntimePolicyBindingV1 } from "../../../../shared-ts/src/utils/routerAbEd25519YaoDigests.js";
|
|
11
11
|
import { ROUTER_AB_ED25519_YAO_EXPORT_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_EXPORT_EXECUTE_PATH_V1, parseRouterAbEd25519YaoExportAdmissionReceiptV1, parseRouterAbEd25519YaoExportAdmissionRequestV1, parseRouterAbEd25519YaoExportExecuteRequestV1, parseRouterAbEd25519YaoExportResultV1 } from "../../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
12
12
|
import { walletAuthAuthorityRef } from "../../../../shared-ts/src/utils/walletAuthAuthority.js";
|
|
13
13
|
import { parseSessionOrigin, parseVerifiedOwnerProofId } from "../../../../authorization/domain.js";
|
|
14
14
|
import { buildVerifiedWalletOperationEmailOtpFactorResult, buildVerifiedWalletOperationPasskeyFactorResult } from "../../../../authorization/factorEvidence.js";
|
|
15
|
-
import { defineRoute } from "../../../framework/routeDefinitions.js";
|
|
16
15
|
import { normalizeCorsOrigin } from "../../../../core/SessionService.js";
|
|
17
16
|
import { ROUTER_AB_TRACE_ID_HEADER_V1, createRouterAbTraceContextV1, parseRouterAbTraceContextV1 } from "../../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
18
17
|
import { json, readJson } from "../../../framework/http.js";
|
|
18
|
+
import { defineRoute } from "../../../framework/routeDefinitions.js";
|
|
19
19
|
import { parseWebAuthnAuthenticationCredential, webAuthnCredentialIdB64uFromCredential } from "../../../auth/webAuthnCredentialCodecs.js";
|
|
20
20
|
import { WALLET_EMAIL_OTP_EXPORT_OPERATION } from "../../../../shared-ts/src/utils/emailOtpDomain.js";
|
|
21
21
|
import { createRouterApiModule } from "../../../framework/modules.js";
|
|
@@ -2,10 +2,10 @@ import { parseThresholdEd25519SessionId } from "../../../../shared-ts/src/utils/
|
|
|
2
2
|
import { routerAbMpcMaterialActivationRefToWire, sameRouterAbMpcMaterialActivationRef } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
3
3
|
import { 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_WARM_RECOVERY_BOOTSTRAP_PATH_V1, parseRouterAbEd25519YaoRecoveryActivationAdmissionReceiptV1, parseRouterAbEd25519YaoRecoveryActivationExecuteRequestV1, parseRouterAbEd25519YaoRecoveryActivationReceiptV1, parseRouterAbEd25519YaoRecoveryActivationRequestV1, parseRouterAbEd25519YaoRecoveryActivationResultV1, parseRouterAbEd25519YaoRecoveryAdmissionRequestV1, parseRouterAbEd25519YaoRegistrationActivationAdmissionReceiptV1, parseRouterAbEd25519YaoRegistrationActivationResultV1, parseRouterAbEd25519YaoRegistrationAdmissionRequestV1, parseRouterAbEd25519YaoWarmRecoveryBootstrapRequestV1, sameRouterAbEd25519YaoActivationBindingV1, sameRouterAbEd25519YaoActivationPublicReceiptV1, sameRouterAbEd25519YaoRecoveryAdmissionRequestV1 } from "../../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
4
4
|
import { normalizeRuntimePolicyScope, signingRootScopeFromRuntimePolicyScope } from "../../../../shared-ts/src/threshold/signingRootScope.js";
|
|
5
|
-
import { ROUTER_AB_ED25519_NORMAL_SIGNING_STATE_KIND } from "../../../../shared-ts/src/utils/signingSessionSeal.js";
|
|
6
|
-
import { defineRoute } from "../../../framework/routeDefinitions.js";
|
|
7
5
|
import { ROUTER_AB_TRACE_ID_HEADER_V1, createRouterAbTraceContextV1, parseRouterAbTraceContextV1 } from "../../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
8
6
|
import { json, readJson } from "../../../framework/http.js";
|
|
7
|
+
import { ROUTER_AB_ED25519_NORMAL_SIGNING_STATE_KIND } from "../../../../shared-ts/src/utils/signingSessionSeal.js";
|
|
8
|
+
import { defineRoute } from "../../../framework/routeDefinitions.js";
|
|
9
9
|
import { createRouterApiModule } from "../../../framework/modules.js";
|
|
10
10
|
//#region src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.ts
|
|
11
11
|
function requireThresholdEd25519SessionId(value, label) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseWalletId } from "../../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { NEAR_ED25519_MPC_OPERATION_KINDS } from "../../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { base64UrlEncode } from "../../../../shared-ts/src/utils/base64.js";
|
|
3
|
+
import { NEAR_ED25519_MPC_OPERATION_KINDS } from "../../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
4
4
|
import { routerAbMpcMaterialActivationRefToWire, sameRouterAbMpcMaterialActivationRef } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
5
5
|
import { sameRouterAbEd25519YaoByteSequence } from "../../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
6
6
|
import { extractBearerCredential } from "../../../auth/routerApiKeyAuth.js";
|
package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { requireRecord } from "../../../../shared-ts/src/utils/validation.js";
|
|
2
2
|
import { deriveRouterAbEd25519YaoStableContextBindingV1 } from "../../../../shared-ts/src/utils/routerAbEd25519YaoDigests.js";
|
|
3
3
|
import { parseRouterAbEd25519YaoActivationKeysetV1, parseRouterAbEd25519YaoActivationResultV1, parseRouterAbEd25519YaoExportResultV1 } from "../../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
4
|
-
import { walletObjectIdentity, walletObjectIdentityHeaders } from "../../../cloudflare/runtime/walletObjectAddresses.js";
|
|
5
4
|
import { createRouterAbTraceContextV1 } from "../../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
5
|
+
import { walletObjectIdentity, walletObjectIdentityHeaders } from "../../../cloudflare/runtime/walletObjectAddresses.js";
|
|
6
6
|
import { routerAbEd25519YaoRegistrationSigningRootIdV1, routerAbEd25519YaoTenantRootWireV1 } from "../routerAbEd25519YaoGatewayEnvelope.js";
|
|
7
7
|
//#region src/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.ts
|
|
8
8
|
const INTERNAL_AUTH_HEADER = "x-router-ab-internal-service-auth";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { sameRouterAbMpcMaterialActivationRef } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
2
2
|
import { ROUTER_AB_ED25519_YAO_REGISTRATION_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_EXECUTE_PATH_V1, parseRouterAbEd25519YaoRegistrationActivationAdmissionReceiptV1, parseRouterAbEd25519YaoRegistrationActivationExecuteRequestV1, parseRouterAbEd25519YaoRegistrationActivationResultV1, parseRouterAbEd25519YaoRegistrationAdmissionRequestV1, sameRouterAbEd25519YaoActivationBindingV1 } from "../../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
3
|
-
import { defineRoute } from "../../../framework/routeDefinitions.js";
|
|
4
3
|
import { ROUTER_AB_TRACE_ID_HEADER_V1, createRouterAbTraceContextV1, parseRouterAbTraceContextV1 } from "../../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
5
4
|
import { json, readJson } from "../../../framework/http.js";
|
|
5
|
+
import { defineRoute } from "../../../framework/routeDefinitions.js";
|
|
6
6
|
import { createRouterApiModule } from "../../../framework/modules.js";
|
|
7
7
|
//#region src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.ts
|
|
8
8
|
function resolveTraceContext(request) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { failure } from "../../../../shared-ts/src/utils/failure.js";
|
|
1
2
|
import { sameRouterAbMpcMaterialActivationRef } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
2
3
|
import { deriveRouterAbEd25519YaoStableContextBindingV1 } from "../../../../shared-ts/src/utils/routerAbEd25519YaoDigests.js";
|
|
3
4
|
import { deriveSigningRootId } from "../../../../shared-ts/src/threshold/signingRootScope.js";
|
|
4
|
-
import { failure } from "../../../../shared-ts/src/utils/failure.js";
|
|
5
5
|
import { computeAddSignerNearEd25519SigningKeyId } from "../../../../shared-ts/src/utils/registrationIds.js";
|
|
6
6
|
import { findRegistrationSignerPlanNearEd25519Branch, registrationNearEd25519BranchKey, registrationSignerPlanFromSelection } from "../../../../shared-ts/src/utils/registrationSignerPlan.js";
|
|
7
7
|
//#region src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeOptionalTrimmedString } from "../../../shared-ts/src/utils/normalize.js";
|
|
2
2
|
import { isPlainObject } from "../../../shared-ts/src/utils/validation.js";
|
|
3
3
|
import { base64UrlDecode, base64UrlEncode } from "../../../shared-ts/src/utils/base64.js";
|
|
4
|
-
import "../../../shared-ts/src/utils/encoders.js";
|
|
5
4
|
import { failure } from "../../../shared-ts/src/utils/failure.js";
|
|
5
|
+
import "../../../shared-ts/src/utils/encoders.js";
|
|
6
6
|
import { emailOtpStatusCode } from "./emailOtpSessionRouteHelpers.js";
|
|
7
7
|
import { EMAIL_OTP_FACTOR_RELEASE_AAD_DOMAIN_V1 } from "../../../shared-ts/src/utils/emailOtpDomain.js";
|
|
8
8
|
//#region src/router/domains/emailOtp/emailOtpRouteHandlers.ts
|
package/dist/esm/router/domains/signingOperations/routerAbEcdsaDerivationNormalSigningRoute.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { parseWalletId } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { buildAuthorizationGrantRef, buildEvmEcdsaMpcOperationRef, parseAuthorizationAuditEventId, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { parseDigestB64u } from "../../../shared-ts/src/utils/canonicalPrimitives.js";
|
|
3
|
+
import { buildAuthorizationGrantRef, buildEvmEcdsaMpcOperationRef, parseAuthorizationAuditEventId, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
4
4
|
import { buildCapabilityOperationEnvelope, computeCapabilityOperationFingerprintDigest } from "../../../shared-ts/src/authorization/operationFingerprint.js";
|
|
5
5
|
import { routerAbMpcMaterialActivationRefToWire, sameRouterAbMpcMaterialActivationRef } from "../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
6
6
|
import { ROUTER_AB_ECDSA_DERIVATION_NORMAL_SIGNING_STATE_KIND_V1, parseRouterAbEcdsaDerivationEvmDigestSigningFinalizeRequestV1, parseRouterAbEcdsaDerivationEvmDigestSigningRequestV1, routerAbEcdsaDerivationActiveStateId, sameRouterAbEcdsaDerivationNormalSigningScopeV1 } from "../../../shared-ts/src/utils/routerAbEcdsaDerivation.js";
|
|
7
7
|
import { authorizedOperationReplayBodyInit } from "../../../authorization/domain.js";
|
|
8
|
-
import { WALLET_SESSION_FAILURE_CODES } from "../../../shared-ts/src/utils/walletSessionFailure.js";
|
|
9
8
|
import { extractBearerCredential } from "../../auth/routerApiKeyAuth.js";
|
|
9
|
+
import { WALLET_SESSION_FAILURE_CODES } from "../../../shared-ts/src/utils/walletSessionFailure.js";
|
|
10
10
|
import { walletSessionFailure, walletSessionFailureStatus } from "../../auth/walletSessionFailure.js";
|
|
11
11
|
import { validateRouterAbEcdsaDerivationWalletSessionInputs } from "../../auth/commonRouterUtils.js";
|
|
12
12
|
import { signingPrepareSessionResponse } from "./signingPrepareSession.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { mpcMaterialActivationRefsEqual } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { buildNearEd25519MpcOperationRef, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { isPlainObject } from "../../../shared-ts/src/utils/validation.js";
|
|
4
3
|
import { base64UrlEncode } from "../../../shared-ts/src/utils/base64.js";
|
|
5
4
|
import { parseDigestB64u } from "../../../shared-ts/src/utils/canonicalPrimitives.js";
|
|
6
|
-
import { buildCapabilityOperationEnvelope, computeCapabilityOperationFingerprintDigest, parseSigningOperationFingerprintDigest } from "../../../shared-ts/src/authorization/operationFingerprint.js";
|
|
7
5
|
import "../../../shared-ts/src/utils/encoders.js";
|
|
6
|
+
import { buildNearEd25519MpcOperationRef, parseAuthorizedOperationId, parseCapabilityId, parseCapabilityOperationId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
7
|
+
import { buildCapabilityOperationEnvelope, computeCapabilityOperationFingerprintDigest, parseSigningOperationFingerprintDigest } from "../../../shared-ts/src/authorization/operationFingerprint.js";
|
|
8
8
|
import { routerAbMpcMaterialActivationRefFromWire, routerAbMpcMaterialActivationRefToWire, sameRouterAbMpcMaterialActivationRef } from "../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
9
9
|
import { extractBearerCredential } from "../../auth/routerApiKeyAuth.js";
|
|
10
10
|
import { validateRouterAbEd25519WalletSessionInputs } from "../../auth/commonRouterUtils.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseProviderSubject } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { parsePrincipalId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { base64UrlEncode } from "../../../shared-ts/src/utils/base64.js";
|
|
4
3
|
import "../../../shared-ts/src/utils/encoders.js";
|
|
4
|
+
import { parsePrincipalId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
5
5
|
import { routerAbMpcMaterialActivationRefToWire, sameRouterAbMpcMaterialActivationRef } from "../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
6
6
|
import { walletAuthAuthorityRef } from "../../../shared-ts/src/utils/walletAuthAuthority.js";
|
|
7
7
|
import { parseSessionOrigin } from "../../../authorization/domain.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { failure } from "../../../shared-ts/src/utils/failure.js";
|
|
1
2
|
import { sameRouterAbMpcMaterialActivationRef } from "../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
2
3
|
import { signingRootScopeFromRuntimePolicyScope } from "../../../shared-ts/src/threshold/signingRootScope.js";
|
|
3
|
-
import { failure } from "../../../shared-ts/src/utils/failure.js";
|
|
4
4
|
import { buildTenantRootIdentityFromAuthenticatedDeploymentV1, isTenantRootIdentityFieldCanonicalV1 } from "../../../shared-ts/src/tenant-root/tenantRootIdentity.js";
|
|
5
5
|
//#region src/router/domains/tenantRoot/tenantRootIdentityResolution.ts
|
|
6
6
|
const FORBIDDEN_TENANT_ROOT_SELECTOR_FIELDS_V1 = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseWalletAuthMethodId, parseWalletAuthorityId, parseWalletId } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { parseDeviceId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { isPlainObject, requireCanonicalString } from "../../../shared-ts/src/utils/validation.js";
|
|
4
3
|
import { alphabetizeStringify, sha256HexUtf8 } from "../../../shared-ts/src/utils/digests.js";
|
|
4
|
+
import { parseDeviceId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
5
5
|
import { secureRandomBase64Url } from "../../../shared-ts/src/utils/secureRandomId.js";
|
|
6
6
|
import { createServerAllocatedWalletId } from "../../../shared-ts/src/utils/registrationIds.js";
|
|
7
7
|
//#region src/router/domains/walletRegistration/walletRegistrationReservation.ts
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { parseWalletAuthMethodId, parseWalletId, parseWebAuthnRpId } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { EVM_ECDSA_MPC_OPERATION_KINDS, NEAR_ED25519_MPC_OPERATION_KINDS, parseWalletSessionId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
2
|
import { isPlainObject } from "../../../shared-ts/src/utils/validation.js";
|
|
4
3
|
import { base64UrlDecode } from "../../../shared-ts/src/utils/base64.js";
|
|
5
4
|
import { parseDigestB64u } from "../../../shared-ts/src/utils/canonicalPrimitives.js";
|
|
6
5
|
import { base58Encode } from "../../../shared-ts/src/utils/base58.js";
|
|
7
6
|
import "../../../shared-ts/src/utils/encoders.js";
|
|
7
|
+
import { EVM_ECDSA_MPC_OPERATION_KINDS, NEAR_ED25519_MPC_OPERATION_KINDS, parseWalletSessionId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
8
8
|
import { parseRouterAbEd25519YaoRegistrationActivationExecuteRequestV1 } from "../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
9
9
|
import { ecdsaClientRootPublicKey33B64uFromString } from "../../../shared-ts/src/threshold/ecdsaDerivationRoleLocalBootstrap.js";
|
|
10
10
|
import { normalizeRuntimePolicyScope } from "../../../shared-ts/src/threshold/signingRootScope.js";
|
|
11
11
|
import { parseRouterAbEcdsaRegistrationActivationRequestV1, parseRouterAbEcdsaRegistrationRequestV1 } from "../../../shared-ts/src/utils/routerAbEcdsaDerivation.js";
|
|
12
12
|
import { normalizeAddAuthMethodInput, normalizeEmailOtpRegistrationProof, normalizeRegistrationAuthMethodInput } from "../../../shared-ts/src/utils/registrationAuthMethodInput.js";
|
|
13
13
|
import { parseHostedWalletSessionOperationCredentialToken, parsePrimaryWalletSessionOperationCredentialToken, parseSessionOrigin } from "../../../authorization/domain.js";
|
|
14
|
+
import { extractBearerCredential, extractRouterApiEnvironmentId } from "../../auth/routerApiKeyAuth.js";
|
|
14
15
|
import { normalizeCorsOrigin } from "../../../core/SessionService.js";
|
|
16
|
+
import { parseRouterAbTraceContextV1 } from "../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
15
17
|
import { thresholdEcdsaChainTargetFromValue } from "../../../core/thresholdEcdsaChainTarget.js";
|
|
16
18
|
import { walletIdFromString } from "../../../shared-ts/src/utils/registrationIds.js";
|
|
17
19
|
import { recordRegistrationServerTiming, registrationServerTimingHeaders } from "../../framework/registrationTiming.js";
|
|
18
20
|
import { parseRegistrationSetupOperationId } from "../../../shared-ts/src/utils/registrationSetupOperation.js";
|
|
19
|
-
import { extractBearerCredential, extractRouterApiEnvironmentId } from "../../auth/routerApiKeyAuth.js";
|
|
20
21
|
import { publishableKeyRoutePrincipal, resolvePublishableKeyApiCredentialAuth, resolveWalletRegistrationContext } from "../../auth/routerApiCredentialAuth.js";
|
|
21
22
|
import { resolveActiveRuntimePolicyScopeForEnvironment, resolveWalletSessionAdministrationAdmission, resolveWalletSessionOperationCredentialAdmission, resolveWalletSessionOperationCredentialAdmissionFromContext } from "../../auth/commonRouterUtils.js";
|
|
22
23
|
import { enforceRoutePolicy } from "../../framework/enforceRoutePolicy.js";
|
|
@@ -28,7 +29,6 @@ import { computeWalletEcdsaKeyFactsInventoryChallengeDigestB64u } from "../../..
|
|
|
28
29
|
import { deriveImplicitNearAccountIdFromEd25519PublicKey, parseImplicitNearAccountId } from "../../../shared-ts/src/utils/near.js";
|
|
29
30
|
import { normalizeRegistrationSignerPlan, registrationSignerSetSelectionFromPlan } from "../../../shared-ts/src/utils/registrationSignerPlan.js";
|
|
30
31
|
import { addAuthMethodIntentGrantFromString, addSignerIntentGrantFromString, computeAddAuthMethodIntentDigestB64u, computeAddSignerIntentDigestB64u, normalizeAddAuthMethodIntentCaller } from "../../../shared-ts/src/utils/registrationIntent.js";
|
|
31
|
-
import { parseRouterAbTraceContextV1 } from "../../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
32
32
|
//#region src/router/domains/walletRegistration/walletRegistrationRoutes.ts
|
|
33
33
|
function parseRegistrationTraceContext(headers) {
|
|
34
34
|
const parsed = parseRouterAbTraceContextV1(headers["x-seams-trace-id"] ?? headers["X-Seams-Trace-Id"]);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { parseEmailOtpChallengeId, parseWalletAuthMethodId, parseWalletAuthorityId, parseWalletId, parseWebAuthnCredentialIdB64u, parseWebAuthnRpId } from "../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { parseAuthFactorId, parsePrincipalId } 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 { failure } from "../../../shared-ts/src/utils/failure.js";
|
|
5
|
+
import { parseAuthFactorId, parsePrincipalId } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
5
6
|
import { ROUTER_AB_ED25519_YAO_EMAIL_OTP_RECOVERY_BOOTSTRAP_KIND_V1 } from "../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
6
7
|
import { walletAuthAuthorityRef } from "../../../shared-ts/src/utils/walletAuthAuthority.js";
|
|
7
8
|
import { parseSessionOrigin, parseVerifiedOwnerProofId, projectActiveWalletSession } from "../../../authorization/domain.js";
|
|
8
9
|
import { buildVerifiedWalletSessionEmailOtpFactorResult, buildVerifiedWalletSessionPasskeyFactorResult } from "../../../authorization/factorEvidence.js";
|
|
9
|
-
import { failure } from "../../../shared-ts/src/utils/failure.js";
|
|
10
10
|
import { emailOtpFailureWebhookEventDescriptors, emailOtpLoggedInWebhookEventDescriptor } from "../emailOtp/emailOtpSessionRouteHelpers.js";
|
|
11
11
|
import { EMAIL_OTP_CHANNEL } from "../../../shared-ts/src/utils/emailOtpDomain.js";
|
|
12
12
|
import { thresholdEd25519StatusCode } from "../../../threshold/statusCodes.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { failure } from "../../shared-ts/src/utils/failure.js";
|
|
1
2
|
import { ROUTER_AB_ED25519_YAO_RECOVERY_CHALLENGE_ID_HEADER_V1 } from "../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
2
3
|
import { LINKED_DEVICE_REQUEST_PROOF_HEADER_V1 } from "../../shared-ts/src/device-linking/requestProof.js";
|
|
3
4
|
import "../../shared-ts/src/device-linking/index.js";
|
|
4
|
-
import { failure } from "../../shared-ts/src/utils/failure.js";
|
|
5
5
|
import { buildCorsOrigins, normalizeCorsOrigin } from "../../core/SessionService.js";
|
|
6
6
|
import { ROUTER_AB_TRACE_ID_HEADER_V1 } from "../../shared-ts/src/utils/routerAbTraceContext.js";
|
|
7
7
|
import { WALLET_MANAGEMENT_PROTOCOL_HEADER } from "../../shared-ts/src/utils/walletManagementProtocol.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ROUTER_AB_PUBLIC_KEYSET_PATH, ROUTER_AB_PUBLIC_KEYSET_WELL_KNOWN_PATH } from "../../shared-ts/src/utils/routerAbPublicKeyset.js";
|
|
2
2
|
import { ROUTER_AB_ECDSA_DERIVATION_EXPORT_PATH, ROUTER_AB_ECDSA_DERIVATION_HEALTH_PATH, ROUTER_AB_ECDSA_DERIVATION_NORMAL_SIGNING_PATH, ROUTER_AB_ECDSA_DERIVATION_NORMAL_SIGNING_PREPARE_PATH, ROUTER_AB_ECDSA_DERIVATION_PRESIGNATURE_POOL_FILL_INIT_PATH, ROUTER_AB_ECDSA_DERIVATION_PRESIGNATURE_POOL_FILL_STEP_PATH, ROUTER_AB_ECDSA_DERIVATION_REFRESH_PATH, ROUTER_AB_ECDSA_DERIVATION_SESSION_ACTIVATION_PATH } from "../../shared-ts/src/utils/routerAbEcdsaDerivation.js";
|
|
3
|
+
import { externalAuthRoutes } from "../transport/fetch/routes/externalAuth.js";
|
|
3
4
|
import { ROUTER_AB_ED25519_HEALTH_PATH, ROUTER_AB_ED25519_NORMAL_SIGNING_PATH, ROUTER_AB_ED25519_NORMAL_SIGNING_PREPARE_PATH, ROUTER_AB_ED25519_WALLET_SESSION_PATH } from "../../shared-ts/src/utils/signingSessionSeal.js";
|
|
4
5
|
import { buildSigningSessionSealApplyPath, buildSigningSessionSealRemovePath, resolveSigningSessionSealBasePath } from "../../threshold/session/signingSessionSeal/transport/shared.js";
|
|
5
6
|
import { API_CREDENTIAL_ROUTE_SCOPES, API_CREDENTIAL_TYPES, PUBLIC_PROOF_TYPES } from "./routeAuthPolicy.js";
|
|
@@ -222,7 +223,7 @@ function apiCredentialRoute(id, method, path, summary, auth, metering, requiredS
|
|
|
222
223
|
}
|
|
223
224
|
function createRouterApiRouteDefinitions(options = {}) {
|
|
224
225
|
const signingSessionSealBasePath = resolveSigningSessionSealBasePath(options.signingSessionSealBasePath);
|
|
225
|
-
const definitions =
|
|
226
|
+
const definitions = externalAuthRoutes();
|
|
226
227
|
if (options.enableHealthz) definitions.push(publicRoute("router_api_healthz", "GET", "/healthz", "Router API health probe", {
|
|
227
228
|
plane: "public",
|
|
228
229
|
rationale: "Health probes are intentionally public diagnostics."
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { EVM_ECDSA_MPC_OPERATION_KINDS, NEAR_ED25519_MPC_OPERATION_KINDS } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
2
1
|
import { base64UrlEncode } from "../../../shared-ts/src/utils/base64.js";
|
|
2
|
+
import { EVM_ECDSA_MPC_OPERATION_KINDS, NEAR_ED25519_MPC_OPERATION_KINDS } from "../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
3
3
|
import { routerAbMpcMaterialActivationRefToWire, sameRouterAbMpcMaterialActivationRef } from "../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
4
4
|
import { routerAbEcdsaDerivationActiveStateId } from "../../../shared-ts/src/utils/routerAbEcdsaDerivation.js";
|
|
5
|
-
import { findRouteDefinitionForRequest } from "../../framework/routeDefinitions.js";
|
|
6
5
|
import { extractBearerCredential } from "../../auth/routerApiKeyAuth.js";
|
|
6
|
+
import { json, jsonFailure, withCors } from "../../framework/http.js";
|
|
7
|
+
import { handleExternalAuth } from "./routes/externalAuth.js";
|
|
8
|
+
import { findRouteDefinitionForRequest } from "../../framework/routeDefinitions.js";
|
|
7
9
|
import { resolveWalletSessionOperationCredentialAdmissionFromContext } from "../../auth/commonRouterUtils.js";
|
|
8
10
|
import { getRouterApiRouteExtensionRoutes, getRouterApiRouteExtensionsForTransport } from "../../framework/routeExtensions.js";
|
|
9
11
|
import { coerceRouterLogger } from "../../framework/logger.js";
|
|
10
|
-
import { json, jsonFailure, withCors } from "../../framework/http.js";
|
|
11
12
|
import { handleHealth, handleReady } from "./routes/health.js";
|
|
12
13
|
import { handleWalletRegistration } from "./routes/walletRegistration.js";
|
|
13
14
|
import { handleWalletVoiceIdActivation } from "./routes/walletVoiceIdActivation.js";
|
|
@@ -224,6 +225,7 @@ function createFetchRouter(service, opts, runtime) {
|
|
|
224
225
|
handleWalletRecoveryRotate,
|
|
225
226
|
handleWalletRecoveryRead,
|
|
226
227
|
handleWalletRecoveryStatus,
|
|
228
|
+
handleExternalAuth,
|
|
227
229
|
handleAuth,
|
|
228
230
|
handleSyncAccount,
|
|
229
231
|
handleOwnerWalletExecutionLanePreflight,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildDelegatedWalletAuthorityV1, buildFullOwnerPermissionsV1, sameDelegatedWalletAuthorityV1 } from "../../../../shared-ts/src/authorization/delegatedAuthority.js";
|
|
2
2
|
import { extractBearerCredential } from "../../../auth/routerApiKeyAuth.js";
|
|
3
|
-
import { resolveThresholdRuntimePolicyScope } from "../../../auth/commonRouterUtils.js";
|
|
4
3
|
import { json, jsonFailure, readJson } from "../../../framework/http.js";
|
|
4
|
+
import { resolveThresholdRuntimePolicyScope } from "../../../auth/commonRouterUtils.js";
|
|
5
5
|
import { parseAuthIdentityMutationRequest, parseAuthProviderActionPath, parseGoogleLoginVerifyRequest, parsePasskeyLoginOptionsRequest, parsePasskeyLoginVerifyRequest } from "../../../auth/authRequestValidation.js";
|
|
6
6
|
//#region src/router/transport/fetch/routes/auth.ts
|
|
7
7
|
function assertNeverAuthProviderAction(route) {
|
|
@@ -11,11 +11,11 @@ import { parseLinkedDeviceEd25519SourcePreservingReservationV1, parseLinkedDevic
|
|
|
11
11
|
import { parseLinkedDeviceApprovalDeliveryV1, parseLinkedDeviceApprovalV1, parseLinkedDeviceEmailOtpBaseFactorRequestV1, parseLinkedDeviceEmailOtpChallengeResendRequestV1, parseLinkedDeviceEmailOtpChallengeResultV1, parseLinkedDeviceEmailOtpChallengeStartRequestV1, parseLinkedDeviceEmailOtpChallengeVerifyRequestV1, parseLinkedDeviceEmailOtpVerificationResultV1, parseLinkedDeviceSessionClaimRequestV1, parseLinkedDeviceSessionTransportRequestV1, parseLinkedDeviceTargetCredentialRegistrationV1, parseLinkedDeviceTargetPreparationRequestV1, parseLinkedDeviceTargetPreparationV1, parseQrLinkedDeviceSessionPayloadV5 } from "../../../../shared-ts/src/device-linking/parsers.js";
|
|
12
12
|
import { parseLocalAuthorityActivationFinalAckV1, parseLocalAuthorityInstallationReceiptV1 } from "../../../../shared-ts/src/device-linking/authorityActivation.js";
|
|
13
13
|
import { LINKED_DEVICE_REQUEST_PROOF_HEADER_V1, computeLinkedDevicePublicKeyDigestV1 } from "../../../../shared-ts/src/device-linking/requestProof.js";
|
|
14
|
-
import { findRouteDefinitionById } from "../../../framework/routeDefinitions.js";
|
|
15
|
-
import { normalizeCorsOrigin } from "../../../../core/SessionService.js";
|
|
16
14
|
import { extractBearerCredential, extractRouterApiEnvironmentId } from "../../../auth/routerApiKeyAuth.js";
|
|
17
|
-
import {
|
|
15
|
+
import { normalizeCorsOrigin } from "../../../../core/SessionService.js";
|
|
18
16
|
import { json, readJson } from "../../../framework/http.js";
|
|
17
|
+
import { findRouteDefinitionById } from "../../../framework/routeDefinitions.js";
|
|
18
|
+
import { resolvePublishableKeyApiCredentialAuth } from "../../../auth/routerApiCredentialAuth.js";
|
|
19
19
|
import { authDeniedResponse, exportRootWriteResponse, invalidInputResponse, invalidStateResponse, methodNotAllowedResponse, notFoundResponse, notSupportedResponse, projectSession, sessionProjectionResponse, targetCredentialResultResponse } from "./deviceLinkingResponses.js";
|
|
20
20
|
import { linkedDeviceBootstrapFailure } from "../../../../core/deviceLinking/linkedDeviceBootstrap.js";
|
|
21
21
|
import { parseLinkedDeviceRequestProofV1 } from "../../../../core/deviceLinking/requestProof.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseProviderSubject } from "../../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { buildDelegatedWalletAuthorityV1 } from "../../../../shared-ts/src/authorization/delegatedAuthority.js";
|
|
3
2
|
import { sha256DigestB64u } from "../../../../shared-ts/src/utils/canonicalPrimitives.js";
|
|
3
|
+
import { buildDelegatedWalletAuthorityV1 } from "../../../../shared-ts/src/authorization/delegatedAuthority.js";
|
|
4
4
|
import { buildEmailOtpWalletAuthAuthority, buildPasskeyWalletAuthAuthority, buildVoiceIdWalletAuthAuthority, walletAuthAuthorityRef } from "../../../../shared-ts/src/utils/walletAuthAuthority.js";
|
|
5
5
|
import { parseLinkedDeviceOwnerAuthorizationRequestV1 } from "../../../../shared-ts/src/device-linking/parsers.js";
|
|
6
6
|
import { buildWalletSessionCapabilitySubjectsV1, walletSessionCapabilitySubjectsV1Equal } from "../../../../authorization/domain.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { parseEmailOtpChallengeId, parseOrgId, parseProviderSubject } from "../../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
-
import { parseAuthFactorId } 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";
|
|
6
5
|
import "../../../../shared-ts/src/utils/encoders.js";
|
|
6
|
+
import { parseAuthFactorId } from "../../../../shared-ts/src/authorization/capabilityKinds.js";
|
|
7
7
|
import { buildVerifiedWalletOperationEmailOtpFactorResult, buildVerifiedWalletOperationPasskeyFactorResult } from "../../../../authorization/factorEvidence.js";
|
|
8
8
|
import { json } from "../../../framework/http.js";
|
|
9
9
|
import { hashEmailOtpOperationBinding } from "../../../domains/emailOtp/emailOtpSessionRouteHelpers.js";
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { parseWalletId } from "../../../../shared-ts/src/utils/domainIds.js";
|
|
2
|
+
import { requireCanonicalString, requireRecord } from "../../../../shared-ts/src/utils/validation.js";
|
|
3
|
+
import { sha256HexUtf8 } from "../../../../shared-ts/src/utils/digests.js";
|
|
4
|
+
import { EXTERNAL_AUTH_PATH, externalAuthFailure, parseExternalAuthConfiguration } from "../../../../shared-ts/src/auth/externalAuth.js";
|
|
5
|
+
import { buildDelegatedWalletAuthorityV1, buildFullOwnerPermissionsV1, sameDelegatedWalletAuthorityV1 } from "../../../../shared-ts/src/authorization/delegatedAuthority.js";
|
|
6
|
+
import { extractBearerCredential, resolveSourceIpFromFetchHeaders } from "../../../auth/routerApiKeyAuth.js";
|
|
7
|
+
import { json, readJson } from "../../../framework/http.js";
|
|
8
|
+
//#region src/router/transport/fetch/routes/externalAuth.ts
|
|
9
|
+
const ACTIONS = [
|
|
10
|
+
"associate",
|
|
11
|
+
"unlink",
|
|
12
|
+
"prepare",
|
|
13
|
+
"exchange",
|
|
14
|
+
"backend-exchange",
|
|
15
|
+
"redeem",
|
|
16
|
+
"settings",
|
|
17
|
+
"logout"
|
|
18
|
+
];
|
|
19
|
+
function parseCommand(action, body) {
|
|
20
|
+
const wallet = parseWalletId(body.walletId);
|
|
21
|
+
if (!wallet.ok) throw new Error("Wallet ID is invalid");
|
|
22
|
+
const walletId = wallet.value;
|
|
23
|
+
if (action === "backend-exchange") return {
|
|
24
|
+
action,
|
|
25
|
+
walletId,
|
|
26
|
+
attemptId: requireCanonicalString(body.attemptId, "attemptId"),
|
|
27
|
+
idToken: requireCanonicalString(body.idToken, "idToken")
|
|
28
|
+
};
|
|
29
|
+
const appOrigin = requireCanonicalString(body.appOrigin, "appOrigin");
|
|
30
|
+
if (new URL(appOrigin).origin !== appOrigin) throw new Error("Application origin is invalid");
|
|
31
|
+
switch (action) {
|
|
32
|
+
case "associate": return {
|
|
33
|
+
action,
|
|
34
|
+
walletId,
|
|
35
|
+
appOrigin,
|
|
36
|
+
ownerCredential: requireCanonicalString(body.ownerCredential, "ownerCredential"),
|
|
37
|
+
idToken: requireCanonicalString(body.idToken, "idToken")
|
|
38
|
+
};
|
|
39
|
+
case "unlink": return {
|
|
40
|
+
action,
|
|
41
|
+
walletId,
|
|
42
|
+
appOrigin,
|
|
43
|
+
ownerCredential: requireCanonicalString(body.ownerCredential, "ownerCredential"),
|
|
44
|
+
associationId: requireCanonicalString(body.associationId, "associationId")
|
|
45
|
+
};
|
|
46
|
+
case "prepare": return {
|
|
47
|
+
action,
|
|
48
|
+
walletId,
|
|
49
|
+
appOrigin,
|
|
50
|
+
binding: secret(body.binding, "binding"),
|
|
51
|
+
sessionToken: secret(body.sessionToken, "sessionToken")
|
|
52
|
+
};
|
|
53
|
+
case "exchange": return {
|
|
54
|
+
action,
|
|
55
|
+
walletId,
|
|
56
|
+
appOrigin,
|
|
57
|
+
attemptId: requireCanonicalString(body.attemptId, "attemptId"),
|
|
58
|
+
idToken: requireCanonicalString(body.idToken, "idToken")
|
|
59
|
+
};
|
|
60
|
+
case "redeem": return {
|
|
61
|
+
action,
|
|
62
|
+
walletId,
|
|
63
|
+
appOrigin,
|
|
64
|
+
attemptId: requireCanonicalString(body.attemptId, "attemptId"),
|
|
65
|
+
binding: secret(body.binding, "binding"),
|
|
66
|
+
sessionToken: secret(body.sessionToken, "sessionToken"),
|
|
67
|
+
code: secret(body.code, "code")
|
|
68
|
+
};
|
|
69
|
+
case "settings":
|
|
70
|
+
case "logout": return {
|
|
71
|
+
action,
|
|
72
|
+
walletId,
|
|
73
|
+
appOrigin,
|
|
74
|
+
sessionToken: secret(body.sessionToken, "sessionToken")
|
|
75
|
+
};
|
|
76
|
+
default: return assertNever(action);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function assertNever(value) {
|
|
80
|
+
throw new Error(`Unsupported external authentication action: ${String(value)}`);
|
|
81
|
+
}
|
|
82
|
+
function externalAuthRoutes() {
|
|
83
|
+
return ACTIONS.map(externalAuthRoute);
|
|
84
|
+
}
|
|
85
|
+
function externalAuthRoute(action) {
|
|
86
|
+
return {
|
|
87
|
+
id: `external_auth_${action}`,
|
|
88
|
+
surface: "relay",
|
|
89
|
+
method: "POST",
|
|
90
|
+
path: `${EXTERNAL_AUTH_PATH}/${action}`,
|
|
91
|
+
auth: {
|
|
92
|
+
plane: "public",
|
|
93
|
+
proof: "challenge_exchange",
|
|
94
|
+
rationale: "Application credentials and scoped external identity evidence are verified by the handler."
|
|
95
|
+
},
|
|
96
|
+
metering: { kind: "none" },
|
|
97
|
+
summary: "External authentication for wallet settings"
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function parseAction(pathname) {
|
|
101
|
+
for (const action of ACTIONS) if (pathname === `/wallet/external-auth/${action}`) return action;
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
function secret(value, label) {
|
|
105
|
+
const text = requireCanonicalString(value, label);
|
|
106
|
+
if (!/^[A-Za-z0-9_-]{43}$/.test(text)) throw new Error(`${label} must contain 32 random bytes`);
|
|
107
|
+
return text;
|
|
108
|
+
}
|
|
109
|
+
function failure(status, code) {
|
|
110
|
+
return json(externalAuthFailure(code), {
|
|
111
|
+
status,
|
|
112
|
+
headers: { "Cache-Control": "no-store" }
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
async function resolveApplicationTrust(ctx, service, command) {
|
|
116
|
+
const credential = extractBearerCredential(ctx.request.headers);
|
|
117
|
+
if (!credential) return null;
|
|
118
|
+
const scope = service.store.scope;
|
|
119
|
+
if (ctx.request.headers.get("x-seams-environment-id") !== scope.envId) return null;
|
|
120
|
+
const result = command.action === "backend-exchange" ? await ctx.opts.apiKeyAuth?.authenticate({
|
|
121
|
+
secret: credential,
|
|
122
|
+
endpoint: ctx.pathname,
|
|
123
|
+
requiredScopes: ["wallets.read"],
|
|
124
|
+
environmentId: scope.envId
|
|
125
|
+
}) : await ctx.opts.publishableKeyAuth?.authenticate({
|
|
126
|
+
secret: credential,
|
|
127
|
+
origin: ctx.request.headers.get("origin") || "",
|
|
128
|
+
environmentId: scope.envId
|
|
129
|
+
});
|
|
130
|
+
if (!result?.ok || result.principal.orgId !== scope.orgId || result.principal.projectId !== scope.projectId || result.principal.environmentId !== scope.envId) return null;
|
|
131
|
+
if (command.action !== "backend-exchange") {
|
|
132
|
+
const parent = await ctx.opts.publishableKeyAuth?.authenticate({
|
|
133
|
+
secret: credential,
|
|
134
|
+
origin: command.appOrigin,
|
|
135
|
+
environmentId: scope.envId
|
|
136
|
+
});
|
|
137
|
+
if (!parent?.ok || parent.principal.apiKeyId !== result.principal.apiKeyId) return null;
|
|
138
|
+
}
|
|
139
|
+
const environment = (await ctx.opts.orgProjectEnv?.listEnvironments({
|
|
140
|
+
orgId: scope.orgId,
|
|
141
|
+
projectId: scope.projectId,
|
|
142
|
+
environmentId: scope.envId,
|
|
143
|
+
actorUserId: result.principal.apiKeyId,
|
|
144
|
+
roles: []
|
|
145
|
+
}, { status: "ACTIVE" }))?.find(matchesEnvironment.bind(null, scope.envId));
|
|
146
|
+
const configuration = parseExternalAuthConfiguration(environment?.externalAuth ?? {
|
|
147
|
+
kind: "disabled",
|
|
148
|
+
revision: 0
|
|
149
|
+
});
|
|
150
|
+
return configuration.kind === "google" ? configuration : null;
|
|
151
|
+
}
|
|
152
|
+
function matchesEnvironment(environmentId, environment) {
|
|
153
|
+
return environment.id === environmentId;
|
|
154
|
+
}
|
|
155
|
+
async function handleExternalAuth(ctx) {
|
|
156
|
+
const action = parseAction(ctx.pathname);
|
|
157
|
+
if (!action) return null;
|
|
158
|
+
if (ctx.method !== "POST") return failure(405, "invalid_request");
|
|
159
|
+
const service = ctx.service.externalAuth;
|
|
160
|
+
if (!service) return failure(503, "unavailable");
|
|
161
|
+
let command;
|
|
162
|
+
try {
|
|
163
|
+
command = parseCommand(action, requireRecord(await readJson(ctx.request), "external authentication request"));
|
|
164
|
+
} catch {
|
|
165
|
+
return failure(400, "invalid_request");
|
|
166
|
+
}
|
|
167
|
+
try {
|
|
168
|
+
const trust = await resolveApplicationTrust(ctx, service, command);
|
|
169
|
+
if (!trust) return failure(403, "access_denied");
|
|
170
|
+
return await dispatch(ctx, service, trust, command);
|
|
171
|
+
} catch {
|
|
172
|
+
return failure(503, "unavailable");
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
async function dispatch(ctx, service, trust, command) {
|
|
176
|
+
const walletId = command.walletId;
|
|
177
|
+
const originBinding = JSON.stringify([ctx.request.headers.get("origin") || "", command.appOrigin]);
|
|
178
|
+
if (command.action === "prepare" || command.action === "exchange" || command.action === "backend-exchange" || command.action === "associate") {
|
|
179
|
+
const rateKey = await sha256HexUtf8(resolveSourceIpFromFetchHeaders(ctx.request.headers) || "unknown");
|
|
180
|
+
if (!await service.store.consumeAuthenticationAllowance(rateKey, Date.now())) return failure(429, "rate_limited");
|
|
181
|
+
}
|
|
182
|
+
if (command.action === "associate" || command.action === "unlink") {
|
|
183
|
+
const token = command.ownerCredential;
|
|
184
|
+
const owner = await ctx.service.authorizationSessions.readWalletSessionAuthorizationV2ByOperationCredential({
|
|
185
|
+
tenantId: ctx.service.authorizationSessions.tenantId,
|
|
186
|
+
token,
|
|
187
|
+
nowMs: Date.now()
|
|
188
|
+
});
|
|
189
|
+
if (!owner || owner.authorization.session.walletId !== walletId || !sameDelegatedWalletAuthorityV1(buildDelegatedWalletAuthorityV1({ permissions: owner.authority.permissions }), buildDelegatedWalletAuthorityV1({ permissions: buildFullOwnerPermissionsV1() }))) return failure(403, "access_denied");
|
|
190
|
+
if (command.action === "unlink") {
|
|
191
|
+
await service.store.revokeAssociation(walletId, command.associationId);
|
|
192
|
+
return json({ ok: true });
|
|
193
|
+
}
|
|
194
|
+
const proof = await service.verifyGoogle(trust, command.idToken);
|
|
195
|
+
if (!proof.ok) return json(proof, { status: 403 });
|
|
196
|
+
return await service.store.associate({
|
|
197
|
+
walletId,
|
|
198
|
+
subject: proof.value.subject,
|
|
199
|
+
authorityId: owner.authority.authorityId,
|
|
200
|
+
authorityEpoch: owner.authority.revocationEpoch
|
|
201
|
+
}) ? json({ ok: true }) : failure(409, "access_denied");
|
|
202
|
+
}
|
|
203
|
+
if (command.action === "prepare") return json(await service.prepare({
|
|
204
|
+
walletId,
|
|
205
|
+
originBinding,
|
|
206
|
+
binding: command.binding,
|
|
207
|
+
sessionToken: command.sessionToken
|
|
208
|
+
}));
|
|
209
|
+
if (command.action === "exchange" || command.action === "backend-exchange") return json(await service.exchange({
|
|
210
|
+
trust,
|
|
211
|
+
walletId,
|
|
212
|
+
attemptId: command.attemptId,
|
|
213
|
+
idToken: command.idToken
|
|
214
|
+
}));
|
|
215
|
+
const tokenHash = await sha256HexUtf8(command.sessionToken);
|
|
216
|
+
if (command.action === "logout") {
|
|
217
|
+
await service.store.revokeSession(tokenHash, originBinding);
|
|
218
|
+
return json({ ok: true });
|
|
219
|
+
}
|
|
220
|
+
const authentication = command.action === "redeem" ? await service.store.redeem({
|
|
221
|
+
walletId,
|
|
222
|
+
originBinding,
|
|
223
|
+
attemptId: command.attemptId,
|
|
224
|
+
bindingHash: await sha256HexUtf8(command.binding),
|
|
225
|
+
codeHash: await sha256HexUtf8(command.code),
|
|
226
|
+
sessionTokenHash: tokenHash,
|
|
227
|
+
nowMs: Date.now(),
|
|
228
|
+
trustRevision: trust.revision
|
|
229
|
+
}) : await service.store.readSession({
|
|
230
|
+
tokenHash,
|
|
231
|
+
originBinding,
|
|
232
|
+
nowMs: Date.now(),
|
|
233
|
+
trustRevision: trust.revision
|
|
234
|
+
});
|
|
235
|
+
if (!authentication || authentication.walletId !== walletId) return failure(403, "access_denied");
|
|
236
|
+
return json({
|
|
237
|
+
ok: true,
|
|
238
|
+
value: await service.settings(authentication)
|
|
239
|
+
}, { headers: { "Cache-Control": "no-store" } });
|
|
240
|
+
}
|
|
241
|
+
//#endregion
|
|
242
|
+
export { externalAuthRoutes, handleExternalAuth };
|
|
243
|
+
|
|
244
|
+
//# sourceMappingURL=externalAuth.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isPlainObject } from "../../../../shared-ts/src/utils/validation.js";
|
|
2
2
|
import { routerAbMpcMaterialActivationRefFromWire } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
3
|
+
import { json } from "../../../framework/http.js";
|
|
3
4
|
import { walletObjectIdentity, walletObjectIdentityHeaders } from "../../../cloudflare/runtime/walletObjectAddresses.js";
|
|
4
5
|
import { ROUTER_AB_INTERNAL_SERVICE_AUTH_HEADER_V1, normalizeRouterAbInternalServiceAuthSecret } from "../../../../core/ThresholdService/routerAb/internalServiceHttp.js";
|
|
5
6
|
import { prepareOwnerWalletExecution } from "../../../domains/signingOperations/walletExecutionAdmission.js";
|
|
6
|
-
import { json } from "../../../framework/http.js";
|
|
7
7
|
//#region src/router/transport/fetch/routes/normalSigningRouterProxy.ts
|
|
8
8
|
async function proxyNormalSigningRequestToMpcRouter(input) {
|
|
9
9
|
const proxy = input.proxy;
|