@seams/wallet-server 0.8.0 → 0.9.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.
Files changed (369) hide show
  1. package/THIRD_PARTY_NOTICES.md +7 -1
  2. package/artifact-manifest.json +196 -41
  3. package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -1
  4. package/cloudflare-router-ab/build/deriver-a/index.js +2 -2
  5. package/cloudflare-router-ab/build/deriver-a/index_bg.wasm +0 -0
  6. package/cloudflare-router-ab/build/deriver-b/build-stamp.json +1 -1
  7. package/cloudflare-router-ab/build/deriver-b/index.js +2 -2
  8. package/cloudflare-router-ab/build/deriver-b/index_bg.wasm +0 -0
  9. package/cloudflare-router-ab/build/local-tools/darwin-arm64/router_ab_local_init +0 -0
  10. package/cloudflare-router-ab/build/local-tools/darwin-x64/router_ab_local_init +0 -0
  11. package/cloudflare-router-ab/build/local-tools/linux-x64/router_ab_local_init +0 -0
  12. package/cloudflare-router-ab/build/router/build-stamp.json +1 -1
  13. package/cloudflare-router-ab/build/router/index.js +2 -2
  14. package/cloudflare-router-ab/build/router/index_bg.wasm +0 -0
  15. package/cloudflare-router-ab/build/signing-worker/build-stamp.json +1 -1
  16. package/cloudflare-router-ab/build/signing-worker/index.js +2 -2
  17. package/cloudflare-router-ab/build/signing-worker/index_bg.wasm +0 -0
  18. package/cloudflare-router-ab/build/tenant-root-control-plane/build-stamp.json +1 -1
  19. package/cloudflare-router-ab/build/tenant-root-control-plane/index.js +2 -2
  20. package/cloudflare-router-ab/build/tenant-root-control-plane/index_bg.wasm +0 -0
  21. package/cloudflare-router-ab/migrations/deriver-a/0019_wallet_object_addresses.sql +10 -0
  22. package/cloudflare-router-ab/migrations/deriver-b/0019_wallet_object_addresses.sql +10 -0
  23. package/cloudflare-router-ab/scripts/prepare-local-runtime-config.mjs +3 -117
  24. package/cloudflare-router-ab/wrangler.deriver-a.toml +0 -8
  25. package/cloudflare-router-ab/wrangler.deriver-b.toml +24 -8
  26. package/cloudflare-router-ab/wrangler.router.toml +0 -2
  27. package/cloudflare-router-ab/wrangler.signing-worker.toml +29 -0
  28. package/dist/esm/authorization/domain.js +3 -2
  29. package/dist/esm/authorization/ed25519WalletSessionAdmission.js +0 -0
  30. package/dist/esm/authorization/service.js +64 -36
  31. package/dist/esm/cloud-host.js +24 -19
  32. package/dist/esm/core/EmailOtpRecords.js +29 -6
  33. package/dist/esm/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.js +2 -0
  34. package/dist/esm/core/ThresholdService/routerAb/ecdsaDerivationPresignBridge.js +10 -0
  35. package/dist/esm/core/ThresholdService/routerAb/internalServiceHttp.js +1 -0
  36. package/dist/esm/core/ThresholdService/validation.js +2 -2
  37. package/dist/esm/core/authService/nearPrivateKeySigning.js +1 -1
  38. package/dist/esm/core/authService/webauthn.js +1 -1
  39. package/dist/esm/core/d1Ed25519SignerRead.js +55 -0
  40. package/dist/esm/core/d1WalletStore.js +14 -11
  41. package/dist/esm/core/deviceLinking/linkedDeviceEmailOtpGrant.js +2 -2
  42. package/dist/esm/core/deviceLinking/linkedDeviceManagement.js +1 -1
  43. package/dist/esm/core/deviceLinking/linkedDeviceSessionRecord.js +2 -2
  44. package/dist/esm/core/emailOtpD1Statements.js +1 -0
  45. package/dist/esm/core/nearRelayerAccountProvisioning.js +1 -1
  46. package/dist/esm/core/routerAbSigning/RouterAbEcdsaPresignRuntime.js +4 -0
  47. package/dist/esm/core/signingLanes/WalletExecutionLaneProjection.js +1 -1
  48. package/dist/esm/core/signingMaterial/ordinaryInactiveSignerMaterialReservation.js +1 -0
  49. package/dist/esm/hosted-wallet-gateway.js +93 -10
  50. package/dist/esm/localHostedWalletGatewayHandler.js +12 -9
  51. package/dist/esm/localIntendedYaoSigningFault.js +2 -30
  52. package/dist/esm/localRegistrationSetupAuthority.js +8 -1
  53. package/dist/esm/router/auth/commonRouterUtils.js +17 -10
  54. package/dist/esm/router/auth/routerApiCredentialAuth.js +26 -7
  55. package/dist/esm/router/auth/walletRegistrationContext.js +49 -0
  56. package/dist/esm/router/auth/webAuthnCredentialCodecs.js +1 -1
  57. package/dist/esm/router/cloudflare/d1/auth/d1AuthorizationAssembly.js +4 -3
  58. package/dist/esm/router/cloudflare/d1/auth/d1AuthorizedOperationRouteService.js +2 -0
  59. package/dist/esm/router/cloudflare/d1/auth/d1EmailOtpRouteService.js +25 -0
  60. package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthConfig.js +14 -6
  61. package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +44 -40
  62. package/dist/esm/router/cloudflare/d1/auth/walletSessionCredentialReaders.js +17 -1
  63. package/dist/esm/router/cloudflare/d1/authorization/authorizedOperationStatements.js +35 -5
  64. package/dist/esm/router/cloudflare/d1/authorization/d1AuthorizationStore.js +258 -99
  65. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js +31 -4
  66. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.js +1 -1
  67. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRequestProofNonceStore.js +1 -1
  68. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionRecords.js +1 -1
  69. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.js +1 -1
  70. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetPlanner.js +1 -1
  71. package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceVerifiedLinkBuilder.js +1 -1
  72. package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoLifecycleDecisionStore.js +11 -2
  73. package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.js +100 -10
  74. package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoStateWriteFence.js +92 -0
  75. package/dist/esm/router/cloudflare/d1/ed25519Yao/d1WalletCeremonyActivity.js +77 -0
  76. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeIssuer.js +14 -8
  77. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.js +14 -8
  78. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeVerifier.js +3 -1
  79. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRateLimitStore.js +58 -38
  80. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.js +27 -20
  81. package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.js +1 -0
  82. package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +1 -0
  83. package/dist/esm/router/cloudflare/d1/oidc/d1OidcBoundary.js +1 -1
  84. package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +18 -7
  85. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.js +75 -14
  86. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +1 -1
  87. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.js +49 -29
  88. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationSessionTransaction.js +28 -0
  89. package/dist/esm/router/cloudflare/d1/registration/d1RegistrationSetupSupport.js +11 -1
  90. package/dist/esm/router/cloudflare/d1/registration/d1WalletExecutionAuthority.js +168 -0
  91. package/dist/esm/router/cloudflare/d1/registration/d1WalletOperationStore.js +53 -0
  92. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +83 -42
  93. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationInitialSession.js +33 -0
  94. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationPreparation.js +16 -0
  95. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationRead.js +58 -0
  96. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +439 -500
  97. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetup.js +1 -1
  98. package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.js +104 -90
  99. package/dist/esm/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.js +78 -44
  100. package/dist/esm/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.js +11 -35
  101. package/dist/esm/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.js +98 -39
  102. package/dist/esm/router/cloudflare/d1/versionedJson/d1VersionedJsonRecordStore.js +12 -9
  103. package/dist/esm/router/cloudflare/d1/wallet/authorizationSnapshotLayout.js +168 -0
  104. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerFinalizeRecord.js +1 -1
  105. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerService.js +15 -6
  106. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +3 -40
  107. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorityStore.js +54 -1
  108. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationCleanup.js +157 -0
  109. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationFreeze.js +56 -0
  110. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationHistory.js +238 -0
  111. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationIntake.js +287 -0
  112. package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorizationSnapshot.js +295 -0
  113. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationApprovals.js +140 -0
  114. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationChallenges.js +170 -0
  115. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationEmailOtp.js +60 -0
  116. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationOwner.js +33 -0
  117. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationOwnerRequest.js +74 -0
  118. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationPasskey.js +77 -0
  119. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationReadAccess.js +37 -0
  120. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationSessions.js +97 -0
  121. package/dist/esm/router/cloudflare/d1/wallet/d1WalletRelocationWriteBlock.js +133 -0
  122. package/dist/esm/router/cloudflare/d1/walletObjectAddresses.js +47 -0
  123. package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.js +1 -1
  124. package/dist/esm/router/cloudflare/runtime/routerAbServiceBindings.js +32 -1
  125. package/dist/esm/router/cloudflare/runtime/staticWalletConsoleBinding.js +20 -8
  126. package/dist/esm/router/cloudflare/runtime/walletAuthorizationRelocationRoutes.js +488 -0
  127. package/dist/esm/router/cloudflare/runtime/walletConsoleOps.js +1 -1
  128. package/dist/esm/router/cloudflare/runtime/walletConsoleOpsClient.js +26 -6
  129. package/dist/esm/router/cloudflare/runtime/walletControlOps.js +3 -0
  130. package/dist/esm/router/cloudflare/runtime/walletGateway.js +1 -1
  131. package/dist/esm/router/cloudflare/runtime/walletObjectAddresses.js +105 -0
  132. package/dist/esm/router/cloudflare/runtime/walletPlacementRoutes.js +339 -0
  133. package/dist/esm/router/cloudflare/runtime/walletRelocationDeriver.js +244 -0
  134. package/dist/esm/router/cloudflare/runtime/walletRelocationEcdsa.js +212 -0
  135. package/dist/esm/router/cloudflare/runtime/walletRelocationEd25519.js +172 -0
  136. package/dist/esm/router/cloudflare/runtime/walletRelocationOps.js +183 -0
  137. package/dist/esm/router/cloudflare/runtime/walletRelocationPresign.js +185 -0
  138. package/dist/esm/router/cloudflare/runtime/walletRelocationSource.js +221 -0
  139. package/dist/esm/router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.js +30 -8
  140. package/dist/esm/router/cloudflare-adaptor.js +8 -8
  141. package/dist/esm/router/cloudflare.js +34115 -32240
  142. package/dist/esm/router/domains/ecdsa/routerAbEcdsaStrictRegistration.js +35 -9
  143. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoCapabilityCommit.js +42 -0
  144. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js +32 -6
  145. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js +61 -1
  146. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPersistence.js +70 -3
  147. package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js +59 -87
  148. package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +52 -22
  149. package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExportRequestScopedCloudflare.js +10 -7
  150. package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.js +108 -78
  151. package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryRequestScopedCloudflare.js +19 -5
  152. package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryWalletSessionAuthorization.js +71 -22
  153. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js +37 -25
  154. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.js +3 -3
  155. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationExecutionRecord.js +2 -1
  156. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.js +24 -3
  157. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js +4 -3
  158. package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationSideEffectBoundary.js +20 -7
  159. package/dist/esm/router/domains/ed25519Yao/routerAbEd25519YaoGatewayEnvelope.js +7 -1
  160. package/dist/esm/router/domains/emailOtp/emailOtpRouteHandlers.js +2 -2
  161. package/dist/esm/router/domains/passkeyCustody/passkeyCustodyEnvelopeRetrieval.js +1 -1
  162. package/dist/esm/router/domains/passkeyCustody/registrationCustodyOutcome.js +34 -18
  163. package/dist/esm/router/domains/passkeyCustody/walletCustodyRegistrationAdmission.js +2 -2
  164. package/dist/esm/router/domains/passkeyCustody/walletCustodyRegistrationCommit.js +16 -6
  165. package/dist/esm/router/domains/signingOperations/authorizedOperationWire.js +73 -0
  166. package/dist/esm/router/domains/signingOperations/ecdsaSigningResponse.js +31 -0
  167. package/dist/esm/router/domains/signingOperations/ed25519AuthorizedOperationReceipt.js +1 -1
  168. package/dist/esm/router/domains/signingOperations/routerAbEcdsaDerivationNormalSigningRoute.js +2 -1
  169. package/dist/esm/router/domains/signingOperations/routerAbEd25519NormalSigningRoute.js +31 -121
  170. package/dist/esm/router/domains/signingOperations/routerAbNormalSigningAdmission.js +2 -93
  171. package/dist/esm/router/domains/signingOperations/routerAbPrivateSigningWorker.js +1 -1
  172. package/dist/esm/router/domains/signingOperations/signingPrepareSession.js +33 -0
  173. package/dist/esm/router/domains/walletRegistration/registrationSessionSeal.js +121 -0
  174. package/dist/esm/router/domains/walletRegistration/walletRegistrationReservation.js +4 -4
  175. package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +46 -157
  176. package/dist/esm/router/domains/walletRegistration/walletRegistrationSetupPayload.js +1 -1
  177. package/dist/esm/router/express.js +764 -894
  178. package/dist/esm/router/framework/http.js +2 -1
  179. package/dist/esm/router/transport/fetch/createFetchRouter.js +2 -2
  180. package/dist/esm/router/transport/fetch/routes/auth.js +1 -1
  181. package/dist/esm/router/transport/fetch/routes/deviceLinking.js +3 -3
  182. package/dist/esm/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.js +2 -2
  183. package/dist/esm/router/transport/fetch/routes/ed25519AuthorizedOperationRevalidation.js +65 -0
  184. package/dist/esm/router/transport/fetch/routes/normalSigningRouterProxy.js +13 -3
  185. package/dist/esm/router/transport/fetch/routes/passkeyCustody.js +3 -3
  186. package/dist/esm/router/transport/fetch/routes/sessions.js +3 -2
  187. package/dist/esm/router/transport/fetch/routes/thresholdEcdsa.js +67 -130
  188. package/dist/esm/router/transport/fetch/routes/thresholdEd25519.js +76 -212
  189. package/dist/esm/router/transport/fetch/routes/walletExecutionLanePreflight.js +18 -41
  190. package/dist/esm/router/transport/fetch/routes/walletRegistration.js +6 -5
  191. package/dist/esm/router/transport/fetch/routes/webauthnAuthenticators.js +1 -1
  192. package/dist/esm/shared-ts/src/authorization/index.js +1 -1
  193. package/dist/esm/shared-ts/src/authorization/walletAuthority.js +2 -2
  194. package/dist/esm/shared-ts/src/device-linking/activeWalletSession.js +12 -2
  195. package/dist/esm/shared-ts/src/device-linking/digests.js +1 -1
  196. package/dist/esm/shared-ts/src/device-linking/ed25519ExportRoot.js +1 -1
  197. package/dist/esm/shared-ts/src/device-linking/index.js +1 -1
  198. package/dist/esm/shared-ts/src/device-linking/parsers.js +1 -1
  199. package/dist/esm/shared-ts/src/device-linking/sourceContribution.js +1 -1
  200. package/dist/esm/shared-ts/src/device-linking/wireFields.js +1 -1
  201. package/dist/esm/shared-ts/src/near/nearClient.js +1 -1
  202. package/dist/esm/shared-ts/src/signing-lanes/ownerContinuity.js +2 -2
  203. package/dist/esm/shared-ts/src/utils/ecdsaServerTiming.js +6 -1
  204. package/dist/esm/shared-ts/src/utils/emailOtpDomain.js +4 -2
  205. package/dist/esm/shared-ts/src/utils/routerAbEcdsaDerivation.js +1 -1
  206. package/dist/esm/shared-ts/src/utils/routerAbPublicKeyset.js +0 -27
  207. package/dist/esm/shared-ts/src/wallet-recovery/walletRecoveryEcdsaPossession.js +1 -1
  208. package/dist/esm/threshold/session/signingSessionSeal/options.js +1 -1
  209. package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
  210. package/dist/types/shared-ts/src/device-linking/activeWalletSession.d.ts +2 -1
  211. package/dist/types/shared-ts/src/device-linking/contracts.d.ts +10 -0
  212. package/dist/types/shared-ts/src/threshold/ed25519OperationFingerprint.d.ts +2 -1
  213. package/dist/types/shared-ts/src/utils/emailOtpDomain.d.ts +3 -1
  214. package/dist/types/shared-ts/src/utils/routerAbPublicKeyset.d.ts +0 -9
  215. package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +1 -1
  216. package/dist/types/wallet-server/src/authorization/domain.d.ts +17 -1
  217. package/dist/types/wallet-server/src/authorization/ecdsaWalletSessionAdmission.d.ts +1 -0
  218. package/dist/types/wallet-server/src/authorization/ed25519WalletSessionAdmission.d.ts +35 -0
  219. package/dist/types/wallet-server/src/authorization/ed25519WalletSessionAdmission.typecheck.d.ts +2 -0
  220. package/dist/types/wallet-server/src/authorization/service.d.ts +43 -5
  221. package/dist/types/wallet-server/src/authorization/sessionRouting.d.ts +2 -0
  222. package/dist/types/wallet-server/src/cloud-host.d.ts +7 -3
  223. package/dist/types/wallet-server/src/core/EmailOtpRecords.d.ts +2 -1
  224. package/dist/types/wallet-server/src/core/EmailOtpStores.d.ts +19 -5
  225. package/dist/types/wallet-server/src/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.d.ts +1 -0
  226. package/dist/types/wallet-server/src/core/ThresholdService/routerAb/ecdsaDerivationPresignBridge.d.ts +6 -0
  227. package/dist/types/wallet-server/src/core/ThresholdService/routerAb/internalServiceHttp.d.ts +1 -0
  228. package/dist/types/wallet-server/src/core/d1Ed25519SignerRead.d.ts +17 -0
  229. package/dist/types/wallet-server/src/core/d1WalletStore.d.ts +6 -0
  230. package/dist/types/wallet-server/src/core/emailOtpD1Statements.d.ts +1 -0
  231. package/dist/types/wallet-server/src/core/routerAbSigning/RouterAbEcdsaPresignRuntime.d.ts +5 -1
  232. package/dist/types/wallet-server/src/core/signingMaterial/ordinaryInactiveSignerMaterialReservation.d.ts +1 -0
  233. package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.d.ts +14 -48
  234. package/dist/types/wallet-server/src/hosted-wallet-gateway.d.ts +4 -3
  235. package/dist/types/wallet-server/src/localIntendedYaoSigningFault.d.ts +1 -16
  236. package/dist/types/wallet-server/src/localRegistrationSetupAuthority.d.ts +1 -1
  237. package/dist/types/wallet-server/src/router/auth/commonRouterUtils.d.ts +7 -1
  238. package/dist/types/wallet-server/src/router/auth/routerApiCredentialAuth.d.ts +11 -3
  239. package/dist/types/wallet-server/src/router/auth/walletRegistrationContext.d.ts +8 -0
  240. package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1AuthorizationAssembly.d.ts +1 -1
  241. package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1EmailOtpRouteService.d.ts +16 -0
  242. package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RouterApiAuthConfig.d.ts +7 -4
  243. package/dist/types/wallet-server/src/router/cloudflare/d1/auth/d1RouterApiAuthService.d.ts +4 -1
  244. package/dist/types/wallet-server/src/router/cloudflare/d1/auth/walletSessionCredentialReaders.d.ts +7 -1
  245. package/dist/types/wallet-server/src/router/cloudflare/d1/authorization/d1AuthorizationStore.d.ts +32 -1
  246. package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.d.ts +2 -0
  247. package/dist/types/wallet-server/src/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoLifecycleDecisionStore.d.ts +3 -1
  248. package/dist/types/wallet-server/src/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.d.ts +1 -0
  249. package/dist/types/wallet-server/src/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoStateWriteFence.d.ts +8 -0
  250. package/dist/types/wallet-server/src/router/cloudflare/d1/ed25519Yao/d1WalletCeremonyActivity.d.ts +15 -0
  251. package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeIssuer.d.ts +6 -1
  252. package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.d.ts +1 -0
  253. package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeVerifier.d.ts +4 -1
  254. package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpCounters.typecheck.d.ts +2 -0
  255. package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRateLimitStore.d.ts +6 -29
  256. package/dist/types/wallet-server/src/router/cloudflare/d1/emailOtp/d1EmailOtpRecords.d.ts +21 -7
  257. package/dist/types/wallet-server/src/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.d.ts +17 -1
  258. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.d.ts +32 -7
  259. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.d.ts +16 -7
  260. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationSessionTransaction.d.ts +13 -0
  261. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationSetupSupport.d.ts +7 -0
  262. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletExecutionAuthority.d.ts +41 -0
  263. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletOperationStore.d.ts +28 -0
  264. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.d.ts +6 -9
  265. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationInitialSession.d.ts +17 -0
  266. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationPreparation.d.ts +12 -0
  267. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationRead.d.ts +43 -0
  268. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationService.d.ts +24 -45
  269. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.d.ts +9 -4
  270. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.d.ts +42 -14
  271. package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationSessionCommitReceipt.d.ts +5 -4
  272. package/dist/types/wallet-server/src/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.d.ts +24 -1
  273. package/dist/types/wallet-server/src/router/cloudflare/d1/versionedJson/d1VersionedJsonRecordStore.d.ts +10 -4
  274. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/authorizationSnapshotLayout.d.ts +21 -0
  275. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAddSignerService.d.ts +3 -0
  276. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthMethodService.d.ts +3 -7
  277. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorityStore.d.ts +8 -0
  278. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorizationCleanup.d.ts +20 -0
  279. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorizationFreeze.d.ts +12 -0
  280. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorizationHistory.d.ts +20 -0
  281. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorizationIntake.d.ts +29 -0
  282. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletAuthorizationSnapshot.d.ts +31 -0
  283. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationApprovals.d.ts +49 -0
  284. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationChallenges.d.ts +47 -0
  285. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationEmailOtp.d.ts +25 -0
  286. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationOwner.d.ts +88 -0
  287. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationOwnerRequest.d.ts +37 -0
  288. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationPasskey.d.ts +12 -0
  289. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationReadAccess.d.ts +18 -0
  290. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationSessions.d.ts +23 -0
  291. package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationWriteBlock.d.ts +16 -0
  292. package/dist/types/wallet-server/src/router/cloudflare/d1/walletObjectAddresses.d.ts +14 -0
  293. package/dist/types/wallet-server/src/router/cloudflare/runtime/routerAbServiceBindings.d.ts +13 -0
  294. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletAuthorizationRelocationRoutes.d.ts +21 -0
  295. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletConsoleOps.d.ts +1 -1
  296. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletConsoleOpsClient.d.ts +3 -3
  297. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletControlOps.d.ts +2 -1
  298. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletGateway.d.ts +3 -1
  299. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletObjectAddresses.d.ts +45 -0
  300. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletPlacementRoutes.d.ts +30 -0
  301. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRelocationDeriver.d.ts +11 -0
  302. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRelocationEcdsa.d.ts +7 -0
  303. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRelocationEd25519.d.ts +7 -0
  304. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRelocationOps.d.ts +11 -0
  305. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRelocationPresign.d.ts +7 -0
  306. package/dist/types/wallet-server/src/router/cloudflare/runtime/walletRelocationSource.d.ts +26 -0
  307. package/dist/types/wallet-server/src/router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.d.ts +5 -0
  308. package/dist/types/wallet-server/src/router/domains/ecdsa/routerAbEcdsaStrictRegistration.d.ts +3 -0
  309. package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoCapabilityCommit.d.ts +7 -0
  310. package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.d.ts +41 -7
  311. package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.d.ts +33 -2
  312. package/dist/types/wallet-server/src/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.d.ts +12 -6
  313. package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.d.ts +17 -9
  314. package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryWalletSessionAuthorization.d.ts +2 -0
  315. package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.d.ts +13 -14
  316. package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.d.ts +7 -3
  317. package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationExecutionRecord.d.ts +1 -0
  318. package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.d.ts +6 -1
  319. package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationSideEffectBoundary.d.ts +11 -0
  320. package/dist/types/wallet-server/src/router/domains/ed25519Yao/routerAbEd25519YaoGatewayEnvelope.d.ts +12 -3
  321. package/dist/types/wallet-server/src/router/domains/passkeyCustody/registrationCustodyOutcome.d.ts +10 -6
  322. package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationAdmission.d.ts +10 -3
  323. package/dist/types/wallet-server/src/router/domains/passkeyCustody/walletCustodyRegistrationCommit.d.ts +12 -5
  324. package/dist/types/wallet-server/src/router/domains/signingOperations/authorizedOperationWire.d.ts +97 -0
  325. package/dist/types/wallet-server/src/router/domains/signingOperations/ecdsaSigningResponse.d.ts +13 -0
  326. package/dist/types/wallet-server/src/router/domains/signingOperations/routerAbNormalSigningAdmission.d.ts +9 -206
  327. package/dist/types/wallet-server/src/router/domains/signingOperations/signingPrepareSession.d.ts +23 -0
  328. package/dist/types/wallet-server/src/router/domains/walletRegistration/registrationSessionSeal.d.ts +36 -0
  329. package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationInputs.d.ts +7 -7
  330. package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationReservation.d.ts +80 -6
  331. package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationRoutes.d.ts +15 -5
  332. package/dist/types/wallet-server/src/router/framework/apiCredentialPorts.d.ts +24 -0
  333. package/dist/types/wallet-server/src/router/framework/authServicePort.d.ts +21 -7
  334. package/dist/types/wallet-server/src/router/framework/routerApi.d.ts +3 -12
  335. package/dist/types/wallet-server/src/router/transport/fetch/routes/ed25519AuthorizedOperationRevalidation.d.ts +37 -0
  336. package/dist/types/wallet-server/src/router/transport/fetch/routes/thresholdEcdsa.d.ts +1 -17
  337. package/dist/types/wallet-server/src/storage/tenantRoute.d.ts +1 -1
  338. package/migrations/d1-signer/0049_wallet_relocation_challenges.sql +16 -0
  339. package/migrations/d1-signer/0050_wallet_relocation_approvals.sql +14 -0
  340. package/migrations/d1-signer/0051_wallet_relocation_email_otp.sql +92 -0
  341. package/migrations/d1-signer/0052_wallet_relocation_session_fences.sql +91 -0
  342. package/migrations/d1-signer/0053_wallet_hosted_history_import.sql +164 -0
  343. package/migrations/d1-signer/0054_wallet_authorization_freeze.sql +318 -0
  344. package/migrations/d1-signer/0055_wallet_authorization_snapshot.sql +120 -0
  345. package/migrations/d1-signer/0056_wallet_authorization_history_import.sql +424 -0
  346. package/migrations/d1-signer/0057_wallet_authorization_intake.sql +44 -0
  347. package/migrations/d1-signer/0058_wallet_ceremony_activity.sql +59 -0
  348. package/migrations/d1-signer/0059_wallet_authorization_activation.sql +45 -0
  349. package/migrations/d1-signer/0060_wallet_authorization_cleanup.sql +153 -0
  350. package/migrations/d1-signer/0061_wallet_session_operation_settlement.sql +28 -0
  351. package/migrations/d1-signer/0062_wallet_step_up_operation_settlement.sql +204 -0
  352. package/migrations/d1-signer/0063_wallet_operation_history_transfer.sql +466 -0
  353. package/migrations/d1-signer/0064_wallet_execution_generations.sql +93 -0
  354. package/migrations/d1-signer/0065_wallet_operation_execution_generation.sql +37 -0
  355. package/migrations/d1-signer/0066_regional_deployment_admission.sql +59 -0
  356. package/migrations/d1-signer/0067_registration_completion_decision.sql +12 -0
  357. package/migrations/d1-signer/0068_registration_cancellation_write_fence.sql +24 -0
  358. package/migrations/d1-signer/0069_cancelled_registration_session_fence.sql +11 -0
  359. package/migrations/d1-signer/0070_wallet_passkey_relocation.sql +369 -0
  360. package/migrations/d1-signer/0071_regional_wallet_otp_counters.sql +98 -0
  361. package/migrations/d1-signer/0072_linked_device_relocation_history.sql +899 -0
  362. package/migrations/d1-signer/0073_wallet_recovery_relocation.sql +86 -0
  363. package/migrations/d1-signer/0074_email_otp_relocation.sql +158 -0
  364. package/migrations/d1-signer/0075_wallet_authorization_return.sql +107 -0
  365. package/migrations/d1-signer/0076_wallet_relocation_write_block.sql +406 -0
  366. package/migrations/d1-signer/0077_wallet_object_addresses.sql +24 -0
  367. package/package.json +1 -1
  368. package/src/README.md +23 -1
  369. package/cloudflare-router-ab/scripts/local-key-material.mjs +0 -29
