@seams/wallet-server 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +1 -9
- package/artifact-manifest.json +78 -33
- package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -1
- 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 -1
- 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 -1
- 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 -1
- 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 -1
- 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/scripts/prepare-local-runtime-config.mjs +0 -2
- package/cloudflare-router-ab/scripts/start-local-role-workers.mjs +77 -20
- package/dist/esm/authorization/lifecycleRouting.js +62 -0
- package/dist/esm/authorization/service.js +35 -12
- package/dist/esm/cloud-host.js +20 -22
- package/dist/esm/core/EmailOtpRecords.js +1 -217
- package/dist/esm/core/EmailOtpStores.js +0 -859
- package/dist/esm/core/IdentityStore.js +2 -339
- package/dist/esm/core/ThresholdService/config.js +1 -9
- package/dist/esm/core/ThresholdService/index.js +0 -4
- package/dist/esm/core/ThresholdService/kv.js +1 -66
- package/dist/esm/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.js +1 -13
- package/dist/esm/core/ThresholdService/routerAbNormalSigningPolicy.js +1 -11
- package/dist/esm/core/ThresholdService/stores/WalletSessionStore.js +0 -541
- package/dist/esm/core/ThresholdService/validation.js +2 -346
- package/dist/esm/core/WalletAuthMethodStore.js +2 -123
- package/dist/esm/core/WalletStore.js +3 -209
- package/dist/esm/core/WebAuthnAuthenticatorStore.js +0 -202
- package/dist/esm/core/WebAuthnCredentialBindingStore.js +2 -182
- package/dist/esm/core/WebAuthnLoginChallengeStore.js +0 -52
- package/dist/esm/core/WebAuthnSyncChallengeStore.js +0 -54
- package/dist/esm/core/authService/emailOtpConfig.js +1 -195
- package/dist/esm/core/authService/emailOtpEnrollment.js +0 -110
- package/dist/esm/core/authService/emailOtpSeal.js +0 -63
- package/dist/esm/core/authService/nearTransactions.js +3 -98
- package/dist/esm/core/authService/rateLimits.js +0 -84
- package/dist/esm/core/authService/webauthn.js +2 -298
- package/dist/esm/core/authService/webauthnOidcHelpers.js +1 -24
- package/dist/esm/core/authService/webauthnWalletBinding.js +0 -37
- package/dist/esm/core/config.js +1 -95
- package/dist/esm/core/d1EcdsaSignerRead.js +1 -1
- package/dist/esm/core/d1IdentityStore.js +1 -2
- package/dist/esm/core/d1TenantStore.js +1 -24
- package/dist/esm/core/d1WalletAuthMethodStore.js +2 -5
- package/dist/esm/core/d1WalletStore.js +2 -2
- package/dist/esm/core/deviceLinking/linkedDeviceBootstrap.js +13 -0
- package/dist/esm/core/deviceLinking/linkedDeviceSession.js +20 -14
- package/dist/esm/core/deviceLinking/requestProof.js +9 -6
- package/dist/esm/core/emailOtpD1Statements.js +107 -94
- package/dist/esm/core/keyMaterialBrands.js +2 -12
- package/dist/esm/core/nearKeys.js +0 -1
- package/dist/esm/core/nearRelayerAccountProvisioning.js +6 -9
- package/dist/esm/core/passkeyCredentialClaims.js +8 -0
- package/dist/esm/core/routerAbSigning/RouterAbEcdsaPresignRuntime.js +2 -6
- package/dist/esm/core/routerAbSigning/RouterAbNormalSigningRuntime.js +2 -30
- package/dist/esm/core/thresholdEcdsaChainTarget.js +1 -4
- package/dist/esm/hosted-wallet-gateway.js +66 -43
- package/dist/esm/index.js +6 -19
- package/dist/esm/localHostedWalletGatewayHandler.js +12 -0
- package/dist/esm/localRegistrationSetupAuthority.js +89 -0
- package/dist/esm/router/auth/authRequestValidation.js +8 -16
- package/dist/esm/router/auth/webAuthnCredentialCodecs.js +0 -1
- package/dist/esm/router/cloudflare/d1/auth/d1AuthorizationAssembly.js +87 -0
- package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthConfig.js +12 -2
- package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +32 -281
- package/dist/esm/router/cloudflare/d1/authorization/authorizedOperationStatements.js +24 -22
- package/dist/esm/router/cloudflare/d1/authorization/d1AuthorizationStore.js +8 -6
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js +12 -13
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEd25519ExportRootStore.js +6 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpGrantStore.js +12 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpTargetFactor.js +4 -4
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.js +1 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRequestProofNonceStore.js +3 -9
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRouteService.js +2 -1
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionStore.js +89 -7
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.js +23 -14
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js +9 -6
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeIssuer.js +0 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeService.js +0 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeVerifier.js +0 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpEnrollmentStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpGrantStore.js +1 -7
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRateLimitStore.js +19 -13
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.js +0 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.js +0 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRegistrationEnrollmentFinalizer.js +2 -2
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpServerSealRuntime.js +0 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js +44 -12
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationRecords.js +1 -49
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +19 -31
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleRegistrationCompletion.js +85 -0
- package/dist/esm/router/cloudflare/d1/identity/d1IdentityRecords.js +0 -1
- package/dist/esm/router/cloudflare/d1/identity/d1IdentityService.js +0 -48
- package/dist/esm/router/cloudflare/d1/near/d1SponsoredNearAccount.js +242 -0
- package/dist/esm/router/cloudflare/d1/oidc/d1OidcBoundary.js +0 -1
- package/dist/esm/router/cloudflare/d1/oidc/d1OidcVerificationService.js +2 -29
- package/dist/esm/router/cloudflare/d1/oidc/googleOidcToken.js +41 -0
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyRouteService.js +5 -0
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +34 -0
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.js +9 -3
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +7 -13
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.js +25 -13
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationIntentService.js +0 -1
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationSetupSupport.js +74 -0
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +7 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +69 -238
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetup.js +12 -56
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.js +155 -0
- package/dist/esm/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.js +1 -3
- package/dist/esm/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.js +12 -6
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerFinalizeRecord.js +68 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerService.js +7 -54
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +9 -8
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorityStore.js +2 -142
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.js +25 -4
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnRecords.js +4 -70
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnStore.js +23 -7
- package/dist/esm/router/cloudflare/runtime/staticWalletConsoleBinding.js +1 -0
- package/dist/esm/router/cloudflare/runtime/walletConsoleOps.js +1 -0
- package/dist/esm/router/cloudflare/runtime/walletConsoleOpsClient.js +5 -0
- package/dist/esm/router/cloudflare/runtime/walletGateway.js +1 -1
- package/dist/esm/router/cloudflare/runtime/walletRuntimeOps.js +16 -4
- package/dist/esm/router/cloudflare-adaptor.js +1 -2
- package/dist/esm/router/cloudflare.js +1342 -1733
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js +11 -8
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js +3 -2
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.js +6 -6
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +6 -6
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExportRequestScopedCloudflare.js +3 -0
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryRequestScopedCloudflare.js +8 -0
- package/dist/esm/router/domains/emailOtp/emailOtpRequestValidation.js +0 -1
- package/dist/esm/router/domains/passkeyCustody/passkeyCustodyEnvelopeRetrieval.js +2 -8
- package/dist/esm/router/domains/passkeyCustody/walletCustodyRegistrationCommit.js +2 -8
- package/dist/esm/router/domains/signingOperations/routerAbPrivateSigningWorker.js +5 -19
- package/dist/esm/router/domains/signingOperations/walletExecutionAdmission.js +2 -3
- package/dist/esm/router/domains/walletRegistration/walletRegistrationReservation.js +70 -0
- package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +10 -11
- package/dist/esm/router/domains/walletRegistration/walletRegistrationSetupPayload.js +2 -3
- package/dist/esm/router/domains/walletUnlock/walletUnlockRouteHandlers.js +14 -0
- package/dist/esm/router/express.js +574 -479
- package/dist/esm/router/framework/http.js +2 -0
- package/dist/esm/router/framework/registrationSetupDispatch.js +14 -0
- package/dist/esm/router/framework/ror/normalize.js +0 -1
- package/dist/esm/router/framework/ror/options.js +0 -1
- package/dist/esm/router/framework/ror/provider.js +0 -1
- package/dist/esm/router/framework/ror/staticProvider.js +0 -1
- package/dist/esm/router/framework/routeDefinitions.js +1 -2
- package/dist/esm/router/framework/routerApiWebhooks.js +0 -1
- package/dist/esm/router/ror.js +0 -1
- package/dist/esm/router/transport/fetch/createFetchRouter.js +0 -2
- package/dist/esm/router/transport/fetch/routes/auth.js +2 -0
- package/dist/esm/router/transport/fetch/routes/deviceLinking.js +36 -147
- package/dist/esm/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.js +3 -2
- package/dist/esm/router/transport/fetch/routes/deviceLinkingResponses.js +130 -0
- package/dist/esm/router/transport/fetch/routes/ecdsaOperationStepUpFactor.js +171 -0
- package/dist/esm/router/transport/fetch/routes/passkeyCustody.js +1 -0
- package/dist/esm/router/transport/fetch/routes/syncAccount.js +7 -2
- package/dist/esm/router/transport/fetch/routes/thresholdEcdsa.js +19 -115
- package/dist/esm/router/transport/fetch/routes/walletRegistration.js +3 -1
- package/dist/esm/shared-ts/src/authorization/walletSessionIssuance.js +0 -1
- package/dist/esm/shared-ts/src/device-linking/authorityActivation.js +0 -2
- package/dist/esm/shared-ts/src/device-linking/contracts.js +16 -1
- package/dist/esm/shared-ts/src/device-linking/digests.js +1 -8
- package/dist/esm/shared-ts/src/near/actions.js +0 -1
- package/dist/esm/shared-ts/src/near/nearClient.js +0 -2
- package/dist/esm/shared-ts/src/signing-lanes/evmFamilySigningKeySlotId.js +1 -1
- package/dist/esm/shared-ts/src/signing-lanes/index.js +1 -6
- package/dist/esm/shared-ts/src/signing-lanes/ownerContinuity.js +1 -1
- package/dist/esm/shared-ts/src/signing-lanes/participantDigest.js +2 -81
- package/dist/esm/shared-ts/src/signing-lanes/participants.js +1 -219
- package/dist/esm/shared-ts/src/signing-lanes/recordParsers.js +0 -3
- package/dist/esm/shared-ts/src/tenant-root/tenantRootOperationRecord.js +1 -2
- package/dist/esm/shared-ts/src/threshold/ecdsaDerivationRoleLocalBootstrap.js +0 -1
- package/dist/esm/shared-ts/src/threshold/keyMaterialBrands.js +1 -22
- package/dist/esm/shared-ts/src/threshold/participants.js +0 -1
- package/dist/esm/shared-ts/src/threshold/signingRootScope.js +0 -1
- package/dist/esm/shared-ts/src/utils/addWalletAuthMethod.js +4 -13
- package/dist/esm/shared-ts/src/utils/canonicalPrimitives.js +1 -7
- package/dist/esm/shared-ts/src/utils/domainIds.js +1 -16
- package/dist/esm/shared-ts/src/utils/ecdsaCapabilityActivation.js +1 -11
- package/dist/esm/shared-ts/src/utils/ecdsaKeyFactsInventory.js +0 -1
- package/dist/esm/shared-ts/src/utils/errors.js +1 -19
- package/dist/esm/shared-ts/src/utils/near.js +1 -1
- package/dist/esm/shared-ts/src/utils/registrationEstablishedSession.js +1 -1
- package/dist/esm/shared-ts/src/utils/registrationIds.js +1 -5
- package/dist/esm/shared-ts/src/utils/registrationIntent.js +0 -1
- package/dist/esm/shared-ts/src/utils/registrationSetupOperation.js +8 -0
- package/dist/esm/shared-ts/src/utils/registrationSignerPlan.js +1 -1
- package/dist/esm/shared-ts/src/utils/routerAbEcdsaDerivation.js +0 -1
- package/dist/esm/shared-ts/src/utils/validation.js +1 -5
- package/dist/esm/shared-ts/src/utils/walletAuthAuthority.js +0 -1
- package/dist/esm/shared-ts/src/utils/walletManagementProtocol.js +6 -0
- package/dist/esm/shared-ts/src/utils/wireSchema.js +2 -13
- package/dist/esm/shared-ts/src/wallet-recovery/backupAcknowledgement.js +6 -24
- package/dist/esm/shared-ts/src/wallet-recovery/recoveryCodeLocator.js +0 -1
- package/dist/esm/shared-ts/src/wallet-recovery/recoveryKeyId.js +5 -6
- package/dist/esm/storage/d1Sql.js +1 -7
- package/dist/esm/threshold/session/signingSessionSeal/crypto/cipher.js +0 -1
- package/dist/esm/threshold/session/signingSessionSeal/guards/backends.js +1 -2
- package/dist/esm/threshold/session/signingSessionSeal/idempotencyBackends.js +0 -1
- package/dist/esm/threshold/session/signingSessionSeal/idempotencyRecords.js +0 -1
- package/dist/esm/threshold/session/signingSessionSeal/options.js +0 -1
- package/dist/esm/wasm/evm_crypto/pkg/evm_crypto_bg.wasm +0 -0
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker.js +0 -611
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
- package/dist/esm/wasm/shamir3pass_runtime/pkg/shamir3pass_runtime_bg.wasm +0 -0
- package/dist/types/shared-ts/src/authorization/capabilityKinds.d.ts +0 -4
- package/dist/types/shared-ts/src/device-linking/contracts.d.ts +1 -0
- package/dist/types/shared-ts/src/signing-lanes/evmFamilySigningKeySlotId.d.ts +0 -2
- package/dist/types/shared-ts/src/signing-lanes/execution.d.ts +0 -11
- package/dist/types/shared-ts/src/signing-lanes/ids.d.ts +2 -7
- package/dist/types/shared-ts/src/signing-lanes/index.d.ts +0 -4
- package/dist/types/shared-ts/src/signing-lanes/ownerContinuity.d.ts +0 -1
- package/dist/types/shared-ts/src/signing-lanes/participantDigest.d.ts +0 -18
- package/dist/types/shared-ts/src/signing-lanes/participants.d.ts +6 -35
- package/dist/types/shared-ts/src/signing-lanes/rotation.d.ts +6 -843
- package/dist/types/shared-ts/src/threshold/keyMaterialBrands.d.ts +0 -10
- package/dist/types/shared-ts/src/threshold/participants.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/addWalletAuthMethod.d.ts +1 -133
- package/dist/types/shared-ts/src/utils/addWalletAuthMethod.typecheck.d.ts +4 -18
- package/dist/types/shared-ts/src/utils/domainIds.d.ts +0 -12
- package/dist/types/shared-ts/src/utils/errors.d.ts +0 -4
- package/dist/types/shared-ts/src/utils/near.d.ts +0 -20
- package/dist/types/shared-ts/src/utils/normalize.d.ts +0 -2
- package/dist/types/shared-ts/src/utils/registrationSetupOperation.d.ts +3 -0
- package/dist/types/shared-ts/src/utils/validation.d.ts +1 -3
- package/dist/types/shared-ts/src/utils/walletCapabilityBindings.d.ts +0 -1
- package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +3 -0
- package/dist/types/shared-ts/src/utils/wireSchema.d.ts +0 -2
- package/dist/types/shared-ts/src/wallet-recovery/backupAcknowledgement.d.ts +0 -1
- package/dist/types/shared-ts/src/wallet-recovery/recoveryCodeReservation.d.ts +1 -10
- package/dist/types/shared-ts/src/wallet-recovery/recoveryCodes.d.ts +1 -3
- package/dist/types/shared-ts/src/wallet-recovery/recoveryKeyId.d.ts +5 -21
- package/dist/types/wallet-server/src/authorization/lifecycleRouting.d.ts +32 -0
- package/dist/types/wallet-server/src/authorization/lifecycleRouting.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/authorization/recoveryRouting.d.ts +22 -0
- package/dist/types/wallet-server/src/authorization/recoveryRouting.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/authorization/service.d.ts +8 -1
- package/dist/types/wallet-server/src/authorization/sessionRouting.d.ts +20 -0
- package/dist/types/wallet-server/src/authorization/sessionRouting.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/cloud-host.d.ts +31 -9
- package/dist/types/wallet-server/src/core/EmailOtpRecords.d.ts +1 -22
- package/dist/types/wallet-server/src/core/EmailOtpStores.d.ts +1 -79
- package/dist/types/wallet-server/src/core/IdentityStore.d.ts +0 -10
- package/dist/types/wallet-server/src/core/RegistrationCeremonyStore.d.ts +0 -1
- package/dist/types/wallet-server/src/core/ThresholdService/config.d.ts +0 -2
- package/dist/types/wallet-server/src/core/ThresholdService/index.d.ts +1 -3
- package/dist/types/wallet-server/src/core/ThresholdService/kv.d.ts +0 -7
- package/dist/types/wallet-server/src/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.d.ts +0 -3
- package/dist/types/wallet-server/src/core/ThresholdService/routerAbNormalSigningPolicy.d.ts +0 -1
- package/dist/types/wallet-server/src/core/ThresholdService/stores/WalletSessionStore.d.ts +7 -19
- package/dist/types/wallet-server/src/core/ThresholdService/validation.d.ts +0 -34
- package/dist/types/wallet-server/src/core/WalletAuthMethodStore.d.ts +1 -5
- package/dist/types/wallet-server/src/core/WalletStore.d.ts +0 -3
- package/dist/types/wallet-server/src/core/WebAuthnAuthenticatorStore.d.ts +0 -20
- package/dist/types/wallet-server/src/core/WebAuthnCredentialBindingStore.d.ts +1 -27
- package/dist/types/wallet-server/src/core/WebAuthnLoginChallengeStore.d.ts +2 -16
- package/dist/types/wallet-server/src/core/WebAuthnSyncChallengeStore.d.ts +22 -14
- package/dist/types/wallet-server/src/core/authService/emailOtpConfig.d.ts +0 -24
- package/dist/types/wallet-server/src/core/authService/emailOtpEnrollment.d.ts +1 -70
- package/dist/types/wallet-server/src/core/authService/emailOtpSeal.d.ts +0 -13
- package/dist/types/wallet-server/src/core/authService/githubOAuth.d.ts +2 -1
- package/dist/types/wallet-server/src/core/authService/nearTransactions.d.ts +1 -39
- package/dist/types/wallet-server/src/core/authService/rateLimits.d.ts +0 -17
- package/dist/types/wallet-server/src/core/authService/webauthn.d.ts +0 -125
- package/dist/types/wallet-server/src/core/authService/webauthnOidcHelpers.d.ts +0 -3
- package/dist/types/wallet-server/src/core/authService/webauthnVerificationOutcomes.d.ts +1 -1
- package/dist/types/wallet-server/src/core/authService/webauthnWalletBinding.d.ts +0 -12
- package/dist/types/wallet-server/src/core/config.d.ts +0 -10
- package/dist/types/wallet-server/src/core/d1IdentityStore.d.ts +0 -2
- package/dist/types/wallet-server/src/core/d1TenantStore.d.ts +0 -7
- package/dist/types/wallet-server/src/core/d1WalletAuthMethodStore.d.ts +0 -1
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceBootstrap.d.ts +19 -0
- package/dist/types/wallet-server/src/core/deviceLinking/linkedDeviceSession.d.ts +8 -6
- package/dist/types/wallet-server/src/core/deviceLinking/requestProof.d.ts +2 -5
- package/dist/types/wallet-server/src/core/emailOtpD1Statements.d.ts +10 -7
- package/dist/types/wallet-server/src/core/keyMaterialBrands.d.ts +1 -5
- package/dist/types/wallet-server/src/core/nearRelayerAccountProvisioning.d.ts +0 -1
- package/dist/types/wallet-server/src/core/passkeyCredentialClaims.d.ts +9 -0
- package/dist/types/wallet-server/src/core/routerAbSigning/RouterAbEcdsaPresignRuntime.d.ts +0 -2
- package/dist/types/wallet-server/src/core/routerAbSigning/RouterAbNormalSigningRuntime.d.ts +0 -2
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.d.ts +1 -92
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.typecheck.d.ts +4 -52
- package/dist/types/wallet-server/src/core/thresholdEcdsaChainTarget.d.ts +0 -1
- package/dist/types/wallet-server/src/core/types.d.ts +0 -299
- package/dist/types/wallet-server/src/hosted-wallet-gateway.d.ts +15 -3
- package/dist/types/wallet-server/src/index.d.ts +8 -13
- package/dist/types/wallet-server/src/localRegistrationSetupAuthority.d.ts +13 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1AuthorizationAssembly.d.ts +23 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RouterApiAuthConfig.d.ts +25 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/authorization/d1AuthorizationStore.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.d.ts +3 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpGrantStore.d.ts +7 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRequestProofNonceStore.d.ts +1 -10
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRouteService.d.ts +4 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionStore.d.ts +6 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetPlanner.d.ts +1 -13
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeService.d.ts +2 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpGrantStore.d.ts +0 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRateLimitStore.d.ts +18 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.d.ts +29 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationRecords.d.ts +3 -16
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.d.ts +7 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1GoogleRegistrationCompletion.d.ts +23 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/identity/d1IdentityService.d.ts +0 -12
- package/dist/types/wallet-server/src/router/cloudflare/d1/near/d1SponsoredNearAccount.d.ts +24 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/near/d1SponsoredNearAccount.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/oidc/d1OidcVerificationService.d.ts +0 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/oidc/googleOidcToken.d.ts +4 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyRouteService.d.ts +5 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.d.ts +9 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.d.ts +10 -11
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.d.ts +3 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationSetupSupport.d.ts +51 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.d.ts +3 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationService.d.ts +30 -47
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationSetup.d.ts +3 -30
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.d.ts +11 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAddSignerFinalizeRecord.d.ts +27 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAddSignerService.d.ts +1 -10
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodService.d.ts +2 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorityStore.d.ts +0 -4
- package/dist/types/wallet-server/src/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.d.ts +3 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/webauthn/d1WebAuthnRecords.d.ts +0 -13
- package/dist/types/wallet-server/src/router/cloudflare/d1/webauthn/d1WebAuthnStore.d.ts +23 -10
- package/dist/types/wallet-server/src/router/cloudflare/d1/webauthn/d1WebAuthnStore.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/router/cloudflare/runtime/cloudflare.types.d.ts +0 -2
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletConsoleOps.d.ts +1 -0
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletConsoleOpsClient.d.ts +2 -0
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletGateway.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRuntimeOps.d.ts +3 -0
- package/dist/types/wallet-server/src/router/cloudflare-adaptor.d.ts +0 -1
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.d.ts +1 -1
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/export/routerAbEd25519YaoExportRequestScopedCloudflare.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryRequestScopedCloudflare.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/passkeyCustodyEnvelopeRetrieval.d.ts +0 -2
- package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationCommit.d.ts +0 -3
- package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbPrivateSigningWorker.d.ts +0 -17
- package/dist/types/wallet-server/src/router/domains/signingOperations/walletExecutionAdmission.d.ts +1 -2
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationInputs.d.ts +1 -0
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationReservation.d.ts +51 -0
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationRoutes.d.ts +2 -10
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationSetupPayload.d.ts +2 -2
- package/dist/types/wallet-server/src/router/framework/authServicePort.d.ts +14 -34
- package/dist/types/wallet-server/src/router/framework/googleLoginResolution.typecheck.d.ts +2 -0
- package/dist/types/wallet-server/src/router/framework/registrationSetupDispatch.d.ts +13 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/deviceLinking.d.ts +1 -1
- package/dist/types/wallet-server/src/router/transport/fetch/routes/deviceLinkingResponses.d.ts +17 -0
- package/dist/types/wallet-server/src/router/transport/fetch/routes/ecdsaOperationStepUpFactor.d.ts +37 -0
- package/dist/types/wallet-server/src/storage/d1Sql.d.ts +0 -1
- package/migrations/d1-signer/0040_namespace_home_challenges.sql +16 -0
- package/migrations/d1-signer/0041_step_up_admission_expiry.sql +28 -0
- package/migrations/d1-signer/0042_deployment_resource_challenges.sql +4 -0
- package/migrations/d1-signer/0043_google_registration_candidate_claim.sql +2 -0
- package/migrations/d1-signer/0044_linked_device_bootstrap_imports.sql +6 -0
- package/migrations/d1-signer/0045_wallet_owned_capability_receipts.sql +29 -0
- package/migrations/d1-signer/0046_wallet_owned_signing_abuse.sql +41 -0
- package/migrations/d1-signer/0047_remove_unused_near_public_keys.sql +2 -0
- package/migrations/d1-signer/0048_operation_owner_scope.sql +45 -0
- package/package.json +2 -3
- package/src/README.md +11 -3
- package/dist/esm/core/AuthService.js +0 -2
- package/dist/esm/core/NearPublicKeyStore.js +0 -200
- package/dist/esm/core/ThresholdService/stores/CloudflareDurableObjectStore.js +0 -397
- package/dist/esm/core/ThresholdService/stores/KeyStore.js +0 -140
- package/dist/esm/core/ThresholdService/stores/SessionStore.js +0 -361
- package/dist/esm/core/ThresholdService/stores/StoreConfig.js +0 -13
- package/dist/esm/core/ThresholdService/stores/exportReplayGuard.js +0 -7
- package/dist/esm/core/authService/AuthService.js +0 -594
- package/dist/esm/core/authService/bytes.js +0 -19
- package/dist/esm/core/authService/configValues.js +0 -15
- package/dist/esm/core/authService/emailOtpChallengeOperations.js +0 -123
- package/dist/esm/core/authService/emailOtpChallengeProof.js +0 -183
- package/dist/esm/core/authService/emailOtpChallengeVerification.js +0 -264
- package/dist/esm/core/authService/emailOtpChallenges.js +0 -225
- package/dist/esm/core/authService/emailOtpDelivery.js +0 -134
- package/dist/esm/core/authService/emailOtpGrant.js +0 -43
- package/dist/esm/core/authService/emailOtpRegistrationEnrollment.js +0 -144
- package/dist/esm/core/authService/emailOtpUnlock.js +0 -174
- package/dist/esm/core/authService/googleEmailOtpOperations.js +0 -141
- package/dist/esm/core/authService/googleEmailOtpRegistration.js +0 -587
- package/dist/esm/core/authService/identity.js +0 -42
- package/dist/esm/core/authService/identityOperations.js +0 -32
- package/dist/esm/core/authService/nearAccountOperations.js +0 -229
- package/dist/esm/core/authService/nearPublicKeyMetadata.js +0 -108
- package/dist/esm/core/authService/oidcVerification.js +0 -249
- package/dist/esm/core/authService/registrationThresholdHelpers.js +0 -30
- package/dist/esm/core/authService/runtime.js +0 -45
- package/dist/esm/core/authService/storeRegistry.js +0 -102
- package/dist/esm/core/authService/thresholdStoreSummary.js +0 -32
- package/dist/esm/core/authService/webauthnAuthority.js +0 -17
- package/dist/esm/core/defaultConfigsServer.js +0 -9
- package/dist/esm/core/hostedAccountIds.js +0 -225
- package/dist/esm/core/routerAbSigning/createRouterAbSigningRuntimes.js +0 -84
- package/dist/esm/core/signingLanes/LaneAggregateRevocationApplicationService.js +0 -86
- package/dist/esm/core/signingLanes/LaneEnrollmentActivation.js +0 -324
- package/dist/esm/core/signingLanes/LaneEnrollmentRevocation.js +0 -173
- package/dist/esm/core/signingLanes/LaneLifecycleApplicationService.js +0 -198
- package/dist/esm/core/signingLanes/ecdsaServerRetirement.js +0 -73
- package/dist/esm/core/signingLanes/ed25519ServerRetirement.js +0 -68
- package/dist/esm/core/signingLanes/signingWorkerLaneMaterialIdentity.js +0 -0
- package/dist/esm/core/storeBackends.js +0 -208
- package/dist/esm/core/utils.js +0 -14
- package/dist/esm/core/webAuthnStoreBackends.js +0 -198
- package/dist/esm/router/cloudflare/d1/near/d1NearPublicKeyStore.js +0 -49
- package/dist/esm/router/cloudflare/d1/signingLanes/d1EcdsaLanePrivateBindingResolver.js +0 -10
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneAggregateRevocationApplicationService.js +0 -22
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneEffectJournalStore.js +0 -166
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneEnrollmentGateway.js +0 -38
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneLifecycleApplicationService.js +0 -20
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneLifecycleStore.js +0 -1459
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneLockStore.js +0 -114
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneProtocolCommitter.js +0 -16
- package/dist/esm/router/cloudflare/d1/signingLanes/d1LaneRecords.js +0 -171
- package/dist/esm/router/cloudflare/d1/signingLanes/index.js +0 -10
- package/dist/esm/router/cloudflare/durableObjects/thresholdStore.js +0 -397
- package/dist/esm/router/cloudflare/signingLanes/cloudflareLaneCurveExecution.js +0 -597
- package/dist/esm/router/cloudflare/signingLanes/cloudflareLaneProtocolCommitter.js +0 -273
- package/dist/esm/router/cloudflare/signingLanes/index.js +0 -4
- package/dist/esm/router/cloudflare/signingLanes/linkedDeviceEd25519CeremonyBinding.js +0 -32
- package/dist/esm/router/transport/fetch/routes/nearPublicKeys.js +0 -27
- package/dist/esm/shared-ts/src/signing-lanes/rotation.js +0 -8
- package/dist/esm/shared-ts/src/signing-lanes/rotationDigests.js +0 -358
- package/dist/esm/shared-ts/src/signing-lanes/rotationLifecycle.js +0 -313
- package/dist/esm/shared-ts/src/signing-lanes/rotationParsers.js +0 -532
- package/dist/esm/shared-ts/src/signing-lanes/rotationProtocolParsers.js +0 -323
- package/dist/esm/shared-ts/src/signing-lanes/rotationWireFields.js +0 -59
- package/dist/types/shared-ts/src/signing-lanes/participantDigest.typecheck.d.ts +0 -2
- package/dist/types/shared-ts/src/signing-lanes/rotation.typecheck.d.ts +0 -2
- package/dist/types/shared-ts/src/signing-lanes/rotationDigests.d.ts +0 -13
- package/dist/types/shared-ts/src/signing-lanes/rotationLifecycle.d.ts +0 -78
- package/dist/types/shared-ts/src/signing-lanes/rotationParsers.d.ts +0 -27
- package/dist/types/shared-ts/src/signing-lanes/rotationProtocolParsers.d.ts +0 -6
- package/dist/types/shared-ts/src/signing-lanes/rotationWireFields.d.ts +0 -20
- package/dist/types/shared-ts/src/wallet-recovery/recoveryCodeAttempt.d.ts +0 -59
- package/dist/types/wallet-server/src/core/AuthService.d.ts +0 -3
- package/dist/types/wallet-server/src/core/NearPublicKeyStore.d.ts +0 -48
- package/dist/types/wallet-server/src/core/ThresholdService/stores/CloudflareDurableObjectStore.d.ts +0 -21
- package/dist/types/wallet-server/src/core/ThresholdService/stores/KeyStore.d.ts +0 -40
- package/dist/types/wallet-server/src/core/ThresholdService/stores/SessionStore.d.ts +0 -98
- package/dist/types/wallet-server/src/core/ThresholdService/stores/StoreConfig.d.ts +0 -4
- package/dist/types/wallet-server/src/core/ThresholdService/stores/ThresholdStoreConfig.typecheck.d.ts +0 -2
- package/dist/types/wallet-server/src/core/ThresholdService/stores/exportReplayGuard.d.ts +0 -3
- package/dist/types/wallet-server/src/core/authService/AuthService.d.ts +0 -490
- package/dist/types/wallet-server/src/core/authService/bytes.d.ts +0 -3
- package/dist/types/wallet-server/src/core/authService/configValues.d.ts +0 -7
- package/dist/types/wallet-server/src/core/authService/emailOtpChallengeOperations.d.ts +0 -109
- package/dist/types/wallet-server/src/core/authService/emailOtpChallengeProof.d.ts +0 -169
- package/dist/types/wallet-server/src/core/authService/emailOtpChallengeVerification.d.ts +0 -47
- package/dist/types/wallet-server/src/core/authService/emailOtpChallenges.d.ts +0 -86
- package/dist/types/wallet-server/src/core/authService/emailOtpDelivery.d.ts +0 -66
- package/dist/types/wallet-server/src/core/authService/emailOtpGrant.d.ts +0 -43
- package/dist/types/wallet-server/src/core/authService/emailOtpRegistrationEnrollment.d.ts +0 -49
- package/dist/types/wallet-server/src/core/authService/emailOtpUnlock.d.ts +0 -64
- package/dist/types/wallet-server/src/core/authService/googleEmailOtpOperations.d.ts +0 -126
- package/dist/types/wallet-server/src/core/authService/googleEmailOtpRegistration.d.ts +0 -169
- package/dist/types/wallet-server/src/core/authService/identity.d.ts +0 -25
- package/dist/types/wallet-server/src/core/authService/identityOperations.d.ts +0 -19
- package/dist/types/wallet-server/src/core/authService/nearAccountOperations.d.ts +0 -55
- package/dist/types/wallet-server/src/core/authService/nearPublicKeyMetadata.d.ts +0 -44
- package/dist/types/wallet-server/src/core/authService/oidcVerification.d.ts +0 -66
- package/dist/types/wallet-server/src/core/authService/registrationThresholdHelpers.d.ts +0 -11
- package/dist/types/wallet-server/src/core/authService/runtime.d.ts +0 -20
- package/dist/types/wallet-server/src/core/authService/storeRegistry.d.ts +0 -53
- package/dist/types/wallet-server/src/core/authService/thresholdStoreSummary.d.ts +0 -3
- package/dist/types/wallet-server/src/core/authService/webauthnAuthority.d.ts +0 -5
- package/dist/types/wallet-server/src/core/defaultConfigsServer.d.ts +0 -5
- package/dist/types/wallet-server/src/core/hostedAccountIds.d.ts +0 -16
- package/dist/types/wallet-server/src/core/routerAbSigning/createRouterAbSigningRuntimes.d.ts +0 -16
- package/dist/types/wallet-server/src/core/signingLanes/LaneAggregateRevocationApplicationService.d.ts +0 -36
- package/dist/types/wallet-server/src/core/signingLanes/LaneEffectJournalStore.d.ts +0 -62
- package/dist/types/wallet-server/src/core/signingLanes/LaneEnrollmentActivation.d.ts +0 -13
- package/dist/types/wallet-server/src/core/signingLanes/LaneEnrollmentRevocation.d.ts +0 -24
- package/dist/types/wallet-server/src/core/signingLanes/LaneLifecycleApplicationService.d.ts +0 -141
- package/dist/types/wallet-server/src/core/signingLanes/LaneLifecycleStore.d.ts +0 -228
- package/dist/types/wallet-server/src/core/signingLanes/ecdsaServerRetirement.d.ts +0 -58
- package/dist/types/wallet-server/src/core/signingLanes/ed25519ServerRetirement.d.ts +0 -30
- package/dist/types/wallet-server/src/core/signingLanes/signingWorkerLaneMaterialIdentity.d.ts +0 -4
- package/dist/types/wallet-server/src/core/storeBackends.d.ts +0 -83
- package/dist/types/wallet-server/src/core/utils.d.ts +0 -3
- package/dist/types/wallet-server/src/core/webAuthnStoreBackends.d.ts +0 -96
- package/dist/types/wallet-server/src/router/cloudflare/d1/near/d1NearPublicKeyStore.d.ts +0 -29
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1EcdsaLanePrivateBindingResolver.d.ts +0 -4
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneAggregateRevocationApplicationService.d.ts +0 -4
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneEffectJournalStore.d.ts +0 -24
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneEnrollmentGateway.d.ts +0 -20
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneLifecycleApplicationService.d.ts +0 -13
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneLifecycleStore.d.ts +0 -51
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneLockStore.d.ts +0 -28
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneProtocolCommitter.d.ts +0 -5
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/d1LaneRecords.d.ts +0 -107
- package/dist/types/wallet-server/src/router/cloudflare/d1/signingLanes/index.d.ts +0 -10
- package/dist/types/wallet-server/src/router/cloudflare/durableObjects/thresholdStore.d.ts +0 -18
- package/dist/types/wallet-server/src/router/cloudflare/signingLanes/cloudflareLaneCurveExecution.d.ts +0 -217
- package/dist/types/wallet-server/src/router/cloudflare/signingLanes/cloudflareLaneProtocolCommitter.d.ts +0 -73
- package/dist/types/wallet-server/src/router/cloudflare/signingLanes/index.d.ts +0 -4
- package/dist/types/wallet-server/src/router/cloudflare/signingLanes/linkedDeviceEd25519CeremonyBinding.d.ts +0 -6
- package/dist/types/wallet-server/src/router/transport/fetch/routes/nearPublicKeys.d.ts +0 -3
- /package/dist/esm/{core/signingLanes/LaneEffectJournalStore.js → authorization/recoveryRouting.js} +0 -0
- /package/dist/esm/{core/signingLanes/LaneLifecycleStore.js → authorization/sessionRouting.js} +0 -0
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { hasWhitespaceOrControlCharacters } from "../utils/domainIds.js";
|
|
2
|
-
import { base64UrlDecode, base64UrlEncode } from "../utils/base64.js";
|
|
3
1
|
import { parseDigestB64u } from "../utils/canonicalPrimitives.js";
|
|
4
|
-
import { requireRecord } from "../utils/validation.js";
|
|
5
2
|
//#region ../shared-ts/src/signing-lanes/participants.ts
|
|
6
3
|
function missing(field) {
|
|
7
4
|
return {
|
|
@@ -15,55 +12,6 @@ function invalid(field, reason) {
|
|
|
15
12
|
message: `${field} ${reason}`
|
|
16
13
|
};
|
|
17
14
|
}
|
|
18
|
-
function parseIdentityId(raw, field) {
|
|
19
|
-
if (raw === void 0 || raw === null) return {
|
|
20
|
-
ok: false,
|
|
21
|
-
error: missing(field)
|
|
22
|
-
};
|
|
23
|
-
if (typeof raw !== "string") return {
|
|
24
|
-
ok: false,
|
|
25
|
-
error: invalid(field, "must be a string")
|
|
26
|
-
};
|
|
27
|
-
const value = raw.trim();
|
|
28
|
-
if (!value) return {
|
|
29
|
-
ok: false,
|
|
30
|
-
error: missing(field)
|
|
31
|
-
};
|
|
32
|
-
if (hasWhitespaceOrControlCharacters(value)) return {
|
|
33
|
-
ok: false,
|
|
34
|
-
error: invalid(field, "must not contain whitespace or control characters")
|
|
35
|
-
};
|
|
36
|
-
return {
|
|
37
|
-
ok: true,
|
|
38
|
-
value
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function parseHpkePublicKey(raw, field) {
|
|
42
|
-
if (raw === void 0 || raw === null) return {
|
|
43
|
-
ok: false,
|
|
44
|
-
error: missing(field)
|
|
45
|
-
};
|
|
46
|
-
if (typeof raw !== "string" || raw.length === 0) return {
|
|
47
|
-
ok: false,
|
|
48
|
-
error: invalid(field, "must be non-empty base64url")
|
|
49
|
-
};
|
|
50
|
-
try {
|
|
51
|
-
const bytes = base64UrlDecode(raw);
|
|
52
|
-
if (bytes.length === 0 || base64UrlEncode(bytes) !== raw) return {
|
|
53
|
-
ok: false,
|
|
54
|
-
error: invalid(field, "must be canonical unpadded base64url")
|
|
55
|
-
};
|
|
56
|
-
} catch {
|
|
57
|
-
return {
|
|
58
|
-
ok: false,
|
|
59
|
-
error: invalid(field, "must be canonical unpadded base64url")
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
ok: true,
|
|
64
|
-
value: raw
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
15
|
function parseDigest(raw, field, brand) {
|
|
68
16
|
if (raw === void 0 || raw === null) return {
|
|
69
17
|
ok: false,
|
|
@@ -81,179 +29,13 @@ function parseDigest(raw, field, brand) {
|
|
|
81
29
|
};
|
|
82
30
|
}
|
|
83
31
|
}
|
|
84
|
-
function brandLaneCustodyDigest(value) {
|
|
85
|
-
return value;
|
|
86
|
-
}
|
|
87
|
-
function brandRecipientDigest(value) {
|
|
88
|
-
return value;
|
|
89
|
-
}
|
|
90
32
|
function brandParticipantDigest(value) {
|
|
91
33
|
return value;
|
|
92
34
|
}
|
|
93
|
-
function rejectUnknownFields(record, fields, label) {
|
|
94
|
-
const allowed = new Set(fields);
|
|
95
|
-
for (const field of Object.keys(record)) if (!allowed.has(field)) throw new Error(`${label}.${field} is not supported`);
|
|
96
|
-
for (const field of fields) if (!(field in record)) throw new Error(`${label}.${field} is required`);
|
|
97
|
-
}
|
|
98
|
-
function parseLaneHolderParticipantId(raw) {
|
|
99
|
-
return parseIdentityId(raw, "laneHolderParticipantId");
|
|
100
|
-
}
|
|
101
|
-
function parseSigningWorkerParticipantId(raw) {
|
|
102
|
-
return parseIdentityId(raw, "signingWorkerParticipantId");
|
|
103
|
-
}
|
|
104
|
-
function parseSigningWorkerRecipientKeyId(raw) {
|
|
105
|
-
return parseIdentityId(raw, "signingWorkerRecipientKeyId");
|
|
106
|
-
}
|
|
107
|
-
function parseLaneHolderCustodyBindingId(raw) {
|
|
108
|
-
return parseIdentityId(raw, "laneHolderCustodyBindingId");
|
|
109
|
-
}
|
|
110
|
-
function parseHpkePublicKeyB64u(raw) {
|
|
111
|
-
return parseHpkePublicKey(raw, "hpkePublicKeyB64u");
|
|
112
|
-
}
|
|
113
35
|
function parseLaneParticipantBindingDigestB64u(raw) {
|
|
114
36
|
return parseDigest(raw, "participantBindingDigestB64u", brandParticipantDigest);
|
|
115
37
|
}
|
|
116
|
-
function parseLaneCustodyBindingDigestB64u(raw) {
|
|
117
|
-
return parseDigest(raw, "custodyBindingDigestB64u", brandLaneCustodyDigest);
|
|
118
|
-
}
|
|
119
|
-
function parseSigningWorkerRecipientKeyDigestB64u(raw) {
|
|
120
|
-
return parseDigest(raw, "hpkePublicKeyDigestB64u", brandRecipientDigest);
|
|
121
|
-
}
|
|
122
|
-
function buildLaneHolderCustodyIdentityV1(args) {
|
|
123
|
-
return {
|
|
124
|
-
kind: "lane_holder_custody_identity_v1",
|
|
125
|
-
custodyBindingId: args.custodyBindingId,
|
|
126
|
-
custodyBindingDigestB64u: args.custodyBindingDigestB64u
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function buildSigningWorkerRecipientIdentityV1(args) {
|
|
130
|
-
return {
|
|
131
|
-
kind: "signing_worker_recipient_identity_v1",
|
|
132
|
-
recipientKeyId: args.recipientKeyId,
|
|
133
|
-
hpkePublicKeyB64u: args.hpkePublicKeyB64u,
|
|
134
|
-
hpkePublicKeyDigestB64u: args.hpkePublicKeyDigestB64u
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function parseLaneHolderCustodyIdentityV1(raw, label = "laneHolderCustodyIdentity") {
|
|
138
|
-
const record = requireRecord(raw, label);
|
|
139
|
-
rejectUnknownFields(record, [
|
|
140
|
-
"kind",
|
|
141
|
-
"custodyBindingId",
|
|
142
|
-
"custodyBindingDigestB64u"
|
|
143
|
-
], label);
|
|
144
|
-
if (record.kind !== "lane_holder_custody_identity_v1") throw new Error(`${label}.kind is invalid`);
|
|
145
|
-
const custodyBindingId = parseLaneHolderCustodyBindingId(record.custodyBindingId);
|
|
146
|
-
if (!custodyBindingId.ok) throw new Error(`${label}.${custodyBindingId.error.message}`);
|
|
147
|
-
const custodyBindingDigestB64u = parseLaneCustodyBindingDigestB64u(record.custodyBindingDigestB64u);
|
|
148
|
-
if (!custodyBindingDigestB64u.ok) throw new Error(`${label}.${custodyBindingDigestB64u.error.message}`);
|
|
149
|
-
return buildLaneHolderCustodyIdentityV1({
|
|
150
|
-
custodyBindingId: custodyBindingId.value,
|
|
151
|
-
custodyBindingDigestB64u: custodyBindingDigestB64u.value
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function parseSigningWorkerRecipientIdentityV1(raw, label = "signingWorkerRecipientIdentity") {
|
|
155
|
-
const record = requireRecord(raw, label);
|
|
156
|
-
rejectUnknownFields(record, [
|
|
157
|
-
"kind",
|
|
158
|
-
"recipientKeyId",
|
|
159
|
-
"hpkePublicKeyB64u",
|
|
160
|
-
"hpkePublicKeyDigestB64u"
|
|
161
|
-
], label);
|
|
162
|
-
if (record.kind !== "signing_worker_recipient_identity_v1") throw new Error(`${label}.kind is invalid`);
|
|
163
|
-
const recipientKeyId = parseSigningWorkerRecipientKeyId(record.recipientKeyId);
|
|
164
|
-
if (!recipientKeyId.ok) throw new Error(`${label}.${recipientKeyId.error.message}`);
|
|
165
|
-
const hpkePublicKeyB64u = parseHpkePublicKey(record.hpkePublicKeyB64u, `${label}.hpkePublicKeyB64u`);
|
|
166
|
-
if (!hpkePublicKeyB64u.ok) throw new Error(hpkePublicKeyB64u.error.message);
|
|
167
|
-
const hpkePublicKeyDigestB64u = parseSigningWorkerRecipientKeyDigestB64u(record.hpkePublicKeyDigestB64u);
|
|
168
|
-
if (!hpkePublicKeyDigestB64u.ok) throw new Error(`${label}.${hpkePublicKeyDigestB64u.error.message}`);
|
|
169
|
-
return buildSigningWorkerRecipientIdentityV1({
|
|
170
|
-
recipientKeyId: recipientKeyId.value,
|
|
171
|
-
hpkePublicKeyB64u: hpkePublicKeyB64u.value,
|
|
172
|
-
hpkePublicKeyDigestB64u: hpkePublicKeyDigestB64u.value
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
function buildLaneHolderParticipantRecordV1(args) {
|
|
176
|
-
return {
|
|
177
|
-
kind: "lane_holder_participant_v1",
|
|
178
|
-
participantId: args.participantId,
|
|
179
|
-
custodyBindingId: args.custody.custodyBindingId,
|
|
180
|
-
custodyBindingDigestB64u: args.custody.custodyBindingDigestB64u,
|
|
181
|
-
hpkePublicKeyB64u: args.hpkePublicKeyB64u,
|
|
182
|
-
hpkePublicKeyDigestB64u: args.hpkePublicKeyDigestB64u,
|
|
183
|
-
participantBindingDigestB64u: args.participantBindingDigestB64u
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
function buildSigningWorkerParticipantRecordV1(args) {
|
|
187
|
-
return {
|
|
188
|
-
kind: "signing_worker_participant_v1",
|
|
189
|
-
participantId: args.participantId,
|
|
190
|
-
recipientKeyId: args.recipient.recipientKeyId,
|
|
191
|
-
hpkePublicKeyB64u: args.recipient.hpkePublicKeyB64u,
|
|
192
|
-
hpkePublicKeyDigestB64u: args.recipient.hpkePublicKeyDigestB64u,
|
|
193
|
-
participantBindingDigestB64u: args.participantBindingDigestB64u
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function parseLaneHolderParticipantRecordV1(raw, label = "laneHolderParticipant") {
|
|
197
|
-
const record = requireRecord(raw, label);
|
|
198
|
-
rejectUnknownFields(record, [
|
|
199
|
-
"kind",
|
|
200
|
-
"participantId",
|
|
201
|
-
"custodyBindingId",
|
|
202
|
-
"custodyBindingDigestB64u",
|
|
203
|
-
"hpkePublicKeyB64u",
|
|
204
|
-
"hpkePublicKeyDigestB64u",
|
|
205
|
-
"participantBindingDigestB64u"
|
|
206
|
-
], label);
|
|
207
|
-
if (record.kind !== "lane_holder_participant_v1") throw new Error(`${label}.kind is invalid`);
|
|
208
|
-
const participantId = parseLaneHolderParticipantId(record.participantId);
|
|
209
|
-
if (!participantId.ok) throw new Error(`${label}.${participantId.error.message}`);
|
|
210
|
-
const custody = parseLaneHolderCustodyIdentityV1({
|
|
211
|
-
kind: "lane_holder_custody_identity_v1",
|
|
212
|
-
custodyBindingId: record.custodyBindingId,
|
|
213
|
-
custodyBindingDigestB64u: record.custodyBindingDigestB64u
|
|
214
|
-
}, `${label}.custody`);
|
|
215
|
-
const hpkePublicKeyB64u = parseHpkePublicKey(record.hpkePublicKeyB64u, `${label}.hpkePublicKeyB64u`);
|
|
216
|
-
if (!hpkePublicKeyB64u.ok) throw new Error(hpkePublicKeyB64u.error.message);
|
|
217
|
-
const hpkePublicKeyDigestB64u = parseSigningWorkerRecipientKeyDigestB64u(record.hpkePublicKeyDigestB64u);
|
|
218
|
-
if (!hpkePublicKeyDigestB64u.ok) throw new Error(`${label}.${hpkePublicKeyDigestB64u.error.message}`);
|
|
219
|
-
const participantBindingDigestB64u = parseLaneParticipantBindingDigestB64u(record.participantBindingDigestB64u);
|
|
220
|
-
if (!participantBindingDigestB64u.ok) throw new Error(`${label}.${participantBindingDigestB64u.error.message}`);
|
|
221
|
-
return buildLaneHolderParticipantRecordV1({
|
|
222
|
-
participantId: participantId.value,
|
|
223
|
-
custody,
|
|
224
|
-
hpkePublicKeyB64u: hpkePublicKeyB64u.value,
|
|
225
|
-
hpkePublicKeyDigestB64u: hpkePublicKeyDigestB64u.value,
|
|
226
|
-
participantBindingDigestB64u: participantBindingDigestB64u.value
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function parseSigningWorkerParticipantRecordV1(raw, label = "signingWorkerParticipant") {
|
|
230
|
-
const record = requireRecord(raw, label);
|
|
231
|
-
rejectUnknownFields(record, [
|
|
232
|
-
"kind",
|
|
233
|
-
"participantId",
|
|
234
|
-
"recipientKeyId",
|
|
235
|
-
"hpkePublicKeyB64u",
|
|
236
|
-
"hpkePublicKeyDigestB64u",
|
|
237
|
-
"participantBindingDigestB64u"
|
|
238
|
-
], label);
|
|
239
|
-
if (record.kind !== "signing_worker_participant_v1") throw new Error(`${label}.kind is invalid`);
|
|
240
|
-
const participantId = parseSigningWorkerParticipantId(record.participantId);
|
|
241
|
-
if (!participantId.ok) throw new Error(`${label}.${participantId.error.message}`);
|
|
242
|
-
const recipient = parseSigningWorkerRecipientIdentityV1({
|
|
243
|
-
kind: "signing_worker_recipient_identity_v1",
|
|
244
|
-
recipientKeyId: record.recipientKeyId,
|
|
245
|
-
hpkePublicKeyB64u: record.hpkePublicKeyB64u,
|
|
246
|
-
hpkePublicKeyDigestB64u: record.hpkePublicKeyDigestB64u
|
|
247
|
-
}, `${label}.recipient`);
|
|
248
|
-
const participantBindingDigestB64u = parseLaneParticipantBindingDigestB64u(record.participantBindingDigestB64u);
|
|
249
|
-
if (!participantBindingDigestB64u.ok) throw new Error(`${label}.${participantBindingDigestB64u.error.message}`);
|
|
250
|
-
return buildSigningWorkerParticipantRecordV1({
|
|
251
|
-
participantId: participantId.value,
|
|
252
|
-
recipient,
|
|
253
|
-
participantBindingDigestB64u: participantBindingDigestB64u.value
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
38
|
//#endregion
|
|
257
|
-
export {
|
|
39
|
+
export { parseLaneParticipantBindingDigestB64u };
|
|
258
40
|
|
|
259
41
|
//# sourceMappingURL=participants.js.map
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { hasWhitespaceOrControlCharacters } from "../utils/domainIds.js";
|
|
2
|
-
import "../utils/validation.js";
|
|
3
|
-
import "../utils/exactRecord.js";
|
|
4
2
|
import "../utils/registrationIds.js";
|
|
5
|
-
import "./participants.js";
|
|
6
3
|
import "./ownerContinuity.js";
|
|
7
4
|
//#region ../shared-ts/src/signing-lanes/recordParsers.ts
|
|
8
5
|
const WALLET_KEY_COMMON_FIELDS = [
|
|
@@ -8,8 +8,7 @@ import { isTenantRootIdentityFieldCanonicalV1 } from "./tenantRootIdentity.js";
|
|
|
8
8
|
*
|
|
9
9
|
* The console builds these records in TypeScript and the control plane
|
|
10
10
|
* consumes their digests in Rust, so both sides must produce identical
|
|
11
|
-
* canonical bytes.
|
|
12
|
-
* `crates/router-ab-core/tests/fixtures/tenant-root-operation`.
|
|
11
|
+
* canonical bytes.
|
|
13
12
|
*
|
|
14
13
|
* A record is the unit of authorization: changing any field changes the
|
|
15
14
|
* digest, so a capability minted for one record cannot be carried to another
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { base64UrlDecode, base64UrlEncode } from "../utils/base64.js";
|
|
2
2
|
import { alphabetizeStringify, sha256Bytes, sha256BytesUtf8 } from "../utils/digests.js";
|
|
3
|
-
import "../utils/encoders.js";
|
|
4
3
|
import { deriveEvmFamilySigningKeySlotId } from "../signing-lanes/evmFamilySigningKeySlotId.js";
|
|
5
4
|
//#region ../shared-ts/src/threshold/ecdsaDerivationRoleLocalBootstrap.ts
|
|
6
5
|
const THRESHOLD_SECP256K1_ECDSA_2P_V1_SCHEME_ID = "threshold-secp256k1-ecdsa-2p-v1";
|
|
@@ -4,46 +4,25 @@ function parseNonEmptyBrand(value, label) {
|
|
|
4
4
|
if (!normalized) throw new Error(`${label} must be a non-empty string`);
|
|
5
5
|
return normalized;
|
|
6
6
|
}
|
|
7
|
-
function parseEcdsaDerivationKeyVersion(value) {
|
|
8
|
-
return parseNonEmptyBrand(value, "ECDSA DERIVATION key version");
|
|
9
|
-
}
|
|
10
7
|
function parseSigningSessionSealKeyVersion(value) {
|
|
11
8
|
return parseNonEmptyBrand(value, "signing-session seal key version");
|
|
12
9
|
}
|
|
13
10
|
function parseEcdsaClientVerifyingShareB64u(value) {
|
|
14
11
|
return parseNonEmptyBrand(value, "ECDSA client verifying share");
|
|
15
12
|
}
|
|
16
|
-
function parseEd25519RelayerKeyId(value) {
|
|
17
|
-
return parseNonEmptyBrand(value, "Ed25519 relayer key id");
|
|
18
|
-
}
|
|
19
13
|
function parseEcdsaRelayerKeyId(value) {
|
|
20
14
|
return parseNonEmptyBrand(value, "ECDSA relayer key id");
|
|
21
15
|
}
|
|
22
16
|
function parseEcdsaKeyHandle(value) {
|
|
23
17
|
return parseNonEmptyBrand(value, "ECDSA key handle");
|
|
24
18
|
}
|
|
25
|
-
function formatEcdsaDerivationKeyVersionForWire(value) {
|
|
26
|
-
return value;
|
|
27
|
-
}
|
|
28
19
|
function formatSigningSessionSealKeyVersionForWire(value) {
|
|
29
20
|
return value;
|
|
30
21
|
}
|
|
31
|
-
function formatEcdsaClientVerifyingShareB64uForWire(value) {
|
|
32
|
-
return value;
|
|
33
|
-
}
|
|
34
|
-
function formatEd25519RelayerKeyIdForWire(value) {
|
|
35
|
-
return value;
|
|
36
|
-
}
|
|
37
|
-
function formatEcdsaRelayerKeyIdForWire(value) {
|
|
38
|
-
return value;
|
|
39
|
-
}
|
|
40
|
-
function formatEcdsaThresholdKeyIdForWire(value) {
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
22
|
function formatEcdsaKeyHandleForWire(value) {
|
|
44
23
|
return value;
|
|
45
24
|
}
|
|
46
25
|
//#endregion
|
|
47
|
-
export {
|
|
26
|
+
export { formatEcdsaKeyHandleForWire, formatSigningSessionSealKeyVersionForWire, parseEcdsaClientVerifyingShareB64u, parseEcdsaKeyHandle, parseEcdsaRelayerKeyId, parseSigningSessionSealKeyVersion };
|
|
48
27
|
|
|
49
28
|
//# sourceMappingURL=keyMaterialBrands.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "../authorization/capabilityKinds.js";
|
|
2
1
|
//#region ../shared-ts/src/utils/addWalletAuthMethod.ts
|
|
3
2
|
function unreachableAuthMethodFamily(value) {
|
|
4
3
|
throw new Error(`Unhandled wallet auth-method family: ${String(value)}`);
|
|
@@ -12,21 +11,13 @@ function unreachableAuthMethodFamily(value) {
|
|
|
12
11
|
* which is why the operation needs no same-family rejection of its own.
|
|
13
12
|
*/
|
|
14
13
|
function admitAddWalletAuthMethod(input) {
|
|
15
|
-
|
|
16
|
-
if (present) return {
|
|
14
|
+
if (input.activeMethodsOnAuthority.find((method) => method.kind === input.targetFamily)) return {
|
|
17
15
|
kind: "already_configured",
|
|
18
|
-
family: input.targetFamily
|
|
19
|
-
existingWalletAuthMethodId: present.walletAuthMethodId
|
|
16
|
+
family: input.targetFamily
|
|
20
17
|
};
|
|
21
18
|
switch (input.sourceMethod.kind) {
|
|
22
|
-
case "passkey": return {
|
|
23
|
-
|
|
24
|
-
branch: "passkey_to_email_otp"
|
|
25
|
-
};
|
|
26
|
-
case "email_otp": return {
|
|
27
|
-
kind: "proceed",
|
|
28
|
-
branch: "email_otp_to_passkey"
|
|
29
|
-
};
|
|
19
|
+
case "passkey": return { kind: "proceed" };
|
|
20
|
+
case "email_otp": return { kind: "proceed" };
|
|
30
21
|
default: return unreachableAuthMethodFamily(input.sourceMethod);
|
|
31
22
|
}
|
|
32
23
|
}
|
|
@@ -16,12 +16,6 @@ function parseDigestB64u(value) {
|
|
|
16
16
|
if (bytes.length !== 32 || base64UrlEncode(bytes) !== value) throw new Error("digest must be canonical base64url for 32 bytes");
|
|
17
17
|
return value;
|
|
18
18
|
}
|
|
19
|
-
function parseIsoTimestamp(value) {
|
|
20
|
-
if (typeof value !== "string") throw new Error("timestamp must be an ISO timestamp");
|
|
21
|
-
const timestampMs = Date.parse(value);
|
|
22
|
-
if (!Number.isFinite(timestampMs) || new Date(timestampMs).toISOString() !== value) throw new Error("timestamp must be canonical ISO-8601 UTC");
|
|
23
|
-
return value;
|
|
24
|
-
}
|
|
25
19
|
async function sha256DigestB64u(bytes) {
|
|
26
20
|
return parseDigestB64u(base64UrlEncode(await sha256Bytes(bytes)));
|
|
27
21
|
}
|
|
@@ -29,6 +23,6 @@ async function sha256Utf8DigestB64u(text) {
|
|
|
29
23
|
return parseDigestB64u(base64UrlEncode(await sha256BytesUtf8(text)));
|
|
30
24
|
}
|
|
31
25
|
//#endregion
|
|
32
|
-
export { parseCorrelationId, parseDigestB64u,
|
|
26
|
+
export { parseCorrelationId, parseDigestB64u, sha256DigestB64u, sha256Utf8DigestB64u };
|
|
33
27
|
|
|
34
28
|
//# sourceMappingURL=canonicalPrimitives.js.map
|
|
@@ -121,9 +121,6 @@ function parseChallengeSubjectId(raw) {
|
|
|
121
121
|
function parseEmailOtpChallengeId(raw) {
|
|
122
122
|
return parseDomainId(raw, "emailOtpChallengeId");
|
|
123
123
|
}
|
|
124
|
-
function parseEmailOtpRegistrationAttemptId(raw) {
|
|
125
|
-
return parseDomainId(raw, "emailOtpRegistrationAttemptId");
|
|
126
|
-
}
|
|
127
124
|
function parseOrgId(raw) {
|
|
128
125
|
return parseDomainId(raw, "orgId");
|
|
129
126
|
}
|
|
@@ -279,24 +276,12 @@ function parseLaneShareEpoch(raw) {
|
|
|
279
276
|
function parseLinkedDeviceId(raw) {
|
|
280
277
|
return parseDomainId(raw, "linkedDeviceId");
|
|
281
278
|
}
|
|
282
|
-
function parseLaneOperationId(raw) {
|
|
283
|
-
return parseDomainId(raw, "laneOperationId");
|
|
284
|
-
}
|
|
285
|
-
function parseLaneEnrollmentId(raw) {
|
|
286
|
-
return parseDomainId(raw, "laneEnrollmentId");
|
|
287
|
-
}
|
|
288
|
-
function parseLaneOperationIdempotencyKey(raw) {
|
|
289
|
-
return parseDomainId(raw, "laneOperationIdempotencyKey");
|
|
290
|
-
}
|
|
291
279
|
function parseLinkedDeviceEnrollmentId(raw) {
|
|
292
280
|
return parseDomainId(raw, "linkedDeviceEnrollmentId");
|
|
293
281
|
}
|
|
294
282
|
function parseWalletRecoveryOperationId(raw) {
|
|
295
283
|
return parseDomainId(raw, "walletRecoveryOperationId");
|
|
296
284
|
}
|
|
297
|
-
function parseEd25519YaoSuiteId(raw) {
|
|
298
|
-
return parseDomainId(raw, "ed25519YaoSuiteId");
|
|
299
|
-
}
|
|
300
285
|
function parseEcdsaRelayerKeyId(raw) {
|
|
301
286
|
return parseDomainId(raw, "ecdsaRelayerKeyId");
|
|
302
287
|
}
|
|
@@ -304,6 +289,6 @@ function parseLinkDeviceSessionId(raw) {
|
|
|
304
289
|
return parseDomainId(raw, "linkDeviceSessionId");
|
|
305
290
|
}
|
|
306
291
|
//#endregion
|
|
307
|
-
export { buildMpcMaterialActivationRef, hasControlCharacter, hasWhitespaceOrControlCharacters, mpcMaterialActivationRefsEqual, parseChallengeSubjectId, parseEcdsaActiveStateId, parseEcdsaRelayerKeyId,
|
|
292
|
+
export { buildMpcMaterialActivationRef, hasControlCharacter, hasWhitespaceOrControlCharacters, mpcMaterialActivationRefsEqual, parseChallengeSubjectId, parseEcdsaActiveStateId, parseEcdsaRelayerKeyId, parseEmailOtpChallengeId, parseEmailOtpProviderUserId, parseGoogleProviderSubject, parseLaneShareEpoch, parseLinkDeviceSessionId, parseLinkedDeviceEnrollmentId, parseLinkedDeviceId, parseMpcMaterialActivationId, parseMpcMaterialActivationRef, parseMpcSigningWorkerRef, parseOrgId, parsePasskeyEnvelopeId, parseProviderSubject, parseRootShareEpoch, parseSigningLaneId, parseThresholdEcdsaSessionId, parseThresholdEd25519SessionId, parseThresholdSessionId, parseVerifiedEmailAddress, parseVerifiedGoogleEmail, parseWalletAuthMethodId, parseWalletAuthorityBindingDigest, parseWalletAuthorityId, parseWalletId, parseWalletKeyId, parseWalletRecoveryOperationId, parseWebAuthnCredentialIdB64u, parseWebAuthnRpId };
|
|
308
293
|
|
|
309
294
|
//# sourceMappingURL=domainIds.js.map
|
|
@@ -7,16 +7,6 @@ function parseNonEmptyString(value, label) {
|
|
|
7
7
|
function parseEcdsaServerGeneration(value) {
|
|
8
8
|
return parseNonEmptyString(value, "ECDSA server generation");
|
|
9
9
|
}
|
|
10
|
-
function parseEcdsaCapabilityManifestId(value) {
|
|
11
|
-
return parseNonEmptyString(value, "ECDSA manifest id");
|
|
12
|
-
}
|
|
13
|
-
function parseEcdsaCapabilityManifestRevision(value) {
|
|
14
|
-
if (!Number.isSafeInteger(value) || Number(value) < 1) throw new Error("ECDSA manifest revision must be a positive safe integer");
|
|
15
|
-
return value;
|
|
16
|
-
}
|
|
17
|
-
function parseEcdsaLifecycleId(value) {
|
|
18
|
-
return parseNonEmptyString(value, "ECDSA lifecycle id");
|
|
19
|
-
}
|
|
20
10
|
function parseCanonicalEcdsaServerActivationRequest(value) {
|
|
21
11
|
if (typeof value !== "string" || value.trim() !== value) throw new Error("ECDSA server activation request must be canonical JSON");
|
|
22
12
|
let parsed;
|
|
@@ -29,6 +19,6 @@ function parseCanonicalEcdsaServerActivationRequest(value) {
|
|
|
29
19
|
return value;
|
|
30
20
|
}
|
|
31
21
|
//#endregion
|
|
32
|
-
export { parseCanonicalEcdsaServerActivationRequest,
|
|
22
|
+
export { parseCanonicalEcdsaServerActivationRequest, parseEcdsaServerGeneration };
|
|
33
23
|
|
|
34
24
|
//# sourceMappingURL=ecdsaCapabilityActivation.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { base64UrlEncode } from "./base64.js";
|
|
2
2
|
import { alphabetizeStringify, sha256BytesUtf8 } from "./digests.js";
|
|
3
|
-
import "./encoders.js";
|
|
4
3
|
import { thresholdEcdsaChainTargetKey } from "./thresholdEcdsaChainTarget.js";
|
|
5
4
|
//#region ../shared-ts/src/utils/ecdsaKeyFactsInventory.ts
|
|
6
5
|
function normalizeChainTarget(target) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./near.js";
|
|
2
1
|
//#region ../shared-ts/src/utils/errors.ts
|
|
3
2
|
/**
|
|
4
3
|
* Best-effort error message extractor without relying on `any`.
|
|
@@ -17,24 +16,7 @@ function b64uField(prefix) {
|
|
|
17
16
|
return `${prefix}B64u`;
|
|
18
17
|
}
|
|
19
18
|
b64uField("seed"), b64uField("canonicalSeed"), b64uField("xClientBase"), b64uField("clientOutputMask"), b64uField("clientRecoverableSecret"), b64uField("prfFirst"), b64uField("prfSecond"), b64uField("signingShare32"), b64uField("clientNonceHandle");
|
|
20
|
-
/**
|
|
21
|
-
* Normalize any thrown value into an Error instance.
|
|
22
|
-
* - preserves message/name/stack when available
|
|
23
|
-
* - best-effort copies optional code/details properties if present
|
|
24
|
-
*/
|
|
25
|
-
function toError(e) {
|
|
26
|
-
if (e instanceof Error) return e;
|
|
27
|
-
const err = new Error(errorMessage(e));
|
|
28
|
-
try {
|
|
29
|
-
const src = e;
|
|
30
|
-
if (typeof src?.name === "string") err.name = src.name;
|
|
31
|
-
if (typeof src?.stack === "string") err.stack = src.stack;
|
|
32
|
-
if (src && typeof src.code !== "undefined") err.code = src.code;
|
|
33
|
-
if (src && typeof src.details !== "undefined") err.details = src.details;
|
|
34
|
-
} catch {}
|
|
35
|
-
return err;
|
|
36
|
-
}
|
|
37
19
|
//#endregion
|
|
38
|
-
export { errorMessage
|
|
20
|
+
export { errorMessage };
|
|
39
21
|
|
|
40
22
|
//# sourceMappingURL=errors.js.map
|
|
@@ -94,6 +94,6 @@ function deriveImplicitNearAccountIdFromEd25519PublicKey(publicKey) {
|
|
|
94
94
|
return bytesToLowerHex(decoded);
|
|
95
95
|
}
|
|
96
96
|
//#endregion
|
|
97
|
-
export { deriveImplicitNearAccountIdFromEd25519PublicKey, ensureEd25519Prefix,
|
|
97
|
+
export { deriveImplicitNearAccountIdFromEd25519PublicKey, ensureEd25519Prefix, parseImplicitNearAccountId, parseNamedNearAccountId, parseNearAccountId };
|
|
98
98
|
|
|
99
99
|
//# sourceMappingURL=near.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { mpcMaterialActivationRefsEqual, parseMpcMaterialActivationRef, parseThresholdEcdsaSessionId, parseThresholdEd25519SessionId, parseWalletId } from "./domainIds.js";
|
|
2
2
|
import { parseMpcWalletSigningQuotaId, parseWalletSessionAuthorizationId, parseWalletSessionId } from "../authorization/capabilityKinds.js";
|
|
3
|
-
import { parseNearAccountId } from "./near.js";
|
|
4
3
|
import { parseActiveWalletSessionV1 } from "../device-linking/activeWalletSession.js";
|
|
5
4
|
import { routerAbMpcMaterialActivationRefFromWire } from "./routerAbNormalSigningIdentity.js";
|
|
6
5
|
import { normalizeRuntimePolicyScope } from "../threshold/signingRootScope.js";
|
|
7
6
|
import { parseRouterAbEcdsaDerivationNormalSigningStateV1 } from "./routerAbEcdsaDerivation.js";
|
|
8
7
|
import { parseRouterAbEd25519NormalSigningState } from "./signingSessionSeal.js";
|
|
9
8
|
import { parseNearEd25519SigningKeyId } from "./registrationIds.js";
|
|
9
|
+
import { parseNearAccountId } from "./near.js";
|
|
10
10
|
import { parseThresholdEcdsaKeyHandle } from "./thresholdEcdsaKeyHandle.js";
|
|
11
11
|
//#region ../shared-ts/src/utils/registrationEstablishedSession.ts
|
|
12
12
|
function registrationSessionTokensMatchCapabilities(walletSession, tokens) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { parseEmailOtpProviderUserId, parseWalletId } from "./domainIds.js";
|
|
2
2
|
import { base64UrlEncode } from "./base64.js";
|
|
3
3
|
import { alphabetizeStringify, sha256BytesUtf8 } from "./digests.js";
|
|
4
|
-
import "./encoders.js";
|
|
5
4
|
//#region ../shared-ts/src/utils/registrationIds.ts
|
|
6
5
|
function walletIdFromString(value) {
|
|
7
6
|
const parsed = parseWalletId(value);
|
|
@@ -161,10 +160,7 @@ function parseServerAllocatedWalletId(raw) {
|
|
|
161
160
|
const suffix = match?.[3] || "";
|
|
162
161
|
if (!match || !SERVER_ALLOCATED_WALLET_ADJECTIVE_SET.has(adjective) || !SERVER_ALLOCATED_WALLET_NOUN_SET.has(noun) || !serverAllocatedWalletSuffixIsValid(suffix)) return {
|
|
163
162
|
ok: false,
|
|
164
|
-
error: {
|
|
165
|
-
code: "invalid",
|
|
166
|
-
message: "server-allocated walletId must match the approved readable word-word-suffix allocation format"
|
|
167
|
-
}
|
|
163
|
+
error: { message: "server-allocated walletId must match the approved readable word-word-suffix allocation format" }
|
|
168
164
|
};
|
|
169
165
|
return {
|
|
170
166
|
ok: true,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { parseWalletAuthMethodId, parseWalletAuthorityId } from "./domainIds.js";
|
|
2
2
|
import { base64UrlEncode } from "./base64.js";
|
|
3
3
|
import { alphabetizeStringify, sha256BytesUtf8 } from "./digests.js";
|
|
4
|
-
import "./encoders.js";
|
|
5
4
|
import { inspectRawObject, trimString } from "./registrationAuthMethodInput.js";
|
|
6
5
|
import "./registrationSignerPlan.js";
|
|
7
6
|
//#region ../shared-ts/src/utils/registrationIntent.ts
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region ../shared-ts/src/utils/registrationSetupOperation.ts
|
|
2
|
+
function parseRegistrationSetupOperationId(value) {
|
|
3
|
+
return typeof value === "string" && /^wreg_[A-Za-z0-9_-]{43}$/u.test(value) ? value : null;
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { parseRegistrationSetupOperationId };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=registrationSetupOperation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { alphabetizeStringify } from "./digests.js";
|
|
2
|
-
import { parseNamedNearAccountId } from "./near.js";
|
|
3
2
|
import { inspectRawObject, trimString } from "./registrationAuthMethodInput.js";
|
|
3
|
+
import { parseNamedNearAccountId } from "./near.js";
|
|
4
4
|
//#region ../shared-ts/src/utils/registrationSignerPlan.ts
|
|
5
5
|
function normalizePositiveInteger(raw, fallback) {
|
|
6
6
|
const value = typeof raw === "number" ? raw : Number(raw);
|
|
@@ -3,7 +3,6 @@ import { EVM_ECDSA_MPC_OPERATION_KINDS, parseEcdsaAuthorizationSessionId, parseM
|
|
|
3
3
|
import { base64UrlDecode, base64UrlEncode } from "./base64.js";
|
|
4
4
|
import { alphabetizeStringify, sha256BytesUtf8 } from "./digests.js";
|
|
5
5
|
import { parseCorrelationId } from "./canonicalPrimitives.js";
|
|
6
|
-
import "./encoders.js";
|
|
7
6
|
import { requireRecord } from "./validation.js";
|
|
8
7
|
import { parseActiveWalletSessionV1, parseWalletSessionOperationCredentialV1 } from "../device-linking/activeWalletSession.js";
|
|
9
8
|
import { requireRouterAbX25519PublicKey } from "./routerAbPublicKeyset.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { normalizeOptionalTrimmedString } from "./normalize.js";
|
|
2
|
-
import "./near.js";
|
|
3
2
|
//#region ../shared-ts/src/utils/validation.ts
|
|
4
3
|
function requireTrimmedString(value, label, message = "is required") {
|
|
5
4
|
const parsed = normalizeOptionalTrimmedString(value);
|
|
@@ -24,9 +23,6 @@ function isObject(x) {
|
|
|
24
23
|
function isPlainObject(x) {
|
|
25
24
|
return isObject(x) && !Array.isArray(x);
|
|
26
25
|
}
|
|
27
|
-
function isString(x) {
|
|
28
|
-
return typeof x === "string";
|
|
29
|
-
}
|
|
30
26
|
function isFunction(x) {
|
|
31
27
|
return typeof x === "function";
|
|
32
28
|
}
|
|
@@ -49,6 +45,6 @@ function requireArray(value, label) {
|
|
|
49
45
|
return value;
|
|
50
46
|
}
|
|
51
47
|
//#endregion
|
|
52
|
-
export { asRecord, coerceNonEmptyString, isFunction, isObject, isPlainObject,
|
|
48
|
+
export { asRecord, coerceNonEmptyString, isFunction, isObject, isPlainObject, requireArray, requireCanonicalString, requireNonEmptyString, requireRecord, requireRecordCopy, requireRecordOrArray, requireTrimmedString };
|
|
53
49
|
|
|
54
50
|
//# sourceMappingURL=validation.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { parseEmailOtpProviderUserId, parseWalletAuthMethodId, parseWalletAuthorityBindingDigest, parseWalletId, parseWebAuthnCredentialIdB64u, parseWebAuthnRpId } from "./domainIds.js";
|
|
2
2
|
import { base64UrlEncode } from "./base64.js";
|
|
3
3
|
import { alphabetizeStringify, sha256BytesUtf8 } from "./digests.js";
|
|
4
|
-
import "./encoders.js";
|
|
5
4
|
//#region ../shared-ts/src/utils/walletAuthAuthority.ts
|
|
6
5
|
const WALLET_AUTHORITY_BINDING_DIGEST_DOMAIN = "seams:wallet-authority-binding:v1|";
|
|
7
6
|
function isPasskeyWalletAuthAuthority(authority) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { requireRecord } from "./validation.js";
|
|
2
2
|
import { exactRecord } from "./exactRecord.js";
|
|
3
3
|
//#region ../shared-ts/src/utils/wireSchema.ts
|
|
4
4
|
/** One of the given strings. */
|
|
@@ -42,17 +42,6 @@ function wireUnion(tag, variants) {
|
|
|
42
42
|
function wireNullable(parse) {
|
|
43
43
|
return (raw, label) => raw === null ? null : parse(raw, label);
|
|
44
44
|
}
|
|
45
|
-
/** A non-empty array of `item`; `refine` checks rules that span the items. */
|
|
46
|
-
function wireNonEmptyArray(item, refine) {
|
|
47
|
-
return (raw, label) => {
|
|
48
|
-
const entries = requireArray(raw, label);
|
|
49
|
-
if (entries.length === 0) throw new Error(`${label} must be non-empty`);
|
|
50
|
-
const [first, ...rest] = entries.map((entry, index) => item(entry, `${label}[${index}]`));
|
|
51
|
-
const items = [first, ...rest];
|
|
52
|
-
refine?.(items, label);
|
|
53
|
-
return items;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
45
|
/** Adapts a parser that returns a result, putting the field's label before its error. */
|
|
57
46
|
function wireResult(parse) {
|
|
58
47
|
return (raw, label) => {
|
|
@@ -72,6 +61,6 @@ function wireLabeled(parse) {
|
|
|
72
61
|
};
|
|
73
62
|
}
|
|
74
63
|
//#endregion
|
|
75
|
-
export { wireLabeled, wireLiteral,
|
|
64
|
+
export { wireLabeled, wireLiteral, wireNullable, wireObject, wireResult, wireUnion };
|
|
76
65
|
|
|
77
66
|
//# sourceMappingURL=wireSchema.js.map
|