@seams/wallet-server 0.6.1 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifact-manifest.json +147 -32
- package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -0
- package/cloudflare-router-ab/build/deriver-a/index.js +2 -2
- package/cloudflare-router-ab/build/deriver-a/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/deriver-b/build-stamp.json +1 -0
- package/cloudflare-router-ab/build/deriver-b/index.js +2 -2
- package/cloudflare-router-ab/build/deriver-b/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/local-tools/darwin-arm64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/local-tools/darwin-x64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/local-tools/linux-x64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/router/build-stamp.json +1 -0
- package/cloudflare-router-ab/build/router/index.js +2 -2
- package/cloudflare-router-ab/build/router/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/signing-worker/build-stamp.json +1 -0
- package/cloudflare-router-ab/build/signing-worker/index.js +2 -2
- package/cloudflare-router-ab/build/signing-worker/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/tenant-root-control-plane/build-stamp.json +1 -0
- package/cloudflare-router-ab/build/tenant-root-control-plane/index.js +2 -2
- package/cloudflare-router-ab/build/tenant-root-control-plane/index_bg.wasm +0 -0
- package/cloudflare-router-ab/migrations/deriver-a/0012_tenant_root_creation_tombstones.sql +20 -0
- package/cloudflare-router-ab/migrations/deriver-a/0013_tenant_root_root_use_admissions.sql +32 -0
- package/cloudflare-router-ab/migrations/deriver-a/0014_tenant_root_refresh_supersessions.sql +24 -0
- package/cloudflare-router-ab/migrations/deriver-a/0015_tenant_root_root_use_attempts.sql +56 -0
- package/cloudflare-router-ab/migrations/deriver-a/0016_tenant_root_root_use_admission_settlement.sql +5 -0
- package/cloudflare-router-ab/migrations/deriver-a/0017_tenant_root_root_use_admission_claims.sql +64 -0
- package/cloudflare-router-ab/migrations/deriver-a/0018_tenant_root_recovery_retention_keys.sql +12 -0
- package/cloudflare-router-ab/migrations/deriver-b/0012_tenant_root_creation_tombstones.sql +20 -0
- package/cloudflare-router-ab/migrations/deriver-b/0013_tenant_root_root_use_admissions.sql +32 -0
- package/cloudflare-router-ab/migrations/deriver-b/0014_tenant_root_refresh_supersessions.sql +24 -0
- package/cloudflare-router-ab/migrations/deriver-b/0015_tenant_root_root_use_attempts.sql +56 -0
- package/cloudflare-router-ab/migrations/deriver-b/0016_tenant_root_root_use_admission_settlement.sql +5 -0
- package/cloudflare-router-ab/migrations/deriver-b/0017_tenant_root_root_use_admission_claims.sql +64 -0
- package/cloudflare-router-ab/migrations/deriver-b/0018_tenant_root_recovery_retention_keys.sql +12 -0
- package/cloudflare-router-ab/scripts/bootstrap-local-tenant-root.mjs +81 -16
- package/cloudflare-router-ab/scripts/prepare-local-runtime-config.mjs +102 -9
- package/cloudflare-router-ab/scripts/start-local-role-workers.mjs +4 -1
- package/cloudflare-router-ab/wrangler.deriver-a.toml +24 -0
- package/cloudflare-router-ab/wrangler.router.toml +13 -0
- package/dist/esm/authorization/capabilityPolicy.js +1 -1
- package/dist/esm/authorization/domain.js +2 -2
- package/dist/esm/authorization/factorEvidence.js +6 -100
- package/dist/esm/authorization/service.js +34 -2
- package/dist/esm/authorization/vaultProxyUse.js +3 -4
- package/dist/esm/cloud-host.js +16 -11
- package/dist/esm/core/EmailOtpRecords.js +19 -1
- package/dist/esm/core/EmailOtpStores.js +323 -924
- package/dist/esm/core/IdentityStore.js +44 -235
- package/dist/esm/core/NearPublicKeyStore.js +21 -63
- package/dist/esm/core/RegistrationCeremonyStore.js +3 -1793
- package/dist/esm/core/ThresholdService/config.js +1 -82
- package/dist/esm/core/ThresholdService/kv.js +3 -3
- package/dist/esm/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.js +37 -5
- package/dist/esm/core/ThresholdService/routerAb/ecdsaDerivationPresignBridge.js +4 -74
- package/dist/esm/core/ThresholdService/stores/CloudflareDurableObjectStore.js +15 -51
- package/dist/esm/core/ThresholdService/stores/KeyStore.js +3 -3
- package/dist/esm/core/ThresholdService/stores/SessionStore.js +5 -81
- package/dist/esm/core/ThresholdService/stores/WalletSessionStore.js +185 -290
- package/dist/esm/core/ThresholdService/validation.js +18 -230
- package/dist/esm/core/WalletAuthMethodStore.js +22 -79
- package/dist/esm/core/WalletStore.js +58 -185
- package/dist/esm/core/WebAuthnAuthenticatorStore.js +57 -340
- package/dist/esm/core/WebAuthnCredentialBindingStore.js +90 -369
- package/dist/esm/core/WebAuthnLoginChallengeStore.js +17 -397
- package/dist/esm/core/WebAuthnSyncChallengeStore.js +17 -397
- package/dist/esm/core/authService/AuthService.js +2 -19
- package/dist/esm/core/authService/emailOtpChallengeProof.js +1 -1
- package/dist/esm/core/authService/emailOtpChallenges.js +1 -1
- package/dist/esm/core/authService/emailOtpConfig.js +1 -32
- package/dist/esm/core/authService/emailOtpRegistrationEnrollment.js +6 -153
- package/dist/esm/core/authService/googleEmailOtpRegistration.js +1 -1
- package/dist/esm/core/authService/nearPrivateKeySigning.js +7 -15
- package/dist/esm/core/authService/nearTransactions.js +2 -1
- package/dist/esm/core/authService/oidcVerification.js +3 -4
- package/dist/esm/core/authService/rateLimits.js +1 -31
- package/dist/esm/core/authService/registrationThresholdHelpers.js +2 -103
- package/dist/esm/core/authService/storeRegistry.js +2 -13
- package/dist/esm/core/authService/thresholdEcdsaKeyInventory.js +4 -5
- package/dist/esm/core/authService/webauthn.js +15 -50
- package/dist/esm/core/authService/webauthnOidcHelpers.js +1 -6
- package/dist/esm/core/authService/webauthnVerificationOutcomes.js +60 -0
- package/dist/esm/core/authService/webauthnWalletBinding.js +2 -122
- package/dist/esm/core/d1IdentityStore.js +32 -66
- package/dist/esm/core/d1TenantStore.js +82 -0
- package/dist/esm/core/d1WalletAuthMethodStore.js +92 -143
- package/dist/esm/core/d1WalletStore.js +14 -12
- package/dist/esm/core/deviceLinking/linkedDeviceEmailOtpGrant.js +10 -8
- package/dist/esm/core/deviceLinking/linkedDeviceManagement.js +25 -3
- package/dist/esm/core/deviceLinking/linkedDeviceSession.js +6 -895
- package/dist/esm/core/deviceLinking/linkedDeviceSessionApproval.js +102 -0
- package/dist/esm/core/deviceLinking/linkedDeviceSessionRecord.js +668 -0
- package/dist/esm/core/emailOtpD1Statements.js +383 -0
- package/dist/esm/core/hostedAccountIds.js +2 -2
- package/dist/esm/core/keyMaterialBrands.js +2 -48
- package/dist/esm/core/nearRelayerAccountProvisioning.js +25 -150
- package/dist/esm/core/nearSignerWasmRuntime.js +1 -4
- package/dist/esm/core/rpcClients/near/NearClient.js +15 -218
- package/dist/esm/core/signingLanes/LaneEnrollmentActivation.js +1 -1
- package/dist/esm/core/signingLanes/LaneLifecycleApplicationService.js +2 -4
- package/dist/esm/core/signingLanes/LaneLifecycleStore.js +0 -24
- package/dist/esm/core/signingLanes/WalletExecutionLaneProjection.js +5 -5
- package/dist/esm/core/signingLanes/ecdsaServerRetirement.js +3 -8
- package/dist/esm/core/signingLanes/ed25519ServerRetirement.js +1 -4
- package/dist/esm/core/storeBackends.js +208 -0
- package/dist/esm/core/thresholdEcdsaChainTarget.js +1 -7
- package/dist/esm/core/webAuthnD1Statements.js +92 -0
- package/dist/esm/core/webAuthnStoreBackends.js +198 -0
- package/dist/esm/hosted-wallet-gateway.js +33 -16
- package/dist/esm/index.js +2 -2
- package/dist/esm/local-hosted-wallet-gateway-worker.js +2 -23
- package/dist/esm/localHostedWalletGatewayHandler.js +299 -0
- package/dist/esm/localIntendedEcdsaFinalizeFault.js +85 -0
- package/dist/esm/localIntendedLinkExecuteFault.js +140 -0
- package/dist/esm/localIntendedRevokeFault.js +106 -0
- package/dist/esm/localIntendedSessionAdmissionFault.js +139 -0
- package/dist/esm/localIntendedYaoExportFault.js +117 -0
- package/dist/esm/localIntendedYaoFault.js +13 -16
- package/dist/esm/localIntendedYaoFinalizeFault.js +99 -0
- package/dist/esm/localIntendedYaoRecoveryFault.js +102 -0
- package/dist/esm/localIntendedYaoSigningFault.js +127 -0
- package/dist/esm/router/auth/authRequestValidation.js +1 -1
- package/dist/esm/router/auth/commonRouterUtils.js +10 -2
- package/dist/esm/router/auth/walletSessionFailure.js +1 -14
- package/dist/esm/router/cloudflare/d1/auth/d1AuthorizedOperationRouteService.js +23 -0
- package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +86 -66
- package/dist/esm/router/cloudflare/d1/authorization/authorizedOperationStatements.js +208 -0
- package/dist/esm/router/cloudflare/d1/authorization/d1AuthorizationStore.js +246 -296
- package/dist/esm/router/cloudflare/d1/authorization/persistedWalletSessionAuthorization.js +14 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js +62 -63
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpGrantStore.js +3 -6
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpTargetFactor.js +1 -19
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceManagementService.js +4 -3
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.js +52 -9
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRequestProofNonceStore.js +3 -6
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRevocation.js +100 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionRecords.js +7 -10
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionStore.js +33 -124
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSourceContributionPreparationPlanner.js +2 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.js +9 -17
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceVerifiedLinkBuilder.js +6 -6
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceVerifiedLinkSourceReader.js +3 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/index.js +3 -3
- package/dist/esm/router/cloudflare/d1/deviceLinking/installedEcdsaAuthority.js +69 -0
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js +39 -68
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoLifecycleDecisionStore.js +69 -0
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.js +2 -2
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.js +26 -71
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeVerifier.js +20 -3
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpEnrollmentStore.js +7 -94
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpGrantStore.js +5 -47
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.js +26 -123
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.js +0 -2
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRegistrationEnrollmentFinalizer.js +2 -2
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js +15 -134
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationRecords.js +54 -260
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +1 -1
- package/dist/esm/router/cloudflare/d1/identity/d1IdentityRecords.js +1 -28
- package/dist/esm/router/cloudflare/d1/near/d1NearPublicKeyStore.js +2 -8
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyEnvelopeStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyRouteService.js +3 -3
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +23 -73
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpRecords.js +15 -2
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpService.js +12 -203
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.js +16 -32
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +29 -72
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.js +4 -1
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationIntentService.js +3 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +6 -30
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +261 -205
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetup.js +5 -3
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.js +2 -2
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.js +3 -3
- package/dist/esm/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.js +43 -25
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneEffectJournalStore.js +0 -1
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneLifecycleStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneRecords.js +2 -1
- package/dist/esm/router/cloudflare/d1/versionedJson/d1VersionedJsonRecordStore.js +2 -60
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerService.js +158 -19
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodBoundary.js +19 -49
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodRevocationReplayStore.js +100 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +132 -33
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorityStore.js +83 -4
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.js +14 -49
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnRecords.js +4 -4
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnStore.js +22 -116
- package/dist/esm/router/cloudflare/runtime/createSelfHostedCloudflareSigningWorker.js +1 -2
- package/dist/esm/router/cloudflare/runtime/walletConsoleTenantRootLineage.js +11 -2
- package/dist/esm/router/cloudflare/runtime/walletGateway.js +1 -1
- package/dist/esm/router/cloudflare/signingLanes/cloudflareLaneCurveExecution.js +5 -6
- package/dist/esm/router/cloudflare/signingLanes/cloudflareLaneProtocolCommitter.js +2 -1
- package/dist/esm/router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.js +48 -21
- package/dist/esm/router/cloudflare.js +11480 -12853
- package/dist/esm/router/domains/ecdsa/routerAbEcdsaStrictRegistration.js +16 -5
- package/dist/esm/router/domains/ecdsa/thresholdEcdsaRequestValidation.js +2 -8
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoLifecycleDecision.js +33 -0
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js +17 -9
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js +29 -431
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.js +7 -2
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRunner.js +2 -1
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js +70 -2
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +134 -169
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExportRequestScopedCloudflare.js +77 -162
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.js +205 -51
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryRequestScopedCloudflare.js +29 -11
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js +182 -55
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.js +2 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationExecutionRecord.js +63 -247
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.js +3 -2
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js +87 -132
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationTwoPhaseRunner.js +5 -4
- package/dist/esm/router/domains/ed25519Yao/routerAbEd25519YaoGatewayEnvelope.js +45 -0
- package/dist/esm/router/domains/ed25519Yao/session/thresholdEd25519RequestValidation.js +1 -1
- package/dist/esm/router/domains/emailOtp/emailOtpExportPolicy.js +1 -42
- package/dist/esm/router/domains/emailOtp/emailOtpRequestValidation.js +1 -6
- package/dist/esm/router/domains/emailOtp/emailOtpSessionRouteHelpers.js +1 -142
- package/dist/esm/router/domains/passkeyCustody/passkeyCustodyEnvelopeRetrievalRoute.js +1 -1
- package/dist/esm/router/domains/passkeyCustody/walletCustodyRegistrationCommit.js +2 -2
- package/dist/esm/router/domains/passkeyCustody/walletRecoveryFinalization.js +23 -45
- package/dist/esm/router/domains/passkeyCustody/walletRecoveryKeyManifest.js +5 -5
- package/dist/esm/router/domains/signingOperations/ed25519AuthorizedOperationReceipt.js +1 -1
- package/dist/esm/router/domains/signingOperations/routerAbEcdsaDerivationNormalSigningRoute.js +827 -0
- package/dist/esm/router/domains/signingOperations/routerAbEd25519NormalSigningRoute.js +698 -0
- package/dist/esm/router/domains/signingOperations/routerAbNormalSigningAdmission.js +209 -0
- package/dist/esm/router/domains/signingOperations/routerAbNormalSigningAdmissionCore.js +16 -15
- package/dist/esm/router/domains/signingOperations/routerAbOperationStepUp.js +313 -0
- package/dist/esm/router/domains/signingOperations/routerAbPrivateSigningWorker.js +62 -2159
- package/dist/esm/router/domains/tenantRoot/tenantRootIdentityResolution.js +1 -1
- package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +18 -22
- package/dist/esm/router/domains/walletRegistration/walletRegistrationSetupPayload.js +3 -4
- package/dist/esm/router/domains/walletUnlock/walletUnlockRequestedCapabilitiesValidation.js +2 -2
- package/dist/esm/router/domains/walletUnlock/walletUnlockRouteHandlers.js +97 -150
- package/dist/esm/router/express.js +5967 -6410
- package/dist/esm/router/framework/http.js +1 -4
- package/dist/esm/router/framework/ror/normalize.js +1 -1
- package/dist/esm/router/framework/routerApiRouteSurface.js +1 -1
- package/dist/esm/router/node/nodeHostedWalletGateway.js +64 -0
- package/dist/esm/router/node/nodeHostedWalletGatewayCheck.js +163 -0
- package/dist/esm/router/node/nodeHostedWalletGatewayMain.js +120 -0
- package/dist/esm/router/node/nodeHttp.js +79 -0
- package/dist/esm/router/node/nodeSqlite.js +43 -0
- package/dist/esm/router/node/signerSqlMigrations.js +48 -0
- package/dist/esm/router/transport/fetch/createFetchRouter.js +1 -1
- package/dist/esm/router/transport/fetch/routes/deviceLinking.js +16 -18
- package/dist/esm/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.js +3 -5
- package/dist/esm/router/transport/fetch/routes/deviceManagement.js +15 -24
- package/dist/esm/router/transport/fetch/routes/normalSigningRouterProxy.js +3 -16
- package/dist/esm/router/transport/fetch/routes/passkeyCustody.js +144 -461
- package/dist/esm/router/transport/fetch/routes/sessions.js +4 -4
- package/dist/esm/router/transport/fetch/routes/syncAccount.js +4 -6
- package/dist/esm/router/transport/fetch/routes/syncAccountBootstrap.js +2 -2
- package/dist/esm/router/transport/fetch/routes/thresholdEcdsa.js +69 -23
- package/dist/esm/router/transport/fetch/routes/thresholdEd25519.js +52 -27
- package/dist/esm/shared-ts/src/authorization/capabilityKinds.js +1 -1
- package/dist/esm/shared-ts/src/authorization/delegatedAuthority.js +1 -1
- package/dist/esm/shared-ts/src/authorization/operationFingerprint.js +1 -2
- package/dist/esm/shared-ts/src/authorization/walletAuthority.js +99 -227
- package/dist/esm/shared-ts/src/authorization/walletCustodyOperation.js +4 -6
- package/dist/esm/shared-ts/src/device-linking/activeWalletSession.js +74 -0
- package/dist/esm/shared-ts/src/device-linking/authorityActivation.js +50 -0
- package/dist/esm/shared-ts/src/device-linking/committedSignerPackages.js +8 -9
- package/dist/esm/shared-ts/src/device-linking/delegatedActivationPlan.js +3 -1
- package/dist/esm/shared-ts/src/device-linking/deviceManagement.js +55 -0
- package/dist/esm/shared-ts/src/device-linking/digests.js +10 -65
- package/dist/esm/shared-ts/src/device-linking/ed25519ExportRoot.js +3 -1
- package/dist/esm/shared-ts/src/device-linking/index.js +4 -1
- package/dist/esm/shared-ts/src/device-linking/parsers.js +510 -1063
- package/dist/esm/shared-ts/src/device-linking/requestProof.js +5 -14
- package/dist/esm/shared-ts/src/device-linking/sourceContribution.js +6 -9
- package/dist/esm/shared-ts/src/device-linking/walletSessionCredentialDelivery.js +9 -9
- package/dist/esm/shared-ts/src/device-linking/wireFields.js +59 -0
- package/dist/esm/shared-ts/src/near/nearClient.js +252 -0
- package/dist/esm/shared-ts/src/passkey-custody/credentialActivity.js +3 -1
- package/dist/esm/shared-ts/src/passkey-custody/custodyEnvelope.js +7 -5
- package/dist/esm/shared-ts/src/passkey-custody/custodySecretBinding.js +6 -4
- package/dist/esm/shared-ts/src/passkey-custody/primitives.js +5 -39
- package/dist/esm/shared-ts/src/signing-lanes/evmFamilySigningKeySlotId.js +1 -5
- package/dist/esm/shared-ts/src/signing-lanes/index.js +3 -3
- package/dist/esm/shared-ts/src/signing-lanes/ownerContinuity.js +5 -12
- package/dist/esm/shared-ts/src/signing-lanes/participantDigest.js +5 -14
- package/dist/esm/shared-ts/src/signing-lanes/participants.js +2 -5
- package/dist/esm/shared-ts/src/signing-lanes/recordParsers.js +7 -5
- package/dist/esm/shared-ts/src/signing-lanes/rotationDigests.js +6 -45
- package/dist/esm/shared-ts/src/signing-lanes/rotationParsers.js +423 -1511
- package/dist/esm/shared-ts/src/signing-lanes/rotationProtocolParsers.js +323 -0
- package/dist/esm/shared-ts/src/signing-lanes/rotationWireFields.js +59 -0
- package/dist/esm/shared-ts/src/tenant-root/tenantRootOperationRecord.js +1 -1
- package/dist/esm/shared-ts/src/threshold/ecdsaDerivationRoleLocalBootstrap.js +1 -2
- package/dist/esm/shared-ts/src/threshold/keyMaterialBrands.js +49 -0
- package/dist/esm/shared-ts/src/utils/addAuthMethodRegistration.js +3 -4
- package/dist/esm/shared-ts/src/utils/canonicalPrimitives.js +8 -1
- package/dist/esm/shared-ts/src/utils/digestEncoding.js +63 -0
- package/dist/esm/shared-ts/src/utils/emailOtpDomain.js +2 -2
- package/dist/esm/shared-ts/src/utils/exactRecord.js +44 -0
- package/dist/esm/shared-ts/src/utils/registrationAuthMethodInput.js +127 -0
- package/dist/esm/shared-ts/src/utils/registrationEstablishedSession.js +2 -2
- package/dist/esm/shared-ts/src/utils/registrationIds.js +280 -0
- package/dist/esm/shared-ts/src/utils/registrationIntent.js +4 -1170
- package/dist/esm/shared-ts/src/utils/registrationSignerPlan.js +429 -0
- package/dist/esm/shared-ts/src/utils/routerAbEcdsaDerivation.js +11 -136
- package/dist/esm/shared-ts/src/utils/routerAbEd25519Yao.js +3 -163
- package/dist/esm/shared-ts/src/utils/routerAbEd25519YaoDigests.js +160 -0
- package/dist/esm/shared-ts/src/utils/routerAbNormalSigningIdentity.js +1 -4
- package/dist/esm/shared-ts/src/utils/routerAbPublicKeyset.js +7 -15
- package/dist/esm/shared-ts/src/utils/validation.js +37 -6
- package/dist/esm/shared-ts/src/utils/walletAuthMethodRecord.js +362 -0
- package/dist/esm/shared-ts/src/utils/wireSchema.js +77 -0
- package/dist/esm/shared-ts/src/wallet-recovery/recoveryCodeLocator.js +1 -1
- package/dist/esm/shared-ts/src/wallet-recovery/recoveryCodeReservation.js +1 -1
- package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryCommittedProjection.js +7 -11
- package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryEcdsaPossession.js +4 -8
- package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryEnvelopeSet.js +3 -1
- package/dist/esm/storage/d1Sql.js +10 -1
- package/dist/esm/storage/syncSqlite.js +79 -0
- package/dist/esm/threshold/session/signingSessionSeal/crypto/cipher.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/crypto/shamir3PassWasm.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/idempotencyRecords.js +1 -2
- package/dist/esm/threshold/session/signingSessionSeal/options.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/transport/shared.js +18 -55
- package/dist/esm/threshold/statusCodes.js +1 -1
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker.js +3 -3
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ecdsa_signing_worker/pkg/router_ab_ecdsa_signing_worker_bg.wasm +0 -0
- package/dist/types/shared-ts/src/authorization/capabilityKinds.d.ts +8 -26
- package/dist/types/shared-ts/src/authorization/delegatedAuthority.d.ts +0 -8
- package/dist/types/shared-ts/src/authorization/operationFingerprint.d.ts +1 -3
- package/dist/types/shared-ts/src/authorization/walletAuthority.d.ts +25 -12
- package/dist/types/shared-ts/src/authorization/walletSessionIssuance.d.ts +2 -1
- package/dist/types/shared-ts/src/device-linking/activeWalletSession.d.ts +3 -2
- package/dist/types/shared-ts/src/device-linking/authorityActivation.d.ts +5 -0
- package/dist/types/shared-ts/src/device-linking/committedSignerPackages.d.ts +2 -5
- package/dist/types/shared-ts/src/device-linking/contracts.d.ts +8 -11
- package/dist/types/shared-ts/src/device-linking/contracts.typecheck.d.ts +2 -1
- package/dist/types/shared-ts/src/device-linking/deviceManagement.d.ts +7 -0
- package/dist/types/shared-ts/src/device-linking/digests.d.ts +0 -5
- package/dist/types/shared-ts/src/device-linking/ed25519ExportRoot.d.ts +3 -2
- package/dist/types/shared-ts/src/device-linking/index.d.ts +2 -0
- package/dist/types/shared-ts/src/device-linking/parsers.d.ts +4 -41
- package/dist/types/shared-ts/src/device-linking/requestProof.d.ts +0 -1
- package/dist/types/shared-ts/src/device-linking/sourceContribution.d.ts +3 -2
- package/dist/types/shared-ts/src/device-linking/walletSessionCredentialDelivery.d.ts +2 -1
- package/dist/types/shared-ts/src/device-linking/wireFields.d.ts +26 -0
- package/dist/types/shared-ts/src/near/actions.d.ts +4 -4
- package/dist/types/shared-ts/src/near/delegate.d.ts +3 -2
- package/dist/types/shared-ts/src/near/nearClient.d.ts +145 -0
- package/dist/types/shared-ts/src/passkey-custody/ceremonyCommitPayload.d.ts +0 -22
- package/dist/types/shared-ts/src/passkey-custody/credentialActivity.d.ts +2 -4
- package/dist/types/shared-ts/src/passkey-custody/custodyEnvelope.d.ts +9 -18
- package/dist/types/shared-ts/src/passkey-custody/custodySecretBinding.d.ts +8 -24
- package/dist/types/shared-ts/src/passkey-custody/index.d.ts +0 -2
- package/dist/types/shared-ts/src/passkey-custody/primitives.d.ts +0 -14
- package/dist/types/shared-ts/src/signing-lanes/evmFamilySigningKeySlotId.d.ts +0 -15
- package/dist/types/shared-ts/src/signing-lanes/execution.d.ts +2 -51
- package/dist/types/shared-ts/src/signing-lanes/index.d.ts +1 -2
- package/dist/types/shared-ts/src/signing-lanes/ownerContinuity.d.ts +1 -2
- package/dist/types/shared-ts/src/signing-lanes/participantDigest.d.ts +5 -27
- package/dist/types/shared-ts/src/signing-lanes/participants.d.ts +0 -11
- package/dist/types/shared-ts/src/signing-lanes/recordParsers.d.ts +6 -53
- package/dist/types/shared-ts/src/signing-lanes/records.d.ts +1 -2
- package/dist/types/shared-ts/src/signing-lanes/rotation.d.ts +15 -37
- package/dist/types/shared-ts/src/signing-lanes/rotationDigests.d.ts +1 -20
- package/dist/types/shared-ts/src/signing-lanes/rotationLifecycle.d.ts +4 -25
- package/dist/types/shared-ts/src/signing-lanes/rotationParsers.d.ts +1 -41
- package/dist/types/shared-ts/src/signing-lanes/rotationProtocolParsers.d.ts +6 -0
- package/dist/types/shared-ts/src/signing-lanes/rotationWireFields.d.ts +20 -0
- package/dist/types/shared-ts/src/threshold/ecdsaDerivationRoleLocalBootstrap.d.ts +2 -35
- package/dist/types/shared-ts/src/threshold/ed25519OperationFingerprint.d.ts +8 -35
- package/dist/types/shared-ts/src/threshold/keyMaterialBrands.d.ts +25 -0
- package/dist/types/shared-ts/src/threshold/participants.d.ts +3 -9
- package/dist/types/shared-ts/src/threshold/secp256k1.d.ts +0 -37
- package/dist/types/shared-ts/src/threshold/sessionPolicy.d.ts +24 -0
- package/dist/types/shared-ts/src/threshold/signingRootScope.d.ts +2 -5
- package/dist/types/shared-ts/src/utils/addAuthMethodRegistration.d.ts +3 -4
- package/dist/types/shared-ts/src/utils/addWalletAuthMethod.d.ts +7 -108
- package/dist/types/shared-ts/src/utils/addWalletAuthMethod.typecheck.d.ts +16 -3
- package/dist/types/shared-ts/src/utils/canonicalPrimitives.d.ts +2 -0
- package/dist/types/shared-ts/src/utils/digestEncoding.d.ts +9 -0
- package/dist/types/shared-ts/src/utils/domainIds.d.ts +1 -2
- package/dist/types/shared-ts/src/utils/ecdsaKeyFactsInventory.d.ts +1 -2
- package/dist/types/shared-ts/src/utils/emailOtpDomain.d.ts +5 -5
- package/dist/types/shared-ts/src/utils/emailOtpRecoveryKey.d.ts +0 -2
- package/dist/types/shared-ts/src/utils/errors.d.ts +0 -7
- package/dist/types/shared-ts/src/utils/exactRecord.d.ts +12 -0
- package/dist/types/shared-ts/src/utils/index.d.ts +5 -2
- package/dist/types/shared-ts/src/utils/jsonRpc.d.ts +3 -2
- package/dist/types/shared-ts/src/utils/near.d.ts +2 -1
- package/dist/types/shared-ts/src/utils/nearRpcResults.d.ts +7 -7
- package/dist/types/shared-ts/src/utils/normalize.d.ts +0 -4
- package/dist/types/shared-ts/src/utils/registrationAuthMethodInput.d.ts +184 -0
- package/dist/types/shared-ts/src/utils/registrationContracts.d.ts +76 -0
- package/dist/types/shared-ts/src/utils/registrationEstablishedSession.d.ts +1 -2
- package/dist/types/shared-ts/src/utils/registrationIds.d.ts +56 -0
- package/dist/types/shared-ts/src/utils/registrationIntent.d.ts +9 -514
- package/dist/types/shared-ts/src/utils/registrationSignerPlan.d.ts +142 -0
- package/dist/types/shared-ts/src/utils/routerAbEcdsaDerivation.d.ts +21 -92
- package/dist/types/shared-ts/src/utils/routerAbEd25519Yao.d.ts +14 -99
- package/dist/types/shared-ts/src/utils/routerAbEd25519YaoDigests.d.ts +39 -0
- package/dist/types/shared-ts/src/utils/routerAbPublicKeyset.d.ts +10 -15
- package/dist/types/shared-ts/src/utils/routerAbTraceContext.d.ts +2 -1
- package/dist/types/shared-ts/src/utils/secureRandomId.d.ts +0 -2
- package/dist/types/shared-ts/src/utils/signerDomain.d.ts +3 -35
- package/dist/types/shared-ts/src/utils/signerSlot.d.ts +0 -4
- package/dist/types/shared-ts/src/utils/signingSessionSeal.d.ts +1 -7
- package/dist/types/shared-ts/src/utils/validation.d.ts +10 -10
- package/dist/types/shared-ts/src/utils/variant.d.ts +11 -0
- package/dist/types/shared-ts/src/utils/variant.typecheck.d.ts +22 -0
- package/dist/types/shared-ts/src/utils/walletAddSignerActivation.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/walletAuthAuthority.d.ts +1 -58
- package/dist/types/shared-ts/src/utils/walletAuthMethodRecord.d.ts +104 -0
- package/dist/types/shared-ts/src/utils/walletCapabilityBindings.d.ts +3 -7
- package/dist/types/shared-ts/src/utils/webauthnDeviceInfo.d.ts +3 -4
- package/dist/types/shared-ts/src/utils/wireSchema.d.ts +60 -0
- package/dist/types/shared-ts/src/wallet-recovery/backupAcknowledgement.d.ts +2 -1
- package/dist/types/shared-ts/src/wallet-recovery/index.d.ts +0 -1
- package/dist/types/shared-ts/src/wallet-recovery/recoveryCodeLocator.d.ts +0 -16
- package/dist/types/shared-ts/src/wallet-recovery/recoveryCodeReservation.d.ts +2 -11
- package/dist/types/shared-ts/src/wallet-recovery/walletRecoveryCommittedProjection.d.ts +6 -18
- package/dist/types/shared-ts/src/wallet-recovery/walletRecoveryEcdsaPossession.d.ts +0 -2
- package/dist/types/shared-ts/src/wallet-recovery/walletRecoveryEnvelopeSet.d.ts +1 -3
- package/dist/types/wallet-server/src/authorization/capabilityPolicy.d.ts +0 -1
- package/dist/types/wallet-server/src/authorization/domain.d.ts +25 -5
- package/dist/types/wallet-server/src/authorization/ecdsaWalletSessionAdmission.d.ts +37 -0
- package/dist/types/wallet-server/src/authorization/ecdsaWalletSessionAdmission.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/authorization/factorEvidence.d.ts +6 -7
- package/dist/types/wallet-server/src/authorization/service.d.ts +52 -3
- package/dist/types/wallet-server/src/cloud-host.d.ts +6 -2
- package/dist/types/wallet-server/src/core/EmailOtpRecords.d.ts +10 -1
- package/dist/types/wallet-server/src/core/EmailOtpStores.d.ts +16 -116
- package/dist/types/wallet-server/src/core/IdentityStore.d.ts +2 -7
- package/dist/types/wallet-server/src/core/NearPublicKeyStore.d.ts +6 -16
- package/dist/types/wallet-server/src/core/RegistrationCeremonyStore.d.ts +29 -90
- package/dist/types/wallet-server/src/core/ThresholdService/config.d.ts +0 -12
- package/dist/types/wallet-server/src/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.d.ts +10 -3
- package/dist/types/wallet-server/src/core/ThresholdService/routerAb/ecdsaDerivationPresignBridge.d.ts +17 -48
- package/dist/types/wallet-server/src/core/ThresholdService/routerAb/internalServiceHttp.d.ts +2 -1
- package/dist/types/wallet-server/src/core/ThresholdService/stores/CloudflareDurableObjectStore.d.ts +4 -71
- package/dist/types/wallet-server/src/core/ThresholdService/stores/KeyStore.d.ts +2 -1
- package/dist/types/wallet-server/src/core/ThresholdService/stores/SessionStore.d.ts +4 -8
- package/dist/types/wallet-server/src/core/ThresholdService/stores/StoreConfig.d.ts +2 -1
- package/dist/types/wallet-server/src/core/ThresholdService/stores/WalletSessionStore.d.ts +1 -3
- package/dist/types/wallet-server/src/core/ThresholdService/validation.d.ts +14 -47
- package/dist/types/wallet-server/src/core/WalletAuthMethodStore.d.ts +2 -7
- package/dist/types/wallet-server/src/core/WalletStore.d.ts +3 -8
- package/dist/types/wallet-server/src/core/WebAuthnAuthenticatorStore.d.ts +7 -22
- package/dist/types/wallet-server/src/core/WebAuthnCredentialBindingStore.d.ts +14 -36
- package/dist/types/wallet-server/src/core/WebAuthnLoginChallengeStore.d.ts +9 -34
- package/dist/types/wallet-server/src/core/WebAuthnSyncChallengeStore.d.ts +9 -34
- package/dist/types/wallet-server/src/core/authService/AuthService.d.ts +0 -3
- package/dist/types/wallet-server/src/core/authService/emailOtpChallengeOperations.d.ts +6 -5
- package/dist/types/wallet-server/src/core/authService/emailOtpChallengeProof.d.ts +9 -17
- package/dist/types/wallet-server/src/core/authService/emailOtpChallengeVerification.d.ts +3 -2
- package/dist/types/wallet-server/src/core/authService/emailOtpChallenges.d.ts +7 -23
- package/dist/types/wallet-server/src/core/authService/emailOtpConfig.d.ts +3 -10
- package/dist/types/wallet-server/src/core/authService/emailOtpDelivery.d.ts +4 -3
- package/dist/types/wallet-server/src/core/authService/emailOtpGrant.d.ts +4 -3
- package/dist/types/wallet-server/src/core/authService/emailOtpRegistrationEnrollment.d.ts +3 -70
- package/dist/types/wallet-server/src/core/authService/emailOtpSeal.d.ts +3 -2
- package/dist/types/wallet-server/src/core/authService/emailOtpUnlock.d.ts +4 -3
- package/dist/types/wallet-server/src/core/authService/googleEmailOtpRegistration.d.ts +5 -8
- package/dist/types/wallet-server/src/core/authService/nearPrivateKeySigning.d.ts +3 -2
- package/dist/types/wallet-server/src/core/authService/nearPublicKeyMetadata.d.ts +2 -1
- package/dist/types/wallet-server/src/core/authService/nearTransactions.d.ts +2 -1
- package/dist/types/wallet-server/src/core/authService/oidcVerification.d.ts +4 -3
- package/dist/types/wallet-server/src/core/authService/rateLimits.d.ts +0 -3
- package/dist/types/wallet-server/src/core/authService/registrationThresholdHelpers.d.ts +0 -26
- package/dist/types/wallet-server/src/core/authService/storeRegistry.d.ts +0 -5
- package/dist/types/wallet-server/src/core/authService/thresholdEcdsaKeyInventory.d.ts +0 -23
- package/dist/types/wallet-server/src/core/authService/webauthn.d.ts +8 -16
- package/dist/types/wallet-server/src/core/authService/webauthnOidcHelpers.d.ts +7 -7
- package/dist/types/wallet-server/src/core/authService/webauthnVerificationOutcomes.d.ts +43 -0
- package/dist/types/wallet-server/src/core/authService/webauthnWalletBinding.d.ts +1 -28
- package/dist/types/wallet-server/src/core/d1IdentityStore.d.ts +6 -16
- package/dist/types/wallet-server/src/core/d1TenantStore.d.ts +51 -0
- package/dist/types/wallet-server/src/core/d1WalletAuthMethodStore.d.ts +11 -29
- package/dist/types/wallet-server/src/core/d1WalletStore.d.ts +6 -1
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceEd25519ExportRoot.d.ts +2 -1
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceEmailOtpGrant.d.ts +2 -1
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceManagement.d.ts +44 -26
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceSession.d.ts +19 -217
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceSessionApproval.d.ts +8 -0
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceSessionRecord.d.ts +259 -0
- package/dist/types/wallet-server/src/core/deviceLinking/requestProof.d.ts +2 -2
- package/dist/types/wallet-server/src/core/emailOtpD1Statements.d.ts +54 -0
- package/dist/types/wallet-server/src/core/hostedAccountIds.d.ts +0 -15
- package/dist/types/wallet-server/src/core/keyMaterialBrands.d.ts +4 -24
- package/dist/types/wallet-server/src/core/nearRelayerAccountProvisioning.d.ts +2 -3
- package/dist/types/wallet-server/src/core/nearSignerWasmRuntime.d.ts +0 -1
- package/dist/types/wallet-server/src/core/registrationContracts.d.ts +37 -108
- package/dist/types/wallet-server/src/core/routerAbSigning/RouterAbNormalSigningRuntime.d.ts +5 -4
- package/dist/types/wallet-server/src/core/rpcClients/near/NearClient.d.ts +10 -106
- package/dist/types/wallet-server/src/core/signingLanes/LaneAggregateRevocationApplicationService.d.ts +4 -3
- package/dist/types/wallet-server/src/core/signingLanes/LaneEffectJournalStore.d.ts +2 -3
- package/dist/types/wallet-server/src/core/signingLanes/LaneLifecycleStore.d.ts +2 -3
- package/dist/types/wallet-server/src/core/signingLanes/WalletExecutionLaneProjection.d.ts +3 -9
- package/dist/types/wallet-server/src/core/signingLanes/ecdsaServerRetirement.d.ts +4 -4
- package/dist/types/wallet-server/src/core/signingLanes/ed25519ServerRetirement.d.ts +3 -3
- package/dist/types/wallet-server/src/core/storeBackends.d.ts +83 -0
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.d.ts +13 -59
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.typecheck.d.ts +51 -3
- package/dist/types/wallet-server/src/core/thresholdEcdsaChainTarget.d.ts +0 -1
- package/dist/types/wallet-server/src/core/types.d.ts +3 -24
- package/dist/types/wallet-server/src/core/webAuthnD1Statements.d.ts +29 -0
- package/dist/types/wallet-server/src/core/webAuthnStoreBackends.d.ts +96 -0
- package/dist/types/wallet-server/src/hosted-wallet-gateway.d.ts +11 -7
- package/dist/types/wallet-server/src/index.d.ts +1 -1
- package/dist/types/wallet-server/src/local-hosted-wallet-gateway-worker.d.ts +1 -4
- package/dist/types/wallet-server/src/localHostedWalletGatewayHandler.d.ts +12 -0
- package/dist/types/wallet-server/src/localIntendedEcdsaFinalizeFault.d.ts +33 -0
- package/dist/types/wallet-server/src/localIntendedLinkExecuteFault.d.ts +47 -0
- package/dist/types/wallet-server/src/localIntendedRevokeFault.d.ts +40 -0
- package/dist/types/wallet-server/src/localIntendedSessionAdmissionFault.d.ts +41 -0
- package/dist/types/wallet-server/src/localIntendedYaoExportFault.d.ts +41 -0
- package/dist/types/wallet-server/src/localIntendedYaoFault.d.ts +7 -1
- package/dist/types/wallet-server/src/localIntendedYaoFinalizeFault.d.ts +37 -0
- package/dist/types/wallet-server/src/localIntendedYaoRecoveryFault.d.ts +45 -0
- package/dist/types/wallet-server/src/localIntendedYaoSigningFault.d.ts +51 -0
- package/dist/types/wallet-server/src/router/auth/authRequestValidation.d.ts +10 -21
- package/dist/types/wallet-server/src/router/auth/commonRouterUtils.d.ts +5 -10
- package/dist/types/wallet-server/src/router/auth/walletSessionFailure.d.ts +1 -4
- package/dist/types/wallet-server/src/router/auth/webAuthnCredentialCodecs.d.ts +3 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1AuthorizedOperationRouteService.d.ts +12 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RouterApiAuthBoundary.d.ts +3 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RouterApiAuthConfig.d.ts +2 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RouterApiAuthService.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/authorization/authorizedOperationStatements.d.ts +30 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/authorization/d1AuthorizationStore.d.ts +45 -21
- package/dist/types/wallet-server/src/router/cloudflare/d1/authorization/persistedWalletSessionAuthorization.d.ts +3 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/authorization/walletSessionAuthorityProjection.d.ts +2 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.d.ts +57 -6
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpGrantStore.d.ts +2 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpTargetFactor.d.ts +8 -21
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.d.ts +14 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRevocation.d.ts +49 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionRecords.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionStore.d.ts +4 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSourceContributionPreparationPlanner.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.d.ts +2 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetPlanner.d.ts +8 -4
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceVerifiedLinkBuilder.d.ts +3 -5
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/installedEcdsaAuthority.d.ts +7 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.d.ts +1 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoLifecycleDecisionStore.d.ts +33 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeIssuer.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.d.ts +13 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeVerifier.d.ts +24 -5
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpEnrollmentStore.d.ts +2 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpGrantStore.d.ts +1 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRateLimitStore.d.ts +3 -4
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.d.ts +9 -8
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.d.ts +0 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRegistrationEnrollmentFinalizer.d.ts +5 -4
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.d.ts +1 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationRecords.d.ts +3 -21
- package/dist/types/wallet-server/src/router/cloudflare/d1/identity/d1IdentityRecords.d.ts +0 -23
- package/dist/types/wallet-server/src/router/cloudflare/d1/near/d1NearPublicKeyStore.d.ts +1 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyEnvelopeStore.d.ts +11 -19
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyRouteService.d.ts +5 -54
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.d.ts +7 -19
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpRecords.d.ts +4 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpService.d.ts +8 -12
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.d.ts +5 -8
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.d.ts +10 -22
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.d.ts +6 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.d.ts +10 -6
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationService.d.ts +15 -22
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationSetup.d.ts +5 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.d.ts +4 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.d.ts +5 -5
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.d.ts +3 -5
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneEffectJournalStore.d.ts +0 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/versionedJson/d1VersionedJsonRecordStore.d.ts +0 -16
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAddSignerService.d.ts +29 -14
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodBoundary.d.ts +15 -12
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodRevocationReplayStore.d.ts +71 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodService.d.ts +34 -24
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorityStore.d.ts +44 -26
- package/dist/types/wallet-server/src/router/cloudflare/d1/webauthn/d1WebAuthnRecords.d.ts +3 -7
- package/dist/types/wallet-server/src/router/cloudflare/d1/webauthn/d1WebAuthnStore.d.ts +8 -19
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletConsoleTenantRootLineage.d.ts +2 -1
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletGateway.d.ts +1 -0
- package/dist/types/wallet-server/src/router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.d.ts +15 -2
- package/dist/types/wallet-server/src/router/cloudflare-adaptor.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/ecdsa/routerAbEcdsaStrictRegistration.d.ts +9 -7
- package/dist/types/wallet-server/src/router/domains/ecdsa/thresholdEcdsaRequestValidation.d.ts +4 -4
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoLifecycleDecision.d.ts +46 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.d.ts +5 -3
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.d.ts +20 -79
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRunner.d.ts +1 -1
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.d.ts +4 -3
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.d.ts +62 -42
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.d.ts +108 -32
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryActivation.typecheck.d.ts +5 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.d.ts +36 -5
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.d.ts +5 -4
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationExecutionRecord.d.ts +41 -50
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.d.ts +3 -3
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationSideEffectBoundary.d.ts +6 -5
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationTwoPhaseRunner.d.ts +14 -4
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/routerAbEd25519YaoGatewayEnvelope.d.ts +12 -1
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/session/routerAbEd25519YaoWalletSession.d.ts +5 -5
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/session/thresholdEd25519RequestValidation.d.ts +3 -4
- package/dist/types/wallet-server/src/router/domains/emailOtp/emailOtpExportPolicy.d.ts +2 -27
- package/dist/types/wallet-server/src/router/domains/emailOtp/emailOtpRequestValidation.d.ts +1 -2
- package/dist/types/wallet-server/src/router/domains/emailOtp/emailOtpRouteHandlers.d.ts +2 -1
- package/dist/types/wallet-server/src/router/domains/emailOtp/emailOtpSessionRouteHelpers.d.ts +2 -102
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/envelopeRevocationAdmission.d.ts +2 -1
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/passkeyCustodyEnvelopeRetrieval.d.ts +3 -2
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/passkeyCustodyEnvelopeRetrievalRoute.d.ts +1 -9
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/registrationCustodyOutcome.d.ts +2 -1
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/verifiedCustodyFactor.d.ts +2 -1
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationAdmission.d.ts +2 -1
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationCommit.d.ts +2 -28
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletRecoveryFinalization.d.ts +43 -1
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletRecoveryKeyManifest.d.ts +7 -7
- package/dist/types/wallet-server/src/router/domains/signingOperations/ed25519AuthorizedOperationReceipt.d.ts +0 -3
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbEcdsaDerivationNormalSigningRoute.d.ts +165 -0
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbEd25519NormalSigningRoute.d.ts +110 -0
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbNormalSigningAdmission.d.ts +360 -0
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbNormalSigningAdmissionCore.d.ts +11 -10
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbNormalSigningAdmissionCore.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbOperationStepUp.d.ts +165 -0
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbPrivateSigningWorker.d.ts +16 -702
- package/dist/types/wallet-server/src/router/domains/signingOperations/walletExecutionAdmission.d.ts +5 -12
- package/dist/types/wallet-server/src/router/domains/syncAccount/syncAccountRequestValidation.d.ts +5 -4
- package/dist/types/wallet-server/src/router/domains/tenantRoot/tenantRootCustodyLineage.d.ts +6 -1
- package/dist/types/wallet-server/src/router/domains/tenantRoot/tenantRootIdentityResolution.d.ts +4 -7
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationInputs.d.ts +2 -1
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationRoutes.d.ts +8 -8
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationSetupPayload.d.ts +4 -4
- package/dist/types/wallet-server/src/router/domains/walletUnlock/walletUnlockRequestedCapabilitiesValidation.d.ts +4 -4
- package/dist/types/wallet-server/src/router/domains/walletUnlock/walletUnlockRouteHandlers.d.ts +4 -62
- package/dist/types/wallet-server/src/router/express-adaptor.d.ts +2 -2
- package/dist/types/wallet-server/src/router/framework/authServicePort.d.ts +64 -61
- package/dist/types/wallet-server/src/router/framework/http.d.ts +0 -1
- package/dist/types/wallet-server/src/router/framework/ror/normalize.d.ts +2 -2
- package/dist/types/wallet-server/src/router/framework/routeMeteringPolicy.d.ts +3 -2
- package/dist/types/wallet-server/src/router/framework/routerApi.d.ts +1 -1
- package/dist/types/wallet-server/src/router/framework/routerApiRouteSurface.d.ts +3 -3
- package/dist/types/wallet-server/src/router/node/nodeHostedWalletGateway.d.ts +34 -0
- package/dist/types/wallet-server/src/router/node/nodeHostedWalletGatewayCheck.d.ts +21 -0
- package/dist/types/wallet-server/src/router/node/nodeHostedWalletGatewayMain.d.ts +2 -0
- package/dist/types/wallet-server/src/router/node/nodeHttp.d.ts +13 -0
- package/dist/types/wallet-server/src/router/node/nodeSqlite.d.ts +22 -0
- package/dist/types/wallet-server/src/router/node/signerSqlMigrations.d.ts +20 -0
- package/dist/types/wallet-server/src/router/transport/fetch/createFetchRouter.d.ts +1 -3
- package/dist/types/wallet-server/src/router/transport/fetch/routes/deviceLinking.d.ts +5 -6
- package/dist/types/wallet-server/src/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.d.ts +2 -2
- package/dist/types/wallet-server/src/router/transport/fetch/routes/deviceManagement.d.ts +14 -16
- package/dist/types/wallet-server/src/router/transport/fetch/routes/normalSigningRouterProxy.d.ts +0 -12
- package/dist/types/wallet-server/src/router/transport/fetch/routes/passkeyCustody.d.ts +1 -1
- package/dist/types/wallet-server/src/router/transport/fetch/routes/sessions.d.ts +2 -1
- package/dist/types/wallet-server/src/router/transport/fetch/routes/syncAccountBootstrap.d.ts +7 -13
- package/dist/types/wallet-server/src/router/transport/fetch/routes/thresholdEcdsa.d.ts +3 -57
- package/dist/types/wallet-server/src/router/transport/fetch/routes/thresholdEd25519.d.ts +0 -44
- package/dist/types/wallet-server/src/storage/d1Sql.d.ts +7 -0
- package/dist/types/wallet-server/src/storage/syncSqlite.d.ts +28 -0
- package/dist/types/wallet-server/src/threshold/session/signingSessionSeal/crypto/shamir3PassWasm.d.ts +0 -1
- package/dist/types/wallet-server/src/threshold/session/signingSessionSeal/idempotencyRecords.d.ts +5 -6
- package/dist/types/wallet-server/src/threshold/session/signingSessionSeal/transport/shared.d.ts +1 -0
- package/dist/types/wallet-server/src/threshold/statusCodes.d.ts +4 -4
- package/migrations/d1-signer/0036_r150_yao_lifecycle_decisions.sql +22 -0
- package/migrations/d1-signer/0037_r150_wallet_auth_method_revocation_replays.sql +26 -0
- package/migrations/d1-signer/0038_r150_registration_ceremony_cas_guard_seed.sql +8 -0
- package/migrations/d1-signer/0039_r150_revocation_replay_answer_kind.sql +9 -0
- package/package.json +1 -1
- package/dist/esm/core/ThresholdService/ecdsaClientRootProof.js +0 -27
- package/dist/esm/core/ThresholdService/routerAbEcdsaSigningWorkerWasm.js +0 -115
- package/dist/esm/core/ThresholdService/secureRandomId.js +0 -9
- package/dist/esm/core/authService/record.js +0 -8
- package/dist/esm/core/authService/thresholdRuntimePolicy.js +0 -19
- package/dist/esm/core/authService/walletRegistrationPlanning.js +0 -49
- package/dist/esm/core/deviceLinking/index.js +0 -5
- package/dist/esm/core/errors.js +0 -54
- package/dist/esm/core/routerAbSigning/createCloudflareDurableObjectRouterAbSigningRuntimes.js +0 -39
- package/dist/esm/core/signingLanes/WalletKeyStore.js +0 -0
- package/dist/esm/core/signingLanes/index.js +0 -8
- package/dist/esm/router/domains/tenantRoot/tenantRootEcdsaWalletSessionComposition.js +0 -55
- package/dist/esm/router/domains/tenantRoot/tenantRootEd25519WalletSessionComposition.js +0 -56
- package/dist/esm/shared-ts/src/signing-lanes/linkedEcdsaScope.js +0 -1
- package/dist/esm/wasm/router_ab_ecdsa_signing_worker/pkg/router_ab_ecdsa_signing_worker.js +0 -414
- package/dist/types/shared-ts/src/passkey-custody/credentialObservations.d.ts +0 -74
- package/dist/types/shared-ts/src/passkey-custody/kekContext.d.ts +0 -34
- package/dist/types/shared-ts/src/signing-lanes/linkedEcdsaScope.d.ts +0 -62
- package/dist/types/shared-ts/src/signing-lanes/linkedEcdsaScope.typecheck.d.ts +0 -2
- package/dist/types/shared-ts/src/signing-lanes/validation.d.ts +0 -11
- package/dist/types/shared-ts/src/utils/bigint.d.ts +0 -3
- package/dist/types/shared-ts/src/utils/paillier.d.ts +0 -37
- package/dist/types/shared-ts/src/utils/recoveryDomain.d.ts +0 -12
- package/dist/types/shared-ts/src/utils/signerDomain.typecheck.d.ts +0 -2
- package/dist/types/shared-ts/src/wallet-recovery/recoveryKekContext.d.ts +0 -37
- package/dist/types/wallet-server/src/core/ThresholdService/ecdsaClientRootProof.d.ts +0 -12
- package/dist/types/wallet-server/src/core/ThresholdService/routerAbEcdsaSigningWorkerWasm.d.ts +0 -17
- package/dist/types/wallet-server/src/core/ThresholdService/secureRandomId.d.ts +0 -2
- package/dist/types/wallet-server/src/core/authService/record.d.ts +0 -2
- package/dist/types/wallet-server/src/core/authService/thresholdRuntimePolicy.d.ts +0 -4
- package/dist/types/wallet-server/src/core/authService/walletRegistrationPlanning.d.ts +0 -19
- package/dist/types/wallet-server/src/core/deviceLinking/index.d.ts +0 -5
- package/dist/types/wallet-server/src/core/errors.d.ts +0 -10
- package/dist/types/wallet-server/src/core/routerAbSigning/createCloudflareDurableObjectRouterAbSigningRuntimes.d.ts +0 -28
- package/dist/types/wallet-server/src/core/signingLanes/SigningLaneStore.d.ts +0 -15
- package/dist/types/wallet-server/src/core/signingLanes/WalletKeyStore.d.ts +0 -13
- package/dist/types/wallet-server/src/core/signingLanes/index.d.ts +0 -11
- package/dist/types/wallet-server/src/router/domains/tenantRoot/tenantRootEcdsaWalletSessionComposition.d.ts +0 -35
- package/dist/types/wallet-server/src/router/domains/tenantRoot/tenantRootEd25519WalletSessionComposition.d.ts +0 -35
- /package/dist/esm/{core/signingLanes/SigningLaneStore.js → authorization/ecdsaWalletSessionAdmission.js} +0 -0
|
@@ -23,6 +23,7 @@ export interface CloudflareWalletGatewayRouterOptionsV1 {
|
|
|
23
23
|
readonly walletConsole: WalletConsoleServiceBinding;
|
|
24
24
|
readonly signerDatabase: CloudflareD1RouterAbNormalSigningAdmissionStoreOptions['database'];
|
|
25
25
|
readonly signerStorageNamespace: string;
|
|
26
|
+
readonly routeExtensions?: readonly RouterApiRouteExtension[];
|
|
26
27
|
readonly router: Omit<RouterApiOptions, WalletGatewayManagedRouterOption>;
|
|
27
28
|
}
|
|
28
29
|
export declare function createCloudflareWalletGatewayRouterV1(input: CloudflareWalletGatewayRouterOptionsV1): FetchHandler;
|
|
@@ -2,7 +2,7 @@ import { type OrdinaryEcdsaSignerMaterialReservationRequestV1, type OrdinaryEcds
|
|
|
2
2
|
import { type LinkedDeviceEd25519SourceContributionPreparationV1 } from '../../../../../shared-ts/src/device-linking/sourceContribution';
|
|
3
3
|
import type { DeviceLinkingEd25519SourcePreservingRouterPortV1 } from '../../transport/fetch/routes/deviceLinking';
|
|
4
4
|
import type { OrdinaryInactiveSignerMaterialActivationPortV1 } from '../d1/deviceLinking/d1LinkedDeviceAuthorityInstallService';
|
|
5
|
-
import type
|
|
5
|
+
import { type RouterAbEd25519YaoResolvedTenantRootV1 } from '../../domains/ed25519Yao/routerAbEd25519YaoGatewayEnvelope';
|
|
6
6
|
import type { OrdinaryEcdsaSignerMaterialReservationPreparationV1, OrdinaryEd25519SignerMaterialReservationPreparationV1 } from '../../../core/signingMaterial/ordinaryInactiveSignerMaterialReservation';
|
|
7
7
|
/** Source-preserving ordinary material paths implemented by the Cloudflare workers. */
|
|
8
8
|
export declare const CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1: "/router-ab/router/ed25519-yao/execute-source-preserving";
|
|
@@ -11,6 +11,16 @@ export declare const CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_
|
|
|
11
11
|
export declare const CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1: "/router-ab/signing-worker/ecdsa-derivation/activate-reservation";
|
|
12
12
|
export declare const CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1: "/router-ab/signing-worker/ed25519-yao/deactivate-reservation";
|
|
13
13
|
export declare const CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1: "/router-ab/signing-worker/ecdsa-derivation/deactivate-reservation";
|
|
14
|
+
/**
|
|
15
|
+
* The tenant this Gateway serves. With one of its wallets it names the
|
|
16
|
+
* SigningWorker wallet object that holds that wallet's material, and the
|
|
17
|
+
* SigningWorker checks the wallet against the source activation it holds.
|
|
18
|
+
*/
|
|
19
|
+
export type CloudflareSigningWorkerTenantV1 = {
|
|
20
|
+
readonly orgId: string;
|
|
21
|
+
readonly projectId: string;
|
|
22
|
+
readonly envId: string;
|
|
23
|
+
};
|
|
14
24
|
/**
|
|
15
25
|
* Boundary for the dedicated ordinary reservation operation. Its response is
|
|
16
26
|
* deliberately unknown until the core reservation parser has checked the
|
|
@@ -26,7 +36,7 @@ export type CloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1 = Devi
|
|
|
26
36
|
export declare function createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1(input: {
|
|
27
37
|
readonly fetch: typeof fetch;
|
|
28
38
|
readonly internalServiceAuthSecret: string;
|
|
29
|
-
readonly resolveTenantRoot: (context: Pick<LinkedDeviceEd25519SourceContributionPreparationV1, 'applicationBinding' | 'targetAdmission' | 'participantIds'>) => Promise<
|
|
39
|
+
readonly resolveTenantRoot: (context: Pick<LinkedDeviceEd25519SourceContributionPreparationV1, 'applicationBinding' | 'targetAdmission' | 'participantIds'>) => Promise<RouterAbEd25519YaoResolvedTenantRootV1>;
|
|
30
40
|
}): CloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1;
|
|
31
41
|
export type CloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1 = {
|
|
32
42
|
activateInactiveEd25519SignerMaterialV1(input: {
|
|
@@ -49,14 +59,17 @@ export type CloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1 = {
|
|
|
49
59
|
export declare function createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1(input: {
|
|
50
60
|
readonly fetch: typeof fetch;
|
|
51
61
|
readonly internalServiceAuthSecret: string;
|
|
62
|
+
readonly tenant: CloudflareSigningWorkerTenantV1;
|
|
52
63
|
}): CloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1;
|
|
53
64
|
export declare function createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1(input: {
|
|
54
65
|
readonly fetch: typeof fetch;
|
|
55
66
|
readonly internalServiceAuthSecret: string;
|
|
67
|
+
readonly tenant: CloudflareSigningWorkerTenantV1;
|
|
56
68
|
}): CloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1;
|
|
57
69
|
export declare function createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1(input: {
|
|
58
70
|
readonly fetch: typeof fetch;
|
|
59
71
|
readonly internalServiceAuthSecret: string;
|
|
72
|
+
readonly tenant: CloudflareSigningWorkerTenantV1;
|
|
60
73
|
}): CloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1;
|
|
61
74
|
/**
|
|
62
75
|
* Adapter for the ordinary inactive reservation endpoint. The endpoint owns
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type { RouterApiKeyAuthAdapter, RouterApiKeyAuthFailureCode, RouterApiKeyAuthRequest, RouterApiKeyAuthResult, RouterApiKeyPrincipal, RouterApiOptions, RouterApiPublishableKeyAuthAdapter, RouterApiPublishableKeyAuthFailureCode, RouterApiPublishableKeyAuthRequest, RouterApiPublishableKeyAuthResult, RouterApiRuntimePolicyScope, RouterApiRuntimeSnapshotConsumer, RouterApiRuntimeSnapshotEnvelope, RouterApiUsageMeterAction, RouterApiUsageMeterAdapter, RouterApiUsageMeterEvent, } from './framework/routerApi';
|
|
2
2
|
export { 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';
|
|
3
3
|
export type { RouterAbPublicKeysetV2 } from '../../../shared-ts/src/utils/routerAbPublicKeyset';
|
|
4
|
-
export type { RouterAbNormalSigningAdmissionAdapter, RouterAbNormalSigningAdmissionFailure, RouterAbNormalSigningAdmissionFailureCode, RouterAbNormalSigningAdmissionInput, RouterAbNormalSigningAdmissionResult, } from './domains/signingOperations/
|
|
4
|
+
export type { RouterAbNormalSigningAdmissionAdapter, RouterAbNormalSigningAdmissionFailure, RouterAbNormalSigningAdmissionFailureCode, RouterAbNormalSigningAdmissionInput, RouterAbNormalSigningAdmissionResult, } from './domains/signingOperations/routerAbNormalSigningAdmission';
|
|
5
5
|
export { InMemoryRouterAbNormalSigningAdmissionStore, createInMemoryRouterAbNormalSigningAdmissionAdapter, createInMemoryRouterAbNormalSigningAdmissionStore, createRouterAbNormalSigningAdmissionAdapter, } from './domains/signingOperations/routerAbNormalSigningAdmissionCore';
|
|
6
|
-
export type { RouterAbNormalSigningAbuseDecision,
|
|
6
|
+
export type { RouterAbNormalSigningAbuseDecision, RouterAbNormalSigningPolicyDecision, RouterAbNormalSigningAdmissionStore, RouterAbNormalSigningProjectPolicyDecision, } from './domains/signingOperations/routerAbNormalSigningAdmissionCore';
|
|
7
7
|
export { CloudflareD1RouterAbNormalSigningAdmissionStore, createCloudflareD1RouterAbNormalSigningAdmissionStore, } from './cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore';
|
|
8
8
|
export type { CloudflareD1RouterAbNormalSigningAdmissionStoreOptions } from './cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore';
|
|
9
9
|
export type { RouterApiFetchRouteExtension, RouterApiFetchRouteExtensionInput, RouterApiRouteExtension, RouterApiRouteExtensionTransport, } from './framework/routeExtensions';
|
package/dist/types/wallet-server/src/router/domains/ecdsa/routerAbEcdsaStrictRegistration.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export type RouterAbEcdsaRegistrationRequestPolicyV1 = {
|
|
|
66
66
|
export type RouterAbEcdsaRegistrationTenantRootV1 = {
|
|
67
67
|
readonly identityDigestB64u: string;
|
|
68
68
|
readonly custodyLineageB64u: string;
|
|
69
|
+
readonly projectEnvironmentId: string;
|
|
69
70
|
};
|
|
70
71
|
type RouterAbRequestPolicyClaimsInputV1 = {
|
|
71
72
|
readonly policyVersion: string;
|
|
@@ -75,16 +76,16 @@ type RouterAbRequestPolicyClaimsInputV1 = {
|
|
|
75
76
|
};
|
|
76
77
|
};
|
|
77
78
|
/**
|
|
78
|
-
* Receives the Router's raw `Server-Timing` header, when it sent one
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
79
|
+
* Receives the Router's raw `Server-Timing` header, when it sent one.
|
|
80
|
+
* Diagnostics only: the Router's spans never reach the response body, and a
|
|
81
|
+
* caller that omits this sink changes nothing about the ceremony. Called at
|
|
82
|
+
* most once per forwarded request, before the result is parsed, so a failing
|
|
83
|
+
* leg still reports where its time went.
|
|
83
84
|
*/
|
|
84
85
|
export type RouterAbEcdsaStrictServerTimingSink = (header: string) => void;
|
|
85
86
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
87
|
+
* Reports whether a role leg returned the diagnostics header we expect, and
|
|
88
|
+
* nothing about what it contained.
|
|
88
89
|
*
|
|
89
90
|
* `Server-Timing` carries role and span names from inside the MPC topology.
|
|
90
91
|
* A missing header and an empty one are different failures — the first means
|
|
@@ -149,6 +150,7 @@ export type RouterAbEcdsaCeremonyTokenClaims = {
|
|
|
149
150
|
readonly orgId: string;
|
|
150
151
|
readonly projectId: string;
|
|
151
152
|
readonly environment: string;
|
|
153
|
+
readonly projectEnvironmentId: string;
|
|
152
154
|
readonly accountId: string;
|
|
153
155
|
readonly expiresAtMs: number;
|
|
154
156
|
};
|
package/dist/types/wallet-server/src/router/domains/ecdsa/thresholdEcdsaRequestValidation.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { type RouterAbEcdsaOperationStepUpPreparationV1Wire } from '../../../../../shared-ts/src/utils/routerAbEcdsaDerivation';
|
|
2
2
|
import { type RouterAbNormalSigningAuthorizationWire } from '../../../../../shared-ts/src/utils/routerAbNormalSigningIdentity';
|
|
3
3
|
import type { RouterAbEcdsaDerivationPoolFillInitRequest, RouterAbEcdsaDerivationPoolFillStepRequest } from '../../../core/types';
|
|
4
|
-
|
|
4
|
+
type ThresholdEcdsaRouteErrorBody = {
|
|
5
5
|
ok: false;
|
|
6
6
|
code: 'invalid_body';
|
|
7
7
|
message: string;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type ThresholdEcdsaRouteParseResult<T> = {
|
|
10
10
|
ok: true;
|
|
11
11
|
request: T;
|
|
12
12
|
} | {
|
|
13
13
|
ok: false;
|
|
14
14
|
body: ThresholdEcdsaRouteErrorBody;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type RouterAbEcdsaPoolFillAuthorization = {
|
|
17
17
|
readonly authorization: Extract<RouterAbNormalSigningAuthorizationWire, {
|
|
18
18
|
readonly kind: 'reusable_wallet_session';
|
|
19
19
|
}>;
|
|
@@ -28,5 +28,5 @@ export type RouterAbEcdsaPoolFillInitRouteRequest = RouterAbEcdsaDerivationPoolF
|
|
|
28
28
|
export type RouterAbEcdsaPoolFillStepRouteRequest = RouterAbEcdsaDerivationPoolFillStepRequest & RouterAbEcdsaPoolFillAuthorization;
|
|
29
29
|
export declare function parseRouterAbEcdsaDerivationPoolFillInitRouteRequest(raw: unknown): ThresholdEcdsaRouteParseResult<RouterAbEcdsaPoolFillInitRouteRequest>;
|
|
30
30
|
export declare function parseRouterAbEcdsaDerivationPoolFillStepRouteRequest(raw: unknown): ThresholdEcdsaRouteParseResult<RouterAbEcdsaPoolFillStepRouteRequest>;
|
|
31
|
-
export
|
|
31
|
+
export {};
|
|
32
32
|
//# sourceMappingURL=thresholdEcdsaRequestValidation.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { WalletEd25519YaoActiveCapabilityRecord } from '../../../../core/WalletStore';
|
|
2
|
+
/**
|
|
3
|
+
* How an Ed25519 Yao lifecycle was finalized. A lifecycle has at most one
|
|
4
|
+
* decision, and the decision is the linearization point of its finalization:
|
|
5
|
+
* it commits in the same batch as the writes that make the finalization
|
|
6
|
+
* visible, so the result is visible if and only if the decision exists.
|
|
7
|
+
*
|
|
8
|
+
* The Router's wallet object binds the first finalization that consumes a
|
|
9
|
+
* registration's execution. The decision records which one became visible,
|
|
10
|
+
* and nothing else records it.
|
|
11
|
+
*/
|
|
12
|
+
export type RouterAbEd25519YaoLifecycleDecisionKindV1 = 'registration_finalized' | 'add_signer_finalized';
|
|
13
|
+
export type RouterAbEd25519YaoLifecycleDecisionV1 = {
|
|
14
|
+
readonly lifecycleId: string;
|
|
15
|
+
readonly kind: RouterAbEd25519YaoLifecycleDecisionKindV1;
|
|
16
|
+
/** Names the finalization: its consumer binding and the capability it installs. */
|
|
17
|
+
readonly decisionId: string;
|
|
18
|
+
readonly walletId: string;
|
|
19
|
+
};
|
|
20
|
+
/** The decision one finalization would record. */
|
|
21
|
+
export declare function routerAbEd25519YaoLifecycleDecisionV1(input: {
|
|
22
|
+
readonly kind: RouterAbEd25519YaoLifecycleDecisionKindV1;
|
|
23
|
+
readonly lifecycleId: string;
|
|
24
|
+
readonly walletId: string;
|
|
25
|
+
/** The binding the Router's wallet object consumed the execution for. */
|
|
26
|
+
readonly consumerBinding: string;
|
|
27
|
+
readonly capability: WalletEd25519YaoActiveCapabilityRecord;
|
|
28
|
+
}): Promise<RouterAbEd25519YaoLifecycleDecisionV1>;
|
|
29
|
+
/** What a finalization finds when it looks up its lifecycle's decision. */
|
|
30
|
+
type RouterAbEd25519YaoLifecycleDecisionLookupV1 =
|
|
31
|
+
/** No finalization has become visible: this one may decide. */
|
|
32
|
+
{
|
|
33
|
+
readonly kind: 'undecided';
|
|
34
|
+
}
|
|
35
|
+
/** This finalization already became visible: its visibility writes are done. */
|
|
36
|
+
| {
|
|
37
|
+
readonly kind: 'decided';
|
|
38
|
+
}
|
|
39
|
+
/** Another finalization became visible for this lifecycle. */
|
|
40
|
+
| {
|
|
41
|
+
readonly kind: 'decided_otherwise';
|
|
42
|
+
readonly decision: RouterAbEd25519YaoLifecycleDecisionV1;
|
|
43
|
+
};
|
|
44
|
+
export declare function routerAbEd25519YaoLifecycleDecisionLookupV1(wanted: RouterAbEd25519YaoLifecycleDecisionV1, stored: RouterAbEd25519YaoLifecycleDecisionV1 | null): RouterAbEd25519YaoLifecycleDecisionLookupV1;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=routerAbEd25519YaoLifecycleDecision.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { type AddSignerIntentV1, type
|
|
1
|
+
import { type AddSignerIntentV1, type WalletId } from '../../../../../../shared-ts/src/utils/registrationIntent';
|
|
2
|
+
import { type RegistrationEd25519AuthorityScope } from '../../../../../../shared-ts/src/utils/registrationIds';
|
|
3
|
+
import { type RegistrationNearEd25519SignerPlan } from '../../../../../../shared-ts/src/utils/registrationSignerPlan';
|
|
2
4
|
import { type RouterAbEd25519YaoActivationAdmissionReceiptV1, type RouterAbEd25519YaoRegistrationAdmissionRequestV1 } from '../../../../../../shared-ts/src/utils/routerAbEd25519Yao';
|
|
3
5
|
import { type RouterAbMpcMaterialActivationRefWire } from '../../../../../../shared-ts/src/utils/routerAbNormalSigningIdentity';
|
|
4
6
|
import type { RouterAbEd25519YaoActivationConsumerV1, RouterAbEd25519YaoActivationConsumptionRequestV1, RouterAbEd25519YaoActivationConsumptionResultV1, RouterAbEd25519YaoRegistrationServiceResult } from '../registration/routerAbEd25519YaoRegistration';
|
|
@@ -10,7 +12,7 @@ import type { ThresholdEd25519SessionId } from '../../../../../../shared-ts/src/
|
|
|
10
12
|
import { type RuntimePolicyScope } from '../../../../../../shared-ts/src/threshold/signingRootScope';
|
|
11
13
|
import type { WalletAuthAuthority } from '../../../../../../shared-ts/src/utils/walletAuthAuthority';
|
|
12
14
|
import type { WalletSessionOperationCredentialV1 } from '../../../../../../shared-ts/src/device-linking';
|
|
13
|
-
import type { WalletRegistrationEd25519YaoBootstrapSession } from '
|
|
15
|
+
import type { WalletRegistrationEd25519YaoBootstrapSession } from '../../../../../../shared-ts/src/utils/registrationContracts';
|
|
14
16
|
import { InMemoryRouterAbEd25519YaoRecoveryStateV1, type RouterAbEd25519YaoActiveCapabilityLookupV1, type RouterAbEd25519YaoActiveCapabilityResolverV1, type RouterAbEd25519YaoPersistedActiveCapabilityInstallerV1, type RouterAbEd25519YaoRecoveryAuthorizationAdapter, type RouterAbEd25519YaoRecoveryService, type RouterAbEd25519YaoRegistrationFinalizeCapabilityInstallerV1, type WarmBootstrapLinkedEd25519AuthorityReaderV1 } from '../recovery/routerAbEd25519YaoRecovery';
|
|
15
17
|
import type { WalletEd25519YaoActiveCapabilityRecord } from '../../../../core/WalletStore';
|
|
16
18
|
import { InMemoryRouterAbEd25519YaoExportStateV1, type RouterAbEd25519YaoExportAuthorizationAdapter, type RouterAbEd25519YaoExportService } from '../export/routerAbEd25519YaoExport';
|
|
@@ -142,7 +144,7 @@ export declare function createRouterAbEd25519YaoMaterialActivationRefV1(input: {
|
|
|
142
144
|
}): RouterAbMpcMaterialActivationRefWire;
|
|
143
145
|
/**
|
|
144
146
|
* Takes the authority *scope* rather than the authority because setup admits
|
|
145
|
-
* before the proof exists
|
|
147
|
+
* before the proof exists. Callers holding a verified authority
|
|
146
148
|
* pass `registrationEd25519AuthorityScopeFromAuthority(authority)`; setup
|
|
147
149
|
* passes the scope derived from the requested auth method, and only when that
|
|
148
150
|
* derivation is complete without a proof.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { VersionedJsonObject,
|
|
2
|
-
import type {
|
|
3
|
-
import { type
|
|
1
|
+
import type { VersionedJsonObject, VersionedJsonRecordReadResult } from '../../../framework/versionedJsonRecordStore';
|
|
2
|
+
import type { D1PreparedStatementLike } from '../../../../storage/tenantRoute';
|
|
3
|
+
import { type RouterAbEd25519YaoRegistrationExecutionAuthorityV1 } from '../registration/routerAbEd25519YaoRegistrationExecutionRecord';
|
|
4
4
|
import type { RouterAbEd25519YaoProductRegistrationStateV1 } from './routerAbEd25519YaoProductRegistration';
|
|
5
5
|
import { type RouterAbEd25519YaoProductRegistrationCeremonyStateV1, type RouterAbEd25519YaoProductRegistrationSharedStateV1 } from './routerAbEd25519YaoProductRegistrationPartitioning';
|
|
6
6
|
export declare const ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1 = "router-ab-ed25519-yao:shared";
|
|
7
7
|
declare const SHARED_RECORD_KIND = "router_ab_ed25519_yao_product_registration_shared_record_v1";
|
|
8
8
|
declare const CEREMONY_RECORD_KIND = "router_ab_ed25519_yao_product_registration_ceremony_record_v1";
|
|
9
|
-
declare const EXECUTION_RECORD_KIND = "router_ab_ed25519_yao_registration_execution_record_v1";
|
|
10
9
|
export type RouterAbEd25519YaoProductRegistrationPartitionRecordV1 = {
|
|
11
10
|
readonly kind: typeof SHARED_RECORD_KIND;
|
|
12
11
|
readonly value: RouterAbEd25519YaoProductRegistrationSharedStateV1;
|
|
@@ -14,10 +13,6 @@ export type RouterAbEd25519YaoProductRegistrationPartitionRecordV1 = {
|
|
|
14
13
|
readonly kind: typeof CEREMONY_RECORD_KIND;
|
|
15
14
|
readonly lifecycleId: string;
|
|
16
15
|
readonly value: RouterAbEd25519YaoProductRegistrationCeremonyStateV1;
|
|
17
|
-
} | {
|
|
18
|
-
readonly kind: typeof EXECUTION_RECORD_KIND;
|
|
19
|
-
readonly lifecycleId: string;
|
|
20
|
-
readonly value: RouterAbEd25519YaoRegistrationExecutionRecordV1;
|
|
21
16
|
};
|
|
22
17
|
export type RouterAbEd25519YaoProductRegistrationPartitionMutationV1 = {
|
|
23
18
|
readonly key: string;
|
|
@@ -34,12 +29,19 @@ export type RouterAbEd25519YaoProductRegistrationPartitionBatchResultV1 = {
|
|
|
34
29
|
readonly kind: 'version_mismatch';
|
|
35
30
|
readonly key: string;
|
|
36
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Writes another store prepared on the same signer database, which commit in
|
|
34
|
+
* the batch of a state commit or not at all.
|
|
35
|
+
*/
|
|
36
|
+
export type RouterAbEd25519YaoPreparedWriteV1 = {
|
|
37
|
+
readonly statements: readonly D1PreparedStatementLike[];
|
|
38
|
+
};
|
|
37
39
|
export type RouterAbEd25519YaoProductRegistrationPartitionRecordStoreV1 = {
|
|
38
40
|
readonly readMany: (keys: readonly string[]) => Promise<readonly {
|
|
39
41
|
readonly key: string;
|
|
40
42
|
readonly result: VersionedJsonRecordReadResult<VersionedJsonObject>;
|
|
41
43
|
}[]>;
|
|
42
|
-
readonly putMany: (mutations: readonly RouterAbEd25519YaoProductRegistrationPartitionMutationV1[]) => Promise<RouterAbEd25519YaoProductRegistrationPartitionBatchResultV1>;
|
|
44
|
+
readonly putMany: (mutations: readonly RouterAbEd25519YaoProductRegistrationPartitionMutationV1[], companion: RouterAbEd25519YaoPreparedWriteV1 | null) => Promise<RouterAbEd25519YaoProductRegistrationPartitionBatchResultV1>;
|
|
43
45
|
};
|
|
44
46
|
export type RouterAbEd25519YaoProductRegistrationPartitionedStateV1 = {
|
|
45
47
|
readonly state: RouterAbEd25519YaoProductRegistrationStateV1;
|
|
@@ -47,82 +49,31 @@ export type RouterAbEd25519YaoProductRegistrationPartitionedStateV1 = {
|
|
|
47
49
|
readonly sharedEncoding: RouterAbEd25519YaoSharedStateCanonicalEncodingV1;
|
|
48
50
|
readonly sharedVersion: string | null;
|
|
49
51
|
readonly ceremonyVersion: string | null;
|
|
50
|
-
readonly executionVersion: string | null;
|
|
51
52
|
};
|
|
52
53
|
};
|
|
53
54
|
export type RouterAbEd25519YaoSharedStateCanonicalEncodingV1 = VersionedJsonObject;
|
|
54
55
|
export type RouterAbEd25519YaoProductRegistrationPartitionedStateCommitInputV1 = {
|
|
55
56
|
readonly lifecycleId: string;
|
|
56
57
|
readonly state: RouterAbEd25519YaoProductRegistrationStateV1;
|
|
58
|
+
/** Another store's writes that commit with this state or not at all, or none. */
|
|
59
|
+
readonly companionWrite: RouterAbEd25519YaoPreparedWriteV1 | null;
|
|
57
60
|
readonly baseline: {
|
|
58
61
|
readonly sharedEncoding: RouterAbEd25519YaoSharedStateCanonicalEncodingV1;
|
|
59
62
|
readonly sharedVersion: string | null;
|
|
60
63
|
readonly ceremonyVersion: string | null;
|
|
61
|
-
readonly executionVersion: string | null;
|
|
62
64
|
};
|
|
63
65
|
};
|
|
64
66
|
export type RouterAbEd25519YaoProductRegistrationPartitionedStateCommitResultV1 = {
|
|
65
67
|
readonly kind: 'stored';
|
|
66
68
|
readonly sharedVersion: string | null;
|
|
67
69
|
readonly ceremonyVersion: string;
|
|
68
|
-
readonly executionVersion: string | null;
|
|
69
70
|
} | {
|
|
70
71
|
readonly kind: 'version_mismatch';
|
|
71
|
-
readonly key: 'shared' | 'ceremony'
|
|
72
|
-
};
|
|
73
|
-
type ExecuteRequest = Extract<RouterAbEd25519YaoRegistrationExecutionRecordV1, {
|
|
74
|
-
readonly kind: 'claimed';
|
|
75
|
-
}>['request'];
|
|
76
|
-
type ActivationResult = Extract<RouterAbEd25519YaoRegistrationExecutionRecordV1, {
|
|
77
|
-
readonly kind: 'completed';
|
|
78
|
-
}>['result'];
|
|
79
|
-
export type RouterAbEd25519YaoRegistrationExecutionClaimResultV1 = {
|
|
80
|
-
readonly kind: 'claimed';
|
|
81
|
-
readonly value: Extract<RouterAbEd25519YaoRegistrationExecutionRecordV1, {
|
|
82
|
-
readonly kind: 'claimed';
|
|
83
|
-
}>;
|
|
84
|
-
readonly version: string;
|
|
85
|
-
} | {
|
|
86
|
-
readonly kind: 'completed';
|
|
87
|
-
readonly value: ActivationResult;
|
|
88
|
-
} | {
|
|
89
|
-
readonly kind: 'failed';
|
|
90
|
-
readonly value: RouterAbEd25519YaoRegistrationFailure;
|
|
91
|
-
} | {
|
|
92
|
-
readonly kind: 'rejected';
|
|
93
|
-
readonly code: 'unknown_registration' | 'binding_mismatch' | 'credential_rejected' | 'credential_expired' | 'execution_in_progress';
|
|
94
|
-
readonly message: string;
|
|
95
|
-
};
|
|
96
|
-
export type RouterAbEd25519YaoRegistrationExecutionCommitResultV1 = {
|
|
97
|
-
readonly kind: 'stored';
|
|
98
|
-
readonly value: ActivationResult | RouterAbEd25519YaoRegistrationFailure;
|
|
99
|
-
} | {
|
|
100
|
-
readonly kind: 'uncertain';
|
|
72
|
+
readonly key: 'shared' | 'ceremony';
|
|
101
73
|
};
|
|
102
74
|
export interface RouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1 {
|
|
103
75
|
load(lifecycleId: string): Promise<RouterAbEd25519YaoProductRegistrationPartitionedStateV1>;
|
|
104
76
|
commit(input: RouterAbEd25519YaoProductRegistrationPartitionedStateCommitInputV1): Promise<RouterAbEd25519YaoProductRegistrationPartitionedStateCommitResultV1>;
|
|
105
|
-
claimRegistrationExecution(input: {
|
|
106
|
-
readonly lifecycleId: string;
|
|
107
|
-
readonly request: ExecuteRequest;
|
|
108
|
-
readonly requestDigestSha256Hex: string;
|
|
109
|
-
readonly credentialDigestSha256Hex: string;
|
|
110
|
-
readonly nowMs: number;
|
|
111
|
-
}): Promise<RouterAbEd25519YaoRegistrationExecutionClaimResultV1>;
|
|
112
|
-
commitRegistrationExecution(input: {
|
|
113
|
-
readonly claimed: Extract<RouterAbEd25519YaoRegistrationExecutionRecordV1, {
|
|
114
|
-
readonly kind: 'claimed';
|
|
115
|
-
}>;
|
|
116
|
-
readonly claimedVersion: string;
|
|
117
|
-
readonly outcome: {
|
|
118
|
-
readonly kind: 'completed';
|
|
119
|
-
readonly result: ActivationResult;
|
|
120
|
-
} | {
|
|
121
|
-
readonly kind: 'failed';
|
|
122
|
-
readonly failure: RouterAbEd25519YaoRegistrationFailure;
|
|
123
|
-
};
|
|
124
|
-
}): Promise<RouterAbEd25519YaoRegistrationExecutionCommitResultV1>;
|
|
125
|
-
consumeRegistrationExecution(input: RouterAbEd25519YaoActivationConsumptionRequestV1): Promise<RouterAbEd25519YaoActivationConsumptionResultV1>;
|
|
126
77
|
}
|
|
127
78
|
export declare function routerAbEd25519YaoPartitionedStateAfterStoredCommitV1(input: {
|
|
128
79
|
readonly lifecycleId: string;
|
|
@@ -131,26 +82,16 @@ export declare function routerAbEd25519YaoPartitionedStateAfterStoredCommitV1(in
|
|
|
131
82
|
readonly kind: 'stored';
|
|
132
83
|
}>;
|
|
133
84
|
}): RouterAbEd25519YaoProductRegistrationPartitionedStateV1;
|
|
134
|
-
export declare function createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1(store: RouterAbEd25519YaoProductRegistrationPartitionRecordStoreV1
|
|
85
|
+
export declare function createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1(store: RouterAbEd25519YaoProductRegistrationPartitionRecordStoreV1): RouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1;
|
|
86
|
+
/**
|
|
87
|
+
* The admitted authority a registration execute is checked against, from a
|
|
88
|
+
* loaded ceremony state, or `null` when the lifecycle is not admitted.
|
|
89
|
+
*/
|
|
90
|
+
export declare function routerAbEd25519YaoAdmittedRegistrationAuthorityV1(state: RouterAbEd25519YaoProductRegistrationStateV1, lifecycleId: string): RouterAbEd25519YaoRegistrationExecutionAuthorityV1 | null;
|
|
135
91
|
export declare function encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1(record: RouterAbEd25519YaoProductRegistrationPartitionRecordV1): VersionedJsonObject;
|
|
136
92
|
export declare function sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1(left: RouterAbEd25519YaoSharedStateCanonicalEncodingV1, right: RouterAbEd25519YaoSharedStateCanonicalEncodingV1): boolean;
|
|
137
93
|
export declare function parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1(input: unknown): RouterAbEd25519YaoProductRegistrationPartitionRecordV1 | null;
|
|
138
94
|
/** The host-neutral adapter carries only validated encoded JSON objects. */
|
|
139
95
|
export declare function parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1(input: unknown): VersionedJsonObject | null;
|
|
140
|
-
type AtomicPatch = (input: {
|
|
141
|
-
readonly key: string;
|
|
142
|
-
readonly expectedVersion: string;
|
|
143
|
-
readonly exactStringPredicates: readonly {
|
|
144
|
-
readonly jsonPath: string;
|
|
145
|
-
readonly value: string;
|
|
146
|
-
}[];
|
|
147
|
-
readonly unexpired: {
|
|
148
|
-
readonly jsonPath: string;
|
|
149
|
-
readonly nowMs: number;
|
|
150
|
-
};
|
|
151
|
-
readonly patch: VersionedJsonObject;
|
|
152
|
-
}) => Promise<VersionedJsonRecordPutResult & {
|
|
153
|
-
readonly value?: VersionedJsonObject;
|
|
154
|
-
}>;
|
|
155
96
|
export {};
|
|
156
97
|
//# sourceMappingURL=routerAbEd25519YaoProductRegistrationPartitionedStateStore.d.ts.map
|
|
@@ -6,6 +6,7 @@ import { type RouterAbEd25519YaoProductRegistrationStateV1 } from './routerAbEd2
|
|
|
6
6
|
type MapValue<T> = T extends Map<string, infer Value> ? Value : never;
|
|
7
7
|
type RegistrationLifecycleState = MapValue<InMemoryRouterAbEd25519YaoRegistrationStateV1['states']>;
|
|
8
8
|
type RegistrationAdmissionClaim = RouterAbEd25519YaoRegistrationAdmissionClaimV1;
|
|
9
|
+
type RegistrationDispatchRoot = MapValue<InMemoryRouterAbEd25519YaoRegistrationStateV1['dispatchRoots']>;
|
|
9
10
|
type RegistrationIntentAuthority = InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationStateV1['authorities'][number];
|
|
10
11
|
type RecoveryCapabilityState = MapValue<InMemoryRouterAbEd25519YaoRecoveryStateV1['capabilities']>;
|
|
11
12
|
type RecoveryLifecycleState = MapValue<InMemoryRouterAbEd25519YaoRecoveryStateV1['recoveries']>;
|
|
@@ -25,6 +26,7 @@ export type RouterAbEd25519YaoProductRegistrationCeremonyStateV1 = {
|
|
|
25
26
|
readonly states: ReadonlyMap<string, RegistrationLifecycleState>;
|
|
26
27
|
readonly lifecycleSessions: ReadonlyMap<string, string>;
|
|
27
28
|
readonly admissionClaims: ReadonlyMap<string, RegistrationAdmissionClaim>;
|
|
29
|
+
readonly dispatchRoots: ReadonlyMap<string, RegistrationDispatchRoot>;
|
|
28
30
|
};
|
|
29
31
|
readonly authorization: {
|
|
30
32
|
readonly authorities: readonly RegistrationIntentAuthority[];
|
|
@@ -16,7 +16,7 @@ export type RouterAbEd25519YaoProductRegistrationRequestScopedRunResultV1<T> = {
|
|
|
16
16
|
readonly ceremonyVersion: string;
|
|
17
17
|
} | {
|
|
18
18
|
readonly kind: 'version_mismatch';
|
|
19
|
-
readonly key: 'shared' | 'ceremony'
|
|
19
|
+
readonly key: 'shared' | 'ceremony';
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* Runs one request against a request-local product-state snapshot.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { WalletEd25519YaoActiveCapabilityRecord } from '../../../../core/WalletStore';
|
|
2
|
-
import { type RouterAbEd25519YaoRegistrationBackend } from '../registration/routerAbEd25519YaoRegistration';
|
|
3
2
|
import { type RouterAbEd25519YaoActiveCapabilityLookupV1 } from '../recovery/routerAbEd25519YaoRecovery';
|
|
4
3
|
import { type RouterAbEd25519YaoProductRegistrationRuntimeV1 } from './routerAbEd25519YaoProductRegistration';
|
|
5
|
-
import type
|
|
4
|
+
import { type RouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1 } from './routerAbEd25519YaoProductRegistrationPartitionedStateStore';
|
|
5
|
+
import { type RouterAbEd25519YaoPinnedRegistrationBackend } from '../registration/routerAbEd25519YaoHttpRegistrationBackend';
|
|
6
6
|
export type RouterAbEd25519YaoProductRegistrationRequestScopedRuntimeInputV1 = {
|
|
7
7
|
readonly signingWorkerId: string;
|
|
8
8
|
readonly store: RouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1;
|
|
9
|
-
|
|
9
|
+
/** The Router, which owns each registration's execution and its consumption. */
|
|
10
|
+
readonly registrationBackend: RouterAbEd25519YaoPinnedRegistrationBackend;
|
|
10
11
|
/** Loads one canonical signer record for an existing-wallet capability miss. */
|
|
11
12
|
readonly loadPersistedActiveCapability?: (input: RouterAbEd25519YaoActiveCapabilityLookupV1) => Promise<WalletEd25519YaoActiveCapabilityRecord | null>;
|
|
12
13
|
};
|
package/dist/types/wallet-server/src/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { RouterApiAuthorizedOperationService, RouterApiEmailOtpRouteService
|
|
|
6
6
|
import { type RouterApiModule } from '../../../framework/modules';
|
|
7
7
|
import type { RouterAbEd25519YaoActiveCapabilityResolverV1 } from '../recovery/routerAbEd25519YaoRecovery';
|
|
8
8
|
import type { RouterAbEd25519YaoExportExecuteAdmissionContextV1 } from '../routerAbEd25519YaoGatewayEnvelope';
|
|
9
|
+
import type { RouterAbEd25519YaoPreparedWriteV1 } from '../capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore';
|
|
9
10
|
export type RouterAbEd25519YaoExportFailure = {
|
|
10
11
|
readonly ok: false;
|
|
11
12
|
readonly status: 400 | 404 | 408 | 409 | 429 | 500 | 502 | 503;
|
|
@@ -31,27 +32,20 @@ export interface RouterAbEd25519YaoExportBackend {
|
|
|
31
32
|
executeExport(request: RouterAbEd25519YaoExportExecuteRequestV1, admissionRequest: RouterAbEd25519YaoExportExecuteAdmissionContextV1, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportBackendResult> | RouterAbEd25519YaoExportBackendResult;
|
|
32
33
|
}
|
|
33
34
|
export interface RouterAbEd25519YaoExportService {
|
|
34
|
-
admitExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportAdmissionReceiptV1>>;
|
|
35
|
+
admitExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, admission: RouterAbEd25519YaoExportOperationAdmissionV1, factorRelease: RouterAbEd25519YaoExportEmailOtpFactorReleaseV1 | null, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportAdmissionReceiptV1>>;
|
|
35
36
|
executeExport(request: RouterAbEd25519YaoExportExecuteRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportResultV1>>;
|
|
36
37
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
readonly kind: 'claimed';
|
|
45
|
-
readonly claim: RouterAbEd25519YaoExportAuthorizationClaimV1;
|
|
38
|
+
/**
|
|
39
|
+
* What authorizing one export did to the state: authorized it, a change the
|
|
40
|
+
* caller commits with the export's operation admission, or answered it from
|
|
41
|
+
* an authorization already there.
|
|
42
|
+
*/
|
|
43
|
+
export type RouterAbEd25519YaoExportAuthorizationDecisionV1 = {
|
|
44
|
+
readonly kind: 'authorized';
|
|
46
45
|
} | {
|
|
47
46
|
readonly kind: 'completed';
|
|
48
47
|
readonly value: RouterAbEd25519YaoExportAuthorizationResult;
|
|
49
48
|
};
|
|
50
|
-
export type RouterAbEd25519YaoExportAuthorizationCommitInputV1 = {
|
|
51
|
-
readonly request: RouterAbEd25519YaoExportAdmissionRequestV1;
|
|
52
|
-
readonly claim: RouterAbEd25519YaoExportAuthorizationClaimV1;
|
|
53
|
-
readonly outcome: RouterAbEd25519YaoExportAuthorizationResult;
|
|
54
|
-
};
|
|
55
49
|
export type RouterAbEd25519YaoExportAdmissionClaimV1 = {
|
|
56
50
|
readonly kind: 'router_ab_ed25519_yao_export_admission_claim_v1';
|
|
57
51
|
readonly lifecycleId: string;
|
|
@@ -116,14 +110,13 @@ export type RouterAbEd25519YaoExportAdmissionAuthorization = {
|
|
|
116
110
|
readonly otpCode: string;
|
|
117
111
|
readonly webauthnAuthentication?: never;
|
|
118
112
|
};
|
|
119
|
-
export type
|
|
120
|
-
readonly kind: 'admit';
|
|
113
|
+
export type RouterAbEd25519YaoExportAdmissionAuthorizationInputV1 = {
|
|
121
114
|
readonly request: Request;
|
|
122
115
|
readonly body: RouterAbEd25519YaoExportAdmissionRequestV1;
|
|
123
116
|
readonly authorization: RouterAbEd25519YaoExportAdmissionAuthorization;
|
|
124
117
|
readonly expectedOrigin: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
118
|
+
};
|
|
119
|
+
export type RouterAbEd25519YaoExportExecutionAuthorizationInputV1 = {
|
|
127
120
|
readonly request: Request;
|
|
128
121
|
readonly body: RouterAbEd25519YaoExportExecuteRequestV1;
|
|
129
122
|
};
|
|
@@ -142,16 +135,40 @@ export type RouterAbEd25519YaoExportAuthorizationResult = {
|
|
|
142
135
|
readonly code: string;
|
|
143
136
|
readonly message: string;
|
|
144
137
|
};
|
|
138
|
+
export type RouterAbEd25519YaoExportAuthorizationFailure = Extract<RouterAbEd25519YaoExportAuthorizationResult, {
|
|
139
|
+
readonly ok: false;
|
|
140
|
+
}>;
|
|
145
141
|
export type RouterAbEd25519YaoExportServerAuthorizationIdentityV1 = {
|
|
146
142
|
readonly thresholdSessionId: ThresholdEd25519SessionId;
|
|
147
143
|
};
|
|
148
|
-
|
|
144
|
+
/**
|
|
145
|
+
* The authorized operation a verified export proof admits, not yet admitted.
|
|
146
|
+
* It commits in the batch that authorizes the export, so the operation, the
|
|
147
|
+
* nonce claim and the export's `authorized` state are durable together.
|
|
148
|
+
*/
|
|
149
|
+
export interface RouterAbEd25519YaoExportOperationAdmissionV1 {
|
|
150
|
+
/** The admission's writes for that batch, or why it needs none. */
|
|
151
|
+
prepare(): Promise<RouterAbEd25519YaoExportPreparedOperationAdmissionV1>;
|
|
152
|
+
/** The rejection a failed batch stands for, when the admission refused it. */
|
|
153
|
+
classifyFailure(error: unknown): RouterAbEd25519YaoExportAuthorizationFailure | null;
|
|
154
|
+
/** The admission applied alone, for export state no batch can include. */
|
|
155
|
+
admit(): Promise<RouterAbEd25519YaoExportAuthorizationResult>;
|
|
156
|
+
}
|
|
157
|
+
export type RouterAbEd25519YaoExportPreparedOperationAdmissionV1 = {
|
|
158
|
+
readonly kind: 'prepared';
|
|
159
|
+
readonly write: RouterAbEd25519YaoPreparedWriteV1;
|
|
160
|
+
} | {
|
|
161
|
+
readonly kind: 'already_admitted';
|
|
162
|
+
} | {
|
|
163
|
+
readonly kind: 'rejected';
|
|
164
|
+
readonly failure: RouterAbEd25519YaoExportAuthorizationFailure;
|
|
165
|
+
};
|
|
166
|
+
export type RouterAbEd25519YaoExportAdmissionAuthorizationResultV1 = {
|
|
149
167
|
readonly ok: true;
|
|
150
168
|
readonly authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1;
|
|
169
|
+
readonly admission: RouterAbEd25519YaoExportOperationAdmissionV1;
|
|
151
170
|
readonly factorRelease?: RouterAbEd25519YaoExportEmailOtpFactorReleaseV1;
|
|
152
|
-
} |
|
|
153
|
-
readonly ok: false;
|
|
154
|
-
}>;
|
|
171
|
+
} | RouterAbEd25519YaoExportAuthorizationFailure;
|
|
155
172
|
export type RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult = {
|
|
156
173
|
readonly ok: true;
|
|
157
174
|
readonly authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1;
|
|
@@ -159,22 +176,20 @@ export type RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult = {
|
|
|
159
176
|
readonly ok: false;
|
|
160
177
|
}>;
|
|
161
178
|
export interface RouterAbEd25519YaoExportAuthorizationAdapter {
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
authorizeAdmission(input: RouterAbEd25519YaoExportAdmissionAuthorizationInputV1): Promise<RouterAbEd25519YaoExportAdmissionAuthorizationResultV1> | RouterAbEd25519YaoExportAdmissionAuthorizationResultV1;
|
|
180
|
+
authorizeExecution(input: RouterAbEd25519YaoExportExecutionAuthorizationInputV1): Promise<RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult> | RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult;
|
|
181
|
+
/** The identity an already-authorized export's admission resolves to now. */
|
|
182
|
+
resolveAuthorizationIdentity(body: RouterAbEd25519YaoExportAdmissionRequestV1): Promise<RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult> | RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult;
|
|
164
183
|
}
|
|
165
184
|
type ExportAuthorizationContext = {
|
|
166
185
|
readonly request: RouterAbEd25519YaoExportAdmissionRequestV1;
|
|
167
186
|
readonly authorizationFingerprint: string;
|
|
168
187
|
readonly authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
readonly kind: 'authorization_failed';
|
|
175
|
-
readonly failure: Extract<RouterAbEd25519YaoExportAuthorizationResult, {
|
|
176
|
-
readonly ok: false;
|
|
177
|
-
}>;
|
|
188
|
+
/**
|
|
189
|
+
* The Email OTP factor release the authorization answered with, if any. Its
|
|
190
|
+
* proof is spent once verified, so an exact replay answers with this.
|
|
191
|
+
*/
|
|
192
|
+
readonly factorRelease: RouterAbEd25519YaoExportEmailOtpFactorReleaseV1 | null;
|
|
178
193
|
};
|
|
179
194
|
type ExportAuthorizedState = ExportAuthorizationContext & {
|
|
180
195
|
readonly kind: 'authorized';
|
|
@@ -207,7 +222,7 @@ type ExportCompletedState = ExportAuthorizationContext & {
|
|
|
207
222
|
readonly executeFingerprint: string;
|
|
208
223
|
readonly result: RouterAbEd25519YaoExportResultV1;
|
|
209
224
|
};
|
|
210
|
-
type ExportLifecycleState =
|
|
225
|
+
type ExportLifecycleState = ExportAuthorizedState | ExportAdmittingState | ExportAdmissionFailedState | ExportAdmittedState | ExportExecutingState | ExportExecutionFailedState | ExportCompletedState;
|
|
211
226
|
export declare class InMemoryRouterAbEd25519YaoExportStateV1 {
|
|
212
227
|
readonly exports: Map<string, ExportLifecycleState>;
|
|
213
228
|
readonly authorizationNonces: Set<string>;
|
|
@@ -220,12 +235,16 @@ export declare class InMemoryRouterAbEd25519YaoExportService implements RouterAb
|
|
|
220
235
|
constructor(backend: RouterAbEd25519YaoExportBackend, capabilities: RouterAbEd25519YaoActiveCapabilityResolverV1, state?: InMemoryRouterAbEd25519YaoExportStateV1);
|
|
221
236
|
authorizationIsUncertain(request: RouterAbEd25519YaoExportAdmissionRequestV1): boolean;
|
|
222
237
|
recordAuthorizationUncertain(request: RouterAbEd25519YaoExportAdmissionRequestV1): void;
|
|
223
|
-
admitExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportAdmissionReceiptV1>>;
|
|
224
|
-
|
|
238
|
+
admitExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, admission: RouterAbEd25519YaoExportOperationAdmissionV1, factorRelease: RouterAbEd25519YaoExportEmailOtpFactorReleaseV1 | null, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportAdmissionReceiptV1>>;
|
|
239
|
+
/**
|
|
240
|
+
* Authorizes one export: its nonce claimed and its state `authorized`, in
|
|
241
|
+
* this state for the caller to commit with the export's operation
|
|
242
|
+
* admission. An export already here answers from its state instead, with
|
|
243
|
+
* the factor release it recorded.
|
|
244
|
+
*/
|
|
245
|
+
authorizeExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, authorizationFingerprint: string, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, factorRelease: RouterAbEd25519YaoExportEmailOtpFactorReleaseV1 | null): RouterAbEd25519YaoExportAuthorizationDecisionV1;
|
|
225
246
|
readAuthorizationIdentity(request: RouterAbEd25519YaoExportAdmissionRequestV1): RouterAbEd25519YaoExportServerAuthorizationIdentityV1 | null;
|
|
226
|
-
|
|
227
|
-
commitAuthorizeExport(input: RouterAbEd25519YaoExportAuthorizationCommitInputV1): RouterAbEd25519YaoExportAuthorizationResult;
|
|
228
|
-
prepareAdmitExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1): Promise<RouterAbEd25519YaoExportAdmissionPreparationV1>;
|
|
247
|
+
prepareAdmitExport(request: RouterAbEd25519YaoExportAdmissionRequestV1, _authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1): Promise<RouterAbEd25519YaoExportAdmissionPreparationV1>;
|
|
229
248
|
commitAdmitExport(input: RouterAbEd25519YaoExportAdmissionCommitInputV1): RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportAdmissionReceiptV1>;
|
|
230
249
|
executeExport(request: RouterAbEd25519YaoExportExecuteRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1, traceContext?: RouterAbTraceContextV1): Promise<RouterAbEd25519YaoExportServiceResult<RouterAbEd25519YaoExportResultV1>>;
|
|
231
250
|
prepareExecuteExport(request: RouterAbEd25519YaoExportExecuteRequestV1, authorizationIdentity: RouterAbEd25519YaoExportServerAuthorizationIdentityV1): RouterAbEd25519YaoExportExecutePreparationV1;
|
|
@@ -243,8 +262,9 @@ export declare class RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter impl
|
|
|
243
262
|
private readonly authorizedOperations;
|
|
244
263
|
private readonly resolveEd25519MaterialActivation;
|
|
245
264
|
constructor(webAuthn: Pick<RouterApiWebAuthnService, 'verifyWebAuthnAuthenticationLite'>, emailOtp: Pick<RouterApiEmailOtpRouteService, 'verifyEmailOtpChallenge'>, walletAuthMethods: Pick<RouterApiWalletAuthMethodService, 'resolveActivePasskeyAuthorityForVerifiedCredential' | 'resolveActiveEmailOtpAuthorityForVerifiedMethod'>, authorizedOperations: RouterApiAuthorizedOperationService, resolveEd25519MaterialActivation: RouterApiWalletRegistrationService['resolveEd25519MaterialActivation']);
|
|
246
|
-
|
|
247
|
-
|
|
265
|
+
authorizeAdmission(input: RouterAbEd25519YaoExportAdmissionAuthorizationInputV1): Promise<RouterAbEd25519YaoExportAdmissionAuthorizationResultV1>;
|
|
266
|
+
authorizeExecution(input: RouterAbEd25519YaoExportExecutionAuthorizationInputV1): RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult;
|
|
267
|
+
resolveAuthorizationIdentity(body: RouterAbEd25519YaoExportAdmissionRequestV1): Promise<RouterAbEd25519YaoExportAuthorizationIdentityResolutionResult>;
|
|
248
268
|
}
|
|
249
269
|
export type RouterAbEd25519YaoExportAdmissionEnvelopeParseResultV1 = {
|
|
250
270
|
readonly ok: true;
|