@@ -1,2 +1,2 @@
1
- import{WorkerEntrypoint as ve}from"cloudflare:workers";var J=globalThis.__worker_init_state={criticalError:!1,instanceId:0};import X from"./index_bg.wasm";var x=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,fe.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_containerstartupoptions_free(e,0)}get enableInternet(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_containerstartupoptions_enableInternet(this.__wbg_ptr),e===16777215?void 0:e!==0}get entrypoint(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;s(),e=_.__wbg_get_containerstartupoptions_entrypoint(this.__wbg_ptr);var t=le(e[0],e[1]).slice();return _.__wbindgen_free(e[0],e[1]*4,4),t}get env(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_containerstartupoptions_env(this.__wbg_ptr),e}set enableInternet(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_containerstartupoptions_enableInternet(this.__wbg_ptr,f(e)?16777215:e?1:0)}set entrypoint(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t=pe(e,_.__wbindgen_malloc),n=l;s(),_.__wbg_set_containerstartupoptions_entrypoint(this.__wbg_ptr,t,n)}set env(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_containerstartupoptions_env(this.__wbg_ptr,e)}};Symbol.dispose&&(x.prototype[Symbol.dispose]=x.prototype.free);var I=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,be.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_intounderlyingbytesource_free(e,0)}get autoAllocateChunkSize(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr),e>>>0}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s(),_.intounderlyingbytesource_cancel(e)}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.intounderlyingbytesource_pull(this.__wbg_ptr,e),t}start(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.intounderlyingbytesource_start(this.__wbg_ptr,e)}get type(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.intounderlyingbytesource_type(this.__wbg_ptr),ce[e]}};Symbol.dispose&&(I.prototype[Symbol.dispose]=I.prototype.free);var R=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ge.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_intounderlyingsink_free(e,0)}abort(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t=this.__destroy_into_raw(),n;return s(),n=_.intounderlyingsink_abort(t,e),n}close(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw(),t;return s(),t=_.intounderlyingsink_close(e),t}write(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.intounderlyingsink_write(this.__wbg_ptr,e),t}};Symbol.dispose&&(R.prototype[Symbol.dispose]=R.prototype.free);var E=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,de.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_intounderlyingsource_free(e,0)}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s(),_.intounderlyingsource_cancel(e)}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.intounderlyingsource_pull(this.__wbg_ptr,e),t}};Symbol.dispose&&(E.prototype[Symbol.dispose]=E.prototype.free);var j=class r{static __wrap(e){let t=Object.create(r.prototype);return t.__wbg_ptr=e,Object.defineProperty(t,"__wbg_inst",{value:o,writable:!0}),$.register(t,{ptr:e,instance:o},t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_minifyconfig_free(e,0)}get css(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_minifyconfig_css(this.__wbg_ptr),e!==0}get html(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_minifyconfig_html(this.__wbg_ptr),e!==0}get js(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_minifyconfig_js(this.__wbg_ptr),e!==0}set css(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_minifyconfig_css(this.__wbg_ptr,e)}set html(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_minifyconfig_html(this.__wbg_ptr,e)}set js(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_minifyconfig_js(this.__wbg_ptr,e)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);var F=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,we.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_r2range_free(e,0)}get length(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_r2range_length(this.__wbg_ptr),e[0]===0?void 0:e[1]}get offset(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_r2range_offset(this.__wbg_ptr),e[0]===0?void 0:e[1]}get suffix(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_r2range_suffix(this.__wbg_ptr),e[0]===0?void 0:e[1]}set length(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_r2range_length(this.__wbg_ptr,!f(e),f(e)?0:e)}set offset(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_r2range_offset(this.__wbg_ptr,!f(e),f(e)?0:e)}set suffix(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_r2range_suffix(this.__wbg_ptr,!f(e),f(e)?0:e)}};Symbol.dispose&&(F.prototype[Symbol.dispose]=F.prototype.free);var S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_routerabrouterwalletdurableobject_free(e,0)}alarm(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.routerabrouterwalletdurableobject_alarm(this.__wbg_ptr),e}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.routerabrouterwalletdurableobject_fetch(this.__wbg_ptr,e),t}constructor(e,t){let n;return s(),n=_.routerabrouterwalletdurableobject_new(e,t),this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:o,writable:!0}),H.register(this,{ptr:n,instance:o},this),this}webSocketClose(e,t,n,i){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let a=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l,b;return s(),b=_.routerabrouterwalletdurableobject_webSocketClose(this.__wbg_ptr,e,t,a,u,i),b}webSocketError(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let n;return s(),n=_.routerabrouterwalletdurableobject_webSocketError(this.__wbg_ptr,e,t),n}webSocketMessage(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let n;return s(),n=_.routerabrouterwalletdurableobject_webSocketMessage(this.__wbg_ptr,e,t),n}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);var k=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_routerabsigningworkerpresignsessiondurableobject_free(e,0)}alarm(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.routerabsigningworkerpresignsessiondurableobject_alarm(this.__wbg_ptr),e}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.routerabsigningworkerpresignsessiondurableobject_fetch(this.__wbg_ptr,e),t}constructor(e,t){let n;return s(),n=_.routerabsigningworkerpresignsessiondurableobject_new(e,t),this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:o,writable:!0}),G.register(this,{ptr:n,instance:o},this),this}};Symbol.dispose&&(k.prototype[Symbol.dispose]=k.prototype.free);var W=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,K.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_routerabtenantrootcreationdurableobject_free(e,0)}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.routerabtenantrootcreationdurableobject_fetch(this.__wbg_ptr,e),t}constructor(e,t){let n;return s(),n=_.routerabtenantrootcreationdurableobject_new(e,t),this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:o,writable:!0}),K.register(this,{ptr:n,instance:o},this),this}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);function L(){o++,v=null,O=null,typeof numBytesDecoded<"u"&&(numBytesDecoded=0),typeof l<"u"&&(l=0),ne=!1,q=new WebAssembly.Instance(X,te()),_=q.exports,_.__wbindgen_start()}function Y(){let r;return s(),r=_.__worker_init_state(),r}function Z(r,e,t){let n;return s(),n=_.fetch(r,e,t),n}function ee(){s(),_.init()}function te(){return{__proto__:null,"./index_bg.js":{__proto__:null,__wbg_Error_9dc85fe1bc224456:function(e,t){return Error(d(e,t))},__wbg_Number_4779d427bae39753:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=String(t),i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l;g().setInt32(e+4,a,!0),g().setInt32(e+0,i,!0)},__wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6:function(e,t){let n=t,i=typeof n=="bigint"?n:void 0;g().setBigInt64(e+8,f(i)?BigInt(0):i,!0),g().setInt32(e+0,!f(i),!0)},__wbg___wbindgen_boolean_get_b131b2f36d6b2f55:function(e){let t=e,n=typeof t=="boolean"?t:void 0;return f(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_56c147eb1a51f0c4:function(e,t){let n=V(t),i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l;g().setInt32(e+4,a,!0),g().setInt32(e+0,i,!0)},__wbg___wbindgen_in_ce8569b2fc6f5088:function(e,t){return e in t},__wbg___wbindgen_is_bigint_df272c65456269c2:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_147961669f068cd4:function(e){return typeof e=="function"},__wbg___wbindgen_is_null_or_undefined_b02321d39cf26d8d:function(e){return e==null},__wbg___wbindgen_is_object_3a2c414391dbf751:function(e){let t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_174c93ec61bab0c5:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c:function(e,t){return e==t},__wbg___wbindgen_number_get_588ed6b97f0d7e14:function(e,t){let n=t,i=typeof n=="number"?n:void 0;g().setFloat64(e+8,f(i)?0:i,!0),g().setInt32(e+0,!f(i),!0)},__wbg___wbindgen_string_get_fa2687d531ed17a5:function(e,t){let n=t,i=typeof n=="string"?n:void 0;var a=f(i)?0:y(i,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l;g().setInt32(e+4,u,!0),g().setInt32(e+0,a,!0)},__wbg___wbindgen_throw_bbadd78c1bac3a77:function(e,t){throw new Error(d(e,t))},__wbg__wbg_cb_unref_c2301a3c9b78104b:function(e){e._wbg_cb_unref()},__wbg_body_442a47f02322d7b0:function(e){let t=e.body;return f(t)?0:w(t)},__wbg_body_b06d3a9c5933702e:function(e){let t=e.body;return f(t)?0:w(t)},__wbg_buffer_8524b3453cde4918:function(e){return e.buffer},__wbg_byobRequest_cc72d210de793e64:function(e){let t=e.byobRequest;return f(t)?0:w(t)},__wbg_byteLength_96807b1d9ab24a4c:function(e){return e.byteLength},__wbg_byteOffset_a9c7002428843c41:function(e){return e.byteOffset},__wbg_call_91f00ddc43e01490:function(){return c(function(e,t){return e.call(t)},arguments)},__wbg_call_ec09a4cf93377d3a:function(){return c(function(e,t,n){return e.call(t,n)},arguments)},__wbg_cancel_f3a197b26dc88b39:function(e){return e.cancel()},__wbg_catch_66060324c27be6f7:function(e,t){return e.catch(t)},__wbg_cause_5f2ec35e043cc9cf:function(e){return e.cause},__wbg_cf_22a1527cd02b5acd:function(){return c(function(e){let t=e.cf;return f(t)?0:w(t)},arguments)},__wbg_cf_ee73de251a6dda8a:function(){return c(function(e){let t=e.cf;return f(t)?0:w(t)},arguments)},__wbg_close_388d99468213b286:function(){return c(function(e){e.close()},arguments)},__wbg_close_4857e22d08b71356:function(){return c(function(e){e.close()},arguments)},__wbg_constructor_04971ae0b51c1fc5:function(e){return e.constructor},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_delete_3854c950a92fa1b3:function(){return c(function(e,t,n){return e.delete(d(t,n))},arguments)},__wbg_delete_e21a892409559f6e:function(){return c(function(e,t,n){return e.delete(d(t,n))},arguments)},__wbg_done_6a8439e544ec6206:function(e){return e.done},__wbg_enqueue_bbeb09ba0b140f76:function(){return c(function(e,t){e.enqueue(t)},arguments)},__wbg_entries_5a6a7e7e0df09fe5:function(e){return Object.entries(e)},__wbg_error_6651fee1c71e5da9:function(e){console.error(e)},__wbg_error_9a99766f65a03031:function(e,t){console.error(e,t)},__wbg_fetch_b447ca2a0c0e6583:function(){return c(function(e,t){return e.fetch(t)},arguments)},__wbg_getByName_5f8a4ae327c50115:function(){return c(function(e,t,n){return e.getByName(d(t,n))},arguments)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return c(function(e,t){e.getRandomValues(t)},arguments)},__wbg_getReader_bb0230851fbf986b:function(){return c(function(e){return e.getReader()},arguments)},__wbg_getTime_ef2e115ede346a26:function(e){return e.getTime()},__wbg_get_44e98e27bda25b5b:function(){return c(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_4b90d6d8c5deb5d5:function(e,t){return e[t>>>0]},__wbg_get_52a8a619f7b88df6:function(){return c(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_6e0eec3a0a32f612:function(){return c(function(e,t,n){return e.get(d(t,n))},arguments)},__wbg_get_a82defe8d6b5b2e5:function(){return c(function(e,t,n,i){let a=t.get(d(n,i));var u=f(a)?0:y(a,_.__wbindgen_malloc,_.__wbindgen_realloc),b=l;g().setInt32(e+4,b,!0),g().setInt32(e+0,u,!0)},arguments)},__wbg_get_a87a6c1024dddd3b:function(){return c(function(e,t,n){return e.get(d(t,n))},arguments)},__wbg_get_c538c7fb0359c222:function(){return c(function(e,t){let n=Reflect.get(e,t);return f(n)?0:w(n)},arguments)},__wbg_get_done_c21b9933fc9a9e9c:function(e){let t=e.done;return f(t)?16777215:t?1:0},__wbg_get_unchecked_46e778e3cec74b5e:function(e,t){return e[t>>>0]},__wbg_get_value_ad568c7d3db9073f:function(e){return e.value},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_headers_5b19cf40627ae54d:function(e){return e.headers},__wbg_headers_e1e94862a6a36f9e:function(e){return e.headers},__wbg_idFromName_32b0b5012b5f6535:function(){return c(function(e,t,n){return e.idFromName(d(t,n))},arguments)},__wbg_id_0c05f441a81ef0fc:function(){return c(function(e){return e.id},arguments)},__wbg_instanceId_3970204fcbf0c41d:function(e){return e.instanceId},__wbg_instanceof_ArrayBuffer_a581da923203f29f:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Error_cb5ebd65d798655e:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_Map_7f94c740225003e2:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_ReadableStream_b1eab376911b1b77:function(e){let t;try{t=e instanceof ReadableStream}catch{t=!1}return t},__wbg_instanceof_Response_36a65a969abaa7c6:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_b6fe1ac89eba107e:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_139f48e3c057ede8:function(e){return Array.isArray(e)},__wbg_isSafeInteger_c22ccb4af2201fe9:function(e){return Number.isSafeInteger(e)},__wbg_iterator_9b36cebf3be7b7cd:function(){return Symbol.iterator},__wbg_json_d44033e4c5c27d14:function(){return c(function(e){return e.json()},arguments)},__wbg_keys_6fe253f5073ff078:function(e){return e.keys()},__wbg_length_68a9d5278d084f4f:function(e){return e.length},__wbg_length_fb04d16d7bdf6d4c:function(e){return e.length},__wbg_message_5c6ab4dd6c4b34e8:function(e){return e.message},__wbg_method_f687b49ca8e2b38d:function(e,t){let n=t.method,i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l;g().setInt32(e+4,a,!0),g().setInt32(e+0,i,!0)},__wbg_minifyconfig_new:function(e){return j.__wrap(e)},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_name_72adaf2fce06bbe8:function(e){return e.name},__wbg_name_f60e249a46c5285a:function(e){return e.name},__wbg_new_0_878c6ec3a1c600f3:function(){return new Date},__wbg_new_0b303268aa395a38:function(){return new Array},__wbg_new_189262ff31890c23:function(){return c(function(){return new Headers},arguments)},__wbg_new_20b778a4c5c691c3:function(){return new Object},__wbg_new_5fae30e6b23db8df:function(e,t){return new Error(d(e,t))},__wbg_new_883c0db065f06efd:function(){return new Map},__wbg_new_a21cf41c5c809e4c:function(e){return new Date(e)},__wbg_new_b06772b280cc6e52:function(e){return new Uint8Array(e)},__wbg_new_typed_90c3f6c29ba36d19:function(e,t){try{var n={a:e,b:t},i=(u,b)=>{let p=n.a;n.a=0;try{return se(p,n.b,u,b)}finally{n.a=p}};return new Promise(i)}finally{n.a=0}},__wbg_new_with_byte_offset_and_length_9e1e664fe1a5d385:function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},__wbg_new_with_length_4b57a7a5dc67221c:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_opt_buffer_source_and_init_f51f4fbe98d29f2e:function(){return c(function(e,t){return new Response(e,t)},arguments)},__wbg_new_with_opt_readable_stream_and_init_def67835ea705e4d:function(){return c(function(e,t){return new Response(e,t)},arguments)},__wbg_new_with_opt_str_and_init_11bb6f5faad68c85:function(){return c(function(e,t,n){return new Response(e===0?void 0:d(e,t),n)},arguments)},__wbg_new_with_str_and_init_df876572184fe639:function(){return c(function(e,t,n){return new Request(d(e,t),n)},arguments)},__wbg_next_8cb028b6ba50743f:function(){return c(function(e){return e.next()},arguments)},__wbg_next_cfd0b146c9538df8:function(e){return e.next},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_bce4dc999095ea77:function(){return Date.now()},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_956c7493c68e29b4:function(e,t,n){Uint8Array.prototype.set.call(M(e,t),n)},__wbg_put_27edc2ab773a21be:function(){return c(function(e,t,n,i){return e.put(d(t,n),i)},arguments)},__wbg_queueMicrotask_4698f900840e3286:function(e){queueMicrotask(e)},__wbg_queueMicrotask_477a5533c7100338:function(e){return e.queueMicrotask},__wbg_randomFillSync_6c25eac9869eb53c:function(){return c(function(e,t){e.randomFillSync(t)},arguments)},__wbg_read_8426c146431f2905:function(e){return e.read()},__wbg_releaseLock_188846ef719acb10:function(e){e.releaseLock()},__wbg_require_b4edbdcf3e2a1ef0:function(){return c(function(){return module.require},arguments)},__wbg_resolve_0183de2e8c6b1d54:function(e){return Promise.resolve(e)},__wbg_respond_3cdb4cf32683fd79:function(){return c(function(e,t){e.respond(t>>>0)},arguments)},__wbg_setAlarm_c9229fb49928e287:function(){return c(function(e,t,n){return e.setAlarm(t,n)},arguments)},__wbg_set_3ab3dfede3bae139:function(){return c(function(e,t,n,i,a){e.set(d(t,n),d(i,a))},arguments)},__wbg_set_5f806304fb633ab3:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_86698c227e5b9dad:function(e,t,n){e.set(M(t,n))},__wbg_set_a6ba3ac0e634b822:function(){return c(function(e,t,n){return Reflect.set(e,t,n)},arguments)},__wbg_set_body_d1153b16a2b95ca1:function(e,t){e.body=t},__wbg_set_cache_5a01a8b5e6ca6cf2:function(e,t){e.cache=ae[t]},__wbg_set_criticalError_3b493d341796397b:function(e,t){e.criticalError=t!==0},__wbg_set_da33c120a6584674:function(e,t,n){e[t>>>0]=n},__wbg_set_headers_178db2684a27c112:function(e,t){e.headers=t},__wbg_set_headers_877ed41890d28af2:function(e,t){e.headers=t},__wbg_set_instanceId_2e5d2db011e9f6af:function(e,t){e.instanceId=t>>>0},__wbg_set_method_b4ede299b2064f37:function(e,t,n){e.method=d(t,n)},__wbg_set_redirect_97b881e7430f3438:function(e,t){e.redirect=ue[t]},__wbg_set_status_56097e6101a48227:function(e,t){e.status=t},__wbg_static_accessor_GLOBAL_60a4124bab7dcc9a:function(){let e=typeof global>"u"?null:global;return f(e)?0:w(e)},__wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13:function(){let e=typeof globalThis>"u"?null:globalThis;return f(e)?0:w(e)},__wbg_static_accessor_INIT_STATE_2271957acdc7fe6e:function(){return J},__wbg_static_accessor_SELF_4c95f759a91e9aae:function(){let e=typeof self>"u"?null:self;return f(e)?0:w(e)},__wbg_static_accessor_WINDOW_44b435597f9e9ee7:function(){let e=typeof window>"u"?null:window;return f(e)?0:w(e)},__wbg_status_9e6505cfa3e73a7c:function(e){return e.status},__wbg_storage_e350ca27f103b85e:function(){return c(function(e){return e.storage},arguments)},__wbg_subarray_42216645a367cd7a:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_254bab9b266a77a5:function(e,t,n){return e.then(t,n)},__wbg_then_3ea18602c6a5123b:function(e,t){return e.then(t)},__wbg_toString_c3e29dc77827b5c7:function(){return c(function(e,t){let n=t.toString(),i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l;g().setInt32(e+4,a,!0),g().setInt32(e+0,i,!0)},arguments)},__wbg_transaction_afcd84163102ab81:function(){return c(function(e,t){return e.transaction(t)},arguments)},__wbg_url_74200ddca55ab638:function(e,t){let n=t.url,i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l;g().setInt32(e+4,a,!0),g().setInt32(e+0,i,!0)},__wbg_value_3d3defe09fb1ffca:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_view_15fa5865c6b336e3:function(e){let t=e.view;return f(t)?0:w(t)},__wbg_webSocket_651aa54cd4107a97:function(){return c(function(e){let t=e.webSocket;return f(t)?0:w(t)},arguments)},__wbindgen_cast_0000000000000001:function(e,t){return C(e,t,ie)},__wbindgen_cast_0000000000000002:function(e,t){return C(e,t,_e)},__wbindgen_cast_0000000000000003:function(e,t){return C(e,t,oe)},__wbindgen_cast_0000000000000004:function(e){return e},__wbindgen_cast_0000000000000005:function(e){return e},__wbindgen_cast_0000000000000006:function(e,t){return M(e,t)},__wbindgen_cast_0000000000000007:function(e,t){return d(e,t)},__wbindgen_cast_0000000000000008:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){let e=_.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function s(){if(ne){L();return}}function _e(r,e,t){s(),_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___wasm_bindgen_41f132779d44f7df___JsValue______true_(r,e,t)}function ie(r,e,t){let n;return s(),n=_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___worker_sys_959aebd343b3f505___types__durable_object__transaction__DurableObjectTransaction__js_sys_1e928aaf8b129fc7___Promise__true_(r,e,t),n}function oe(r,e,t){let n;if(s(),n=_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___wasm_bindgen_41f132779d44f7df___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_41f132779d44f7df___JsError___true_(r,e,t),n[1])throw he(n[0])}function se(r,e,t,n){s(),_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___js_sys_1e928aaf8b129fc7___Function_fn_wasm_bindgen_41f132779d44f7df___JsValue_____wasm_bindgen_41f132779d44f7df___sys__Undefined___js_sys_1e928aaf8b129fc7___Function_fn_wasm_bindgen_41f132779d44f7df___JsValue_____wasm_bindgen_41f132779d44f7df___sys__Undefined_______true_(r,e,t,n)}var ce=["bytes"],ae=["default","no-store","reload","no-cache","force-cache","only-if-cached"],ue=["follow","error","manual"],o=0,fe=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_containerstartupoptions_free(r,1)}),be=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_intounderlyingbytesource_free(r,1)}),ge=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_intounderlyingsink_free(r,1)}),de=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_intounderlyingsource_free(r,1)}),$=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_minifyconfig_free(r,1)}),we=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_r2range_free(r,1)}),H=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_routerabrouterwalletdurableobject_free(r,1)}),G=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_routerabsigningworkerpresignsessiondurableobject_free(r,1)}),K=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_routerabtenantrootcreationdurableobject_free(r,1)});function w(r){let e=_.__externref_table_alloc();return _.__wbindgen_externrefs.set(e,r),e}var Q=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>{r.instance===o&&_.__wbindgen_destroy_closure(r.a,r.b)});function V(r){let e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){let i=r.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=r.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(r)){let i=r.length,a="[";i>0&&(a+=V(r[0]));for(let u=1;u<i;u++)a+=", "+V(r[u]);return a+="]",a}let t=/\[object ([^\]]+)\]/.exec(toString.call(r)),n;if(t&&t.length>1)n=t[1];else return toString.call(r);if(n=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}
2
- ${r.stack}`:n}function le(r,e){r=r>>>0;let t=g(),n=[];for(let i=r;i<r+4*e;i+=4)n.push(_.__wbindgen_externrefs.get(t.getUint32(i,!0)));return _.__externref_drop_slice(r,e),n}function M(r,e){return r=r>>>0,P().subarray(r/1,r/1+e)}var v=null;function g(){return(v===null||v.buffer.detached===!0||v.buffer.detached===void 0&&v.buffer!==_.memory.buffer)&&(v=new DataView(_.memory.buffer)),v}function d(r,e){return ye(r>>>0,e)}var O=null;function P(){return(O===null||O.byteLength===0)&&(O=new Uint8Array(_.memory.buffer)),O}function c(r,e){try{return r.apply(this,e)}catch(t){let n=w(t);_.__wbindgen_exn_store(n)}}function f(r){return r==null}function C(r,e,t){let n={a:r,b:e,cnt:1,instance:o},i=(...a)=>{if(n.instance!==o)throw new Error("Cannot invoke closure from previous WASM instance");n.cnt++;let u=n.a;n.a=0;try{return t(u,n.b,...a)}finally{n.a=u,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--n.cnt===0&&(_.__wbindgen_destroy_closure(n.a,n.b),n.a=0,Q.unregister(n))},Q.register(i,n,n),i}function pe(r,e){let t=e(r.length*4,4)>>>0;for(let n=0;n<r.length;n++){let i=w(r[n]);g().setUint32(t+4*n,i,!0)}return l=r.length,t}function y(r,e,t){if(t===void 0){let b=z.encode(r),p=e(b.length,1)>>>0;return P().subarray(p,p+b.length).set(b),l=b.length,p}let n=r.length,i=e(n,1)>>>0,a=P(),u=0;for(;u<n;u++){let b=r.charCodeAt(u);if(b>127)break;a[i+u]=b}if(u!==n){u!==0&&(r=r.slice(u)),i=t(i,n,n=u+r.length*3,1)>>>0;let b=P().subarray(i+u,i+n),p=z.encodeInto(r,b);u+=p.written,i=t(i,n,u,1)>>>0}return l=u,i}var ne=!1;function he(r){let e=_.__wbindgen_externrefs.get(r);return _.__externref_table_dealloc(r),e}var re=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});re.decode();function ye(r,e){return re.decode(P().subarray(r,r+e))}var z=new TextEncoder;"encodeInto"in z||(z.encodeInto=function(r,e){let t=z.encode(r);return e.set(t),{read:r.length,written:t.length}});var l=0,q=new WebAssembly.Instance(X,te()),_=q.exports;_.__wbindgen_start();Error.stackTraceLimit=100;var m=Y();function B(){m.criticalError&&(console.log("Reinitializing Wasm application"),L(),m.criticalError=!1,m.instanceId++)}addEventListener("error",r=>{N(r.error)});function N(r){r instanceof WebAssembly.RuntimeError&&(console.error("Critical",r),m.criticalError=!0)}var T=class extends ve{};T.prototype.fetch=function(e){return Z.call(this,e,this.env,this.ctx)};T.prototype.init=ee;var je={set:(r,e,t,n)=>Reflect.set(r.instance,e,t,n),has:(r,e)=>Reflect.has(r.instance,e),deleteProperty:(r,e)=>Reflect.deleteProperty(r.instance,e),apply:(r,e,t)=>Reflect.apply(r.instance,e,t),construct:(r,e,t)=>Reflect.construct(r.instance,e,t),getPrototypeOf:r=>Reflect.getPrototypeOf(r.instance),setPrototypeOf:(r,e)=>Reflect.setPrototypeOf(r.instance,e),isExtensible:r=>Reflect.isExtensible(r.instance),preventExtensions:r=>Reflect.preventExtensions(r.instance),getOwnPropertyDescriptor:(r,e)=>Reflect.getOwnPropertyDescriptor(r.instance,e),defineProperty:(r,e,t)=>Reflect.defineProperty(r.instance,e,t),ownKeys:r=>Reflect.ownKeys(r.instance)},h={construct(r,e,t){try{B();let n={instance:Reflect.construct(r,e,t),instanceId:m.instanceId,ctor:r,args:e,newTarget:t};return new Proxy(n,{...je,get(i,a,u){i.instanceId!==m.instanceId&&(i.instance=Reflect.construct(i.ctor,i.args,i.newTarget),i.instanceId=m.instanceId);let b=Reflect.get(i.instance,a,u);return typeof b!="function"?b:b.constructor===Function?new Proxy(b,{apply(p,U,D){B();try{return p.apply(U,D)}catch(A){throw N(A),A}}}):new Proxy(b,{async apply(p,U,D){B();try{return await p.apply(U,D)}catch(A){throw N(A),A}}})}})}catch(n){throw m.criticalError=!0,n}}},Fe=new Proxy(T,h),Se=new Proxy(x,h),ke=new Proxy(I,h),We=new Proxy(R,h),Ae=new Proxy(E,h),Oe=new Proxy(j,h),Pe=new Proxy(F,h),ze=new Proxy(S,h),Te=new Proxy(k,h),Ue=new Proxy(W,h);export{Se as ContainerStartupOptions,ke as IntoUnderlyingByteSource,We as IntoUnderlyingSink,Ae as IntoUnderlyingSource,Oe as MinifyConfig,Pe as R2Range,ze as RouterAbRouterWalletDurableObject,Te as RouterAbSigningWorkerPresignSessionDurableObject,Ue as RouterAbTenantRootCreationDurableObject,Fe as default};
1
+ import{WorkerEntrypoint as ve}from"cloudflare:workers";var J=globalThis.__worker_init_state={criticalError:!1,instanceId:0};import X from"./index_bg.wasm";var x=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,be.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_containerstartupoptions_free(e,0)}get enableInternet(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_containerstartupoptions_enableInternet(this.__wbg_ptr),e===16777215?void 0:e!==0}get entrypoint(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;s(),e=_.__wbg_get_containerstartupoptions_entrypoint(this.__wbg_ptr);var t=ne(e[0],e[1]).slice();return _.__wbindgen_free(e[0],e[1]*4,4),t}get env(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_containerstartupoptions_env(this.__wbg_ptr),e}set enableInternet(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_containerstartupoptions_enableInternet(this.__wbg_ptr,f(e)?16777215:e?1:0)}set entrypoint(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t=pe(e,_.__wbindgen_malloc),n=l;s(),_.__wbg_set_containerstartupoptions_entrypoint(this.__wbg_ptr,t,n)}set env(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_containerstartupoptions_env(this.__wbg_ptr,e)}};Symbol.dispose&&(x.prototype[Symbol.dispose]=x.prototype.free);var I=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,ge.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_intounderlyingbytesource_free(e,0)}get autoAllocateChunkSize(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr),e>>>0}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s(),_.intounderlyingbytesource_cancel(e)}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.intounderlyingbytesource_pull(this.__wbg_ptr,e),t}start(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.intounderlyingbytesource_start(this.__wbg_ptr,e)}get type(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.intounderlyingbytesource_type(this.__wbg_ptr),ue[e]}};Symbol.dispose&&(I.prototype[Symbol.dispose]=I.prototype.free);var R=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,de.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_intounderlyingsink_free(e,0)}abort(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t=this.__destroy_into_raw(),n;return s(),n=_.intounderlyingsink_abort(t,e),n}close(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw(),t;return s(),t=_.intounderlyingsink_close(e),t}write(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.intounderlyingsink_write(this.__wbg_ptr,e),t}};Symbol.dispose&&(R.prototype[Symbol.dispose]=R.prototype.free);var E=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,we.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_intounderlyingsource_free(e,0)}cancel(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e=this.__destroy_into_raw();s(),_.intounderlyingsource_cancel(e)}pull(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.intounderlyingsource_pull(this.__wbg_ptr,e),t}};Symbol.dispose&&(E.prototype[Symbol.dispose]=E.prototype.free);var j=class r{static __wrap(e){let t=Object.create(r.prototype);return t.__wbg_ptr=e,Object.defineProperty(t,"__wbg_inst",{value:o,writable:!0}),$.register(t,{ptr:e,instance:o},t),t}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_minifyconfig_free(e,0)}get css(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_minifyconfig_css(this.__wbg_ptr),e!==0}get html(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_minifyconfig_html(this.__wbg_ptr),e!==0}get js(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_minifyconfig_js(this.__wbg_ptr),e!==0}set css(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_minifyconfig_css(this.__wbg_ptr,e)}set html(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_minifyconfig_html(this.__wbg_ptr,e)}set js(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_minifyconfig_js(this.__wbg_ptr,e)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);var F=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,le.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_r2range_free(e,0)}get length(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_r2range_length(this.__wbg_ptr),e[0]===0?void 0:e[1]}get offset(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_r2range_offset(this.__wbg_ptr),e[0]===0?void 0:e[1]}get suffix(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.__wbg_get_r2range_suffix(this.__wbg_ptr),e[0]===0?void 0:e[1]}set length(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_r2range_length(this.__wbg_ptr,!f(e),f(e)?0:e)}set offset(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_r2range_offset(this.__wbg_ptr,!f(e),f(e)?0:e)}set suffix(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");s(),_.__wbg_set_r2range_suffix(this.__wbg_ptr,!f(e),f(e)?0:e)}};Symbol.dispose&&(F.prototype[Symbol.dispose]=F.prototype.free);var S=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,H.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_routerabrouterwalletdurableobject_free(e,0)}alarm(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.routerabrouterwalletdurableobject_alarm(this.__wbg_ptr),e}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.routerabrouterwalletdurableobject_fetch(this.__wbg_ptr,e),t}constructor(e,t){let n;return s(),n=_.routerabrouterwalletdurableobject_new(e,t),this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:o,writable:!0}),H.register(this,{ptr:n,instance:o},this),this}webSocketClose(e,t,n,i){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let u=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l,b;return s(),b=_.routerabrouterwalletdurableobject_webSocketClose(this.__wbg_ptr,e,t,u,a,i),b}webSocketError(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let n;return s(),n=_.routerabrouterwalletdurableobject_webSocketError(this.__wbg_ptr,e,t),n}webSocketMessage(e,t){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let n;return s(),n=_.routerabrouterwalletdurableobject_webSocketMessage(this.__wbg_ptr,e,t),n}};Symbol.dispose&&(S.prototype[Symbol.dispose]=S.prototype.free);var k=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,G.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_routerabsigningworkerpresignsessiondurableobject_free(e,0)}alarm(){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let e;return s(),e=_.routerabsigningworkerpresignsessiondurableobject_alarm(this.__wbg_ptr),e}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.routerabsigningworkerpresignsessiondurableobject_fetch(this.__wbg_ptr,e),t}constructor(e,t){let n;return s(),n=_.routerabsigningworkerpresignsessiondurableobject_new(e,t),this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:o,writable:!0}),G.register(this,{ptr:n,instance:o},this),this}};Symbol.dispose&&(k.prototype[Symbol.dispose]=k.prototype.free);var W=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,K.unregister(this),e}free(){let e=this.__destroy_into_raw();s(),_.__wbg_routerabtenantrootcreationdurableobject_free(e,0)}fetch(e){if(this.__wbg_inst!==void 0&&this.__wbg_inst!==o)throw new Error("Invalid stale object from previous Wasm instance");let t;return s(),t=_.routerabtenantrootcreationdurableobject_fetch(this.__wbg_ptr,e),t}constructor(e,t){let n;return s(),n=_.routerabtenantrootcreationdurableobject_new(e,t),this.__wbg_ptr=n,Object.defineProperty(this,"__wbg_inst",{value:o,writable:!0}),K.register(this,{ptr:n,instance:o},this),this}};Symbol.dispose&&(W.prototype[Symbol.dispose]=W.prototype.free);function L(){o++,v=null,O=null,typeof numBytesDecoded<"u"&&(numBytesDecoded=0),typeof l<"u"&&(l=0),re=!1,q=new WebAssembly.Instance(X,te()),_=q.exports,_.__wbindgen_start()}function Y(){let r;return s(),r=_.__worker_init_state(),r}function Z(r,e,t){let n;return s(),n=_.fetch(r,e,t),n}function ee(){s(),_.init()}function te(){return{__proto__:null,"./index_bg.js":{__proto__:null,__wbg_Error_9dc85fe1bc224456:function(e,t){return Error(d(e,t))},__wbg_Number_4779d427bae39753:function(e){return Number(e)},__wbg_String_8564e559799eccda:function(e,t){let n=String(t),i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l;g().setInt32(e+4,u,!0),g().setInt32(e+0,i,!0)},__wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6:function(e,t){let n=t,i=typeof n=="bigint"?n:void 0;g().setBigInt64(e+8,f(i)?BigInt(0):i,!0),g().setInt32(e+0,!f(i),!0)},__wbg___wbindgen_boolean_get_b131b2f36d6b2f55:function(e){let t=e,n=typeof t=="boolean"?t:void 0;return f(n)?16777215:n?1:0},__wbg___wbindgen_debug_string_56c147eb1a51f0c4:function(e,t){let n=V(t),i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l;g().setInt32(e+4,u,!0),g().setInt32(e+0,i,!0)},__wbg___wbindgen_in_ce8569b2fc6f5088:function(e,t){return e in t},__wbg___wbindgen_is_bigint_df272c65456269c2:function(e){return typeof e=="bigint"},__wbg___wbindgen_is_function_147961669f068cd4:function(e){return typeof e=="function"},__wbg___wbindgen_is_null_or_undefined_b02321d39cf26d8d:function(e){return e==null},__wbg___wbindgen_is_object_3a2c414391dbf751:function(e){let t=e;return typeof t=="object"&&t!==null},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(e){return typeof e=="string"},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(e){return e===void 0},__wbg___wbindgen_jsval_eq_174c93ec61bab0c5:function(e,t){return e===t},__wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c:function(e,t){return e==t},__wbg___wbindgen_number_get_588ed6b97f0d7e14:function(e,t){let n=t,i=typeof n=="number"?n:void 0;g().setFloat64(e+8,f(i)?0:i,!0),g().setInt32(e+0,!f(i),!0)},__wbg___wbindgen_string_get_fa2687d531ed17a5:function(e,t){let n=t,i=typeof n=="string"?n:void 0;var u=f(i)?0:y(i,_.__wbindgen_malloc,_.__wbindgen_realloc),a=l;g().setInt32(e+4,a,!0),g().setInt32(e+0,u,!0)},__wbg___wbindgen_throw_bbadd78c1bac3a77:function(e,t){throw new Error(d(e,t))},__wbg__wbg_cb_unref_c2301a3c9b78104b:function(e){e._wbg_cb_unref()},__wbg_body_442a47f02322d7b0:function(e){let t=e.body;return f(t)?0:w(t)},__wbg_body_b06d3a9c5933702e:function(e){let t=e.body;return f(t)?0:w(t)},__wbg_buffer_8524b3453cde4918:function(e){return e.buffer},__wbg_byobRequest_cc72d210de793e64:function(e){let t=e.byobRequest;return f(t)?0:w(t)},__wbg_byteLength_96807b1d9ab24a4c:function(e){return e.byteLength},__wbg_byteOffset_a9c7002428843c41:function(e){return e.byteOffset},__wbg_call_91f00ddc43e01490:function(){return c(function(e,t){return e.call(t)},arguments)},__wbg_call_ec09a4cf93377d3a:function(){return c(function(e,t,n){return e.call(t,n)},arguments)},__wbg_cancel_f3a197b26dc88b39:function(e){return e.cancel()},__wbg_catch_66060324c27be6f7:function(e,t){return e.catch(t)},__wbg_cause_5f2ec35e043cc9cf:function(e){return e.cause},__wbg_cf_22a1527cd02b5acd:function(){return c(function(e){let t=e.cf;return f(t)?0:w(t)},arguments)},__wbg_cf_ee73de251a6dda8a:function(){return c(function(e){let t=e.cf;return f(t)?0:w(t)},arguments)},__wbg_close_388d99468213b286:function(){return c(function(e){e.close()},arguments)},__wbg_close_4857e22d08b71356:function(){return c(function(e){e.close()},arguments)},__wbg_constructor_04971ae0b51c1fc5:function(e){return e.constructor},__wbg_crypto_38df2bab126b63dc:function(e){return e.crypto},__wbg_delete_0332d9732b7b743f:function(){return c(function(e,t,n){var i=ne(t,n).slice();return _.__wbindgen_free(t,n*4,4),e.delete(i)},arguments)},__wbg_delete_e21a892409559f6e:function(){return c(function(e,t,n){return e.delete(d(t,n))},arguments)},__wbg_done_6a8439e544ec6206:function(e){return e.done},__wbg_enqueue_bbeb09ba0b140f76:function(){return c(function(e,t){e.enqueue(t)},arguments)},__wbg_entries_5a6a7e7e0df09fe5:function(e){return Object.entries(e)},__wbg_error_6651fee1c71e5da9:function(e){console.error(e)},__wbg_error_9a99766f65a03031:function(e,t){console.error(e,t)},__wbg_fetch_1d1b09eaf160ddf3:function(e,t,n){return e.fetch(t,n)},__wbg_fetch_931fc4244e17ef2d:function(e,t,n,i){return e.fetch(d(t,n),i)},__wbg_fetch_b447ca2a0c0e6583:function(){return c(function(e,t){return e.fetch(t)},arguments)},__wbg_fetch_be42f5d2be38cba1:function(){return c(function(e,t){return e.fetch(t)},arguments)},__wbg_getAlarm_5528fdbdd50b2988:function(){return c(function(e,t){return e.getAlarm(t)},arguments)},__wbg_getByName_5f8a4ae327c50115:function(){return c(function(e,t,n){return e.getByName(d(t,n))},arguments)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return c(function(e,t){e.getRandomValues(t)},arguments)},__wbg_getReader_bb0230851fbf986b:function(){return c(function(e){return e.getReader()},arguments)},__wbg_getTime_ef2e115ede346a26:function(e){return e.getTime()},__wbg_get_44e98e27bda25b5b:function(){return c(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_4b90d6d8c5deb5d5:function(e,t){return e[t>>>0]},__wbg_get_52a8a619f7b88df6:function(){return c(function(e,t){return Reflect.get(e,t)},arguments)},__wbg_get_6e0eec3a0a32f612:function(){return c(function(e,t,n){return e.get(d(t,n))},arguments)},__wbg_get_a82defe8d6b5b2e5:function(){return c(function(e,t,n,i){let u=t.get(d(n,i));var a=f(u)?0:y(u,_.__wbindgen_malloc,_.__wbindgen_realloc),b=l;g().setInt32(e+4,b,!0),g().setInt32(e+0,a,!0)},arguments)},__wbg_get_a87a6c1024dddd3b:function(){return c(function(e,t,n){return e.get(d(t,n))},arguments)},__wbg_get_c538c7fb0359c222:function(){return c(function(e,t){let n=Reflect.get(e,t);return f(n)?0:w(n)},arguments)},__wbg_get_done_c21b9933fc9a9e9c:function(e){let t=e.done;return f(t)?16777215:t?1:0},__wbg_get_unchecked_46e778e3cec74b5e:function(e,t){return e[t>>>0]},__wbg_get_value_ad568c7d3db9073f:function(e){return e.value},__wbg_get_with_ref_key_6412cf3094599694:function(e,t){return e[t]},__wbg_headers_5b19cf40627ae54d:function(e){return e.headers},__wbg_headers_e1e94862a6a36f9e:function(e){return e.headers},__wbg_idFromName_32b0b5012b5f6535:function(){return c(function(e,t,n){return e.idFromName(d(t,n))},arguments)},__wbg_id_0c05f441a81ef0fc:function(){return c(function(e){return e.id},arguments)},__wbg_instanceId_3970204fcbf0c41d:function(e){return e.instanceId},__wbg_instanceof_ArrayBuffer_a581da923203f29f:function(e){let t;try{t=e instanceof ArrayBuffer}catch{t=!1}return t},__wbg_instanceof_Error_cb5ebd65d798655e:function(e){let t;try{t=e instanceof Error}catch{t=!1}return t},__wbg_instanceof_Map_7f94c740225003e2:function(e){let t;try{t=e instanceof Map}catch{t=!1}return t},__wbg_instanceof_ReadableStream_b1eab376911b1b77:function(e){let t;try{t=e instanceof ReadableStream}catch{t=!1}return t},__wbg_instanceof_Response_36a65a969abaa7c6:function(e){let t;try{t=e instanceof Response}catch{t=!1}return t},__wbg_instanceof_Uint8Array_b6fe1ac89eba107e:function(e){let t;try{t=e instanceof Uint8Array}catch{t=!1}return t},__wbg_isArray_139f48e3c057ede8:function(e){return Array.isArray(e)},__wbg_isSafeInteger_c22ccb4af2201fe9:function(e){return Number.isSafeInteger(e)},__wbg_iterator_9b36cebf3be7b7cd:function(){return Symbol.iterator},__wbg_json_d44033e4c5c27d14:function(){return c(function(e){return e.json()},arguments)},__wbg_keys_6fe253f5073ff078:function(e){return e.keys()},__wbg_keys_f365fabedba1fe04:function(e){return e.keys()},__wbg_length_68a9d5278d084f4f:function(e){return e.length},__wbg_length_fb04d16d7bdf6d4c:function(e){return e.length},__wbg_list_1e28f18cc3692a47:function(){return c(function(e,t){return e.list(t)},arguments)},__wbg_list_fc2e1da79650bd5a:function(){return c(function(e,t){return e.list(t)},arguments)},__wbg_log_6614a4effdb4e983:function(e){console.log(e)},__wbg_message_5c6ab4dd6c4b34e8:function(e){return e.message},__wbg_method_f687b49ca8e2b38d:function(e,t){let n=t.method,i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l;g().setInt32(e+4,u,!0),g().setInt32(e+0,i,!0)},__wbg_minifyconfig_new:function(e){return j.__wrap(e)},__wbg_msCrypto_bd5a034af96bcba6:function(e){return e.msCrypto},__wbg_name_72adaf2fce06bbe8:function(e){return e.name},__wbg_name_f60e249a46c5285a:function(e){return e.name},__wbg_new_0_878c6ec3a1c600f3:function(){return new Date},__wbg_new_0b303268aa395a38:function(){return new Array},__wbg_new_189262ff31890c23:function(){return c(function(){return new Headers},arguments)},__wbg_new_20b778a4c5c691c3:function(){return new Object},__wbg_new_5fae30e6b23db8df:function(e,t){return new Error(d(e,t))},__wbg_new_883c0db065f06efd:function(){return new Map},__wbg_new_a21cf41c5c809e4c:function(e){return new Date(e)},__wbg_new_b06772b280cc6e52:function(e){return new Uint8Array(e)},__wbg_new_typed_90c3f6c29ba36d19:function(e,t){try{var n={a:e,b:t},i=(a,b)=>{let p=n.a;n.a=0;try{return ce(p,n.b,a,b)}finally{n.a=p}};return new Promise(i)}finally{n.a=0}},__wbg_new_with_byte_offset_and_length_9e1e664fe1a5d385:function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},__wbg_new_with_length_4b57a7a5dc67221c:function(e){return new Uint8Array(e>>>0)},__wbg_new_with_opt_buffer_source_and_init_f51f4fbe98d29f2e:function(){return c(function(e,t){return new Response(e,t)},arguments)},__wbg_new_with_opt_readable_stream_and_init_def67835ea705e4d:function(){return c(function(e,t){return new Response(e,t)},arguments)},__wbg_new_with_opt_str_and_init_11bb6f5faad68c85:function(){return c(function(e,t,n){return new Response(e===0?void 0:d(e,t),n)},arguments)},__wbg_new_with_str_and_init_df876572184fe639:function(){return c(function(e,t,n){return new Request(d(e,t),n)},arguments)},__wbg_next_8cb028b6ba50743f:function(){return c(function(e){return e.next()},arguments)},__wbg_next_cfd0b146c9538df8:function(e){return e.next},__wbg_node_84ea875411254db1:function(e){return e.node},__wbg_now_bce4dc999095ea77:function(){return Date.now()},__wbg_process_44c7a14e11e9f69e:function(e){return e.process},__wbg_prototypesetcall_956c7493c68e29b4:function(e,t,n){Uint8Array.prototype.set.call(M(e,t),n)},__wbg_put_27edc2ab773a21be:function(){return c(function(e,t,n,i){return e.put(d(t,n),i)},arguments)},__wbg_queueMicrotask_4698f900840e3286:function(e){queueMicrotask(e)},__wbg_queueMicrotask_477a5533c7100338:function(e){return e.queueMicrotask},__wbg_randomFillSync_6c25eac9869eb53c:function(){return c(function(e,t){e.randomFillSync(t)},arguments)},__wbg_read_8426c146431f2905:function(e){return e.read()},__wbg_releaseLock_188846ef719acb10:function(e){e.releaseLock()},__wbg_require_b4edbdcf3e2a1ef0:function(){return c(function(){return module.require},arguments)},__wbg_resolve_0183de2e8c6b1d54:function(e){return Promise.resolve(e)},__wbg_respond_3cdb4cf32683fd79:function(){return c(function(e,t){e.respond(t>>>0)},arguments)},__wbg_setAlarm_c9229fb49928e287:function(){return c(function(e,t,n){return e.setAlarm(t,n)},arguments)},__wbg_set_3ab3dfede3bae139:function(){return c(function(e,t,n,i,u){e.set(d(t,n),d(i,u))},arguments)},__wbg_set_5f806304fb633ab3:function(e,t,n){return e.set(t,n)},__wbg_set_6be42768c690e380:function(e,t,n){e[t]=n},__wbg_set_86698c227e5b9dad:function(e,t,n){e.set(M(t,n))},__wbg_set_a6ba3ac0e634b822:function(){return c(function(e,t,n){return Reflect.set(e,t,n)},arguments)},__wbg_set_body_d1153b16a2b95ca1:function(e,t){e.body=t},__wbg_set_cache_5a01a8b5e6ca6cf2:function(e,t){e.cache=ae[t]},__wbg_set_criticalError_3b493d341796397b:function(e,t){e.criticalError=t!==0},__wbg_set_da33c120a6584674:function(e,t,n){e[t>>>0]=n},__wbg_set_headers_178db2684a27c112:function(e,t){e.headers=t},__wbg_set_headers_877ed41890d28af2:function(e,t){e.headers=t},__wbg_set_instanceId_2e5d2db011e9f6af:function(e,t){e.instanceId=t>>>0},__wbg_set_method_b4ede299b2064f37:function(e,t,n){e.method=d(t,n)},__wbg_set_redirect_97b881e7430f3438:function(e,t){e.redirect=fe[t]},__wbg_set_signal_9022b5aa06a6ce5b:function(e,t){e.signal=t},__wbg_set_status_56097e6101a48227:function(e,t){e.status=t},__wbg_size_74fdf4919eb82558:function(e){return e.size},__wbg_static_accessor_GLOBAL_60a4124bab7dcc9a:function(){let e=typeof global>"u"?null:global;return f(e)?0:w(e)},__wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13:function(){let e=typeof globalThis>"u"?null:globalThis;return f(e)?0:w(e)},__wbg_static_accessor_INIT_STATE_2271957acdc7fe6e:function(){return J},__wbg_static_accessor_SELF_4c95f759a91e9aae:function(){let e=typeof self>"u"?null:self;return f(e)?0:w(e)},__wbg_static_accessor_WINDOW_44b435597f9e9ee7:function(){let e=typeof window>"u"?null:window;return f(e)?0:w(e)},__wbg_status_9e6505cfa3e73a7c:function(e){return e.status},__wbg_storage_e350ca27f103b85e:function(){return c(function(e){return e.storage},arguments)},__wbg_subarray_42216645a367cd7a:function(e,t,n){return e.subarray(t>>>0,n>>>0)},__wbg_then_254bab9b266a77a5:function(e,t,n){return e.then(t,n)},__wbg_then_3ea18602c6a5123b:function(e,t){return e.then(t)},__wbg_toString_c3e29dc77827b5c7:function(){return c(function(e,t){let n=t.toString(),i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l;g().setInt32(e+4,u,!0),g().setInt32(e+0,i,!0)},arguments)},__wbg_transaction_afcd84163102ab81:function(){return c(function(e,t){return e.transaction(t)},arguments)},__wbg_url_74200ddca55ab638:function(e,t){let n=t.url,i=y(n,_.__wbindgen_malloc,_.__wbindgen_realloc),u=l;g().setInt32(e+4,u,!0),g().setInt32(e+0,i,!0)},__wbg_value_3d3defe09fb1ffca:function(e){return e.value},__wbg_versions_276b2795b1c6a219:function(e){return e.versions},__wbg_view_15fa5865c6b336e3:function(e){let t=e.view;return f(t)?0:w(t)},__wbg_webSocket_651aa54cd4107a97:function(){return c(function(e){let t=e.webSocket;return f(t)?0:w(t)},arguments)},__wbindgen_cast_0000000000000001:function(e,t){return C(e,t,oe)},__wbindgen_cast_0000000000000002:function(e,t){return C(e,t,ie)},__wbindgen_cast_0000000000000003:function(e,t){return C(e,t,se)},__wbindgen_cast_0000000000000004:function(e){return e},__wbindgen_cast_0000000000000005:function(e){return e},__wbindgen_cast_0000000000000006:function(e,t){return M(e,t)},__wbindgen_cast_0000000000000007:function(e,t){return d(e,t)},__wbindgen_cast_0000000000000008:function(e){return BigInt.asUintN(64,e)},__wbindgen_init_externref_table:function(){let e=_.__wbindgen_externrefs,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)}}}}function s(){if(re){L();return}}function ie(r,e,t){s(),_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___wasm_bindgen_41f132779d44f7df___JsValue______true_(r,e,t)}function oe(r,e,t){let n;return s(),n=_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___worker_sys_959aebd343b3f505___types__durable_object__transaction__DurableObjectTransaction__js_sys_1e928aaf8b129fc7___Promise__true_(r,e,t),n}function se(r,e,t){let n;if(s(),n=_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___wasm_bindgen_41f132779d44f7df___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_41f132779d44f7df___JsError___true_(r,e,t),n[1])throw he(n[0])}function ce(r,e,t,n){s(),_.wasm_bindgen_41f132779d44f7df___convert__closures_____invoke___js_sys_1e928aaf8b129fc7___Function_fn_wasm_bindgen_41f132779d44f7df___JsValue_____wasm_bindgen_41f132779d44f7df___sys__Undefined___js_sys_1e928aaf8b129fc7___Function_fn_wasm_bindgen_41f132779d44f7df___JsValue_____wasm_bindgen_41f132779d44f7df___sys__Undefined_______true_(r,e,t,n)}var ue=["bytes"],ae=["default","no-store","reload","no-cache","force-cache","only-if-cached"],fe=["follow","error","manual"],o=0,be=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_containerstartupoptions_free(r,1)}),ge=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_intounderlyingbytesource_free(r,1)}),de=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_intounderlyingsink_free(r,1)}),we=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_intounderlyingsource_free(r,1)}),$=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_minifyconfig_free(r,1)}),le=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_r2range_free(r,1)}),H=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_routerabrouterwalletdurableobject_free(r,1)}),G=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_routerabsigningworkerpresignsessiondurableobject_free(r,1)}),K=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(({ptr:r,instance:e})=>{e===o&&_.__wbg_routerabtenantrootcreationdurableobject_free(r,1)});function w(r){let e=_.__externref_table_alloc();return _.__wbindgen_externrefs.set(e,r),e}var Q=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(r=>{r.instance===o&&_.__wbindgen_destroy_closure(r.a,r.b)});function V(r){let e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){let i=r.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){let i=r.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(r)){let i=r.length,u="[";i>0&&(u+=V(r[0]));for(let a=1;a<i;a++)u+=", "+V(r[a]);return u+="]",u}let t=/\[object ([^\]]+)\]/.exec(toString.call(r)),n;if(t&&t.length>1)n=t[1];else return toString.call(r);if(n=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}
2
+ ${r.stack}`:n}function ne(r,e){r=r>>>0;let t=g(),n=[];for(let i=r;i<r+4*e;i+=4)n.push(_.__wbindgen_externrefs.get(t.getUint32(i,!0)));return _.__externref_drop_slice(r,e),n}function M(r,e){return r=r>>>0,z().subarray(r/1,r/1+e)}var v=null;function g(){return(v===null||v.buffer.detached===!0||v.buffer.detached===void 0&&v.buffer!==_.memory.buffer)&&(v=new DataView(_.memory.buffer)),v}function d(r,e){return ye(r>>>0,e)}var O=null;function z(){return(O===null||O.byteLength===0)&&(O=new Uint8Array(_.memory.buffer)),O}function c(r,e){try{return r.apply(this,e)}catch(t){let n=w(t);_.__wbindgen_exn_store(n)}}function f(r){return r==null}function C(r,e,t){let n={a:r,b:e,cnt:1,instance:o},i=(...u)=>{if(n.instance!==o)throw new Error("Cannot invoke closure from previous WASM instance");n.cnt++;let a=n.a;n.a=0;try{return t(a,n.b,...u)}finally{n.a=a,i._wbg_cb_unref()}};return i._wbg_cb_unref=()=>{--n.cnt===0&&(_.__wbindgen_destroy_closure(n.a,n.b),n.a=0,Q.unregister(n))},Q.register(i,n,n),i}function pe(r,e){let t=e(r.length*4,4)>>>0;for(let n=0;n<r.length;n++){let i=w(r[n]);g().setUint32(t+4*n,i,!0)}return l=r.length,t}function y(r,e,t){if(t===void 0){let b=P.encode(r),p=e(b.length,1)>>>0;return z().subarray(p,p+b.length).set(b),l=b.length,p}let n=r.length,i=e(n,1)>>>0,u=z(),a=0;for(;a<n;a++){let b=r.charCodeAt(a);if(b>127)break;u[i+a]=b}if(a!==n){a!==0&&(r=r.slice(a)),i=t(i,n,n=a+r.length*3,1)>>>0;let b=z().subarray(i+a,i+n),p=P.encodeInto(r,b);a+=p.written,i=t(i,n,a,1)>>>0}return l=a,i}var re=!1;function he(r){let e=_.__wbindgen_externrefs.get(r);return _.__externref_table_dealloc(r),e}var _e=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});_e.decode();function ye(r,e){return _e.decode(z().subarray(r,r+e))}var P=new TextEncoder;"encodeInto"in P||(P.encodeInto=function(r,e){let t=P.encode(r);return e.set(t),{read:r.length,written:t.length}});var l=0,q=new WebAssembly.Instance(X,te()),_=q.exports;_.__wbindgen_start();Error.stackTraceLimit=100;var m=Y();function B(){m.criticalError&&(console.log("Reinitializing Wasm application"),L(),m.criticalError=!1,m.instanceId++)}addEventListener("error",r=>{N(r.error)});function N(r){r instanceof WebAssembly.RuntimeError&&(console.error("Critical",r),m.criticalError=!0)}var T=class extends ve{};T.prototype.fetch=function(e){return Z.call(this,e,this.env,this.ctx)};T.prototype.init=ee;var je={set:(r,e,t,n)=>Reflect.set(r.instance,e,t,n),has:(r,e)=>Reflect.has(r.instance,e),deleteProperty:(r,e)=>Reflect.deleteProperty(r.instance,e),apply:(r,e,t)=>Reflect.apply(r.instance,e,t),construct:(r,e,t)=>Reflect.construct(r.instance,e,t),getPrototypeOf:r=>Reflect.getPrototypeOf(r.instance),setPrototypeOf:(r,e)=>Reflect.setPrototypeOf(r.instance,e),isExtensible:r=>Reflect.isExtensible(r.instance),preventExtensions:r=>Reflect.preventExtensions(r.instance),getOwnPropertyDescriptor:(r,e)=>Reflect.getOwnPropertyDescriptor(r.instance,e),defineProperty:(r,e,t)=>Reflect.defineProperty(r.instance,e,t),ownKeys:r=>Reflect.ownKeys(r.instance)},h={construct(r,e,t){try{B();let n={instance:Reflect.construct(r,e,t),instanceId:m.instanceId,ctor:r,args:e,newTarget:t};return new Proxy(n,{...je,get(i,u,a){i.instanceId!==m.instanceId&&(i.instance=Reflect.construct(i.ctor,i.args,i.newTarget),i.instanceId=m.instanceId);let b=Reflect.get(i.instance,u,a);return typeof b!="function"?b:b.constructor===Function?new Proxy(b,{apply(p,U,D){B();try{return p.apply(U,D)}catch(A){throw N(A),A}}}):new Proxy(b,{async apply(p,U,D){B();try{return await p.apply(U,D)}catch(A){throw N(A),A}}})}})}catch(n){throw m.criticalError=!0,n}}},Fe=new Proxy(T,h),Se=new Proxy(x,h),ke=new Proxy(I,h),We=new Proxy(R,h),Ae=new Proxy(E,h),Oe=new Proxy(j,h),ze=new Proxy(F,h),Pe=new Proxy(S,h),Te=new Proxy(k,h),Ue=new Proxy(W,h);export{Se as ContainerStartupOptions,ke as IntoUnderlyingByteSource,We as IntoUnderlyingSink,Ae as IntoUnderlyingSource,Oe as MinifyConfig,ze as R2Range,Pe as RouterAbRouterWalletDurableObject,Te as RouterAbSigningWorkerPresignSessionDurableObject,Ue as RouterAbTenantRootCreationDurableObject,Fe as default};
@@ -0,0 +1,10 @@
1
+ -- Wallet admissions retain the exact object address for later reconciliation.
2
+ -- Existing named-address wallets must be discarded before activating this release.
3
+ ALTER TABLE tenant_root_root_use_admissions RENAME COLUMN pair_object_name TO pair_object_id;
4
+ CREATE TRIGGER tenant_root_pair_object_id_insert
5
+ BEFORE INSERT ON tenant_root_root_use_admissions
6
+ WHEN NEW.pair_object_id IS NOT NULL
7
+ AND (length(NEW.pair_object_id) != 64 OR NEW.pair_object_id GLOB '*[^0-9a-f]*')
8
+ BEGIN
9
+ SELECT RAISE(ABORT, 'wallet pair admission requires a Durable Object ID');
10
+ END;
@@ -0,0 +1,10 @@
1
+ -- Wallet admissions retain the exact object address for later reconciliation.
2
+ -- Existing named-address wallets must be discarded before activating this release.
3
+ ALTER TABLE tenant_root_root_use_admissions RENAME COLUMN pair_object_name TO pair_object_id;
4
+ CREATE TRIGGER tenant_root_pair_object_id_insert
5
+ BEFORE INSERT ON tenant_root_root_use_admissions
6
+ WHEN NEW.pair_object_id IS NOT NULL
7
+ AND (length(NEW.pair_object_id) != 64 OR NEW.pair_object_id GLOB '*[^0-9a-f]*')
8
+ BEGIN
9
+ SELECT RAISE(ABORT, 'wallet pair admission requires a Durable Object ID');
10
+ END;
@@ -7,10 +7,6 @@ import { fileURLToPath } from 'node:url';
7
7
  const require = createRequire(import.meta.url);
