@seams/wallet-server 0.9.3 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +33 -1
- package/artifact-manifest.json +57 -37
- package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/deriver-a/index.js +2 -2
- package/cloudflare-router-ab/build/deriver-a/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/deriver-b/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/deriver-b/index.js +2 -2
- package/cloudflare-router-ab/build/deriver-b/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/local-tools/darwin-arm64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/local-tools/darwin-x64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/local-tools/linux-x64/router_ab_local_init +0 -0
- package/cloudflare-router-ab/build/router/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/router/index.js +1 -1
- package/cloudflare-router-ab/build/router/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/signing-worker/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/signing-worker/index.js +1 -1
- package/cloudflare-router-ab/build/signing-worker/index_bg.wasm +0 -0
- package/cloudflare-router-ab/build/tenant-root-control-plane/build-stamp.json +1 -1
- package/cloudflare-router-ab/build/tenant-root-control-plane/index.js +1 -1
- package/cloudflare-router-ab/build/tenant-root-control-plane/index_bg.wasm +0 -0
- package/cloudflare-router-ab/migrations/deriver-a/0020_registration_preparation.sql +7 -0
- package/cloudflare-router-ab/migrations/deriver-b/0020_registration_preparation.sql +7 -0
- package/dist/esm/cloud-host.js +9 -9
- package/dist/esm/core/d1Ed25519SignerRead.js +3 -19
- package/dist/esm/hosted-wallet-gateway.js +15 -1
- package/dist/esm/localHostedWalletGatewayHandler.js +1 -1
- package/dist/esm/router/cloudflare/d1/authorization/d1AuthorizationStore.js +26 -20
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecords.js +21 -2
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.js +11 -4
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationSetupRateLimit.js +34 -0
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +17 -16
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +45 -65
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.js +87 -10
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerService.js +1 -1
- package/dist/esm/router/cloudflare/runtime/walletGateway.js +2 -0
- package/dist/esm/router/cloudflare-adaptor.js +7 -7
- package/dist/esm/router/cloudflare.js +8812 -8594
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoCapabilityCommit.js +45 -24
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js +52 -3
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.js +13 -5
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js +41 -7
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryRequestScopedCloudflare.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js +24 -4
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.js +24 -14
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.js +10 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js +45 -5
- package/dist/esm/router/domains/walletRegistration/walletRegistrationRoutes.js +48 -8
- package/dist/esm/router/express.js +107 -16
- package/dist/esm/router/framework/registrationSetupDispatch.js +28 -2
- package/dist/esm/router/framework/registrationSetupRateLimit.js +0 -0
- package/dist/esm/router/transport/fetch/routes/walletRegistration.js +3 -2
- package/dist/esm/storage/d1Retry.js +38 -0
- package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +1 -1
- package/dist/types/wallet-server/src/core/RegistrationCeremonyStore.d.ts +12 -0
- package/dist/types/wallet-server/src/core/d1Ed25519SignerRead.d.ts +1 -4
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.d.ts +50 -6
- package/dist/types/wallet-server/src/hosted-wallet-gateway.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.d.ts +7 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1RegistrationSetupRateLimit.d.ts +7 -0
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationService.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationSetupExecution.d.ts +3 -0
- package/dist/types/wallet-server/src/router/cloudflare/runtime/walletGateway.d.ts +1 -1
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoCapabilityCommit.d.ts +18 -4
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.d.ts +35 -4
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.d.ts +1 -1
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.d.ts +7 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryRequestScopedCloudflare.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.d.ts +5 -3
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.d.ts +18 -3
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.d.ts +2 -0
- package/dist/types/wallet-server/src/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.d.ts +39 -0
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationInputs.d.ts +6 -0
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationReservation.d.ts +16 -2
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationRoutes.d.ts +1 -0
- package/dist/types/wallet-server/src/router/framework/registrationSetupRateLimit.d.ts +11 -0
- package/dist/types/wallet-server/src/router/framework/routerApi.d.ts +1 -0
- package/dist/types/wallet-server/src/storage/d1Retry.d.ts +10 -0
- package/migrations/d1-signer/0079_tenant_lookup_indexes.sql +33 -0
- package/migrations/d1-signer/0080_registration_setup_rate_limits.sql +11 -0
- package/package.json +1 -1
- package/src/README.md +1 -1
|
@@ -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,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}
|
|
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_waitUntil_909855b1aeec03d5:function(){return c(function(e,t){e.waitUntil(t)},arguments)},__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
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};
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- A preparation reserves an epoch before the client supplies its encrypted input.
|
|
2
|
+
-- Binding the input clears this marker in the same transaction that reads the share.
|
|
3
|
+
ALTER TABLE tenant_root_root_use_admissions ADD COLUMN preparation_digest_hex TEXT
|
|
4
|
+
CHECK (preparation_digest_hex IS NULL OR (
|
|
5
|
+
length(preparation_digest_hex) = 64
|
|
6
|
+
AND preparation_digest_hex NOT GLOB '*[^0-9a-f]*'
|
|
7
|
+
));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- A preparation reserves an epoch before the client supplies its encrypted input.
|
|
2
|
+
-- Binding the input clears this marker in the same transaction that reads the share.
|
|
3
|
+
ALTER TABLE tenant_root_root_use_admissions ADD COLUMN preparation_digest_hex TEXT
|
|
4
|
+
CHECK (preparation_digest_hex IS NULL OR (
|
|
5
|
+
length(preparation_digest_hex) = 64
|
|
6
|
+
AND preparation_digest_hex NOT GLOB '*[^0-9a-f]*'
|
|
7
|
+
));
|
package/dist/esm/cloud-host.js
CHANGED
|
@@ -74,29 +74,29 @@ import { admitD1EstablishedWalletHome } from "./router/cloudflare/d1/registratio
|
|
|
74
74
|
import { parseLinkedDeviceSessionRecordV1 } from "./core/deviceLinking/linkedDeviceSessionRecord.js";
|
|
75
75
|
import { D1LinkedDeviceSourceContributionPreparationPlannerV1, createD1LinkedDeviceSourceContributionPreparationPlannerV1, linkedDeviceX25519RecipientPublicKeyB64uV1 } from "./router/cloudflare/d1/deviceLinking/d1LinkedDeviceSourceContributionPreparationPlanner.js";
|
|
76
76
|
import { D1LinkedDeviceAuthorityInstallServiceV1, parseInstalledEcdsaCustodySnapshotV1, readD1LinkedDeviceEcdsaSourceV1, readD1LinkedDeviceEd25519SourceV1 } from "./router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js";
|
|
77
|
+
import { CloudflareD1AuthorizationStore } from "./router/cloudflare/d1/authorization/d1AuthorizationStore.js";
|
|
78
|
+
import { CloudflareD1VaultProxyStore } from "./router/cloudflare/d1/authorization/d1VaultProxyStore.js";
|
|
77
79
|
import { InMemoryRouterAbEd25519YaoRegistrationService, createRouterAbEd25519YaoRegistrationModule } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.js";
|
|
78
80
|
import { InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationAdapter } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.js";
|
|
79
81
|
import { InMemoryRouterAbEd25519YaoExportService, InMemoryRouterAbEd25519YaoExportStateV1, RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter, createRouterAbEd25519YaoExportModule, parseRouterAbEd25519YaoExportAdmissionEnvelopeV1, parseRouterAbEd25519YaoExportExecuteEnvelopeV1 } from "./router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js";
|
|
80
82
|
import { parseRouterAbEd25519YaoTenantRootWireV1, routerAbEd25519YaoRegistrationSigningRootIdV1, routerAbEd25519YaoTenantRootWireV1 } from "./router/domains/ed25519Yao/routerAbEd25519YaoGatewayEnvelope.js";
|
|
81
|
-
import { buildRouterAbEd25519YaoAddSignerAdmissionRequestV1, buildRouterAbEd25519YaoProductAdmissionRequestV1, createRouterAbEd25519YaoMaterialActivationRefV1, createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1, createRouterAbEd25519YaoProductRegistrationRuntimeV1, createRouterAbEd25519YaoProductRegistrationStateFromPartsV1, createRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoProductRegistrationStateV1, projectRouterAbEd25519YaoExactWalletSession, routerAbEd25519YaoPersistedCapabilityMatchesLookupV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js";
|
|
82
|
-
import { createRouterAbEd25519YaoCeremonyStateStoreV1, encodeRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoCeremonyKeyV1, parseRouterAbEd25519YaoProductRegistrationStateJsonV1, resolveRouterAbEd25519YaoCeremonyKeyFromRequestV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPersistence.js";
|
|
83
|
-
import { mergeRouterAbEd25519YaoProductRegistrationStatePartitionV1, partitionRouterAbEd25519YaoProductRegistrationStateV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.js";
|
|
84
|
-
import { ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1, routerAbEd25519YaoAdmittedRegistrationAuthorityV1, routerAbEd25519YaoPartitionedStateAfterStoredCommitV1, sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js";
|
|
85
|
-
import { CloudflareD1AuthorizationStore } from "./router/cloudflare/d1/authorization/d1AuthorizationStore.js";
|
|
86
|
-
import { CloudflareD1VaultProxyStore } from "./router/cloudflare/d1/authorization/d1VaultProxyStore.js";
|
|
83
|
+
import { buildRouterAbEd25519YaoAddSignerAdmissionRequestV1, buildRouterAbEd25519YaoProductAdmissionRequestV1, createRouterAbEd25519YaoMaterialActivationRefV1, createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1, createRouterAbEd25519YaoProductRegistrationRuntimeV1, createRouterAbEd25519YaoProductRegistrationStateFromPartsV1, createRouterAbEd25519YaoProductRegistrationStateV1, mintRouterAbEd25519YaoRegistrationIdentityV1, parseRouterAbEd25519YaoProductRegistrationStateV1, projectRouterAbEd25519YaoExactWalletSession, routerAbEd25519YaoPersistedCapabilityMatchesLookupV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js";
|
|
87
84
|
import { RouterAbEd25519YaoHttpRegistrationBackend, createRouterAbEd25519YaoHttpRegistrationBackendFromEnv, parseRouterAbEd25519YaoActivationKeysetFromEnvV1, parseRouterAbEd25519YaoRegistrationRouterAnswerV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js";
|
|
88
85
|
import { StaticCloudflareTenantStorageRouteResolver, createCloudflareTenantStorageRoute, createSignerD1DoStorageTarget, createStaticCloudflareTenantStorageRouteResolver, createStaticCloudflareTenantStorageRouteResolverFromBindings, tenantStorageRouteBackendFamily, tenantStorageRouteDiagnostic } from "./storage/tenantRoute.js";
|
|
89
86
|
import { createInMemoryRouterApiRuntimeSnapshotConsumer, validateRuntimeSnapshotExpectation } from "./router/framework/runtimeSnapshotConsumer.js";
|
|
90
87
|
import { createSelfHostedCloudflareSigningRouter, createSelfHostedCloudflareSigningWorker } from "./router/cloudflare/runtime/createSelfHostedCloudflareSigningWorker.js";
|
|
91
88
|
import { CloudflareDurableObjectVersionedJsonRecordStore, CloudflareVersionedJsonRecordStoreError, createCloudflareDurableObjectVersionedJsonRecordStore } from "./router/cloudflare/durableObjects/versionedJsonRecordStore.js";
|
|
92
89
|
import { CloudflareD1VersionedJsonRecordStore, CloudflareD1VersionedJsonRecordStoreError, createCloudflareD1VersionedJsonRecordStore } from "./router/cloudflare/d1/versionedJson/d1VersionedJsonRecordStore.js";
|
|
90
|
+
import { createRouterAbEd25519YaoCeremonyStateStoreV1, encodeRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoCeremonyKeyV1, parseRouterAbEd25519YaoProductRegistrationStateJsonV1, resolveRouterAbEd25519YaoCeremonyKeyFromRequestV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPersistence.js";
|
|
91
|
+
import { mergeRouterAbEd25519YaoProductRegistrationStatePartitionV1, partitionRouterAbEd25519YaoProductRegistrationStateV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitioning.js";
|
|
92
|
+
import { ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1, routerAbEd25519YaoAdmittedRegistrationAuthorityV1, routerAbEd25519YaoPartitionedStateAfterStoredCommitV1, sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js";
|
|
93
93
|
import { createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V1 } from "./router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.js";
|
|
94
94
|
import { runRouterAbEd25519YaoProductRegistrationRequestScopedV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRunner.js";
|
|
95
|
+
import { runRouterAbEd25519YaoRegistrationTwoPhaseV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationTwoPhaseRunner.js";
|
|
96
|
+
import { executeRouterAbEd25519YaoAdmittedRegistrationV1, handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1, routerAbEd25519YaoRegistrationExecutionTimingEntriesV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js";
|
|
95
97
|
import { createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js";
|
|
96
98
|
import { runRouterAbEd25519YaoRegistrationSideEffectV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationSideEffectBoundary.js";
|
|
97
|
-
import { runRouterAbEd25519YaoRegistrationTwoPhaseV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationTwoPhaseRunner.js";
|
|
98
99
|
import { CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_RESERVE_INACTIVE_SOURCE_PRESERVING_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1, CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1, CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialDeactivationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1, createUnavailableOrdinaryInactiveSignerMaterialDeactivationPortV1, createUnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1 } from "./router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.js";
|
|
99
|
-
import { handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js";
|
|
100
100
|
import "./router/cloudflare-adaptor.js";
|
|
101
101
|
import { CloudflareD1RouterAbEd25519YaoCapabilityPersistence, ROUTER_AB_ED25519_YAO_CAPABILITY_REPLACEMENT_TABLE_V1 } from "./router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js";
|
|
102
102
|
import { CloudflareD1OidcJwksCache, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseGoogleJwks, parseJwtAud, parseRs256JwtForVerification, validateGoogleIdTokenClaims, verifyRs256JwtSignature } from "./router/cloudflare/d1/oidc/d1OidcBoundary.js";
|
|
@@ -131,4 +131,4 @@ import { handleRouterAbEd25519YaoRecoveryRequestScopedCloudflareV1 } from "./rou
|
|
|
131
131
|
import { RouterAbEd25519YaoRecoveryWalletSessionAuthorizationAdapter } from "./router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecoveryWalletSessionAuthorization.js";
|
|
132
132
|
import { keccak256Bytes } from "./shared-ts/src/utils/keccak.js";
|
|
133
133
|
import { decodeEvmBlockHeader, decodeEvmTransactionByHash, decodeEvmTransactionCall, decodeEvmTransactionReceipt, parseRpcHexQuantity } from "./shared-ts/src/utils/evmRpcResults.js";
|
|
134
|
-
export { API_CREDENTIAL_ROUTE_SCOPES, API_CREDENTIAL_TYPES, ActionType, CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_RESERVE_INACTIVE_SOURCE_PRESERVING_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1, CloudflareD1AuthorizationStore, CloudflareD1GoogleEmailOtpRegistrationAttemptStore, CloudflareD1OidcJwksCache, CloudflareD1RouterAbEd25519YaoCapabilityPersistence, CloudflareD1RouterAbNormalSigningAdmissionStore, CloudflareD1VaultProxyStore, CloudflareD1VersionedJsonRecordStore, CloudflareD1VersionedJsonRecordStoreError, CloudflareD1WebAuthnAuthService, CloudflareD1WebAuthnStore, CloudflareDurableObjectVersionedJsonRecordStore, CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1, CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1, CloudflareVersionedJsonRecordStoreError, CrossSiteSessionCookieAdapter, D1IdentityStore, D1LinkedDeviceAuthorityInstallServiceV1, D1LinkedDeviceEd25519ExportRootStoreV1, D1LinkedDeviceRequestProofNonceStoreV1, D1LinkedDeviceSessionStoreV1, D1LinkedDeviceSourceContributionPreparationPlannerV1, D1LinkedDeviceTargetAuthenticatorStoreV1, D1LinkedDeviceTargetCredentialProviderV1, D1LinkedDeviceTargetPlannerV1, D1WalletAuthMethodStore, D1WalletObjectAddresses, D1WalletStore, D1_BATCH_CAS_GUARD_SQL, DEFAULT_SESSION_COOKIE_NAME, DEFAULT_WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_V1, DEFAULT_WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_V1, DEFAULT_WALLET_SESSION_REMAINING_USES, DEFAULT_WALLET_SESSION_TTL_MS, ED25519_SIGNER_ACTIVATION_ID_PATH, InMemoryRouterAbEd25519YaoExportService, InMemoryRouterAbEd25519YaoExportStateV1, InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationAdapter, InMemoryRouterAbEd25519YaoRegistrationService, InMemoryRouterAbNormalSigningAdmissionStore, LINKED_DEVICE_OWNER_AUTHORIZATION_PATH_V1, LinkedDeviceRetiredTargetRegistrationShapeErrorV1, LinkedDeviceSourceFamilyUnavailableErrorV1, LinkedDeviceWebAuthnRegistrationVerifierV1, MAX_WALLET_SESSION_REMAINING_USES, MAX_WALLET_SESSION_TTL_MS, PUBLIC_PROOF_TYPES, ROUTER_AB_ECDSA_DERIVATION_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_YAO_CAPABILITY_REPLACEMENT_TABLE_V1, ROUTER_AB_ED25519_YAO_EXPORT_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_EXPORT_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ACTIVATE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_STATUS_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, ROUTER_AB_ED25519_YAO_WARM_RECOVERY_BOOTSTRAP_PATH_V1, ROUTER_AB_MPC_ROUTER_ORIGIN, ROUTER_AB_PUBLIC_KEYSET_PATH, ROUTER_AB_PUBLIC_KEYSET_VERSION_V2, ROUTER_AB_PUBLIC_KEYSET_WELL_KNOWN_PATH, ROUTER_AB_SIGNING_WORKER_ORIGIN, ROUTER_AB_TRACE_ID_HEADER_V1, ROUTER_API_CREDENTIAL_SCOPES, ROUTE_SERVICE_KEYS, RouterAbEcdsaPresignRuntime, RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter, RouterAbEd25519YaoHttpRegistrationBackend, RouterAbEd25519YaoRecoveryWalletSessionAuthorizationAdapter, SESSION_CAS_GUARD_SQL, SessionService, StaticCloudflareTenantStorageRouteResolver, UnavailableOrdinaryInactiveSignerMaterialDeactivationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, WALLET_AUTH_METHOD_D1_STORE, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_SQL, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_V2_SQL, WALLET_CONSOLE_API_WALLET_DETAIL_PREFIX_V1, WALLET_CONSOLE_OPS_BASE_PATH_V1, WALLET_CONSOLE_OP_PATHS_V1, WALLET_CONSOLE_SERVICE_ORIGIN_V1, WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_ID_V1, WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_ID_V1, WALLET_CONTROL_AUTH_MARKER_V1, WALLET_CONTROL_BASE_PATH_V1, WALLET_CONTROL_SERVICE_ORIGIN_V1, WALLET_RUNTIME_OPS_BASE_PATH_V1, WALLET_RUNTIME_OP_PATHS_V1, WALLET_RUNTIME_SERVICE_ORIGIN_V1, WALLET_STORE_D1_SCHEMA_SQL, WalletHomeCustodyBinding, WalletLifecycleLocator, WalletObjectAddressSnapshot, WalletPlacementRoutes, abusePrincipalKey, addSecp256k1PublicKeys33, admitD1EstablishedWalletHome, admitRouterAbEcdsaReusableWalletSessionOperation, applyRouteMetering, assertUniqueRouterApiRouteDefinitions, authenticateDeviceLinkingOwnerWalletSessionRequestV1, authenticateRouterAbEcdsaOperationStepUp, authenticateRouterAbWalletOperationStepUp, authenticateRouterAbWalletOperationStepUpIdentity, authorizeRouterAbEcdsaDerivationNormalSigningRoute, authorizeRouterAbEd25519NormalSigningRoute, base64UrlDecode, base64UrlEncode, bindWalletAuthMethodIdentity, bindWalletAuthMethodIdentityV2, buildCorsOrigins, buildRouterAbEcdsaDerivationPrivateSigningWorkerBody, buildRouterAbEcdsaOwnerOperationStepUpPreparation, buildRouterAbEd25519OwnerOperationStepUpPreparation, buildRouterAbEd25519PrivateSigningWorkerBody, buildRouterAbEd25519YaoAddSignerAdmissionRequestV1, buildRouterAbEd25519YaoProductAdmissionRequestV1, buildTenantRootIdentityFromAuthenticatedDeploymentV1, buildVerifiedLinkInputV1, buildVerifiedTargetFactorV1, buildWalletEcdsaSignerRecord, claimRouterAbEcdsaOperationStepUp, coerceLogger, coerceRouterLogger, completeRouterAbEcdsaOperation, computeEip1559TxHash, computeLinkedDeviceSessionClaimDigestV1, computeRouterAbEd25519NormalSigningAdmissionMaterial, computeVerifiedTargetFactorVerificationDigestV1, createCloudflareD1RouterAbNormalSigningAdmissionStore, createCloudflareD1RouterApiAuthService, createCloudflareD1VersionedJsonRecordStore, createCloudflareDurableObjectVersionedJsonRecordStore, createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1, createCloudflareRouter, createCloudflareTenantStorageRoute, createCloudflareWalletGatewayRouterV1, createD1LinkedDeviceOwnerAuthorizationMetadataSourceV1, createD1LinkedDeviceOwnerAuthorizationProviderV1, createD1LinkedDeviceOwnerSourceChildReaderV1, createD1LinkedDeviceRouteServiceV1, createD1LinkedDeviceSessionServiceV1, createD1LinkedDeviceSourceContributionPreparationPlannerV1, createD1LinkedDeviceVerifiedLinkSourceReaderV1, createDeviceLinkingOwnerRequestAuthenticatorV1, createEd25519SessionAdapter, createInMemoryRouterAbNormalSigningAdmissionAdapter, createInMemoryRouterAbNormalSigningAdmissionStore, createInMemoryRouterApiRuntimeSnapshotConsumer, createRouterAbEcdsaEd25519CeremonyTokenIssuer, createRouterAbEcdsaStrictPostRegistrationPort, createRouterAbEcdsaStrictRegistrationPort, createRouterAbEd25519YaoCeremonyStateStoreV1, createRouterAbEd25519YaoExportModule, createRouterAbEd25519YaoHttpRegistrationBackendFromEnv, createRouterAbEd25519YaoMaterialActivationRefV1, createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1, createRouterAbEd25519YaoProductRegistrationRuntimeV1, createRouterAbEd25519YaoProductRegistrationStateFromPartsV1, createRouterAbEd25519YaoProductRegistrationStateV1, createRouterAbEd25519YaoRegistrationModule, createRouterAbNormalSigningAdmissionAdapter, createRouterAbServiceBindingFetch, createRouterApiModule, createRouterApiRouteDefinitions, createSelfHostedCloudflareSigningRouter, createSelfHostedCloudflareSigningWorker, createSignerD1DoStorageTarget, createSigningSessionSealOptions, createStaticCloudflareTenantStorageRouteResolver, createStaticCloudflareTenantStorageRouteResolverFromBindings, createStaticWalletConsoleBindingV1, createUnavailableOrdinaryInactiveSignerMaterialDeactivationPortV1, createUnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, createWalletConsoleOpsClient, createWalletConsoleRelayProxyExtensionV1, createWalletControlClientBindings, createWalletRegistrationContextResolver, createWalletRuntimeOpsHandler, d1ChangedRows, d1Integer, d1Number, decideRouterAbEcdsaOwnerOperationAuthorization, decideRouterAbEd25519OwnerOperationAuthorization, decodeEvmBlockHeader, decodeEvmTransactionByHash, decodeEvmTransactionCall, decodeEvmTransactionReceipt, decodeJsonRpcEnvelope, decodeWalletConsoleTenantRootActiveLineageRequestV1, decodeWalletConsoleTenantRootActiveLineageResponseV1, defineRoute, defineRouteExtension, deriveJwtExpiresAtIso, deriveRecoveryCodeLocatorV1FromBytes, digestOpaqueValue, encodeEip1559SignedTxFromSignature65, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, encodeRouterAbEd25519YaoProductRegistrationStateV1, encodeSessionJsonSegment, encodeTenantRootIdentityV1, enforceDelegatePolicy, enforceRoutePolicy, ensureEvmCryptoWasm, ensureLeadingSlash, ensureWalletAuthMethodStoreD1Schema, ensureWalletStoreD1Schema, evaluateRouterAbNormalSigningAdmission, executeSignedDelegateWithRelayer, extractBearerCredential, extractRouterApiEnvironmentId, findRouteDefinitionById, findRouteDefinitionForRequest, formatD1ExecStatement, getRouterApiRouteExtensionDefinitions, getRouterApiRouteExtensionRoutes, getRouterApiRouteExtensionsForTransport, handleRouterAbEcdsaDerivationNormalSigningRouteCore, handleRouterAbEd25519YaoExportRequestScopedCloudflareV1, handleRouterAbEd25519YaoRecoveryRequestScopedCloudflareV1, handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1, handleStaticWalletConsoleRequestV1, handleWalletControlRequest, headersToRecord, isD1DatabaseLike, isObject, isPlainObject, json, jsonFailure, keccak256Bytes, linkedDeviceSignerManifestsEqualV1, linkedDeviceX25519RecipientPublicKeyB64uV1, loadCloudflareSignerWasmModule, matchesRouteDefinitionRequest, mergeRouterAbEd25519YaoProductRegistrationStatePartitionV1, normalizeBoundedPositiveInteger, normalizeCorsOrigin, normalizeD1RouterApiAuthOptions, normalizeHashToBytes, normalizeLinkedDevicePasskeyTargetConfigurationV1, normalizeLogger, normalizeLowercaseString, normalizeSessionString, normalizeSessionTtlSeconds, normalizeSourceIp, normalizeTrimmedString, normalizeWalletAuthMethod, normalizeWalletAuthMethodV2, parseBooleanFlag, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseCsvList, parseD1JsonArrayColumn, parseD1JsonColumn, parseD1JsonObjectColumn, parseD1LinkedDeviceSessionRowV1, parseD1LinkedDeviceSessionTranscriptRowV1, parseGoogleEmailOtpRegistrationAttemptRecord, parseGoogleEmailOtpRegistrationOfferCandidates, parseGoogleJwks, parseGoogleLoginVerifyRequest, parseInstalledEcdsaCustodySnapshotV1, parseJwtAud, parseLinkedDeviceSessionRecordV1, parseOrgId, parseRecoveryCodeLocatorV1, parseRouterAbEcdsaEd25519PrivateJwk, parseRouterAbEcdsaPresignRuntimeConfig, parseRouterAbEcdsaStrictRegistrationTopology, parseRouterAbEd25519NormalSigningScopeV2, parseRouterAbEd25519OperationStepUpScope, parseRouterAbEd25519YaoActivationKeysetFromEnvV1, parseRouterAbEd25519YaoCeremonyKeyV1, parseRouterAbEd25519YaoExportAdmissionEnvelopeV1, parseRouterAbEd25519YaoExportExecuteEnvelopeV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationStateJsonV1, parseRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoRegistrationRouterAnswerV1, parseRouterAbEd25519YaoTenantRootWireV1, parseRouterAbOperationStepUpOperation, parseRouterAbPublicKeysetV2, parseRpcHexQuantity, parseRs256JwtForVerification, parseSessionJwt, parseSigningSessionSealRootConfig, parseStaticWalletConsoleBindingConfigV1, parseStoredRouterAbEcdsaPendingActivationV1, parseWalletEd25519SignerRecord, parseWalletId, parseWalletRecoveryOperationId, parseWalletRegistrationContextResponse, parseWalletRegistrationSetupRequest, parseWalletRegistrationSetupReservation, parseWalletRuntimeExecuteSignedDelegateRequest, parseWalletRuntimeExecuteSignedDelegateResponse, parseWalletRuntimeExecuteSignedDelegateResult, parseWalletRuntimeRelayerAccount, parseWalletRuntimeWalletIdentitiesResult, parseWalletRuntimeWalletIdentityRequest, parseWebAuthnRpId, parseWebAuthnSyncChallengeRecord, partitionRouterAbEd25519YaoProductRegistrationStateV1, postRouterAbSigningWorkerJson, prepareD1TenantStatement, prepareD1WalletAuthMethodInsertStatement, prepareD1WalletAuthMethodPutStatement, prepareD1WalletAuthMethodV2PutStatement, prepareD1WalletPutSignerStatement, prepareD1WalletPutSubjectStatement, prepareD1WebAuthnAuthenticatorInsertStatement, prepareD1WebAuthnAuthenticatorPutStatement, projectRouterAbEd25519YaoExactWalletSession, proposeWalletRegistrationSetup, publishableKeyRoutePrincipal, queryD1All, queryD1One, randomTenantRootCreationGrantBytesV1, readD1LinkedDeviceEcdsaSourceV1, readD1LinkedDeviceEd25519SourceV1, readEnvironmentCsv, readEnvironmentString, readJson, registrationPreparationIdFromString, requireD1RouterApiAuthScopeString, requireEnvironmentString, requireNormalizedSessionString, requireRuntimePolicyScope, resolveFreshRouterAbEcdsaMaterialActivation, resolvePublishableKeyApiCredentialAuth, resolveRequestOriginRateLimitKeyFromExpressRequest, resolveRequestOriginRateLimitKeyFromFetchHeaders, resolveRouterAbEd25519YaoCeremonyKeyFromRequestV1, resolveRuntimeTenantRootLineage, resolveSecretKeyApiCredentialAuth, resolveSourceIpFromExpressRequest, resolveSourceIpFromFetchHeaders, resolveWalletRegistrationContext, routeError, routeJson, routerAbEcdsaAtomicAuthorizationConfigured, routerAbEcdsaOperationInProgressResult, routerAbEcdsaOwnerOperationFailureResult, routerAbEcdsaRecordedResponse, routerAbEcdsaReplayHttpResponse, routerAbEcdsaReplayResult, routerAbEcdsaReplayUnavailableResult, routerAbEcdsaStrictRegistrationFactsBindingJson, routerAbEcdsaStrictRegistrationRequestBindingJson, routerAbEcdsaStrictRegistrationRequestMatchesFacts, routerAbEd25519OwnerOperationFailureResult, routerAbEd25519YaoAdmittedRegistrationAuthorityV1, routerAbEd25519YaoPartitionedStateAfterStoredCommitV1, routerAbEd25519YaoPersistedCapabilityMatchesLookupV1, routerAbEd25519YaoRegistrationSigningRootIdV1, routerAbEd25519YaoTenantRootWireV1, runRouterAbEd25519YaoProductRegistrationRequestScopedV1, runRouterAbEd25519YaoRegistrationSideEffectV1, runRouterAbEd25519YaoRegistrationTwoPhaseV1, runRouterAbPrewarmScheduledV1, runtimePolicyScopeKey, sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1, secp256k1PrivateKey32ToPublicKey33, secp256k1PublicKey33ToEthereumAddress, secureRandomBase36, secureRandomBase64Url, selectWalletEd25519Signer, sendExpressRouteResponse, sessionJwtTimeClaims, sha256Bytes, sha256BytesSync, signSecp256k1Recoverable, signTenantRootCreationGrantV1, tenantRootIdentityDigestB64uV1, tenantStorageRouteBackendFamily, tenantStorageRouteDiagnostic, toFetchRouteResponse, normalizeOptionalTrimmedString as toOptionalTrimmedString, toResponse, toSessionArrayBufferCopy, unavailableRegistrationContext, validateDelegateExpiryAndNonce, validateGoogleIdTokenClaims, validateRuntimeSnapshotExpectation, validateSecp256k1PublicKey33, verifyGoogleOidcToken, verifyRs256JwtSignature, verifySecp256k1Bip340SignatureAgainstPublicKey33, verifySecp256k1RecoverableSignatureAgainstPublicKey33, walletAuthMethodId, walletAuthMethodV2Id, walletConsoleApiWalletGetRouteDefinitionV1, walletConsoleApiWalletListRouteDefinitionV1, walletConsoleApiWalletSearchRouteDefinitionV1, walletConsoleRelayRouteDefinitionsV1, walletConsoleSignedDelegateRouteDefinitionV1, walletConsoleSponsoredEvmCallRouteDefinitionV1, walletObjectIdentity, walletRegistrationContext, walletRegistrationSetupRequestDigest, webAuthnCredentialIdB64uFromCredential, withCors };
|
|
134
|
+
export { API_CREDENTIAL_ROUTE_SCOPES, API_CREDENTIAL_TYPES, ActionType, CLOUDFLARE_ROUTER_ED25519_YAO_SOURCE_PRESERVING_EXECUTE_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_DEACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ECDSA_RESERVE_INACTIVE_SOURCE_PRESERVING_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_ACTIVATE_RESERVATION_PATH_V1, CLOUDFLARE_SIGNING_WORKER_ED25519_YAO_DEACTIVATE_RESERVATION_PATH_V1, CloudflareD1AuthorizationStore, CloudflareD1GoogleEmailOtpRegistrationAttemptStore, CloudflareD1OidcJwksCache, CloudflareD1RouterAbEd25519YaoCapabilityPersistence, CloudflareD1RouterAbNormalSigningAdmissionStore, CloudflareD1VaultProxyStore, CloudflareD1VersionedJsonRecordStore, CloudflareD1VersionedJsonRecordStoreError, CloudflareD1WebAuthnAuthService, CloudflareD1WebAuthnStore, CloudflareDurableObjectVersionedJsonRecordStore, CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1, CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1, CloudflareVersionedJsonRecordStoreError, CrossSiteSessionCookieAdapter, D1IdentityStore, D1LinkedDeviceAuthorityInstallServiceV1, D1LinkedDeviceEd25519ExportRootStoreV1, D1LinkedDeviceRequestProofNonceStoreV1, D1LinkedDeviceSessionStoreV1, D1LinkedDeviceSourceContributionPreparationPlannerV1, D1LinkedDeviceTargetAuthenticatorStoreV1, D1LinkedDeviceTargetCredentialProviderV1, D1LinkedDeviceTargetPlannerV1, D1WalletAuthMethodStore, D1WalletObjectAddresses, D1WalletStore, D1_BATCH_CAS_GUARD_SQL, DEFAULT_SESSION_COOKIE_NAME, DEFAULT_WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_V1, DEFAULT_WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_V1, DEFAULT_WALLET_SESSION_REMAINING_USES, DEFAULT_WALLET_SESSION_TTL_MS, ED25519_SIGNER_ACTIVATION_ID_PATH, InMemoryRouterAbEd25519YaoExportService, InMemoryRouterAbEd25519YaoExportStateV1, InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationAdapter, InMemoryRouterAbEd25519YaoRegistrationService, InMemoryRouterAbNormalSigningAdmissionStore, LINKED_DEVICE_OWNER_AUTHORIZATION_PATH_V1, LinkedDeviceRetiredTargetRegistrationShapeErrorV1, LinkedDeviceSourceFamilyUnavailableErrorV1, LinkedDeviceWebAuthnRegistrationVerifierV1, MAX_WALLET_SESSION_REMAINING_USES, MAX_WALLET_SESSION_TTL_MS, PUBLIC_PROOF_TYPES, ROUTER_AB_ECDSA_DERIVATION_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_PRIVATE_SIGNING_PATHS, ROUTER_AB_ED25519_YAO_CAPABILITY_REPLACEMENT_TABLE_V1, ROUTER_AB_ED25519_YAO_EXPORT_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_EXPORT_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ACTIVATE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_RECOVERY_STATUS_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_ADMISSION_PATH_V1, ROUTER_AB_ED25519_YAO_REGISTRATION_EXECUTE_PATH_V1, ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, ROUTER_AB_ED25519_YAO_WARM_RECOVERY_BOOTSTRAP_PATH_V1, ROUTER_AB_MPC_ROUTER_ORIGIN, ROUTER_AB_PUBLIC_KEYSET_PATH, ROUTER_AB_PUBLIC_KEYSET_VERSION_V2, ROUTER_AB_PUBLIC_KEYSET_WELL_KNOWN_PATH, ROUTER_AB_SIGNING_WORKER_ORIGIN, ROUTER_AB_TRACE_ID_HEADER_V1, ROUTER_API_CREDENTIAL_SCOPES, ROUTE_SERVICE_KEYS, RouterAbEcdsaPresignRuntime, RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter, RouterAbEd25519YaoHttpRegistrationBackend, RouterAbEd25519YaoRecoveryWalletSessionAuthorizationAdapter, SESSION_CAS_GUARD_SQL, SessionService, StaticCloudflareTenantStorageRouteResolver, UnavailableOrdinaryInactiveSignerMaterialDeactivationWorkerV1, UnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, WALLET_AUTH_METHOD_D1_STORE, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_SQL, WALLET_AUTH_METHOD_STORE_D1_SCHEMA_V2_SQL, WALLET_CONSOLE_API_WALLET_DETAIL_PREFIX_V1, WALLET_CONSOLE_OPS_BASE_PATH_V1, WALLET_CONSOLE_OP_PATHS_V1, WALLET_CONSOLE_SERVICE_ORIGIN_V1, WALLET_CONSOLE_SIGNED_DELEGATE_ROUTE_ID_V1, WALLET_CONSOLE_SPONSORED_EVM_CALL_ROUTE_ID_V1, WALLET_CONTROL_AUTH_MARKER_V1, WALLET_CONTROL_BASE_PATH_V1, WALLET_CONTROL_SERVICE_ORIGIN_V1, WALLET_RUNTIME_OPS_BASE_PATH_V1, WALLET_RUNTIME_OP_PATHS_V1, WALLET_RUNTIME_SERVICE_ORIGIN_V1, WALLET_STORE_D1_SCHEMA_SQL, WalletHomeCustodyBinding, WalletLifecycleLocator, WalletObjectAddressSnapshot, WalletPlacementRoutes, abusePrincipalKey, addSecp256k1PublicKeys33, admitD1EstablishedWalletHome, admitRouterAbEcdsaReusableWalletSessionOperation, applyRouteMetering, assertUniqueRouterApiRouteDefinitions, authenticateDeviceLinkingOwnerWalletSessionRequestV1, authenticateRouterAbEcdsaOperationStepUp, authenticateRouterAbWalletOperationStepUp, authenticateRouterAbWalletOperationStepUpIdentity, authorizeRouterAbEcdsaDerivationNormalSigningRoute, authorizeRouterAbEd25519NormalSigningRoute, base64UrlDecode, base64UrlEncode, bindWalletAuthMethodIdentity, bindWalletAuthMethodIdentityV2, buildCorsOrigins, buildRouterAbEcdsaDerivationPrivateSigningWorkerBody, buildRouterAbEcdsaOwnerOperationStepUpPreparation, buildRouterAbEd25519OwnerOperationStepUpPreparation, buildRouterAbEd25519PrivateSigningWorkerBody, buildRouterAbEd25519YaoAddSignerAdmissionRequestV1, buildRouterAbEd25519YaoProductAdmissionRequestV1, buildTenantRootIdentityFromAuthenticatedDeploymentV1, buildVerifiedLinkInputV1, buildVerifiedTargetFactorV1, buildWalletEcdsaSignerRecord, claimRouterAbEcdsaOperationStepUp, coerceLogger, coerceRouterLogger, completeRouterAbEcdsaOperation, computeEip1559TxHash, computeLinkedDeviceSessionClaimDigestV1, computeRouterAbEd25519NormalSigningAdmissionMaterial, computeVerifiedTargetFactorVerificationDigestV1, createCloudflareD1RouterAbNormalSigningAdmissionStore, createCloudflareD1RouterApiAuthService, createCloudflareD1VersionedJsonRecordStore, createCloudflareDurableObjectVersionedJsonRecordStore, createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationPortV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1, createCloudflareRouter, createCloudflareTenantStorageRoute, createCloudflareWalletGatewayRouterV1, createD1LinkedDeviceOwnerAuthorizationMetadataSourceV1, createD1LinkedDeviceOwnerAuthorizationProviderV1, createD1LinkedDeviceOwnerSourceChildReaderV1, createD1LinkedDeviceRouteServiceV1, createD1LinkedDeviceSessionServiceV1, createD1LinkedDeviceSourceContributionPreparationPlannerV1, createD1LinkedDeviceVerifiedLinkSourceReaderV1, createDeviceLinkingOwnerRequestAuthenticatorV1, createEd25519SessionAdapter, createInMemoryRouterAbNormalSigningAdmissionAdapter, createInMemoryRouterAbNormalSigningAdmissionStore, createInMemoryRouterApiRuntimeSnapshotConsumer, createRouterAbEcdsaEd25519CeremonyTokenIssuer, createRouterAbEcdsaStrictPostRegistrationPort, createRouterAbEcdsaStrictRegistrationPort, createRouterAbEd25519YaoCeremonyStateStoreV1, createRouterAbEd25519YaoExportModule, createRouterAbEd25519YaoHttpRegistrationBackendFromEnv, createRouterAbEd25519YaoMaterialActivationRefV1, createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1, createRouterAbEd25519YaoProductRegistrationRuntimeV1, createRouterAbEd25519YaoProductRegistrationStateFromPartsV1, createRouterAbEd25519YaoProductRegistrationStateV1, createRouterAbEd25519YaoRegistrationModule, createRouterAbNormalSigningAdmissionAdapter, createRouterAbServiceBindingFetch, createRouterApiModule, createRouterApiRouteDefinitions, createSelfHostedCloudflareSigningRouter, createSelfHostedCloudflareSigningWorker, createSignerD1DoStorageTarget, createSigningSessionSealOptions, createStaticCloudflareTenantStorageRouteResolver, createStaticCloudflareTenantStorageRouteResolverFromBindings, createStaticWalletConsoleBindingV1, createUnavailableOrdinaryInactiveSignerMaterialDeactivationPortV1, createUnavailableOrdinaryInactiveSignerMaterialReservationWorkerV1, createWalletConsoleOpsClient, createWalletConsoleRelayProxyExtensionV1, createWalletControlClientBindings, createWalletRegistrationContextResolver, createWalletRuntimeOpsHandler, d1ChangedRows, d1Integer, d1Number, decideRouterAbEcdsaOwnerOperationAuthorization, decideRouterAbEd25519OwnerOperationAuthorization, decodeEvmBlockHeader, decodeEvmTransactionByHash, decodeEvmTransactionCall, decodeEvmTransactionReceipt, decodeJsonRpcEnvelope, decodeWalletConsoleTenantRootActiveLineageRequestV1, decodeWalletConsoleTenantRootActiveLineageResponseV1, defineRoute, defineRouteExtension, deriveJwtExpiresAtIso, deriveRecoveryCodeLocatorV1FromBytes, digestOpaqueValue, encodeEip1559SignedTxFromSignature65, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, encodeRouterAbEd25519YaoProductRegistrationStateV1, encodeSessionJsonSegment, encodeTenantRootIdentityV1, enforceDelegatePolicy, enforceRoutePolicy, ensureEvmCryptoWasm, ensureLeadingSlash, ensureWalletAuthMethodStoreD1Schema, ensureWalletStoreD1Schema, evaluateRouterAbNormalSigningAdmission, executeRouterAbEd25519YaoAdmittedRegistrationV1, executeSignedDelegateWithRelayer, extractBearerCredential, extractRouterApiEnvironmentId, findRouteDefinitionById, findRouteDefinitionForRequest, formatD1ExecStatement, getRouterApiRouteExtensionDefinitions, getRouterApiRouteExtensionRoutes, getRouterApiRouteExtensionsForTransport, handleRouterAbEcdsaDerivationNormalSigningRouteCore, handleRouterAbEd25519YaoExportRequestScopedCloudflareV1, handleRouterAbEd25519YaoRecoveryRequestScopedCloudflareV1, handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1, handleStaticWalletConsoleRequestV1, handleWalletControlRequest, headersToRecord, isD1DatabaseLike, isObject, isPlainObject, json, jsonFailure, keccak256Bytes, linkedDeviceSignerManifestsEqualV1, linkedDeviceX25519RecipientPublicKeyB64uV1, loadCloudflareSignerWasmModule, matchesRouteDefinitionRequest, mergeRouterAbEd25519YaoProductRegistrationStatePartitionV1, mintRouterAbEd25519YaoRegistrationIdentityV1, normalizeBoundedPositiveInteger, normalizeCorsOrigin, normalizeD1RouterApiAuthOptions, normalizeHashToBytes, normalizeLinkedDevicePasskeyTargetConfigurationV1, normalizeLogger, normalizeLowercaseString, normalizeSessionString, normalizeSessionTtlSeconds, normalizeSourceIp, normalizeTrimmedString, normalizeWalletAuthMethod, normalizeWalletAuthMethodV2, parseBooleanFlag, parseBooleanJwtClaim, parseCacheControlMaxAgeSec, parseCsvList, parseD1JsonArrayColumn, parseD1JsonColumn, parseD1JsonObjectColumn, parseD1LinkedDeviceSessionRowV1, parseD1LinkedDeviceSessionTranscriptRowV1, parseGoogleEmailOtpRegistrationAttemptRecord, parseGoogleEmailOtpRegistrationOfferCandidates, parseGoogleJwks, parseGoogleLoginVerifyRequest, parseInstalledEcdsaCustodySnapshotV1, parseJwtAud, parseLinkedDeviceSessionRecordV1, parseOrgId, parseRecoveryCodeLocatorV1, parseRouterAbEcdsaEd25519PrivateJwk, parseRouterAbEcdsaPresignRuntimeConfig, parseRouterAbEcdsaStrictRegistrationTopology, parseRouterAbEd25519NormalSigningScopeV2, parseRouterAbEd25519OperationStepUpScope, parseRouterAbEd25519YaoActivationKeysetFromEnvV1, parseRouterAbEd25519YaoCeremonyKeyV1, parseRouterAbEd25519YaoExportAdmissionEnvelopeV1, parseRouterAbEd25519YaoExportExecuteEnvelopeV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationStateJsonV1, parseRouterAbEd25519YaoProductRegistrationStateV1, parseRouterAbEd25519YaoRegistrationRouterAnswerV1, parseRouterAbEd25519YaoTenantRootWireV1, parseRouterAbOperationStepUpOperation, parseRouterAbPublicKeysetV2, parseRpcHexQuantity, parseRs256JwtForVerification, parseSessionJwt, parseSigningSessionSealRootConfig, parseStaticWalletConsoleBindingConfigV1, parseStoredRouterAbEcdsaPendingActivationV1, parseWalletEd25519SignerRecord, parseWalletId, parseWalletRecoveryOperationId, parseWalletRegistrationContextResponse, parseWalletRegistrationSetupRequest, parseWalletRegistrationSetupReservation, parseWalletRuntimeExecuteSignedDelegateRequest, parseWalletRuntimeExecuteSignedDelegateResponse, parseWalletRuntimeExecuteSignedDelegateResult, parseWalletRuntimeRelayerAccount, parseWalletRuntimeWalletIdentitiesResult, parseWalletRuntimeWalletIdentityRequest, parseWebAuthnRpId, parseWebAuthnSyncChallengeRecord, partitionRouterAbEd25519YaoProductRegistrationStateV1, postRouterAbSigningWorkerJson, prepareD1TenantStatement, prepareD1WalletAuthMethodInsertStatement, prepareD1WalletAuthMethodPutStatement, prepareD1WalletAuthMethodV2PutStatement, prepareD1WalletPutSignerStatement, prepareD1WalletPutSubjectStatement, prepareD1WebAuthnAuthenticatorInsertStatement, prepareD1WebAuthnAuthenticatorPutStatement, projectRouterAbEd25519YaoExactWalletSession, proposeWalletRegistrationSetup, publishableKeyRoutePrincipal, queryD1All, queryD1One, randomTenantRootCreationGrantBytesV1, readD1LinkedDeviceEcdsaSourceV1, readD1LinkedDeviceEd25519SourceV1, readEnvironmentCsv, readEnvironmentString, readJson, registrationPreparationIdFromString, requireD1RouterApiAuthScopeString, requireEnvironmentString, requireNormalizedSessionString, requireRuntimePolicyScope, resolveFreshRouterAbEcdsaMaterialActivation, resolvePublishableKeyApiCredentialAuth, resolveRequestOriginRateLimitKeyFromExpressRequest, resolveRequestOriginRateLimitKeyFromFetchHeaders, resolveRouterAbEd25519YaoCeremonyKeyFromRequestV1, resolveRuntimeTenantRootLineage, resolveSecretKeyApiCredentialAuth, resolveSourceIpFromExpressRequest, resolveSourceIpFromFetchHeaders, resolveWalletRegistrationContext, routeError, routeJson, routerAbEcdsaAtomicAuthorizationConfigured, routerAbEcdsaOperationInProgressResult, routerAbEcdsaOwnerOperationFailureResult, routerAbEcdsaRecordedResponse, routerAbEcdsaReplayHttpResponse, routerAbEcdsaReplayResult, routerAbEcdsaReplayUnavailableResult, routerAbEcdsaStrictRegistrationFactsBindingJson, routerAbEcdsaStrictRegistrationRequestBindingJson, routerAbEcdsaStrictRegistrationRequestMatchesFacts, routerAbEd25519OwnerOperationFailureResult, routerAbEd25519YaoAdmittedRegistrationAuthorityV1, routerAbEd25519YaoPartitionedStateAfterStoredCommitV1, routerAbEd25519YaoPersistedCapabilityMatchesLookupV1, routerAbEd25519YaoRegistrationExecutionTimingEntriesV1, routerAbEd25519YaoRegistrationSigningRootIdV1, routerAbEd25519YaoTenantRootWireV1, runRouterAbEd25519YaoProductRegistrationRequestScopedV1, runRouterAbEd25519YaoRegistrationSideEffectV1, runRouterAbEd25519YaoRegistrationTwoPhaseV1, runRouterAbPrewarmScheduledV1, runtimePolicyScopeKey, sameRouterAbEd25519YaoSharedStateCanonicalEncodingV1, secp256k1PrivateKey32ToPublicKey33, secp256k1PublicKey33ToEthereumAddress, secureRandomBase36, secureRandomBase64Url, selectWalletEd25519Signer, sendExpressRouteResponse, sessionJwtTimeClaims, sha256Bytes, sha256BytesSync, signSecp256k1Recoverable, signTenantRootCreationGrantV1, tenantRootIdentityDigestB64uV1, tenantStorageRouteBackendFamily, tenantStorageRouteDiagnostic, toFetchRouteResponse, normalizeOptionalTrimmedString as toOptionalTrimmedString, toResponse, toSessionArrayBufferCopy, unavailableRegistrationContext, validateDelegateExpiryAndNonce, validateGoogleIdTokenClaims, validateRuntimeSnapshotExpectation, validateSecp256k1PublicKey33, verifyGoogleOidcToken, verifyRs256JwtSignature, verifySecp256k1Bip340SignatureAgainstPublicKey33, verifySecp256k1RecoverableSignatureAgainstPublicKey33, walletAuthMethodId, walletAuthMethodV2Id, walletConsoleApiWalletGetRouteDefinitionV1, walletConsoleApiWalletListRouteDefinitionV1, walletConsoleApiWalletSearchRouteDefinitionV1, walletConsoleRelayRouteDefinitionsV1, walletConsoleSignedDelegateRouteDefinitionV1, walletConsoleSponsoredEvmCallRouteDefinitionV1, walletObjectIdentity, walletRegistrationContext, walletRegistrationSetupRequestDigest, webAuthnCredentialIdB64uFromCredential, withCors };
|
|
@@ -1,46 +1,30 @@
|
|
|
1
1
|
import { isPlainObject } from "../shared-ts/src/utils/validation.js";
|
|
2
2
|
import { sameRouterAbMpcMaterialActivationRef } from "../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
3
3
|
import { selectWalletEd25519Signer } from "./d1WalletStore.js";
|
|
4
|
-
import { resolveRouterAbEd25519YaoActiveCapability } from "../router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.js";
|
|
5
|
-
import { parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1 } from "../router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js";
|
|
6
4
|
//#region src/core/d1Ed25519SignerRead.ts
|
|
7
5
|
/** Signer rows read with a Wallet Session; a failure surfaces after session validation. */
|
|
8
6
|
var Ed25519SignerRead = class Ed25519SignerRead {
|
|
9
7
|
#result;
|
|
10
|
-
constructor(walletId, activation, result
|
|
8
|
+
constructor(walletId, activation, result) {
|
|
11
9
|
this.walletId = walletId;
|
|
12
10
|
this.activation = activation;
|
|
13
|
-
this.capabilities = capabilities;
|
|
14
11
|
this.#result = result;
|
|
15
12
|
}
|
|
16
|
-
static fromRows(walletId, activation, rows
|
|
13
|
+
static fromRows(walletId, activation, rows) {
|
|
17
14
|
let result;
|
|
18
|
-
let capabilities = null;
|
|
19
15
|
try {
|
|
20
16
|
if (!Array.isArray(rows) || !rows.every(isPlainObject)) throw new Error("Ed25519 material rows are invalid");
|
|
21
17
|
result = {
|
|
22
18
|
ok: true,
|
|
23
19
|
signer: selectWalletEd25519Signer(rows, walletId, activation)
|
|
24
20
|
};
|
|
25
|
-
if (capabilityPartition !== null) {
|
|
26
|
-
const partition = parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1(capabilityPartition);
|
|
27
|
-
if (partition?.kind !== "router_ab_ed25519_yao_product_registration_shared_record_v1") throw new Error("Ed25519 capability partition is invalid");
|
|
28
|
-
capabilities = partition.value.recoveryCapabilities;
|
|
29
|
-
}
|
|
30
21
|
} catch (error) {
|
|
31
22
|
result = {
|
|
32
23
|
ok: false,
|
|
33
24
|
message: error instanceof Error ? error.message : "Ed25519 material read failed"
|
|
34
25
|
};
|
|
35
26
|
}
|
|
36
|
-
return new Ed25519SignerRead(walletId, activation, result
|
|
37
|
-
}
|
|
38
|
-
resolveActiveCapability(input) {
|
|
39
|
-
if (input.walletId !== this.walletId) throw new Error("Ed25519 capability read belongs to another wallet");
|
|
40
|
-
if (!this.#result.ok) throw new Error(this.#result.message);
|
|
41
|
-
if (!this.capabilities) return null;
|
|
42
|
-
const result = resolveRouterAbEd25519YaoActiveCapability(this.capabilities, input);
|
|
43
|
-
return !result.ok && result.code === "unknown_capability" ? null : result;
|
|
27
|
+
return new Ed25519SignerRead(walletId, activation, result);
|
|
44
28
|
}
|
|
45
29
|
/** The session wallet's signer for the activation this read selected, or null. */
|
|
46
30
|
resolve(walletId, activation) {
|
|
@@ -26,9 +26,9 @@ import { readD1LinkedDeviceEcdsaSourceV1, readD1LinkedDeviceEd25519SourceV1 } fr
|
|
|
26
26
|
import { RouterAbEd25519YaoExportOwnerProofAuthorizationAdapter } from "./router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js";
|
|
27
27
|
import { createRouterAbEd25519YaoHttpRegistrationBackendFromEnv } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js";
|
|
28
28
|
import { createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V1 } from "./router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.js";
|
|
29
|
+
import { handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js";
|
|
29
30
|
import { createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1 } from "./router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js";
|
|
30
31
|
import { createCloudflareLinkedDeviceEd25519SourcePreservingRouterEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialActivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialDeactivationEndpointV1, createCloudflareOrdinaryInactiveSignerMaterialReservationEndpointV1 } from "./router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.js";
|
|
31
|
-
import { handleRouterAbEd25519YaoRegistrationRequestScopedCloudflareV1 } from "./router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationRequestScopedCloudflare.js";
|
|
32
32
|
import { CloudflareD1RouterAbEd25519YaoCapabilityPersistence } from "./router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js";
|
|
33
33
|
import { createSigningSessionSealOptions } from "./threshold/session/signingSessionSeal/options.js";
|
|
34
34
|
import { createRouterAbEcdsaEd25519CeremonyTokenIssuer, createRouterAbEcdsaStrictPostRegistrationPort, createRouterAbEcdsaStrictRegistrationPort, parseRouterAbEcdsaEd25519PrivateJwk, parseRouterAbEcdsaStrictRegistrationTopology } from "./router/domains/ecdsa/routerAbEcdsaStrictRegistration.js";
|
|
@@ -720,9 +720,23 @@ function createStagingYaoRequestScopedRuntime(env, resolveTenantRoot) {
|
|
|
720
720
|
async function scheduleRegistrationRouterStartup(env, background, registration) {
|
|
721
721
|
const tenant = stagingTenantScope(env);
|
|
722
722
|
const identity = walletObjectIdentity(registration.walletId, registration.ownershipGeneration, tenant);
|
|
723
|
+
if (registration.kind === "pair") {
|
|
724
|
+
background.waitUntil(prepareRegistrationRouterPair(env, identity, registration));
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
723
727
|
await new D1WalletObjectAddresses(env.SIGNER_DB, tenant).initialize(identity, env.MPC_ROUTER, requireEnvironmentString(env, "ROUTER_AB_GATEWAY_TO_ROUTER_AUTH_SECRET"));
|
|
724
728
|
background.waitUntil(startRegistrationRouter(env, identity));
|
|
725
729
|
}
|
|
730
|
+
async function prepareRegistrationRouterPair(env, identity, registration) {
|
|
731
|
+
try {
|
|
732
|
+
await createStagingEd25519YaoBackend(env, createStagingRegistrationTenantRootResolver(stagingTenantScope(env), createStagingTenantRootCustodyLineage(createWalletConsoleOpsClient(env.WALLET_CONSOLE)))).prepareRegistrationPair(identity, registration.admissionRequest, registration.admissionReceipt, registration.expiresAtMs);
|
|
733
|
+
} catch {
|
|
734
|
+
console.log(JSON.stringify({
|
|
735
|
+
event: "registration_pair_preparation",
|
|
736
|
+
outcome: "failure"
|
|
737
|
+
}));
|
|
738
|
+
}
|
|
739
|
+
}
|
|
726
740
|
async function startRegistrationRouter(env, registration) {
|
|
727
741
|
const started = Date.now();
|
|
728
742
|
let outcome = "failure";
|
|
@@ -166,7 +166,7 @@ async function handleLocalHostedWalletGatewayRequestV1(request, env, ctx, depend
|
|
|
166
166
|
const mode = parseLocalIntendedYaoFaultModeV1(rawMode);
|
|
167
167
|
const token = parseLocalIntendedYaoFaultTokenV1(rawToken);
|
|
168
168
|
const url = new URL(request.url);
|
|
169
|
-
if (url.protocol !== "http:" || url.hostname !== "127.0.0.1" || url.pathname !== "/router-ab/ed25519/yao/registration/execute" || request.method !== "POST" || !mode || !token) return Response.json({ code: "invalid_intended_yao_fault" }, { status: 400 });
|
|
169
|
+
if (url.protocol !== "http:" || url.hostname !== "127.0.0.1" || url.pathname !== "/router-ab/ed25519/yao/registration/execute" && url.pathname !== REGISTRATION_RESPOND_PATH || request.method !== "POST" || !mode || !token) return Response.json({ code: "invalid_intended_yao_fault" }, { status: 400 });
|
|
170
170
|
const controller = new LocalIntendedYaoFaultControllerV1(gatewayEnv.MPC_ROUTER.fetch.bind(gatewayEnv.MPC_ROUTER));
|
|
171
171
|
controller.arm(mode);
|
|
172
172
|
return responseWithLocalIntendedYaoFaultOutcomeV1(await handleSplitGatewayRequest(sanitizedRequest, {
|
|
@@ -12,7 +12,6 @@ import { normalizeWalletAuthMethodV2 } from "../../../../core/d1WalletAuthMethod
|
|
|
12
12
|
import { D1EcdsaAdmissionPolicyRead, D1Ed25519AdmissionPolicyRead, ECDSA_CREDENTIAL_POLICY_PROJECTION, ED25519_CREDENTIAL_POLICY_PROJECTION } from "../signingAdmission/d1RouterAbNormalSigningAdmissionStore.js";
|
|
13
13
|
import { parseInstalledEcdsaCustodySnapshotV1 } from "../deviceLinking/d1LinkedDeviceAuthorityInstallService.js";
|
|
14
14
|
import { D1RegistrationSessionTransaction } from "../registration/d1RegistrationSessionTransaction.js";
|
|
15
|
-
import { ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1 } from "../../../domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js";
|
|
16
15
|
import { Ed25519SignerRead } from "../../../../core/d1Ed25519SignerRead.js";
|
|
17
16
|
import { prepareAuthorizedOperationAdmissionRead, prepareAuthorizedOperationCommittedRead, prepareAuthorizedOperationInsert, prepareAuthorizedOperationRead } from "./authorizedOperationStatements.js";
|
|
18
17
|
import { prepareD1WalletSessionAuthorityProjectionStatements } from "./walletSessionAuthorityProjection.js";
|
|
@@ -1082,7 +1081,7 @@ var CloudflareD1AuthorizationStore = class {
|
|
|
1082
1081
|
const session = snapshot.kind === "active" ? snapshot.authorization.session : snapshot.session;
|
|
1083
1082
|
return {
|
|
1084
1083
|
snapshot,
|
|
1085
|
-
signerRead: Ed25519SignerRead.fromRows(session.walletId, input.materialActivation, parseD1JsonColumn(row.ed25519_material_records_json)
|
|
1084
|
+
signerRead: Ed25519SignerRead.fromRows(session.walletId, input.materialActivation, parseD1JsonColumn(row.ed25519_material_records_json)),
|
|
1086
1085
|
policyRead: D1Ed25519AdmissionPolicyRead.fromRows(this.database, this.namespace, session.walletId, session.authorityId, parseD1JsonColumn(row.ed25519_policy_records_json))
|
|
1087
1086
|
};
|
|
1088
1087
|
}
|
|
@@ -1318,17 +1317,11 @@ var CloudflareD1AuthorizationStore = class {
|
|
|
1318
1317
|
json_extract(signer.record_json, '${ED25519_SIGNER_ACTIVATION_ID_PATH}') = ?
|
|
1319
1318
|
ELSE 0 END
|
|
1320
1319
|
) AS ed25519_material_records_json,
|
|
1321
|
-
(SELECT record_json FROM router_ab_yao_versioned_json_records
|
|
1322
|
-
WHERE namespace = ? AND org_id = ? AND project_id = ? AND env_id = ?
|
|
1323
|
-
AND record_key = ?
|
|
1324
|
-
) AS ed25519_capability_partition_json,
|
|
1325
1320
|
${ED25519_CREDENTIAL_POLICY_PROJECTION}`;
|
|
1326
1321
|
materialBindings = [
|
|
1327
1322
|
...signerScope,
|
|
1328
1323
|
input.projection.materialActivation.activation_id,
|
|
1329
1324
|
...signerScope,
|
|
1330
|
-
`router-ab-yao:${ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1}`,
|
|
1331
|
-
...signerScope,
|
|
1332
1325
|
input.projection.materialActivation.activation_id
|
|
1333
1326
|
];
|
|
1334
1327
|
} else if (input.projection.kind === "session_status") {
|
|
@@ -1953,20 +1946,33 @@ function directV2SessionIdentityAvailabilitySql() {
|
|
|
1953
1946
|
)
|
|
1954
1947
|
AND NOT EXISTS (
|
|
1955
1948
|
SELECT 1
|
|
1956
|
-
FROM
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
OR existing.mint_id = ?
|
|
1965
|
-
OR existing.wallet_session_id = ?
|
|
1966
|
-
OR existing.quota_id = ?
|
|
1967
|
-
)
|
|
1949
|
+
FROM (
|
|
1950
|
+
SELECT ? AS namespace, ? AS org_id, ? AS project_id, ? AS env_id, ? AS tenant_id,
|
|
1951
|
+
? AS authorization_id, ? AS mint_id, ? AS wallet_session_id, ? AS quota_id
|
|
1952
|
+
) AS candidate
|
|
1953
|
+
WHERE ${existingSessionWithCandidateSql("authorization_id")}
|
|
1954
|
+
OR ${existingSessionWithCandidateSql("mint_id")}
|
|
1955
|
+
OR ${existingSessionWithCandidateSql("wallet_session_id")}
|
|
1956
|
+
OR ${existingSessionWithCandidateSql("quota_id")}
|
|
1968
1957
|
)`;
|
|
1969
1958
|
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Each of the four session identifiers has its own unique key. One lookup for
|
|
1961
|
+
* each key reads one row. A single lookup with the four identifiers in an OR
|
|
1962
|
+
* reads every session of the tenant.
|
|
1963
|
+
*/
|
|
1964
|
+
function existingSessionWithCandidateSql(identifier) {
|
|
1965
|
+
return `EXISTS (
|
|
1966
|
+
SELECT 1
|
|
1967
|
+
FROM wallet_session_authorizations_v2 AS existing
|
|
1968
|
+
WHERE existing.namespace = candidate.namespace
|
|
1969
|
+
AND existing.org_id = candidate.org_id
|
|
1970
|
+
AND existing.project_id = candidate.project_id
|
|
1971
|
+
AND existing.env_id = candidate.env_id
|
|
1972
|
+
AND existing.tenant_id = candidate.tenant_id
|
|
1973
|
+
AND existing.${identifier} = candidate.${identifier}
|
|
1974
|
+
)`;
|
|
1975
|
+
}
|
|
1970
1976
|
function directV2SessionIdentityAvailabilityBindings(namespace, scope, session) {
|
|
1971
1977
|
return [
|
|
1972
1978
|
...activeV2AuthorityMethodBindings(scope, session),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1 } from "../../../domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js";
|
|
2
1
|
import { createCloudflareD1VersionedJsonRecordStore } from "../versionedJson/d1VersionedJsonRecordStore.js";
|
|
2
|
+
import { ROUTER_AB_ED25519_YAO_SHARED_STATE_RECORD_KEY_V1, createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1, encodeRouterAbEd25519YaoProductRegistrationPartitionRecordV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordJsonV1, parseRouterAbEd25519YaoProductRegistrationPartitionRecordV1 } from "../../../domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationPartitionedStateStore.js";
|
|
3
3
|
import { D1WalletCeremonyActivity, ceremonySettled } from "./d1WalletCeremonyActivity.js";
|
|
4
4
|
import { collectChangedStateWallets, lifecycleWriteFenceStatements } from "./d1Ed25519YaoStateWriteFence.js";
|
|
5
5
|
//#region src/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.ts
|
|
@@ -3,6 +3,7 @@ import { parseDeviceId } from "../../../../shared-ts/src/authorization/capabilit
|
|
|
3
3
|
import { normalizeOptionalTrimmedString } from "../../../../shared-ts/src/utils/normalize.js";
|
|
4
4
|
import { parseDigestB64u } from "../../../../shared-ts/src/utils/canonicalPrimitives.js";
|
|
5
5
|
import { parseWalletAddAuthMethodRegistrationOptions } from "../../../../shared-ts/src/utils/addAuthMethodRegistration.js";
|
|
6
|
+
import { parseRouterAbMpcMaterialActivationRef } from "../../../../shared-ts/src/utils/routerAbNormalSigningIdentity.js";
|
|
6
7
|
import { parseRouterAbEd25519YaoRegistrationActivationAdmissionReceiptV1, parseRouterAbEd25519YaoRegistrationActivationResultV1, parseRouterAbEd25519YaoRegistrationAdmissionRequestV1 } from "../../../../shared-ts/src/utils/routerAbEd25519Yao.js";
|
|
7
8
|
import { deriveEvmFamilySigningKeySlotId } from "../../../../shared-ts/src/signing-lanes/evmFamilySigningKeySlotId.js";
|
|
8
9
|
import { derivationClientSharePublicKey33B64uFromString, ecdsaClientRootPublicKey33B64uFromString } from "../../../../shared-ts/src/threshold/ecdsaDerivationRoleLocalBootstrap.js";
|
|
@@ -23,7 +24,7 @@ import "../../../../shared-ts/src/signing-lanes/index.js";
|
|
|
23
24
|
import { parsePasskeyCustodyEnvelopeRecord } from "../../../../shared-ts/src/passkey-custody/custodyEnvelope.js";
|
|
24
25
|
import "../../../../shared-ts/src/passkey-custody/index.js";
|
|
25
26
|
import { parseImplicitNearAccountId, parseNamedNearAccountId } from "../../../../shared-ts/src/utils/near.js";
|
|
26
|
-
import { normalizeAddSignerSelection, normalizeRegistrationSignerPlan, registrationSignerBranchKeyFromString, registrationSignerSetSelectionFromPlan } from "../../../../shared-ts/src/utils/registrationSignerPlan.js";
|
|
27
|
+
import { findRegistrationSignerPlanNearEd25519Branch, normalizeAddSignerSelection, normalizeRegistrationSignerPlan, registrationSignerBranchKeyFromString, registrationSignerSetSelectionFromPlan } from "../../../../shared-ts/src/utils/registrationSignerPlan.js";
|
|
27
28
|
import { addAuthMethodIntentGrantFromString, addSignerIntentGrantFromString, normalizeAddAuthMethodIntentCaller } from "../../../../shared-ts/src/utils/registrationIntent.js";
|
|
28
29
|
import { parseEcdsaDerivationPublicIdentity, parseThresholdEd25519AuthorityScope, thresholdEd25519AuthorityScopeFromWalletAuthAuthority, thresholdEd25519AuthorityScopesMatch } from "../../../../core/ThresholdService/validation.js";
|
|
29
30
|
import { toRecordValue } from "../auth/d1RouterApiAuthBoundary.js";
|
|
@@ -172,7 +173,8 @@ function parseD1StoredWalletRegistrationCeremony(raw) {
|
|
|
172
173
|
const signerState = parseD1StoredWalletRegistrationSignerState(record.signerState);
|
|
173
174
|
const signingRootId = normalizeOptionalTrimmedString(record.signingRootId);
|
|
174
175
|
const signingRootVersion = normalizeOptionalTrimmedString(record.signingRootVersion);
|
|
175
|
-
|
|
176
|
+
const ed25519YaoMint = parseD1WalletRegistrationEd25519YaoMint(record.ed25519YaoMint);
|
|
177
|
+
if (!registrationCeremonyId || !intent || !digestB64u || !orgId || !signingRootId || !signingRootVersion || !foundingWalletAuthorityId.ok || !foundingDeviceId.ok || !foundingWalletAuthMethodId.ok || expiresAtMs === null || !authorityState || !signerPlan || !preparedContext || !intentSignerPlan || !storedRegistrationSignerPlansMatch(signerPlan, intentSignerPlan) || signingRootId && preparedContext.signingRootId !== signingRootId || signingRootVersion && preparedContext.signingRootVersion !== signingRootVersion || !signerState || ed25519YaoMint === void 0 || ed25519YaoMint === null !== (findRegistrationSignerPlanNearEd25519Branch(signerPlan) === null)) return null;
|
|
176
178
|
const ceremony = {
|
|
177
179
|
registrationCeremonyId,
|
|
178
180
|
foundingWalletAuthorityId: foundingWalletAuthorityId.value,
|
|
@@ -185,6 +187,7 @@ function parseD1StoredWalletRegistrationCeremony(raw) {
|
|
|
185
187
|
orgId,
|
|
186
188
|
expiresAtMs,
|
|
187
189
|
authorityState,
|
|
190
|
+
ed25519YaoMint,
|
|
188
191
|
signerState
|
|
189
192
|
};
|
|
190
193
|
const expectedOrigin = normalizeOptionalTrimmedString(record.expectedOrigin);
|
|
@@ -193,6 +196,22 @@ function parseD1StoredWalletRegistrationCeremony(raw) {
|
|
|
193
196
|
if (expectedOrigin) ceremony.expectedOrigin = expectedOrigin;
|
|
194
197
|
return ceremony;
|
|
195
198
|
}
|
|
199
|
+
/** `undefined` for a record that is not a mint and not `null`. */
|
|
200
|
+
function parseD1WalletRegistrationEd25519YaoMint(raw) {
|
|
201
|
+
if (raw === null) return null;
|
|
202
|
+
const record = toRecordValue(raw);
|
|
203
|
+
if (!record || !hasExactKeys(record, ["materialActivation", "sessionId"])) return void 0;
|
|
204
|
+
const sessionId = parseD1Bytes32(record.sessionId);
|
|
205
|
+
if (!sessionId || sessionId.every((byte) => byte === 0)) return void 0;
|
|
206
|
+
try {
|
|
207
|
+
return {
|
|
208
|
+
materialActivation: parseRouterAbMpcMaterialActivationRef(record.materialActivation),
|
|
209
|
+
sessionId
|
|
210
|
+
};
|
|
211
|
+
} catch {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
196
215
|
/**
|
|
197
216
|
* Setup creates the ceremony before the WebAuthn proof exists, so the stored
|
|
198
217
|
* authority is a two-arm state rather than a required record.
|
|
@@ -2,6 +2,7 @@ import { normalizeOptionalTrimmedString } from "../../../../shared-ts/src/utils/
|
|
|
2
2
|
import { isPlainObject } from "../../../../shared-ts/src/utils/validation.js";
|
|
3
3
|
import { prepareD1RegistrationHomeReservation } from "./d1WalletExecutionAuthority.js";
|
|
4
4
|
import { parseD1StoredAddAuthMethodIntent, parseD1StoredAddSignerIntent, parseD1StoredWalletAddAuthMethodCeremony, parseD1StoredWalletAddAuthMethodFinalizeReplay, parseD1StoredWalletAddSignerCeremony, parseD1StoredWalletAddSignerFinalizeReplay, parseD1StoredWalletRegistrationCeremony } from "./d1RegistrationCeremonyRecords.js";
|
|
5
|
+
import { retryTransientD1 } from "../../../../storage/d1Retry.js";
|
|
5
6
|
import { D1RegistrationCeremonyRecordStore } from "./d1RegistrationCeremonyRecordStore.js";
|
|
6
7
|
//#region src/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.ts
|
|
7
8
|
var CloudflareD1RegistrationCeremonyIntentStore = class {
|
|
@@ -10,15 +11,21 @@ var CloudflareD1RegistrationCeremonyIntentStore = class {
|
|
|
10
11
|
this.storage = new D1RegistrationCeremonyRecordStore(input);
|
|
11
12
|
}
|
|
12
13
|
async getSetupCeremony(ceremonyId) {
|
|
13
|
-
const stored = await this.storage.get("setup-ceremony", ceremonyId);
|
|
14
|
+
const stored = await retryTransientD1(() => this.storage.get("setup-ceremony", ceremonyId));
|
|
14
15
|
if (!stored) return null;
|
|
15
16
|
const ceremony = parseD1StoredWalletRegistrationCeremony(stored.value);
|
|
16
17
|
if (!ceremony) throw new Error("Registration setup snapshot is invalid");
|
|
17
18
|
return ceremony;
|
|
18
19
|
}
|
|
19
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* One batch stores the setup snapshot, ceremony, and authenticated execution identity.
|
|
22
|
+
*
|
|
23
|
+
* The batch is safe to repeat after a transient fault. Its inserts ignore an
|
|
24
|
+
* existing row, its reads return the stored winner, and the home reservation
|
|
25
|
+
* accepts its own earlier row. A repeat after a lost commit is an exact retry.
|
|
26
|
+
*/
|
|
20
27
|
async reserveSetupCeremony(proposed, ownershipGeneration) {
|
|
21
|
-
const stored = await this.storage.insertOrReadWithCopy({
|
|
28
|
+
const stored = await retryTransientD1(() => this.storage.insertOrReadWithCopy({
|
|
22
29
|
scope: "setup-ceremony",
|
|
23
30
|
id: proposed.registrationCeremonyId,
|
|
24
31
|
value: encodeRecord(proposed),
|
|
@@ -27,7 +34,7 @@ var CloudflareD1RegistrationCeremonyIntentStore = class {
|
|
|
27
34
|
walletId: proposed.intent.walletId,
|
|
28
35
|
ceremonyId: proposed.registrationCeremonyId,
|
|
29
36
|
ownershipGeneration
|
|
30
|
-
}));
|
|
37
|
+
})));
|
|
31
38
|
const ceremony = parseD1StoredWalletRegistrationCeremony(stored.record.value);
|
|
32
39
|
if (!ceremony || !sameSetupReservation(ceremony, proposed)) throw new Error("Registration setup snapshot conflicts with its reservation");
|
|
33
40
|
const current = parseD1StoredWalletRegistrationCeremony(stored.copy.value);
|