@seams/wallet-server 0.15.6 → 0.17.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/README.md +4 -4
- package/THIRD_PARTY_NOTICES.md +102 -1
- package/artifact-manifest.json +27 -22
- package/cloudflare-router-ab/build/deriver-a/build-stamp.json +1 -1
- 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_bg.wasm +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_bg.wasm +0 -0
- package/cloudflare-router-ab/build/signing-worker/build-stamp.json +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_bg.wasm +0 -0
- package/cloudflare-router-ab/migrations/postgres/0001_role_store.sql +567 -0
- package/dist/esm/authorization/factorEvidence.js +49 -8
- package/dist/esm/authorization/vaultProxyUse.js +15 -15
- package/dist/esm/core/SessionService.js +1 -0
- package/dist/esm/core/ThresholdService/kv.js +2 -0
- package/dist/esm/core/ThresholdService/routerAb/ecdsaDerivationPoolFillHandlers.js +3 -0
- package/dist/esm/core/d1IdentityStore.js +3 -1
- package/dist/esm/core/d1TenantStore.js +4 -1
- package/dist/esm/core/d1WalletAuthMethodStore.js +3 -1
- package/dist/esm/core/d1WalletStore.js +5 -2
- package/dist/esm/core/deviceLinking/linkedDeviceManagement.js +1 -4
- package/dist/esm/core/deviceLinking/linkedDeviceSession.js +2 -0
- package/dist/esm/core/deviceLinking/requestProof.js +1 -0
- package/dist/esm/core/routerAbSigning/RouterAbEcdsaPresignRuntime.js +2 -0
- package/dist/esm/core/routerAbSigning/RouterAbNormalSigningRuntime.js +3 -0
- package/dist/esm/core/rpcClients/near/NearClient.js +8 -0
- package/dist/esm/core/signingMaterial/ordinaryInactiveSignerMaterialReservation.js +0 -1
- package/dist/esm/localHostedWalletGatewayHandler.js +2 -2
- package/dist/esm/localIntendedEcdsaFinalizeFault.js +1 -1
- package/dist/esm/localIntendedLinkExecuteFault.js +1 -1
- package/dist/esm/localIntendedMaterialAdmissionFault.js +2 -2
- package/dist/esm/localIntendedRevokeFault.js +1 -1
- package/dist/esm/localIntendedSessionAdmissionFault.js +1 -1
- package/dist/esm/localIntendedYaoExportFault.js +1 -1
- package/dist/esm/localIntendedYaoFault.js +1 -1
- package/dist/esm/localIntendedYaoFinalizeFault.js +1 -1
- package/dist/esm/localIntendedYaoRecoveryFault.js +3 -3
- package/dist/esm/localIntendedYaoSigningFault.js +1 -1
- package/dist/esm/localRegistrationSetupAuthority.js +1 -0
- package/dist/esm/router/cloudflare/d1/auth/d1RouterApiAuthService.js +2 -2
- package/dist/esm/router/cloudflare/d1/authorization/d1AuthorizationStore.js +5 -0
- package/dist/esm/router/cloudflare/d1/authorization/d1VaultProxyStore.js +1 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceAuthorityInstallService.js +1 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEd25519ExportRootStore.js +2 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpGrantStore.js +2 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceEmailOtpTargetFactor.js +3 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceOwnerAuthorizationProvider.js +2 -3
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceRequestProofNonceStore.js +2 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSessionStore.js +3 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceSourceContributionPreparationPlanner.js +6 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetAuthenticatorStore.js +3 -0
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.js +10 -2
- package/dist/esm/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetPlanner.js +3 -0
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoCapabilityPersistence.js +6 -1
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoLifecycleDecisionStore.js +2 -0
- package/dist/esm/router/cloudflare/d1/ed25519Yao/d1Ed25519YaoProductRegistrationPartitionedStateStore.js +1 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeIssuer.js +5 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeService.js +8 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeStore.js +6 -1
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpChallengeVerifier.js +4 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpEnrollmentStore.js +1 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpGrantStore.js +1 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRecoveryService.js +4 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpRegistrationEnrollmentFinalizer.js +2 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1EmailOtpServerSealRuntime.js +1 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpRegistrationAttemptStore.js +3 -0
- package/dist/esm/router/cloudflare/d1/emailOtp/d1GoogleEmailOtpSessionResolver.js +6 -0
- package/dist/esm/router/cloudflare/d1/identity/d1IdentityService.js +1 -0
- package/dist/esm/router/cloudflare/d1/oidc/d1OidcBoundary.js +2 -4
- package/dist/esm/router/cloudflare/d1/oidc/d1OidcVerificationService.js +4 -0
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1PasskeyCustodyEnvelopeStore.js +4 -0
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletCustodyCommitStore.js +7 -0
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpAttemptStore.js +1 -0
- package/dist/esm/router/cloudflare/d1/passkeyCustody/d1WalletRecoveryGoogleEmailOtpService.js +8 -0
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyRecordStore.js +3 -0
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationCeremonyStore.js +1 -0
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationIntentService.js +1 -0
- package/dist/esm/router/cloudflare/d1/registration/d1RegistrationSessionTransaction.js +1 -1
- package/dist/esm/router/cloudflare/d1/registration/d1WalletOperationStore.js +2 -0
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationCommitStore.js +3 -0
- package/dist/esm/router/cloudflare/d1/registration/d1WalletRegistrationService.js +24 -0
- package/dist/esm/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.js +3 -0
- package/dist/esm/router/cloudflare/d1/versionedJson/d1VersionedJsonRecordStore.js +6 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAddSignerService.js +11 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodRevocationReplayStore.js +2 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthMethodService.js +16 -0
- package/dist/esm/router/cloudflare/d1/wallet/d1WalletAuthorityStore.js +3 -1
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnAuthService.js +4 -0
- package/dist/esm/router/cloudflare/d1/webauthn/d1WebAuthnStore.js +5 -1
- package/dist/esm/router/cloudflare/durableObjects/versionedJsonRecordStore.js +6 -0
- package/dist/esm/router/cloudflare/runtime/ed25519SessionAdapter.js +6 -0
- package/dist/esm/router/cloudflare/runtime/walletAuthorizationRelocationRoutes.js +117 -117
- package/dist/esm/router/cloudflare/runtime/walletPlacementRoutes.js +51 -51
- package/dist/esm/router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.js +3 -3
- package/dist/esm/router/cloudflare.js +114 -61
- package/dist/esm/router/domains/ecdsa/routerAbEcdsaStrictRegistration.js +1 -1
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistration.js +2 -1
- package/dist/esm/router/domains/ed25519Yao/capabilityLifecycle/routerAbEd25519YaoProductRegistrationRequestScopedRuntime.js +2 -1
- package/dist/esm/router/domains/ed25519Yao/export/routerAbEd25519YaoExport.js +6 -8
- package/dist/esm/router/domains/ed25519Yao/recovery/routerAbEd25519YaoRecovery.js +11 -9
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js +2 -1
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistration.js +11 -9
- package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoRegistrationIntentAuthorization.js +2 -3
- package/dist/esm/router/domains/signingOperations/routerAbNormalSigningAdmissionCore.js +2 -4
- package/dist/esm/router/domains/walletRegistration/registrationSessionSeal.js +1 -1
- package/dist/esm/router/framework/http.js +1 -1
- package/dist/esm/router/framework/ror/staticProvider.js +1 -0
- package/dist/esm/router/ror.js +1 -0
- package/dist/esm/shared-ts/src/authorization/delegatedAuthority.js +1 -1
- package/dist/esm/shared-ts/src/authorization/operationFingerprint.js +6 -0
- package/dist/esm/shared-ts/src/device-linking/sourceContribution.js +5 -5
- package/dist/esm/shared-ts/src/near/nearClient.js +6 -0
- package/dist/esm/shared-ts/src/tenant-root/tenantRootIdentity.js +5 -0
- package/dist/esm/shared-ts/src/utils/domainIds.js +7 -0
- package/dist/esm/shared-ts/src/utils/routerAbEd25519Yao.js +7 -6
- package/dist/esm/storage/tenantRoute.js +4 -0
- package/dist/esm/threshold/session/signingSessionSeal/crypto/cipher.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/crypto/shamir3PassWasm.js +1 -1
- package/dist/esm/threshold/session/signingSessionSeal/guards/backends.js +2 -0
- package/dist/esm/threshold/session/signingSessionSeal/guards/index.js +2 -1
- package/dist/esm/threshold/session/signingSessionSeal/idempotencyBackends.js +3 -0
- package/dist/types/shared-ts/src/authorization/capabilityKinds.d.ts +14 -14
- package/dist/types/shared-ts/src/authorization/delegatedAuthority.d.ts +1 -1
- package/dist/types/shared-ts/src/device-linking/ed25519ExportRoot.d.ts +1 -1
- package/dist/types/shared-ts/src/device-linking/requestProof.d.ts +1 -1
- package/dist/types/shared-ts/src/device-linking/sourceContribution.d.ts +5 -5
- package/dist/types/shared-ts/src/passkey-custody/custodyEnvelope.d.ts +3 -3
- package/dist/types/shared-ts/src/passkey-custody/custodySecretBinding.d.ts +1 -1
- package/dist/types/shared-ts/src/tenant-root/tenantRootIdentity.d.ts +1 -1
- package/dist/types/shared-ts/src/tenant-root/tenantRootOperationRecord.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/base64.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/digestEncoding.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/digests.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/emailOtpDomain.d.ts +16 -16
- package/dist/types/shared-ts/src/utils/emailOtpRecoveryKey.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/routerAbEcdsaDerivation.d.ts +10 -10
- package/dist/types/shared-ts/src/utils/routerAbEd25519Yao.d.ts +12 -11
- package/dist/types/shared-ts/src/utils/routerAbPublicKeyset.d.ts +3 -3
- package/dist/types/shared-ts/src/utils/routerAbTraceContext.d.ts +1 -1
- package/dist/types/shared-ts/src/utils/signerDomain.d.ts +15 -15
- package/dist/types/shared-ts/src/utils/signingSessionSeal.d.ts +11 -11
- package/dist/types/shared-ts/src/utils/walletSessionFailure.d.ts +8 -8
- package/dist/types/shared-ts/src/utils/webauthnDeviceInfo.d.ts +2 -2
- package/dist/types/shared-ts/src/utils/wireSchema.d.ts +1 -1
- package/dist/types/shared-ts/src/wallet-recovery/recoveryKeyId.d.ts +1 -1
- package/dist/types/wallet-server/src/authorization/factorEvidence.d.ts +6 -6
- package/dist/types/wallet-server/src/core/ecdsaMaterialReadSnapshot.d.ts +1 -1
- package/dist/types/wallet-server/src/core/threeRouteRegistrationContracts.typecheck.d.ts +6 -6
- package/dist/types/wallet-server/src/router/auth/webAuthnCredentialCodecs.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetCredentialProvider.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/deviceLinking/d1LinkedDeviceTargetPlanner.d.ts +3 -3
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/d1WalletRegistrationRead.d.ts +2 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/registration/walletRegistrationEstablishedSessionIssuer.d.ts +2 -2
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/authorizationSnapshotLayout.d.ts +1 -1
- package/dist/types/wallet-server/src/router/cloudflare/d1/wallet/d1WalletRelocationOwner.d.ts +9 -9
- package/dist/types/wallet-server/src/router/cloudflare/signingLanes/cloudflareOrdinaryInactiveSignerMaterialReservation.d.ts +6 -6
- package/dist/types/wallet-server/src/router/domains/signingOperations/signingPrepareSession.d.ts +2 -2
- package/dist/types/wallet-server/src/router/domains/walletRegistration/walletRegistrationSetupPayload.d.ts +1 -1
- package/dist/types/wallet-server/src/router/domains/walletUnlock/walletUnlockRequestedCapabilitiesValidation.d.ts +3 -3
- package/dist/types/wallet-server/src/router/framework/apiCredentialPorts.d.ts +1 -1
- package/dist/types/wallet-server/src/router/framework/routeAuthPolicy.d.ts +2 -2
- package/dist/types/wallet-server/src/router/framework/routeExecutionContext.d.ts +1 -1
- package/dist/types/wallet-server/src/router/transport/fetch/routes/deviceLinkingOwnerAuthorization.d.ts +1 -1
- package/migrations/d1-signer/0082_wallet_signature_completions.sql +39 -0
- package/package.json +4 -5
|
@@ -182,10 +182,8 @@ function parseRouterAbPublicKeysetV2(value) {
|
|
|
182
182
|
//#endregion
|
|
183
183
|
//#region src/router/domains/signingOperations/routerAbNormalSigningAdmissionCore.ts
|
|
184
184
|
var InMemoryRouterAbNormalSigningAdmissionStore = class {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
this.abuseDecisions = /* @__PURE__ */ new Map();
|
|
188
|
-
}
|
|
185
|
+
projectPolicies = /* @__PURE__ */ new Map();
|
|
186
|
+
abuseDecisions = /* @__PURE__ */ new Map();
|
|
189
187
|
setProjectPolicy(scope, decision) {
|
|
190
188
|
this.projectPolicies.set(runtimePolicyScopeKey(scope), decision);
|
|
191
189
|
}
|
|
@@ -324,6 +322,13 @@ var MpcMaterialActivationReference = class {
|
|
|
324
322
|
retainProof() {
|
|
325
323
|
return true;
|
|
326
324
|
}
|
|
325
|
+
kind;
|
|
326
|
+
activationId;
|
|
327
|
+
capability;
|
|
328
|
+
materialOwner;
|
|
329
|
+
keyBinding;
|
|
330
|
+
lifecycleBinding;
|
|
331
|
+
signingWorker;
|
|
327
332
|
constructor(fields) {
|
|
328
333
|
this.retainProof();
|
|
329
334
|
this.kind = "mpc_material_activation_ref";
|
|
@@ -1255,9 +1260,9 @@ const DELEGATED_WALLET_PERMISSION_VALUE_SET = new Set([
|
|
|
1255
1260
|
]);
|
|
1256
1261
|
const canonicalPermissionSetBrand = Symbol("canonicalPermissionSetBrand");
|
|
1257
1262
|
var CanonicalDelegatedWalletPermissionSetProof = class CanonicalDelegatedWalletPermissionSetProof extends Array {
|
|
1263
|
+
[canonicalPermissionSetBrand] = true;
|
|
1258
1264
|
constructor(permissions) {
|
|
1259
1265
|
super(...permissions);
|
|
1260
|
-
this[canonicalPermissionSetBrand] = true;
|
|
1261
1266
|
Object.freeze(this);
|
|
1262
1267
|
}
|
|
1263
1268
|
static create(permissions) {
|
|
@@ -3588,7 +3593,8 @@ function parseExportBinding(value) {
|
|
|
3588
3593
|
authorization_digest: requireBytes32$1(record.authorization_digest, "export binding.authorization_digest", true)
|
|
3589
3594
|
};
|
|
3590
3595
|
}
|
|
3591
|
-
function
|
|
3596
|
+
function parseRouterAbEd25519YaoActivationBindingV1(value) {
|
|
3597
|
+
const binding = parseCeremonyBinding(value);
|
|
3592
3598
|
switch (binding.operation) {
|
|
3593
3599
|
case "registration":
|
|
3594
3600
|
if (binding.lifecycle.work_kind !== REGISTRATION_WORK_KIND || binding.lifecycle.primitive_request_kind !== REGISTRATION_PRIMITIVE_REQUEST_KIND) throw new Error("activation binding has the wrong registration lifecycle kind");
|
|
@@ -3923,7 +3929,7 @@ function parseExportResultValue(value) {
|
|
|
3923
3929
|
function parseActivationAdmissionReceiptValue(value) {
|
|
3924
3930
|
const record = requireRecord$1(value, "activation admission receipt");
|
|
3925
3931
|
requireExactKeys$4(record, "activation admission receipt", ["binding", "keyset"]);
|
|
3926
|
-
const binding =
|
|
3932
|
+
const binding = parseRouterAbEd25519YaoActivationBindingV1(record.binding);
|
|
3927
3933
|
const keyset = parseKeyset(record.keyset);
|
|
3928
3934
|
switch (binding.operation) {
|
|
3929
3935
|
case "registration": return {
|
|
@@ -3943,7 +3949,7 @@ function parseActivationExecuteRequestValue(value) {
|
|
|
3943
3949
|
"deriver_a_input",
|
|
3944
3950
|
"deriver_b_input"
|
|
3945
3951
|
]);
|
|
3946
|
-
const binding =
|
|
3952
|
+
const binding = parseRouterAbEd25519YaoActivationBindingV1(record.binding);
|
|
3947
3953
|
const deriverAInput = requireActivationInput(binding, parseEncryptedInput(record.deriver_a_input, "deriver_a_input"), "deriver_a", "deriver_a_input");
|
|
3948
3954
|
const deriverBInput = requireActivationInput(binding, parseEncryptedInput(record.deriver_b_input, "deriver_b_input"), "deriver_b", "deriver_b_input");
|
|
3949
3955
|
if (binding.operation === "registration") {
|
|
@@ -3969,7 +3975,7 @@ function parseActivationResultValue(value) {
|
|
|
3969
3975
|
"deriver_b_client_package",
|
|
3970
3976
|
"public_receipt"
|
|
3971
3977
|
]);
|
|
3972
|
-
const binding =
|
|
3978
|
+
const binding = parseRouterAbEd25519YaoActivationBindingV1(record.binding);
|
|
3973
3979
|
const receipt = parseRouterAbEd25519YaoActivationPublicReceiptV1(record.public_receipt);
|
|
3974
3980
|
if (!sameRouterAbMpcMaterialActivationRef(binding.material_activation, receipt.material_activation)) throw new Error("activation result receipt material does not match the admitted binding");
|
|
3975
3981
|
const packageA = parseEncryptedPackage(record.deriver_a_client_package, "deriver_a_client_package");
|
|
@@ -3992,7 +3998,7 @@ function parseActivationResultValue(value) {
|
|
|
3992
3998
|
}
|
|
3993
3999
|
}
|
|
3994
4000
|
function requireRecoveryBinding(value) {
|
|
3995
|
-
const binding =
|
|
4001
|
+
const binding = parseRouterAbEd25519YaoActivationBindingV1(value);
|
|
3996
4002
|
switch (binding.operation) {
|
|
3997
4003
|
case "registration": throw new Error("recovery activation requires a recovery binding");
|
|
3998
4004
|
case "recovery": return binding;
|
|
@@ -4473,9 +4479,12 @@ function prepareD1WalletPutSignerStatement(input) {
|
|
|
4473
4479
|
updated_at_ms = MAX(wallet_signers.updated_at_ms, EXCLUDED.updated_at_ms)`).bind(input.scope.namespace, input.scope.orgId, input.scope.projectId, input.scope.envId, parsed.walletId, signerFamily(parsed), parsed.signerId, recordChainTargetKey(parsed), JSON.stringify(parsed), parsed.createdAtMs, parsed.updatedAtMs);
|
|
4474
4480
|
}
|
|
4475
4481
|
var D1WalletStore = class {
|
|
4482
|
+
adapterKind = "d1";
|
|
4483
|
+
database;
|
|
4484
|
+
scope;
|
|
4485
|
+
ensureSchemaOnUse;
|
|
4486
|
+
schemaReady = false;
|
|
4476
4487
|
constructor(input) {
|
|
4477
|
-
this.adapterKind = "d1";
|
|
4478
|
-
this.schemaReady = false;
|
|
4479
4488
|
const normalized = normalizeD1WalletStoreOptions(input);
|
|
4480
4489
|
this.database = normalized.database;
|
|
4481
4490
|
this.scope = {
|
|
@@ -4803,6 +4812,9 @@ var D1WalletStore = class {
|
|
|
4803
4812
|
//#region src/router/cloudflare/d1/signingAdmission/d1RouterAbNormalSigningAdmissionStore.ts
|
|
4804
4813
|
const ROUTER_AB_NORMAL_SIGNING_ADMISSION_TABLE = "router_ab_normal_signing_admission_records";
|
|
4805
4814
|
var CloudflareD1RouterAbNormalSigningAdmissionStore = class {
|
|
4815
|
+
database;
|
|
4816
|
+
storageNamespace;
|
|
4817
|
+
now;
|
|
4806
4818
|
constructor(options) {
|
|
4807
4819
|
if (!isD1DatabaseLike(options.database)) throw new Error("Router A/B normal-signing admission D1 database is required");
|
|
4808
4820
|
this.database = options.database;
|
|
@@ -5905,6 +5917,11 @@ const TENANT_ROOT_IDENTITY_DOMAIN_V1 = new TextEncoder().encode("seams/tenant-ro
|
|
|
5905
5917
|
* incompatible with the trusted identity.
|
|
5906
5918
|
*/
|
|
5907
5919
|
var TenantRootIdentityProof = class TenantRootIdentityProof {
|
|
5920
|
+
orgId;
|
|
5921
|
+
projectId;
|
|
5922
|
+
envId;
|
|
5923
|
+
signingRootId;
|
|
5924
|
+
signingRootVersion;
|
|
5908
5925
|
retainProof() {
|
|
5909
5926
|
return true;
|
|
5910
5927
|
}
|
|
@@ -7067,7 +7084,7 @@ function parseEd25519SourceContributionPreparation(record) {
|
|
|
7067
7084
|
"sourceRegisteredPublicKeyB64u"
|
|
7068
7085
|
], "linked-device Ed25519 source contribution preparation");
|
|
7069
7086
|
if (record.kind !== "linked_device_ed25519_source_contribution_preparation_v1") throw new Error("linked-device Ed25519 source contribution preparation kind is invalid");
|
|
7070
|
-
const sourceBinding =
|
|
7087
|
+
const sourceBinding = parseRouterAbEd25519YaoActivationBindingV1(record.sourceBinding);
|
|
7071
7088
|
const targetAdmissionResult = parseRouterAbEd25519YaoRegistrationActivationAdmissionReceiptV1(record.targetAdmission);
|
|
7072
7089
|
if (!targetAdmissionResult.ok) throw new Error(`targetAdmission ${targetAdmissionResult.message}`);
|
|
7073
7090
|
const targetAdmission = targetAdmissionResult.value;
|
|
@@ -7131,7 +7148,7 @@ function parseEd25519Contribution(record) {
|
|
|
7131
7148
|
], "linked-device Ed25519 source contribution");
|
|
7132
7149
|
if (record.kind !== "linked_device_ed25519_source_contribution_v1") throw new Error("linked-device Ed25519 source contribution kind is invalid");
|
|
7133
7150
|
if (record.keyFamily !== "ed25519") throw new Error("linked-device Ed25519 source contribution family is invalid");
|
|
7134
|
-
const sourceBinding =
|
|
7151
|
+
const sourceBinding = parseRouterAbEd25519YaoActivationBindingV1(record.sourceBinding);
|
|
7135
7152
|
const targetMaterialActivation = parseActivation$2(record.targetMaterialActivation, "source contribution targetMaterialActivation");
|
|
7136
7153
|
const targetBinding = parseRegistrationBinding(record.targetBinding, "targetBinding");
|
|
7137
7154
|
const activationReceipt = parseRouterAbEd25519YaoActivationPublicReceiptV1(record.activationReceipt);
|
|
@@ -7408,7 +7425,7 @@ function parseLinkedDeviceEcdsaEncryptedSourceContributionV1(raw, label) {
|
|
|
7408
7425
|
};
|
|
7409
7426
|
}
|
|
7410
7427
|
function parseRegistrationBinding(raw, label) {
|
|
7411
|
-
const binding =
|
|
7428
|
+
const binding = parseRouterAbEd25519YaoActivationBindingV1(raw);
|
|
7412
7429
|
if (binding.operation !== "registration") throw new Error(`${label} must use the registration operation`);
|
|
7413
7430
|
return binding;
|
|
7414
7431
|
}
|
|
@@ -7422,7 +7439,7 @@ function assertSourceBindingContext(binding, linkSessionId, label) {
|
|
|
7422
7439
|
if (binding.session_id.length !== 32 || String(linkSessionId).length === 0) throw new Error(`${label} link binding is invalid`);
|
|
7423
7440
|
}
|
|
7424
7441
|
function sameEdStableIdentity(left, right) {
|
|
7425
|
-
return left.
|
|
7442
|
+
return left.stable_key_context_binding.every((value, index) => value === right.stable_key_context_binding[index]) && left.material_activation.capability === right.material_activation.capability && left.material_activation.material_owner === right.material_activation.material_owner && left.material_activation.key_binding === right.material_activation.key_binding && left.material_activation.lifecycle_binding === right.material_activation.lifecycle_binding && left.material_activation.signing_worker === right.material_activation.signing_worker && left.lifecycle.root_share_epoch === right.lifecycle.root_share_epoch && left.lifecycle.account_id === right.lifecycle.account_id && left.lifecycle.signer_set_id === right.lifecycle.signer_set_id && left.lifecycle.selected_server_id === right.lifecycle.selected_server_id;
|
|
7426
7443
|
}
|
|
7427
7444
|
function sameEcdsaSourceSigner$1(left, right) {
|
|
7428
7445
|
return mpcMaterialActivationRefsEqual(left.activation, right.activation) && left.clientPublicKey33B64u === right.clientPublicKey33B64u && left.relayerPublicKey33B64u === right.relayerPublicKey33B64u && left.thresholdPublicKey33B64u === right.thresholdPublicKey33B64u && left.thresholdEthereumAddress20B64u === right.thresholdEthereumAddress20B64u;
|
|
@@ -9576,7 +9593,7 @@ const WALLET_MANAGEMENT_PROTOCOL_HEADER = "X-Seams-Wallet-Protocol";
|
|
|
9576
9593
|
//#endregion
|
|
9577
9594
|
//#region src/router/framework/http.ts
|
|
9578
9595
|
const CORS_ALLOW_METHODS = "GET,POST,PUT,PATCH,DELETE,OPTIONS";
|
|
9579
|
-
const CORS_PREFLIGHT_MAX_AGE_SECONDS =
|
|
9596
|
+
const CORS_PREFLIGHT_MAX_AGE_SECONDS = 7200;
|
|
9580
9597
|
const CORS_ALLOW_HEADERS = [
|
|
9581
9598
|
"Content-Type",
|
|
9582
9599
|
WALLET_MANAGEMENT_PROTOCOL_HEADER,
|
|
@@ -10015,6 +10032,12 @@ async function computeOwnerLaneParticipantBindingDigestV1(input) {
|
|
|
10015
10032
|
//#region ../shared-ts/src/authorization/operationFingerprint.ts
|
|
10016
10033
|
const CAPABILITY_OPERATION_FINGERPRINT_DOMAIN_V1 = "seams:authorization:capability-operation-fingerprint:v1";
|
|
10017
10034
|
var CapabilityOperationEnvelopeProof = class {
|
|
10035
|
+
tenantId;
|
|
10036
|
+
principalId;
|
|
10037
|
+
capabilityId;
|
|
10038
|
+
operationId;
|
|
10039
|
+
operation;
|
|
10040
|
+
digests;
|
|
10018
10041
|
retainProof() {
|
|
10019
10042
|
return true;
|
|
10020
10043
|
}
|
|
@@ -11159,10 +11182,10 @@ async function enforceRoutePolicy(input) {
|
|
|
11159
11182
|
//#region src/router/domains/walletRegistration/registrationSessionSeal.ts
|
|
11160
11183
|
/** Holds one request's computation until registration can publish its response. */
|
|
11161
11184
|
var RegistrationPreparedSessionSeal = class {
|
|
11185
|
+
prepared = null;
|
|
11162
11186
|
constructor(request, service) {
|
|
11163
11187
|
this.request = request;
|
|
11164
11188
|
this.service = service;
|
|
11165
|
-
this.prepared = null;
|
|
11166
11189
|
}
|
|
11167
11190
|
async prepare(session) {
|
|
11168
11191
|
await this.finish(session);
|
|
@@ -27481,10 +27504,7 @@ var DeviceLinkingInputError = class extends Error {
|
|
|
27481
27504
|
//#endregion
|
|
27482
27505
|
//#region src/core/deviceLinking/linkedDeviceManagement.ts
|
|
27483
27506
|
var LinkedDeviceListCursorError = class extends Error {
|
|
27484
|
-
|
|
27485
|
-
super(..._args);
|
|
27486
|
-
this.kind = "linked_device_list_cursor_error_v1";
|
|
27487
|
-
}
|
|
27507
|
+
kind = "linked_device_list_cursor_error_v1";
|
|
27488
27508
|
};
|
|
27489
27509
|
//#endregion
|
|
27490
27510
|
//#region src/router/transport/fetch/routes/deviceManagement.ts
|
|
@@ -31303,8 +31323,11 @@ function prepareD1WebAuthnAuthenticatorInsertStatement(input) {
|
|
|
31303
31323
|
return prepareAuthenticatorStatement(INSERT_WEBAUTHN_AUTHENTICATOR_SQL, input);
|
|
31304
31324
|
}
|
|
31305
31325
|
var CloudflareD1WebAuthnStore = class {
|
|
31326
|
+
syncChallenges;
|
|
31327
|
+
database;
|
|
31328
|
+
scope;
|
|
31329
|
+
credentialClaims;
|
|
31306
31330
|
constructor(input) {
|
|
31307
|
-
this.prepare = (sql, values) => prepareD1TenantStatement(this.database, this.scope, sql, values);
|
|
31308
31331
|
this.credentialClaims = input.credentialClaims;
|
|
31309
31332
|
this.syncChallenges = input.syncChallenges;
|
|
31310
31333
|
this.database = input.database;
|
|
@@ -31464,6 +31487,7 @@ var CloudflareD1WebAuthnStore = class {
|
|
|
31464
31487
|
async consumeChallenge(input) {
|
|
31465
31488
|
return await webAuthnChallengeRows.consume(this.prepare, input.challengeId, input.challengeKind, Date.now()).first();
|
|
31466
31489
|
}
|
|
31490
|
+
prepare = (sql, values) => prepareD1TenantStatement(this.database, this.scope, sql, values);
|
|
31467
31491
|
};
|
|
31468
31492
|
//#endregion
|
|
31469
31493
|
//#region src/authorization/lifecycleRouting.ts
|
|
@@ -31542,6 +31566,10 @@ function errorMessage$1(error) {
|
|
|
31542
31566
|
return error instanceof Error ? error.message : String(error || "");
|
|
31543
31567
|
}
|
|
31544
31568
|
var CloudflareD1WebAuthnAuthService = class {
|
|
31569
|
+
lifecycleRouting;
|
|
31570
|
+
webAuthnStore;
|
|
31571
|
+
walletManifestSource;
|
|
31572
|
+
walletAuthMethodStore;
|
|
31545
31573
|
constructor(input) {
|
|
31546
31574
|
this.lifecycleRouting = input.lifecycleRouting;
|
|
31547
31575
|
this.webAuthnStore = input.webAuthnStore;
|
|
@@ -32262,10 +32290,10 @@ function storedReservationGeneration(record) {
|
|
|
32262
32290
|
//#region src/router/cloudflare/d1/registration/d1RegistrationSessionTransaction.ts
|
|
32263
32291
|
/** The wallet's version checks and the session's winner read share one batch. */
|
|
32264
32292
|
var D1RegistrationSessionTransaction = class {
|
|
32293
|
+
sessionResults = null;
|
|
32265
32294
|
constructor(database, commitWallet) {
|
|
32266
32295
|
this.database = database;
|
|
32267
32296
|
this.commitWallet = commitWallet;
|
|
32268
|
-
this.sessionResults = null;
|
|
32269
32297
|
}
|
|
32270
32298
|
async execute(sessionStatements) {
|
|
32271
32299
|
await this.commitWallet(this.commit.bind(this, sessionStatements));
|
|
@@ -33097,6 +33125,11 @@ function activeV2AuthorityMethodBindings(scope, session) {
|
|
|
33097
33125
|
];
|
|
33098
33126
|
}
|
|
33099
33127
|
var CloudflareD1AuthorizationStore = class {
|
|
33128
|
+
database;
|
|
33129
|
+
namespace;
|
|
33130
|
+
walletSignerScope;
|
|
33131
|
+
walletStore;
|
|
33132
|
+
getLinkedDeviceAuthorityReader;
|
|
33100
33133
|
constructor(options) {
|
|
33101
33134
|
this.getLinkedDeviceAuthorityReader = options.getLinkedDeviceAuthorityReader ?? (() => null);
|
|
33102
33135
|
this.database = options.database;
|
|
@@ -35175,6 +35208,7 @@ const VAULT_PROXY_SECRET_AAD_DOMAIN_V1 = "seams:vault:proxy-secret:v1";
|
|
|
35175
35208
|
const AES_GCM_NONCE_BYTES = 12;
|
|
35176
35209
|
const AES_GCM_KEY_BYTES = 32;
|
|
35177
35210
|
var CloudflareD1VaultProxyStore = class {
|
|
35211
|
+
key;
|
|
35178
35212
|
constructor(database, namespace, encryptionKey) {
|
|
35179
35213
|
this.database = database;
|
|
35180
35214
|
this.namespace = namespace;
|
|
@@ -35294,12 +35328,11 @@ function resolveTraceContext$2(request) {
|
|
|
35294
35328
|
};
|
|
35295
35329
|
}
|
|
35296
35330
|
var InMemoryRouterAbEd25519YaoRegistrationStateV1 = class {
|
|
35297
|
-
|
|
35298
|
-
|
|
35299
|
-
|
|
35300
|
-
|
|
35301
|
-
|
|
35302
|
-
}
|
|
35331
|
+
states = /* @__PURE__ */ new Map();
|
|
35332
|
+
lifecycleSessions = /* @__PURE__ */ new Map();
|
|
35333
|
+
admissionClaims = /* @__PURE__ */ new Map();
|
|
35334
|
+
/** The tenant root each admitted lifecycle dispatches to, pinned at admission. */
|
|
35335
|
+
dispatchRoots = /* @__PURE__ */ new Map();
|
|
35303
35336
|
};
|
|
35304
35337
|
function registrationSessionKey(receipt) {
|
|
35305
35338
|
return bytesToHex$3(receipt.binding.session_id);
|
|
@@ -35416,12 +35449,12 @@ function routeFailureResponse$1(result) {
|
|
|
35416
35449
|
}, { status: result.status });
|
|
35417
35450
|
}
|
|
35418
35451
|
var RouterAbEd25519YaoRegistrationRouteExtension = class {
|
|
35452
|
+
kind = "fetch_route_extension";
|
|
35453
|
+
id = "router_ab_ed25519_yao_registration";
|
|
35454
|
+
routes = ROUTER_AB_ED25519_YAO_REGISTRATION_ROUTES;
|
|
35419
35455
|
constructor(service, authorization) {
|
|
35420
35456
|
this.service = service;
|
|
35421
35457
|
this.authorization = authorization;
|
|
35422
|
-
this.kind = "fetch_route_extension";
|
|
35423
|
-
this.id = "router_ab_ed25519_yao_registration";
|
|
35424
|
-
this.routes = ROUTER_AB_ED25519_YAO_REGISTRATION_ROUTES;
|
|
35425
35458
|
}
|
|
35426
35459
|
async handleFetchRoute(input) {
|
|
35427
35460
|
if (input.method !== "POST") return json$3({
|
|
@@ -35494,6 +35527,9 @@ function createRouterAbEd25519YaoRegistrationModule(input) {
|
|
|
35494
35527
|
});
|
|
35495
35528
|
}
|
|
35496
35529
|
var InMemoryRouterAbEd25519YaoRegistrationService = class {
|
|
35530
|
+
states;
|
|
35531
|
+
lifecycleSessions;
|
|
35532
|
+
admissionClaims;
|
|
35497
35533
|
constructor(backend, state = new InMemoryRouterAbEd25519YaoRegistrationStateV1()) {
|
|
35498
35534
|
this.backend = backend;
|
|
35499
35535
|
this.states = state.states;
|
|
@@ -36051,11 +36087,10 @@ function findAuthorityByLifecycleId(authorities, lifecycleId) {
|
|
|
36051
36087
|
return null;
|
|
36052
36088
|
}
|
|
36053
36089
|
var InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationStateV1 = class {
|
|
36054
|
-
|
|
36055
|
-
this.authorities = [];
|
|
36056
|
-
}
|
|
36090
|
+
authorities = [];
|
|
36057
36091
|
};
|
|
36058
36092
|
var InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationAdapter = class {
|
|
36093
|
+
authorities;
|
|
36059
36094
|
constructor(state = new InMemoryRouterAbEd25519YaoRegistrationIntentAuthorizationStateV1()) {
|
|
36060
36095
|
this.authorities = state.authorities;
|
|
36061
36096
|
}
|
|
@@ -36278,12 +36313,10 @@ var EphemeralRouterAbEd25519YaoCapabilityPersistenceV1 = class {
|
|
|
36278
36313
|
}
|
|
36279
36314
|
};
|
|
36280
36315
|
var InMemoryRouterAbEd25519YaoRecoveryStateV1 = class {
|
|
36281
|
-
|
|
36282
|
-
|
|
36283
|
-
|
|
36284
|
-
|
|
36285
|
-
this.recoverySessions = /* @__PURE__ */ new Map();
|
|
36286
|
-
}
|
|
36316
|
+
capabilities = /* @__PURE__ */ new Map();
|
|
36317
|
+
identityCapabilities = /* @__PURE__ */ new Map();
|
|
36318
|
+
recoveries = /* @__PURE__ */ new Map();
|
|
36319
|
+
recoverySessions = /* @__PURE__ */ new Map();
|
|
36287
36320
|
};
|
|
36288
36321
|
const ROUTER_AB_ED25519_YAO_RECOVERY_ROUTES = Object.freeze([
|
|
36289
36322
|
defineRoute({
|
|
@@ -36910,6 +36943,10 @@ function resolveRouterAbEd25519YaoActiveCapability(capabilities, input) {
|
|
|
36910
36943
|
};
|
|
36911
36944
|
}
|
|
36912
36945
|
var InMemoryRouterAbEd25519YaoRecoveryService = class {
|
|
36946
|
+
capabilities;
|
|
36947
|
+
identityCapabilities;
|
|
36948
|
+
recoveries;
|
|
36949
|
+
recoverySessions;
|
|
36913
36950
|
constructor(backend, state = new InMemoryRouterAbEd25519YaoRecoveryStateV1(), capabilityPersistence = new EphemeralRouterAbEd25519YaoCapabilityPersistenceV1()) {
|
|
36914
36951
|
this.backend = backend;
|
|
36915
36952
|
this.capabilityPersistence = capabilityPersistence;
|
|
@@ -37810,14 +37847,14 @@ var InMemoryRouterAbEd25519YaoRecoveryService = class {
|
|
|
37810
37847
|
}
|
|
37811
37848
|
};
|
|
37812
37849
|
var RouterAbEd25519YaoRecoveryRouteExtension = class {
|
|
37850
|
+
kind = "fetch_route_extension";
|
|
37851
|
+
id = "router_ab_ed25519_yao_recovery";
|
|
37852
|
+
routes = ROUTER_AB_ED25519_YAO_RECOVERY_ROUTES;
|
|
37813
37853
|
constructor(service, capabilities, authorization, linkedAuthorities = null) {
|
|
37814
37854
|
this.service = service;
|
|
37815
37855
|
this.capabilities = capabilities;
|
|
37816
37856
|
this.authorization = authorization;
|
|
37817
37857
|
this.linkedAuthorities = linkedAuthorities;
|
|
37818
|
-
this.kind = "fetch_route_extension";
|
|
37819
|
-
this.id = "router_ab_ed25519_yao_recovery";
|
|
37820
|
-
this.routes = ROUTER_AB_ED25519_YAO_RECOVERY_ROUTES;
|
|
37821
37858
|
}
|
|
37822
37859
|
async handleFetchRoute(input) {
|
|
37823
37860
|
if (input.method !== "POST") return json$3({
|
|
@@ -37985,11 +38022,9 @@ function resolveTraceContext(request) {
|
|
|
37985
38022
|
};
|
|
37986
38023
|
}
|
|
37987
38024
|
var InMemoryRouterAbEd25519YaoExportStateV1 = class {
|
|
37988
|
-
|
|
37989
|
-
|
|
37990
|
-
|
|
37991
|
-
this.authorizationUncertainOwners = /* @__PURE__ */ new Map();
|
|
37992
|
-
}
|
|
38025
|
+
exports = /* @__PURE__ */ new Map();
|
|
38026
|
+
authorizationNonceOwners = /* @__PURE__ */ new Map();
|
|
38027
|
+
authorizationUncertainOwners = /* @__PURE__ */ new Map();
|
|
37993
38028
|
};
|
|
37994
38029
|
const ROUTES = Object.freeze([defineRoute({
|
|
37995
38030
|
id: "router_ab_ed25519_yao_export_admit",
|
|
@@ -38136,12 +38171,12 @@ function parseRouterAbEd25519YaoExportExecuteEnvelopeV1(value) {
|
|
|
38136
38171
|
};
|
|
38137
38172
|
}
|
|
38138
38173
|
var RouterAbEd25519YaoExportRouteExtension = class {
|
|
38174
|
+
kind = "fetch_route_extension";
|
|
38175
|
+
id = "router_ab_ed25519_yao_export";
|
|
38176
|
+
routes = ROUTES;
|
|
38139
38177
|
constructor(service, authorization) {
|
|
38140
38178
|
this.service = service;
|
|
38141
38179
|
this.authorization = authorization;
|
|
38142
|
-
this.kind = "fetch_route_extension";
|
|
38143
|
-
this.id = "router_ab_ed25519_yao_export";
|
|
38144
|
-
this.routes = ROUTES;
|
|
38145
38180
|
}
|
|
38146
38181
|
async handleFetchRoute(input) {
|
|
38147
38182
|
if (input.method !== "POST") return json$3({
|
|
@@ -38452,9 +38487,10 @@ function createRouterAbEd25519YaoProductRegistrationCompositionFromPortsV1(input
|
|
|
38452
38487
|
};
|
|
38453
38488
|
}
|
|
38454
38489
|
var RouterAbEd25519YaoProductRegistrationRuntime = class {
|
|
38490
|
+
kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
38491
|
+
signingWorkerId;
|
|
38455
38492
|
constructor(input) {
|
|
38456
38493
|
this.input = input;
|
|
38457
|
-
this.kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
38458
38494
|
this.signingWorkerId = input.signingWorkerId.trim();
|
|
38459
38495
|
if (!this.signingWorkerId) throw new Error("Ed25519 Yao SigningWorker ID is required");
|
|
38460
38496
|
}
|
|
@@ -38974,8 +39010,9 @@ function requestInitWithReplayHeader(init) {
|
|
|
38974
39010
|
};
|
|
38975
39011
|
}
|
|
38976
39012
|
var RouterAbEd25519YaoHttpRegistrationBackend = class {
|
|
39013
|
+
config;
|
|
39014
|
+
lastRouterServerTiming = null;
|
|
38977
39015
|
constructor(config) {
|
|
38978
|
-
this.lastRouterServerTiming = null;
|
|
38979
39016
|
this.config = validateConfig(config);
|
|
38980
39017
|
}
|
|
38981
39018
|
takeLastRouterServerTiming() {
|
|
@@ -39325,6 +39362,10 @@ function createCloudflareTenantStorageRoute(input) {
|
|
|
39325
39362
|
};
|
|
39326
39363
|
}
|
|
39327
39364
|
var StaticCloudflareTenantStorageRouteResolver = class {
|
|
39365
|
+
routeVersion;
|
|
39366
|
+
topology;
|
|
39367
|
+
jurisdiction;
|
|
39368
|
+
signerTarget;
|
|
39328
39369
|
constructor(input) {
|
|
39329
39370
|
this.routeVersion = normalizeRouteVersion(input.routeVersion);
|
|
39330
39371
|
this.topology = input.topology;
|
|
@@ -39475,6 +39516,7 @@ function createInMemoryRouterApiRuntimeSnapshotConsumer() {
|
|
|
39475
39516
|
//#endregion
|
|
39476
39517
|
//#region src/router/cloudflare/durableObjects/versionedJsonRecordStore.ts
|
|
39477
39518
|
var CloudflareVersionedJsonRecordStoreError = class extends Error {
|
|
39519
|
+
code;
|
|
39478
39520
|
constructor(code, message) {
|
|
39479
39521
|
super(message);
|
|
39480
39522
|
this.name = "CloudflareVersionedJsonRecordStoreError";
|
|
@@ -39482,6 +39524,11 @@ var CloudflareVersionedJsonRecordStoreError = class extends Error {
|
|
|
39482
39524
|
}
|
|
39483
39525
|
};
|
|
39484
39526
|
var CloudflareDurableObjectVersionedJsonRecordStore = class {
|
|
39527
|
+
namespace;
|
|
39528
|
+
objectNameForKey;
|
|
39529
|
+
encode;
|
|
39530
|
+
parse;
|
|
39531
|
+
keyPrefix;
|
|
39485
39532
|
constructor(options) {
|
|
39486
39533
|
if (!isDurableObjectNamespaceLike(options.namespace)) throw new Error("Cloudflare Durable Object namespace is required");
|
|
39487
39534
|
if (typeof options.objectNameForKey !== "function") throw new Error("Cloudflare versioned JSON object-name resolver is required");
|
|
@@ -39664,6 +39711,7 @@ function assertNever$6(value) {
|
|
|
39664
39711
|
const TABLE_NAME = "router_ab_yao_versioned_json_records";
|
|
39665
39712
|
const CAS_GUARD_SQL = D1_BATCH_CAS_GUARD_SQL;
|
|
39666
39713
|
var CloudflareD1VersionedJsonRecordStoreError = class extends Error {
|
|
39714
|
+
code;
|
|
39667
39715
|
constructor(code, message) {
|
|
39668
39716
|
super(message);
|
|
39669
39717
|
this.name = "CloudflareD1VersionedJsonRecordStoreError";
|
|
@@ -39671,6 +39719,11 @@ var CloudflareD1VersionedJsonRecordStoreError = class extends Error {
|
|
|
39671
39719
|
}
|
|
39672
39720
|
};
|
|
39673
39721
|
var CloudflareD1VersionedJsonRecordStore = class {
|
|
39722
|
+
database;
|
|
39723
|
+
scope;
|
|
39724
|
+
encode;
|
|
39725
|
+
parse;
|
|
39726
|
+
keyPrefix;
|
|
39674
39727
|
constructor(options) {
|
|
39675
39728
|
if (!isD1DatabaseLike(options.database)) throw new Error("Cloudflare D1 versioned JSON database is required");
|
|
39676
39729
|
this.database = options.database;
|
|
@@ -41076,10 +41129,10 @@ function createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreFromD1V
|
|
|
41076
41129
|
return createRouterAbEd25519YaoProductRegistrationPartitionedStateStoreV1(new D1LifecycleRecords(options, createD1Ed25519YaoLifecycleRecords(options)));
|
|
41077
41130
|
}
|
|
41078
41131
|
var D1LifecycleRecords = class {
|
|
41132
|
+
observed = /* @__PURE__ */ new Map();
|
|
41079
41133
|
constructor(options, records) {
|
|
41080
41134
|
this.options = options;
|
|
41081
41135
|
this.records = records;
|
|
41082
|
-
this.observed = /* @__PURE__ */ new Map();
|
|
41083
41136
|
}
|
|
41084
41137
|
async readMany(keys) {
|
|
41085
41138
|
const entries = await this.records.readMany(keys);
|
|
@@ -41731,9 +41784,10 @@ function createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1(input
|
|
|
41731
41784
|
return new RouterAbEd25519YaoProductRegistrationRequestScopedRuntime(input);
|
|
41732
41785
|
}
|
|
41733
41786
|
var RouterAbEd25519YaoProductRegistrationRequestScopedRuntime = class {
|
|
41787
|
+
kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
41788
|
+
signingWorkerId;
|
|
41734
41789
|
constructor(input) {
|
|
41735
41790
|
this.input = input;
|
|
41736
|
-
this.kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
41737
41791
|
this.signingWorkerId = input.signingWorkerId.trim();
|
|
41738
41792
|
if (!this.signingWorkerId) throw new Error("Ed25519 Yao SigningWorker ID is required");
|
|
41739
41793
|
}
|
|
@@ -42280,7 +42334,6 @@ function validateOrdinaryInactiveSignerMaterialReservationRequestV1(request) {
|
|
|
42280
42334
|
const targetBinding = parseRouterAbEd25519YaoCeremonyBindingV1(request.preparation.targetBinding);
|
|
42281
42335
|
if (targetBinding.operation !== "registration") throw new Error("ordinary Ed25519 target binding must use registration");
|
|
42282
42336
|
assertMaterialActivationMatchesV1(request.plannedActivationRef, routerAbMpcMaterialActivationRefFromWire(targetBinding.material_activation));
|
|
42283
|
-
if (request.preparation.sourceContribution.sourceBinding.operation !== "registration") throw new Error("ordinary Ed25519 source contribution must use registration");
|
|
42284
42337
|
parseRouterAbEd25519YaoParticipantIdsV1(request.preparation.sourceContribution.participantIds);
|
|
42285
42338
|
return;
|
|
42286
42339
|
}
|
|
@@ -42824,10 +42877,10 @@ function hasExactKeysV1(value, keys) {
|
|
|
42824
42877
|
* silently changing the request while preserving the endpoint's exact result.
|
|
42825
42878
|
*/
|
|
42826
42879
|
var CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1 = class {
|
|
42880
|
+
ed25519Reservations = /* @__PURE__ */ new Map();
|
|
42881
|
+
ecdsaReservations = /* @__PURE__ */ new Map();
|
|
42827
42882
|
constructor(endpoint) {
|
|
42828
42883
|
this.endpoint = endpoint;
|
|
42829
|
-
this.ed25519Reservations = /* @__PURE__ */ new Map();
|
|
42830
|
-
this.ecdsaReservations = /* @__PURE__ */ new Map();
|
|
42831
42884
|
}
|
|
42832
42885
|
async reserveInactiveEd25519SignerMaterialV1(input) {
|
|
42833
42886
|
validateOrdinaryInactiveSignerMaterialReservationRequestV1(input);
|
|
@@ -42866,9 +42919,9 @@ function createCloudflareOrdinaryInactiveSignerMaterialReservationServiceV1(inpu
|
|
|
42866
42919
|
return createOrdinaryInactiveSignerMaterialReservationServiceV1({ worker: new CloudflareOrdinaryInactiveSignerMaterialReservationWorkerV1(input.endpoint) });
|
|
42867
42920
|
}
|
|
42868
42921
|
var CloudflareOrdinaryInactiveSignerMaterialDeactivationWorkerV1 = class {
|
|
42922
|
+
terminalOperations = /* @__PURE__ */ new Map();
|
|
42869
42923
|
constructor(endpoint) {
|
|
42870
42924
|
this.endpoint = endpoint;
|
|
42871
|
-
this.terminalOperations = /* @__PURE__ */ new Map();
|
|
42872
42925
|
}
|
|
42873
42926
|
async deactivateOrdinarySignerMaterialV1(input) {
|
|
42874
42927
|
validateOrdinaryInactiveSignerMaterialDeactivationRequestV1(input);
|
|
@@ -496,9 +496,9 @@ function routerAbEcdsaStrictRegistrationRequestBindingJson(request) {
|
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
498
|
var Ed25519CeremonyTokenIssuer = class {
|
|
499
|
+
signingKey = null;
|
|
499
500
|
constructor(config) {
|
|
500
501
|
this.config = config;
|
|
501
|
-
this.signingKey = null;
|
|
502
502
|
validateCeremonyTokenIssuerConfig(config);
|
|
503
503
|
}
|
|
504
504
|
async issue(claims) {
|
|
@@ -210,9 +210,10 @@ async function resolveRouterAbEd25519YaoWalletSessionTermsV1(input) {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
var RouterAbEd25519YaoProductRegistrationRuntime = class {
|
|
213
|
+
kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
214
|
+
signingWorkerId;
|
|
213
215
|
constructor(input) {
|
|
214
216
|
this.input = input;
|
|
215
|
-
this.kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
216
217
|
this.signingWorkerId = input.signingWorkerId.trim();
|
|
217
218
|
if (!this.signingWorkerId) throw new Error("Ed25519 Yao SigningWorker ID is required");
|
|
218
219
|
}
|
|
@@ -21,9 +21,10 @@ function createRouterAbEd25519YaoProductRegistrationRequestScopedRuntimeV1(input
|
|
|
21
21
|
return new RouterAbEd25519YaoProductRegistrationRequestScopedRuntime(input);
|
|
22
22
|
}
|
|
23
23
|
var RouterAbEd25519YaoProductRegistrationRequestScopedRuntime = class {
|
|
24
|
+
kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
25
|
+
signingWorkerId;
|
|
24
26
|
constructor(input) {
|
|
25
27
|
this.input = input;
|
|
26
|
-
this.kind = "router_ab_ed25519_yao_product_registration_runtime_v1";
|
|
27
28
|
this.signingWorkerId = input.signingWorkerId.trim();
|
|
28
29
|
if (!this.signingWorkerId) throw new Error("Ed25519 Yao SigningWorker ID is required");
|
|
29
30
|
}
|
|
@@ -43,11 +43,9 @@ function resolveTraceContext(request) {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
var InMemoryRouterAbEd25519YaoExportStateV1 = class {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.authorizationUncertainOwners = /* @__PURE__ */ new Map();
|
|
50
|
-
}
|
|
46
|
+
exports = /* @__PURE__ */ new Map();
|
|
47
|
+
authorizationNonceOwners = /* @__PURE__ */ new Map();
|
|
48
|
+
authorizationUncertainOwners = /* @__PURE__ */ new Map();
|
|
51
49
|
};
|
|
52
50
|
function bytesToHex(bytes) {
|
|
53
51
|
let encoded = "";
|
|
@@ -1259,12 +1257,12 @@ function parseRouterAbEd25519YaoExportExecuteEnvelopeV1(value) {
|
|
|
1259
1257
|
};
|
|
1260
1258
|
}
|
|
1261
1259
|
var RouterAbEd25519YaoExportRouteExtension = class {
|
|
1260
|
+
kind = "fetch_route_extension";
|
|
1261
|
+
id = "router_ab_ed25519_yao_export";
|
|
1262
|
+
routes = ROUTES;
|
|
1262
1263
|
constructor(service, authorization) {
|
|
1263
1264
|
this.service = service;
|
|
1264
1265
|
this.authorization = authorization;
|
|
1265
|
-
this.kind = "fetch_route_extension";
|
|
1266
|
-
this.id = "router_ab_ed25519_yao_export";
|
|
1267
|
-
this.routes = ROUTES;
|
|
1268
1266
|
}
|
|
1269
1267
|
async handleFetchRoute(input) {
|
|
1270
1268
|
if (input.method !== "POST") return json({
|
|
@@ -87,12 +87,10 @@ var EphemeralRouterAbEd25519YaoCapabilityPersistenceV1 = class {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
var InMemoryRouterAbEd25519YaoRecoveryStateV1 = class {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this.recoverySessions = /* @__PURE__ */ new Map();
|
|
95
|
-
}
|
|
90
|
+
capabilities = /* @__PURE__ */ new Map();
|
|
91
|
+
identityCapabilities = /* @__PURE__ */ new Map();
|
|
92
|
+
recoveries = /* @__PURE__ */ new Map();
|
|
93
|
+
recoverySessions = /* @__PURE__ */ new Map();
|
|
96
94
|
};
|
|
97
95
|
const ROUTER_AB_ED25519_YAO_RECOVERY_ROUTES = Object.freeze([
|
|
98
96
|
defineRoute({
|
|
@@ -727,6 +725,10 @@ function resolveRouterAbEd25519YaoActiveCapability(capabilities, input) {
|
|
|
727
725
|
};
|
|
728
726
|
}
|
|
729
727
|
var InMemoryRouterAbEd25519YaoRecoveryService = class {
|
|
728
|
+
capabilities;
|
|
729
|
+
identityCapabilities;
|
|
730
|
+
recoveries;
|
|
731
|
+
recoverySessions;
|
|
730
732
|
constructor(backend, state = new InMemoryRouterAbEd25519YaoRecoveryStateV1(), capabilityPersistence = new EphemeralRouterAbEd25519YaoCapabilityPersistenceV1()) {
|
|
731
733
|
this.backend = backend;
|
|
732
734
|
this.capabilityPersistence = capabilityPersistence;
|
|
@@ -1627,14 +1629,14 @@ var InMemoryRouterAbEd25519YaoRecoveryService = class {
|
|
|
1627
1629
|
}
|
|
1628
1630
|
};
|
|
1629
1631
|
var RouterAbEd25519YaoRecoveryRouteExtension = class {
|
|
1632
|
+
kind = "fetch_route_extension";
|
|
1633
|
+
id = "router_ab_ed25519_yao_recovery";
|
|
1634
|
+
routes = ROUTER_AB_ED25519_YAO_RECOVERY_ROUTES;
|
|
1630
1635
|
constructor(service, capabilities, authorization, linkedAuthorities = null) {
|
|
1631
1636
|
this.service = service;
|
|
1632
1637
|
this.capabilities = capabilities;
|
|
1633
1638
|
this.authorization = authorization;
|
|
1634
1639
|
this.linkedAuthorities = linkedAuthorities;
|
|
1635
|
-
this.kind = "fetch_route_extension";
|
|
1636
|
-
this.id = "router_ab_ed25519_yao_recovery";
|
|
1637
|
-
this.routes = ROUTER_AB_ED25519_YAO_RECOVERY_ROUTES;
|
|
1638
1640
|
}
|
|
1639
1641
|
async handleFetchRoute(input) {
|
|
1640
1642
|
if (input.method !== "POST") return json({
|
package/dist/esm/router/domains/ed25519Yao/registration/routerAbEd25519YaoHttpRegistrationBackend.js
CHANGED
|
@@ -409,8 +409,9 @@ function requestInitWithReplayHeader(init) {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
var RouterAbEd25519YaoHttpRegistrationBackend = class {
|
|
412
|
+
config;
|
|
413
|
+
lastRouterServerTiming = null;
|
|
412
414
|
constructor(config) {
|
|
413
|
-
this.lastRouterServerTiming = null;
|
|
414
415
|
this.config = validateConfig(config);
|
|
415
416
|
}
|
|
416
417
|
takeLastRouterServerTiming() {
|