8
8
  const runtimeRoot = fileURLToPath(new URL('../', import.meta.url));
9
9
  const walletServerRoot = path.dirname(require.resolve('@seams/wallet-server/package.json'));
10
- export { localPeerVerifyingKeyHex } from './local-key-material.mjs';
11
-
12
- import { localPeerSigningKeyBase64Url, localPeerVerifyingKeyHex } from './local-key-material.mjs';
13
-
14
10
  const localPortOffset = Number(process.env.SEAMS_LOCAL_PORT_OFFSET || 0);
15
11
  const STRICT_WORKER_ROLES = Object.freeze([
16
12
  { role: 'router', port: 4102 + localPortOffset },
@@ -63,8 +59,6 @@ export function prepareLocalHostedWalletGatewayConfig(input) {
63
59
  const outputConfigPath = path.join(outputRoot, 'wrangler.local-hosted-wallet-gateway.toml');
64
60
  const secretPath = path.join(outputRoot, '.dev.vars.wallet-gateway');
65
61
  const routerEnv = readEnvMap(path.join(localEnvRoot, '.env.router-ab.router.local'));
66
- const deriverAEnv = readEnvMap(path.join(localEnvRoot, '.env.router-ab.deriver-a.local'));
67
- const deriverBEnv = readEnvMap(path.join(localEnvRoot, '.env.router-ab.deriver-b.local'));
68
62
  const signingWorkerEnv = readEnvMap(
69
63
  path.join(localEnvRoot, '.env.router-ab.signing-worker.local'),
70
64
  );
@@ -122,12 +116,7 @@ export function prepareLocalHostedWalletGatewayConfig(input) {
122
116
  ROUTER_AB_GATEWAY_TO_ROUTER_AUTH_SECRET: gatewayToRouterAuthSecret,
123
117
  ROUTER_AB_GATEWAY_TO_SIGNING_WORKER_PRESIGN_AUTH_SECRET:
124
118
  gatewayToSigningWorkerPresignAuthSecret,
125
- ROUTER_AB_PUBLIC_KEYSET_JSON: localPublicKeysetJson({
126
- routerEnv,
127
- deriverAEnv,
128
- deriverBEnv,
129
- signingWorkerEnv,
130
- }),
119
+ ROUTER_AB_PUBLIC_KEYSET_JSON: localPublicKeysetJson({ routerEnv, signingWorkerEnv }),
131
120
  SEAMS_STAGING_ENV_ID: deployment.deployment.environmentId,
132
121
  SEAMS_STAGING_ORG_ID: deployment.deployment.orgId,
133
122
  SEAMS_STAGING_PROJECT_ID: deployment.deployment.projectId,
@@ -206,20 +195,6 @@ function localPublicKeysetJson(input) {
206
195
  },
207
196
  },
208
197
  },
209
- signer_peer_verifying_keys: {
210
- deriver_a: {
211
- role: 'signer_a',
212
- verifying_key_hex: localPeerVerifyingKeyHex(
213
- requiredEnv(input.deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY'),
214
- ),
215
- },
216
- deriver_b: {
217
- role: 'signer_b',
218
- verifying_key_hex: localPeerVerifyingKeyHex(
219
- requiredEnv(input.deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY'),
220
- ),
221
- },
222
- },
223
198
  signing_worker_server_output_hpke: {
224
199
  key_epoch: requiredEnv(input.signingWorkerEnv, 'SIGNING_WORKER_KEY_EPOCH'),
225
200
  public_key: requiredEnv(
@@ -388,39 +363,6 @@ export function prepareRouterAbStrictLocalRuntimeConfigs(input) {
388
363
  .join('/');
389
364
  let config = stripBuildSection(readFileSync(sourcePath, 'utf8'));
390
365
  config = replaceTomlAssignment(config, 'main', mainPath);
391
- if (role === 'deriver-b' && process.env.ROUTER_AB_WALLET_DO_HARNESS === 'enabled') {
392
- config = config.replace(
393
- '[[services]]',
394
- `[[durable_objects.bindings]]
395
- name = "DERIVER_B_WALLET_DO"
396
- class_name = "RouterAbDeriverBWalletDurableObject"
397
-
398
- [[migrations]]
399
- tag = "r150-deriver-b-wallet-sqlite-v1"
400
- new_sqlite_classes = ["RouterAbDeriverBWalletDurableObject"]
401
-
402
- [[services]]`,
403
- );
404
- }
405
- if (role === 'signing-worker' && process.env.ROUTER_AB_WALLET_DO_HARNESS === 'enabled') {
406
- const presignBinding = ' { name = "SIGNING_WORKER_PRESIGN_SESSION_DO", class_name = "RouterAbSigningWorkerPresignSessionDurableObject" },';
407
- if (!config.includes(presignBinding)) {
408
- throw new Error('SigningWorker presign object binding is missing');
409
- }
410
- config = config.replace(
411
- presignBinding,
412
- `${presignBinding}
413
- { name = "SIGNING_WORKER_WALLET_DO", class_name = "RouterAbSigningWorkerWalletDurableObject" },`,
414
- );
415
- config = config.replace(
416
- '[vars]',
417
- `[[migrations]]
418
- tag = "r150-signing-worker-wallet-sqlite-v1"
419
- new_sqlite_classes = ["RouterAbSigningWorkerWalletDurableObject"]
420
-
421
- [vars]`,
422
- );
423
- }
424
366
  config = applyRoleVars(config, role, {
425
367
  sdkRouterUrl,
426
368
  routerEnv,
@@ -552,18 +494,6 @@ function applyRoleVars(source, role, env) {
552
494
  'DERIVER_B_ENVELOPE_HPKE_PUBLIC_KEY',
553
495
  requiredEnv(env.routerEnv, 'DERIVER_B_ED25519_YAO_INPUT_PUBLIC_KEY'),
554
496
  );
555
- config = setTomlSectionAssignment(
556
- config,
557
- 'vars',
558
- 'DERIVER_A_PEER_VERIFYING_KEY_HEX',
559
- localPeerVerifyingKeyHex(requiredEnv(env.deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY')),
560
- );
561
- config = setTomlSectionAssignment(
562
- config,
563
- 'vars',
564
- 'DERIVER_B_PEER_VERIFYING_KEY_HEX',
565
- localPeerVerifyingKeyHex(requiredEnv(env.deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY')),
566
- );
567
497
  return setTenantRootDeriverVars(
568
498
  setPrivateD1Vars(config, 'DERIVER_ROLE_PRIVATE_D1', env.privateD1Keys.deriverA),
569
499
  'A',
@@ -582,18 +512,6 @@ function applyRoleVars(source, role, env) {
582
512
  'DERIVER_A_ENVELOPE_HPKE_PUBLIC_KEY',
583
513
  requiredEnv(env.routerEnv, 'DERIVER_A_ED25519_YAO_INPUT_PUBLIC_KEY'),
584
514
  );
585
- config = setTomlSectionAssignment(
586
- config,
587
- 'vars',
588
- 'DERIVER_A_PEER_VERIFYING_KEY_HEX',
589
- localPeerVerifyingKeyHex(requiredEnv(env.deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY')),
590
- );
591
- config = setTomlSectionAssignment(
592
- config,
593
- 'vars',
594
- 'DERIVER_B_PEER_VERIFYING_KEY_HEX',
595
- localPeerVerifyingKeyHex(requiredEnv(env.deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY')),
596
- );
597
515
  return setTenantRootDeriverVars(
598
516
  setPrivateD1Vars(config, 'DERIVER_ROLE_PRIVATE_D1', env.privateD1Keys.deriverB),
599
517
  'B',
@@ -644,18 +562,6 @@ function applyRoleVars(source, role, env) {
644
562
  'DERIVER_B_CUSTODY_AUTHORITY_VERIFYING_KEY_HEX',
645
563
  env.tenantRootKeys.deriverBCustodyAuthorityVerifyingKeyHex,
646
564
  );
647
- config = setTomlSectionAssignment(
648
- config,
649
- 'vars',
650
- 'DERIVER_A_PEER_VERIFYING_KEY_HEX',
651
- localPeerVerifyingKeyHex(requiredEnv(env.deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY')),
652
- );
653
- config = setTomlSectionAssignment(
654
- config,
655
- 'vars',
656
- 'DERIVER_B_PEER_VERIFYING_KEY_HEX',
657
- localPeerVerifyingKeyHex(requiredEnv(env.deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY')),
658
- );
659
565
  return setTenantRootPublicKeys(config, env);
660
566
  default:
661
567
  throw new Error(`unsupported strict local worker role ${role}`);
@@ -766,18 +672,6 @@ function replaceTopologyPublicVars(source, env) {
766
672
  'DERIVER_B_ENVELOPE_HPKE_PUBLIC_KEY',
767
673
  requiredEnv(env.routerEnv, 'DERIVER_B_ED25519_YAO_INPUT_PUBLIC_KEY'),
768
674
  );
769
- config = setTomlSectionAssignment(
770
- config,
771
- 'vars',
772
- 'DERIVER_A_PEER_VERIFYING_KEY_HEX',
773
- localPeerVerifyingKeyHex(requiredEnv(env.deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY')),
774
- );
775
- config = setTomlSectionAssignment(
776
- config,
777
- 'vars',
778
- 'DERIVER_B_PEER_VERIFYING_KEY_HEX',
779
- localPeerVerifyingKeyHex(requiredEnv(env.deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY')),
780
- );
781
675
  return setTomlSectionAssignment(
782
676
  config,
783
677
  'vars',
@@ -807,9 +701,6 @@ function strictRoleSecretFile(role, env) {
807
701
  'hpke-x25519-private-v1:',
808
702
  'Deriver A envelope HPKE private key',
809
703
  )}`,
810
- `DERIVER_A_PEER_SIGNING_KEY=${localPeerSigningKeyBase64Url(
811
- requiredEnv(env.deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY'),
812
- )}`,
813
704
  `DERIVER_A_ROLE_PRIVATE_D1_KEK=hpke-x25519-role-private-d1-private-v1:${env.privateD1Keys.deriverA.privateKeyHex}`,
814
705
  `DERIVER_A_TENANT_ROOT_CREATION_SIGNING_KEY=${env.tenantRootKeys.deriverA.creationSigningSeedB64u}`,
815
706
  `DERIVER_A_TENANT_ROOT_ONLINE_HPKE_PRIVATE_KEY=hpke-x25519-private-v1:${env.tenantRootKeys.deriverA.onlineKey.privateKeyHex}`,
@@ -829,9 +720,6 @@ function strictRoleSecretFile(role, env) {
829
720
  'hpke-x25519-private-v1:',
830
721
  'Deriver B envelope HPKE private key',
831
722
  )}`,
832
- `DERIVER_B_PEER_SIGNING_KEY=${localPeerSigningKeyBase64Url(
833
- requiredEnv(env.deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY'),
834
- )}`,
835
723
  `DERIVER_B_ROLE_PRIVATE_D1_KEK=hpke-x25519-role-private-d1-private-v1:${env.privateD1Keys.deriverB.privateKeyHex}`,
836
724
  `DERIVER_B_TENANT_ROOT_CREATION_SIGNING_KEY=${env.tenantRootKeys.deriverB.creationSigningSeedB64u}`,
837
725
  `DERIVER_B_TENANT_ROOT_ONLINE_HPKE_PRIVATE_KEY=hpke-x25519-private-v1:${env.tenantRootKeys.deriverB.onlineKey.privateKeyHex}`,
@@ -966,12 +854,10 @@ export function resolveLocalTenantRootKeyMaterial(input) {
966
854
  );
967
855
  const deriverA = localTenantRootDeriverKeyMaterial(
968
856
  'A',
969
- requiredEnv(deriverAEnv, 'DERIVER_A_PEER_SIGNING_KEY'),
970
857
  requiredEnv(deriverAEnv, 'DERIVER_A_ENVELOPE_HPKE_PRIVATE_KEY'),
971
858
  );
972
859
  const deriverB = localTenantRootDeriverKeyMaterial(
973
860
  'B',
974
- requiredEnv(deriverBEnv, 'DERIVER_B_PEER_SIGNING_KEY'),
975
861
  requiredEnv(deriverBEnv, 'DERIVER_B_ENVELOPE_HPKE_PRIVATE_KEY'),
976
862
  );
977
863
  return Object.freeze({
@@ -1013,9 +899,9 @@ export function resolveLocalTenantRootKeyMaterial(input) {
1013
899
  });
1014
900
  }
1015
901
 
1016
- function localTenantRootDeriverKeyMaterial(suffix, signingSeed, hpkeSeedHex) {
902
+ function localTenantRootDeriverKeyMaterial(suffix, hpkeSeedHex) {
1017
903
  const lower = suffix.toLowerCase();
1018
- const creation = deriveLocalEd25519KeyPair(signingSeed, `tenant-root/${lower}/creation-signing`);
904
+ const creation = deriveLocalEd25519KeyPair(hpkeSeedHex, `tenant-root/${lower}/creation-signing`);
1019
905
  return Object.freeze({
1020
906
  creationSigningKeyId: `local-deriver-${lower}-tenant-root-creation-v1`,
1021
907
  creationSigningSeedB64u: creation.signingSeedB64u,
@@ -43,8 +43,6 @@ DERIVER_ROLE_PRIVATE_D1_ROLE = "deriver_a"
43
43
  DERIVER_A_ENVELOPE_HPKE_PRIVATE_KEY_BINDING = "DERIVER_A_ENVELOPE_HPKE_PRIVATE_KEY"
44
44
  DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
45
45
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
46
- DERIVER_A_PEER_SIGNING_KEY_BINDING = "DERIVER_A_PEER_SIGNING_KEY"
47
- DERIVER_A_PEER_SIGNING_KEY_EPOCH = "epoch-1"
48
46
  DERIVER_B_PEER_BINDING = "DERIVER_B"
49
47
 
50
48
  [env.staging]
@@ -87,10 +85,6 @@ DERIVER_A_ENVELOPE_HPKE_PRIVATE_KEY_BINDING = "DERIVER_A_ENVELOPE_HPKE_PRIVATE_K
87
85
  DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
88
86
  DERIVER_A_ENVELOPE_HPKE_PUBLIC_KEY = "x25519:2693d0896a85398a7bef705c714590bbd99e0c91be62323d33c421d5be597257"
89
87
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
90
- DERIVER_A_PEER_SIGNING_KEY_BINDING = "DERIVER_A_PEER_SIGNING_KEY"
91
- DERIVER_A_PEER_SIGNING_KEY_EPOCH = "epoch-1"
92
- DERIVER_A_PEER_VERIFYING_KEY_HEX = "d6d21d388a92e6eb9d85d9fcdbcba81c383d7102717b7160fab5e2b501555907"
93
- DERIVER_B_PEER_VERIFYING_KEY_HEX = "1a369e342f555305e278312f3b704465e11fadbbab09134ed897402ed65c2d4a"
94
88
  DERIVER_B_PEER_BINDING = "DERIVER_B"
95
89
 
96
90
  [env.production-testnet]
@@ -132,8 +126,6 @@ DERIVER_ROLE_PRIVATE_D1_ROLE = "deriver_a"
132
126
  DERIVER_A_ENVELOPE_HPKE_PRIVATE_KEY_BINDING = "DERIVER_A_ENVELOPE_HPKE_PRIVATE_KEY"
133
127
  DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
134
128
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
135
- DERIVER_A_PEER_SIGNING_KEY_BINDING = "DERIVER_A_PEER_SIGNING_KEY"
136
- DERIVER_A_PEER_SIGNING_KEY_EPOCH = "epoch-1"
137
129
  DERIVER_B_PEER_BINDING = "DERIVER_B"
138
130
 
139
131
  [observability]
@@ -24,6 +24,14 @@ name = "ROUTER_TENANT_ROOT_CREATION_DO"
24
24
  class_name = "RouterAbTenantRootCreationDurableObject"
25
25
  script_name = "router-ab-mpc-router"
26
26
 
27
+ [[durable_objects.bindings]]
28
+ name = "DERIVER_B_WALLET_DO"
29
+ class_name = "RouterAbDeriverBWalletDurableObject"
30
+
31
+ [[migrations]]
32
+ tag = "r150-deriver-b-wallet-sqlite-v1"
33
+ new_sqlite_classes = ["RouterAbDeriverBWalletDurableObject"]
34
+
27
35
  [[services]]
28
36
  binding = "DERIVER_A"
29
37
  service = "router-ab-deriver-a"
@@ -35,8 +43,6 @@ DERIVER_ROLE_PRIVATE_D1_ROLE = "deriver_b"
35
43
  DERIVER_B_ENVELOPE_HPKE_PRIVATE_KEY_BINDING = "DERIVER_B_ENVELOPE_HPKE_PRIVATE_KEY"
36
44
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
37
45
  DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
38
- DERIVER_B_PEER_SIGNING_KEY_BINDING = "DERIVER_B_PEER_SIGNING_KEY"
39
- DERIVER_B_PEER_SIGNING_KEY_EPOCH = "epoch-1"
40
46
  DERIVER_A_PEER_BINDING = "DERIVER_A"
41
47
 
42
48
  [env.staging]
@@ -59,6 +65,14 @@ name = "ROUTER_TENANT_ROOT_CREATION_DO"
59
65
  class_name = "RouterAbTenantRootCreationDurableObject"
60
66
  script_name = "router-ab-mpc-router-staging"
61
67
 
68
+ [[env.staging.durable_objects.bindings]]
69
+ name = "DERIVER_B_WALLET_DO"
70
+ class_name = "RouterAbDeriverBWalletDurableObject"
71
+
72
+ [[env.staging.migrations]]
73
+ tag = "r150-deriver-b-wallet-sqlite-v1"
74
+ new_sqlite_classes = ["RouterAbDeriverBWalletDurableObject"]
75
+
62
76
  [[env.staging.services]]
63
77
  binding = "DERIVER_A"
64
78
  service = "router-ab-deriver-a-staging"
@@ -71,10 +85,6 @@ DERIVER_B_ENVELOPE_HPKE_PRIVATE_KEY_BINDING = "DERIVER_B_ENVELOPE_HPKE_PRIVATE_K
71
85
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
72
86
  DERIVER_B_ENVELOPE_HPKE_PUBLIC_KEY = "x25519:5e2819f555ecfcc996761ca4558551172f06052fb9f80123a88f4e0094c3b13a"
73
87
  DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
74
- DERIVER_B_PEER_SIGNING_KEY_BINDING = "DERIVER_B_PEER_SIGNING_KEY"
75
- DERIVER_B_PEER_SIGNING_KEY_EPOCH = "epoch-1"
76
- DERIVER_A_PEER_VERIFYING_KEY_HEX = "d6d21d388a92e6eb9d85d9fcdbcba81c383d7102717b7160fab5e2b501555907"
77
- DERIVER_B_PEER_VERIFYING_KEY_HEX = "1a369e342f555305e278312f3b704465e11fadbbab09134ed897402ed65c2d4a"
78
88
  DERIVER_A_PEER_BINDING = "DERIVER_A"
79
89
 
80
90
  [env.production-testnet]
@@ -97,6 +107,14 @@ name = "ROUTER_TENANT_ROOT_CREATION_DO"
97
107
  class_name = "RouterAbTenantRootCreationDurableObject"
98
108
  script_name = "router-ab-mpc-router-testnet"
99
109
 
110
+ [[env.production-testnet.durable_objects.bindings]]
111
+ name = "DERIVER_B_WALLET_DO"
112
+ class_name = "RouterAbDeriverBWalletDurableObject"
113
+
114
+ [[env.production-testnet.migrations]]
115
+ tag = "r150-deriver-b-wallet-sqlite-v1"
116
+ new_sqlite_classes = ["RouterAbDeriverBWalletDurableObject"]
117
+
100
118
  [[env.production-testnet.services]]
101
119
  binding = "DERIVER_A"
102
120
  service = "router-ab-deriver-a-testnet"
@@ -108,8 +126,6 @@ DERIVER_ROLE_PRIVATE_D1_ROLE = "deriver_b"
108
126
  DERIVER_B_ENVELOPE_HPKE_PRIVATE_KEY_BINDING = "DERIVER_B_ENVELOPE_HPKE_PRIVATE_KEY"
109
127
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
110
128
  DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
111
- DERIVER_B_PEER_SIGNING_KEY_BINDING = "DERIVER_B_PEER_SIGNING_KEY"
112
- DERIVER_B_PEER_SIGNING_KEY_EPOCH = "epoch-1"
113
129
  DERIVER_A_PEER_BINDING = "DERIVER_A"
114
130
 
115
131
  [observability]
@@ -82,8 +82,6 @@ DERIVER_A_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
82
82
  DERIVER_A_ENVELOPE_HPKE_PUBLIC_KEY = "x25519:2693d0896a85398a7bef705c714590bbd99e0c91be62323d33c421d5be597257"
83
83
  DERIVER_B_ENVELOPE_HPKE_KEY_EPOCH = "epoch-1"
84
84
  DERIVER_B_ENVELOPE_HPKE_PUBLIC_KEY = "x25519:5e2819f555ecfcc996761ca4558551172f06052fb9f80123a88f4e0094c3b13a"
85
- DERIVER_A_PEER_VERIFYING_KEY_HEX = "d6d21d388a92e6eb9d85d9fcdbcba81c383d7102717b7160fab5e2b501555907"
86
- DERIVER_B_PEER_VERIFYING_KEY_HEX = "1a369e342f555305e278312f3b704465e11fadbbab09134ed897402ed65c2d4a"
87
85
  SIGNING_WORKER_SERVER_OUTPUT_HPKE_KEY_EPOCH = "epoch-1"
88
86
  SIGNING_WORKER_SERVER_OUTPUT_HPKE_PUBLIC_KEY = "x25519:d0a06a6445d78bc87f449dfac2b427ad1857a0b00d91e20f152031ad49c18010"
89
87
  DERIVER_A_PEER_BINDING = "DERIVER_A"
@@ -14,12 +14,17 @@ migrations_dir = "migrations/signing-worker"
14
14
  [durable_objects]
15
15
  bindings = [
16
16
  { name = "SIGNING_WORKER_PRESIGN_SESSION_DO", class_name = "RouterAbSigningWorkerPresignSessionDurableObject" },
17
+ { name = "SIGNING_WORKER_WALLET_DO", class_name = "RouterAbSigningWorkerWalletDurableObject" },
17
18
  ]
18
19
 
19
20
  [[migrations]]
20
21
  tag = "router_ab_signing_worker_v4"
21
22
  new_sqlite_classes = ["RouterAbSigningWorkerPresignSessionDurableObject"]
22
23
 
24
+ [[migrations]]
25
+ tag = "r150-signing-worker-wallet-sqlite-v1"
26
+ new_sqlite_classes = ["RouterAbSigningWorkerWalletDurableObject"]
27
+
23
28
  [vars]
24
29
  ROUTER_AB_INTERNAL_SERVICE_AUTH_SECRET_BINDING = "ROUTER_AB_INTERNAL_SERVICE_AUTH_SECRET"
25
30
  SIGNING_WORKER_PRESIGN_SESSION_DO_BINDING = "SIGNING_WORKER_PRESIGN_SESSION_DO"
@@ -43,6 +48,18 @@ migrations_dir = "migrations/signing-worker"
43
48
  name = "SIGNING_WORKER_PRESIGN_SESSION_DO"
44
49
  class_name = "RouterAbSigningWorkerPresignSessionDurableObject"
45
50
 
51
+ [[env.staging.durable_objects.bindings]]
52
+ name = "SIGNING_WORKER_WALLET_DO"
53
+ class_name = "RouterAbSigningWorkerWalletDurableObject"
54
+
55
+ [[env.staging.migrations]]
56
+ tag = "router_ab_signing_worker_v4"
57
+ new_sqlite_classes = ["RouterAbSigningWorkerPresignSessionDurableObject"]
58
+
59
+ [[env.staging.migrations]]
60
+ tag = "r150-signing-worker-wallet-sqlite-v1"
61
+ new_sqlite_classes = ["RouterAbSigningWorkerWalletDurableObject"]
62
+
46
63
  [env.staging.vars]
47
64
  ROUTER_AB_INTERNAL_SERVICE_AUTH_SECRET_BINDING = "ROUTER_AB_INTERNAL_SERVICE_AUTH_SECRET"
48
65
  SIGNING_WORKER_PRESIGN_SESSION_DO_BINDING = "SIGNING_WORKER_PRESIGN_SESSION_DO"
@@ -67,6 +84,18 @@ migrations_dir = "migrations/signing-worker"
67
84
  name = "SIGNING_WORKER_PRESIGN_SESSION_DO"
68
85
  class_name = "RouterAbSigningWorkerPresignSessionDurableObject"
69
86
 
87
+ [[env.production-testnet.durable_objects.bindings]]
88
+ name = "SIGNING_WORKER_WALLET_DO"
89
+ class_name = "RouterAbSigningWorkerWalletDurableObject"
90
+
91
+ [[env.production-testnet.migrations]]
92
+ tag = "router_ab_signing_worker_v4"
93
+ new_sqlite_classes = ["RouterAbSigningWorkerPresignSessionDurableObject"]
94
+
95
+ [[env.production-testnet.migrations]]
96
+ tag = "r150-signing-worker-wallet-sqlite-v1"
97
+ new_sqlite_classes = ["RouterAbSigningWorkerWalletDurableObject"]
98
+
70
99
  [env.production-testnet.vars]
71
100
  ROUTER_AB_INTERNAL_SERVICE_AUTH_SECRET_BINDING = "ROUTER_AB_INTERNAL_SERVICE_AUTH_SECRET"
72
101
  SIGNING_WORKER_PRESIGN_SESSION_DO_BINDING = "SIGNING_WORKER_PRESIGN_SESSION_DO"
@@ -3,9 +3,9 @@ import { parseMpcWalletSigningQuotaId, parsePrincipalId, parseTenantId, parseWal
3
3
  import { base64UrlEncode } from "../shared-ts/src/utils/base64.js";
4
4
  import { alphabetizeStringify, sha256BytesUtf8 } from "../shared-ts/src/utils/digests.js";
5
5
  import { parseDigestB64u } from "../shared-ts/src/utils/canonicalPrimitives.js";
6
+ import { parseActiveWalletSessionV1, parseWalletSessionHome } from "../shared-ts/src/device-linking/activeWalletSession.js";
6
7
  import { computeCapabilityOperationFingerprintDigest } from "../shared-ts/src/authorization/operationFingerprint.js";
7
8
  import "../shared-ts/src/utils/encoders.js";
8
- import { parseActiveWalletSessionV1 } from "../shared-ts/src/device-linking/activeWalletSession.js";
9
9
  import "../shared-ts/src/device-linking/index.js";
10
10
  //#region src/authorization/domain.ts
11
11
  function buildExactWalletSessionQuotaProjectionV1(fields) {
@@ -340,13 +340,14 @@ function parseHostedWalletSessionOperationCredentialV1(raw) {
340
340
  if (!walletSessionId.ok) throw new Error(`walletSessionId is invalid: ${walletSessionId.error.message}`);
341
341
  return {
342
342
  kind: raw.kind,
343
+ home: parseWalletSessionHome(raw.home),
343
344
  token,
344
345
  walletSessionId: walletSessionId.value
345
346
  };
346
347
  }
347
348
  function isHostedWalletSessionOperationCredentialRecordV1(value) {
348
349
  if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
349
- return Object.keys(value).sort().join("|") === "kind|token|walletSessionId";
350
+ return Object.keys(value).sort().join("|") === "home|kind|token|walletSessionId";
350
351
  }
351
352
  function parsePrimaryWalletSessionOperationCredentialToken(value) {
352
353
  if (typeof value !== "string" || !/^wst_[A-Za-z0-9_-]{43}$/.test(value)) throw new Error("primary Wallet Session credential is invalid");