@seams/wallet 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/LICENSE.md +201 -0
  2. package/THIRD_PARTY_NOTICES.md +15095 -0
  3. package/dist/.build-inputs.sha256 +1 -1
  4. package/dist/esm/SeamsWeb/signingSurface/BrowserSigningSurface.js +7 -14
  5. package/dist/esm/core/signingEngine/session/identity/exactWalletSessionReader.js +2 -27
  6. package/dist/esm/react/SeamsWeb/signingSurface/BrowserSigningSurface.js +7 -14
  7. package/dist/esm/react/core/signingEngine/session/identity/exactWalletSessionReader.js +2 -27
  8. package/dist/esm/sdk/export-private-key-viewer.js +1420 -1425
  9. package/dist/esm/sdk/halo-border.js +1424 -1429
  10. package/dist/esm/sdk/{host-BqwEYhX0.js → host-DNmO0eve.js} +2 -2
  11. package/dist/esm/sdk/passkey-halo-loading.js +1426 -1431
  12. package/dist/{public/sdk/registrationPreparationPreload-u3ruCmpF.js → esm/sdk/registrationPreparationPreload-CwUkRwVz.js} +1 -1
  13. package/dist/esm/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
  14. package/dist/{public/sdk/runtime-auth-Da9yQyaD.js → esm/sdk/runtime-auth-dpoaCtkK.js} +2 -2
  15. package/dist/esm/sdk/{runtime-device-link-DNlzlwrr.js → runtime-device-link-C75epnbj.js} +1 -1
  16. package/dist/{public/sdk/runtime-ecdsa-tempo-B7dBVcCI.js → esm/sdk/runtime-ecdsa-tempo-CV-E-iZG.js} +1 -1
  17. package/dist/{public/sdk/runtime-email-otp-CckVQZJC.js → esm/sdk/runtime-email-otp-V0mdMD_t.js} +1 -1
  18. package/dist/{public/sdk/runtime-export-WAiBwZL_.js → esm/sdk/runtime-export-C4HO5ysH.js} +1 -1
  19. package/dist/esm/sdk/{runtime-near-DBJ4KfFv.js → runtime-near-DlviFQWy.js} +1 -1
  20. package/dist/{public/sdk/runtime-preferences-DmH7eMHH.js → esm/sdk/runtime-preferences-DyJidFuf.js} +1 -1
  21. package/dist/esm/sdk/{runtime-recovery-kPgl9nTT.js → runtime-recovery-CHDE5gl0.js} +1 -1
  22. package/dist/esm/sdk/{runtimeContext-BorCgXo5.js → runtimeContext-D_TkUM6Z.js} +6 -38
  23. package/dist/esm/sdk/{runtimeLoader-BKQjNgXO.js → runtimeLoader-DxiLgXPm.js} +9 -9
  24. package/dist/esm/sdk/tx-confirm-ui.js +1400 -1407
  25. package/dist/esm/sdk/w3a-tx-confirmer.js +1442 -1447
  26. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  27. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  28. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  29. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  30. package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker.js +4 -4
  31. package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
  32. package/dist/esm/wasm/router_ab_ecdsa_client/pkg/router_ab_ecdsa_client_bg.wasm +0 -0
  33. package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client_bg.wasm +0 -0
  34. package/dist/public/headers.manifest.json +1 -1
  35. package/dist/public/sdk/export-private-key-viewer.js +1420 -1425
  36. package/dist/public/sdk/halo-border.js +1424 -1429
  37. package/dist/public/sdk/{host-BqwEYhX0.js → host-DNmO0eve.js} +2 -2
  38. package/dist/public/sdk/passkey-halo-loading.js +1426 -1431
  39. package/dist/{esm/sdk/registrationPreparationPreload-u3ruCmpF.js → public/sdk/registrationPreparationPreload-CwUkRwVz.js} +1 -1
  40. package/dist/public/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
  41. package/dist/{esm/sdk/runtime-auth-Da9yQyaD.js → public/sdk/runtime-auth-dpoaCtkK.js} +2 -2
  42. package/dist/public/sdk/{runtime-device-link-DNlzlwrr.js → runtime-device-link-C75epnbj.js} +1 -1
  43. package/dist/{esm/sdk/runtime-ecdsa-tempo-B7dBVcCI.js → public/sdk/runtime-ecdsa-tempo-CV-E-iZG.js} +1 -1
  44. package/dist/{esm/sdk/runtime-email-otp-CckVQZJC.js → public/sdk/runtime-email-otp-V0mdMD_t.js} +1 -1
  45. package/dist/{esm/sdk/runtime-export-WAiBwZL_.js → public/sdk/runtime-export-C4HO5ysH.js} +1 -1
  46. package/dist/public/sdk/{runtime-near-DBJ4KfFv.js → runtime-near-DlviFQWy.js} +1 -1
  47. package/dist/{esm/sdk/runtime-preferences-DmH7eMHH.js → public/sdk/runtime-preferences-DyJidFuf.js} +1 -1
  48. package/dist/public/sdk/{runtime-recovery-kPgl9nTT.js → runtime-recovery-CHDE5gl0.js} +1 -1
  49. package/dist/public/sdk/{runtimeContext-BorCgXo5.js → runtimeContext-D_TkUM6Z.js} +6 -38
  50. package/dist/public/sdk/{runtimeLoader-BKQjNgXO.js → runtimeLoader-DxiLgXPm.js} +9 -9
  51. package/dist/public/sdk/tx-confirm-ui.js +1400 -1407
  52. package/dist/public/sdk/w3a-tx-confirmer.js +1442 -1447
  53. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  54. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  55. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  56. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  57. package/dist/public/sdk/workers/device-linking-key.worker.js +133 -140
  58. package/dist/public/sdk/workers/ecdsa-derivation-client.worker.js +94 -188
  59. package/dist/public/sdk/workers/ecdsa-online-client.worker.js +6 -7
  60. package/dist/public/sdk/workers/ecdsa-presign-client.worker.js +6 -7
  61. package/dist/public/sdk/workers/email-otp.worker.js +39 -52
  62. package/dist/public/sdk/workers/email_otp_runtime_bg.wasm +0 -0
  63. package/dist/public/sdk/workers/evm-crypto.worker.js +3 -3
  64. package/dist/public/sdk/workers/evm_crypto.wasm +0 -0
  65. package/dist/public/sdk/workers/evm_crypto_bg.wasm +0 -0
  66. package/dist/public/sdk/workers/near-signer.worker.js +9 -9
  67. package/dist/public/sdk/workers/near_signer.wasm +0 -0
  68. package/dist/public/sdk/workers/passkey-confirm.worker.js +4 -4
  69. package/dist/public/sdk/workers/passkey-mpc-export.worker.js +9 -19
  70. package/dist/public/sdk/workers/router_ab_ecdsa_client_bg.wasm +0 -0
  71. package/dist/public/sdk/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
  72. package/dist/public/sdk/workers/shamir3pass.worker.js +3 -3
  73. package/dist/public/sdk/workers/shamir3pass_runtime_bg.wasm +0 -0
  74. package/dist/public/sdk/workers/tempo-signer.worker.js +3 -3
  75. package/dist/public/sdk/workers/tempo_signer.wasm +0 -0
  76. package/dist/public/sdk/workers/tempo_signer_bg.wasm +0 -0
  77. package/dist/public/sdk/workers/wallet-custody-ceremony.worker.js +55 -1244
  78. package/dist/public/sdk/workers/wallet_custody_ceremony_bg.wasm +0 -0
  79. package/dist/public/sdk/workers/wasm_signer_worker_bg.wasm +0 -0
  80. package/dist/public/wallet-assets.manifest.json +32 -32
  81. package/dist/types/wallet/src/SeamsWeb/signingSurface/BrowserSigningSurface.d.ts +4 -4
  82. package/dist/types/wallet/src/core/signingEngine/session/identity/exactWalletSessionReader.d.ts +1 -9
  83. package/dist/workers/device-linking-key.worker.js +133 -140
  84. package/dist/workers/ecdsa-derivation-client.worker.js +94 -188
  85. package/dist/workers/ecdsa-online-client.worker.js +6 -7
  86. package/dist/workers/ecdsa-presign-client.worker.js +6 -7
  87. package/dist/workers/email-otp.worker.js +39 -52
  88. package/dist/workers/email_otp_runtime_bg.wasm +0 -0
  89. package/dist/workers/evm-crypto.worker.js +3 -3
  90. package/dist/workers/evm_crypto.wasm +0 -0
  91. package/dist/workers/evm_crypto_bg.wasm +0 -0
  92. package/dist/workers/near-signer.worker.js +9 -9
  93. package/dist/workers/near_signer.wasm +0 -0
  94. package/dist/workers/passkey-confirm.worker.js +4 -4
  95. package/dist/workers/passkey-mpc-export.worker.js +9 -19
  96. package/dist/workers/router_ab_ecdsa_client_bg.wasm +0 -0
  97. package/dist/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
  98. package/dist/workers/shamir3pass.worker.js +3 -3
  99. package/dist/workers/shamir3pass_runtime_bg.wasm +0 -0
  100. package/dist/workers/tempo-signer.worker.js +3 -3
  101. package/dist/workers/tempo_signer.wasm +0 -0
  102. package/dist/workers/tempo_signer_bg.wasm +0 -0
  103. package/dist/workers/wallet-custody-ceremony.worker.js +55 -1244
  104. package/dist/workers/wallet_custody_ceremony_bg.wasm +0 -0
  105. package/dist/workers/wasm_signer_worker_bg.wasm +0 -0
  106. package/package.json +6 -3
  107. package/LICENSE +0 -21
@@ -50,10 +50,10 @@ var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function
50
50
  function passStringToWasm0(arg, malloc, realloc) {
51
51
  if (realloc === undefined) {
52
52
  const buf = cachedTextEncoder.encode(arg);
53
- const ptr2 = malloc(buf.length, 1) >>> 0;
54
- getUint8ArrayMemory0().subarray(ptr2, ptr2 + buf.length).set(buf);
53
+ const ptr = malloc(buf.length, 1) >>> 0;
54
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
55
55
  WASM_VECTOR_LEN = buf.length;
56
- return ptr2;
56
+ return ptr;
57
57
  }
58
58
  let len = arg.length;
59
59
  let ptr = malloc(len, 1) >>> 0;
@@ -1078,13 +1078,6 @@ class MpcMaterialActivationReference {
1078
1078
  retainProof() {
1079
1079
  return true;
1080
1080
  }
1081
- kind;
1082
- activationId;
1083
- capability;
1084
- materialOwner;
1085
- keyBinding;
1086
- lifecycleBinding;
1087
- signingWorker;
1088
1081
  constructor(fields) {
1089
1082
  this.retainProof();
1090
1083
  this.kind = "mpc_material_activation_ref";
@@ -3988,19 +3981,19 @@ function parseSource(raw, label = "source") {
3988
3981
  const baseRecord = requireRecord3(raw, label);
3989
3982
  const laneKind = parseLaneKind(baseRecord.laneKind, `${label}.laneKind`);
3990
3983
  if (laneKind === "owner_passkey" || laneKind === "owner_email_otp") {
3991
- const record2 = exactRecord2(baseRecord, NON_EMPTY_FIELDS.ownerSource, label);
3992
- if (record2.sourceKind !== "owner_registration") {
3984
+ const record = exactRecord2(baseRecord, NON_EMPTY_FIELDS.ownerSource, label);
3985
+ if (record.sourceKind !== "owner_registration") {
3993
3986
  throw new Error(`${label}.sourceKind must be owner_registration`);
3994
3987
  }
3995
3988
  return {
3996
3989
  sourceKind: "owner_registration",
3997
- laneId: parseLaneId(record2.laneId, `${label}.laneId`),
3990
+ laneId: parseLaneId(record.laneId, `${label}.laneId`),
3998
3991
  laneKind,
3999
- laneShareEpoch: parseShareEpoch(record2.laneShareEpoch, `${label}.laneShareEpoch`),
4000
- revocationEpoch: requiredInteger(record2.revocationEpoch, `${label}.revocationEpoch`),
4001
- ownerParticipantContinuity: parseOwnerLaneParticipantContinuityV1(record2.ownerParticipantContinuity, `${label}.ownerParticipantContinuity`),
4002
- participantBindingDigestB64u: resultValue(parseLaneParticipantBindingDigestB64u(record2.participantBindingDigestB64u), `${label}.participantBindingDigestB64u`),
4003
- materialActivation: parseMpcActivation(record2.materialActivation, `${label}.materialActivation`)
3992
+ laneShareEpoch: parseShareEpoch(record.laneShareEpoch, `${label}.laneShareEpoch`),
3993
+ revocationEpoch: requiredInteger(record.revocationEpoch, `${label}.revocationEpoch`),
3994
+ ownerParticipantContinuity: parseOwnerLaneParticipantContinuityV1(record.ownerParticipantContinuity, `${label}.ownerParticipantContinuity`),
3995
+ participantBindingDigestB64u: resultValue(parseLaneParticipantBindingDigestB64u(record.participantBindingDigestB64u), `${label}.participantBindingDigestB64u`),
3996
+ materialActivation: parseMpcActivation(record.materialActivation, `${label}.materialActivation`)
4004
3997
  };
4005
3998
  }
4006
3999
  const record = exactRecord2(baseRecord, NON_EMPTY_FIELDS.provisionedSource, label);
@@ -4776,7 +4769,7 @@ function parseRouterAbEcdsaExplicitExportRequestFactsV1(value) {
4776
4769
  if (capability.material_activation.material_owner !== lifecycle.account_id || capability.material_activation.signing_worker !== lifecycle.selected_server_id) {
4777
4770
  throw new Error("ECDSA explicit-export facts.material_activation is not bound to lifecycle owner and selected server");
4778
4771
  }
4779
- const base2 = {
4772
+ const base = {
4780
4773
  context: capability.context,
4781
4774
  lifecycle,
4782
4775
  public_identity: capability.public_identity,
@@ -4790,10 +4783,10 @@ function parseRouterAbEcdsaExplicitExportRequestFactsV1(value) {
4790
4783
  deriver_recipient_keys: capability.deriver_recipient_keys
4791
4784
  };
4792
4785
  if (authorization.kind === "reusable_wallet_session") {
4793
- return { ...base2, authorization };
4786
+ return { ...base, authorization };
4794
4787
  }
4795
4788
  return {
4796
- ...base2,
4789
+ ...base,
4797
4790
  authorization,
4798
4791
  authorization_id: parseEcdsaClientChannelDigest(readEcdsaClientChannelField(record, "authorization_id"), "ECDSA explicit-export facts.authorization_id"),
4799
4792
  operation: parseRouterAbEcdsaOperationStepUpPreparationV1(readEcdsaClientChannelField(record, "operation"))
@@ -5377,8 +5370,8 @@ async function deriveThresholdEcdsaKeyHandle(input) {
5377
5370
  signingRootId: requiredString2(input.signingRootId, "signingRootId"),
5378
5371
  signingRootVersion: normalizedSigningRootVersion(input.signingRootVersion)
5379
5372
  });
5380
- const digest2 = await sha256BytesUtf8(canonical);
5381
- return `ederivation-key-${base64UrlEncode(digest2)}`;
5373
+ const digest = await sha256BytesUtf8(canonical);
5374
+ return `ederivation-key-${base64UrlEncode(digest)}`;
5382
5375
  }
5383
5376
  // ../shared-ts/src/signing-lanes/rotationDigests.ts
5384
5377
  var TEXT_ENCODER2 = new TextEncoder;
@@ -5608,11 +5601,11 @@ function getMethod(target, prop) {
5608
5601
  }
5609
5602
  const method = async function(storeName, ...args) {
5610
5603
  const tx = this.transaction(storeName, isWrite ? "readwrite" : "readonly");
5611
- let target2 = tx.store;
5604
+ let target = tx.store;
5612
5605
  if (useIndex)
5613
- target2 = target2.index(args.shift());
5606
+ target = target.index(args.shift());
5614
5607
  return (await Promise.all([
5615
- target2[targetFuncName](...args),
5608
+ target[targetFuncName](...args),
5616
5609
  isWrite && tx.done
5617
5610
  ]))[0];
5618
5611
  };
@@ -6248,10 +6241,9 @@ async function runIndexedDbTransactionTask(context, task) {
6248
6241
  }
6249
6242
 
6250
6243
  class SeamsWalletDBManager {
6251
- config;
6252
- dbPromise = null;
6253
- disabled = false;
6254
6244
  constructor(config = SEAMS_WALLET_DB_CONFIG) {
6245
+ this.dbPromise = null;
6246
+ this.disabled = false;
6255
6247
  this.config = config;
6256
6248
  }
6257
6249
  getDbName() {
@@ -6533,17 +6525,14 @@ class EcdsaCapabilityManifestProof {
6533
6525
  }
6534
6526
 
6535
6527
  class EcdsaCapabilityScopeProof extends EcdsaCapabilityManifestProof {
6536
- kind = "evm_family";
6537
- targetMemberships;
6538
6528
  constructor(targetMemberships) {
6539
6529
  super();
6530
+ this.kind = "evm_family";
6540
6531
  this.targetMemberships = targetMemberships;
6541
6532
  }
6542
6533
  }
6543
6534
 
6544
6535
  class EcdsaManifestIdentityProof extends EcdsaCapabilityManifestProof {
6545
- manifestId;
6546
- manifestRevision;
6547
6536
  constructor(fields) {
6548
6537
  super();
6549
6538
  this.manifestId = fields.manifestId;
@@ -6552,42 +6541,40 @@ class EcdsaManifestIdentityProof extends EcdsaCapabilityManifestProof {
6552
6541
  }
6553
6542
 
6554
6543
  class NoCurrentEcdsaManifestExpectationProof extends EcdsaCapabilityManifestProof {
6555
- kind = "no_current_manifest";
6544
+ constructor() {
6545
+ super(...arguments);
6546
+ this.kind = "no_current_manifest";
6547
+ }
6556
6548
  }
6557
6549
 
6558
6550
  class ExactEcdsaManifestExpectationProof extends EcdsaCapabilityManifestProof {
6559
- kind = "exact_manifest";
6560
- manifestId;
6561
- manifestRevision;
6562
6551
  constructor(identity) {
6563
6552
  super();
6553
+ this.kind = "exact_manifest";
6564
6554
  this.manifestId = identity.manifestId;
6565
6555
  this.manifestRevision = identity.manifestRevision;
6566
6556
  }
6567
6557
  }
6568
6558
 
6569
6559
  class NoCurrentEcdsaServerGenerationExpectationProof extends EcdsaCapabilityManifestProof {
6570
- kind = "no_current_generation";
6560
+ constructor() {
6561
+ super(...arguments);
6562
+ this.kind = "no_current_generation";
6563
+ }
6571
6564
  }
6572
6565
 
6573
6566
  class ExactEcdsaServerGenerationExpectationProof extends EcdsaCapabilityManifestProof {
6574
- kind = "exact_generation";
6575
- serverGeneration;
6576
6567
  constructor(serverGeneration) {
6577
6568
  super();
6569
+ this.kind = "exact_generation";
6578
6570
  this.serverGeneration = serverGeneration;
6579
6571
  }
6580
6572
  }
6581
6573
 
6582
6574
  class EcdsaRoleLocalMaterialBindingProof extends EcdsaCapabilityManifestProof {
6583
- kind = "ecdsa_role_local_material_binding";
6584
- keyHandle;
6585
- ecdsaThresholdKeyId;
6586
- clientVerifyingPublicKey33B64u;
6587
- participantIds;
6588
- relayerKeyId;
6589
6575
  constructor(fields) {
6590
6576
  super();
6577
+ this.kind = "ecdsa_role_local_material_binding";
6591
6578
  this.keyHandle = fields.keyHandle;
6592
6579
  this.ecdsaThresholdKeyId = fields.ecdsaThresholdKeyId;
6593
6580
  this.clientVerifyingPublicKey33B64u = fields.clientVerifyingPublicKey33B64u;
@@ -6597,17 +6584,9 @@ class EcdsaRoleLocalMaterialBindingProof extends EcdsaCapabilityManifestProof {
6597
6584
  }
6598
6585
 
6599
6586
  class PreparedEvmFamilySignerProof extends EcdsaCapabilityManifestProof {
6600
- kind = "prepared_evm_family_signer";
6601
- capability;
6602
- signerId;
6603
- walletId;
6604
- authority;
6605
- scope;
6606
- materialOwner;
6607
- signingRootId;
6608
- signingRootVersion;
6609
6587
  constructor(fields) {
6610
6588
  super();
6589
+ this.kind = "prepared_evm_family_signer";
6611
6590
  this.capability = fields.capability;
6612
6591
  this.signerId = fields.signerId;
6613
6592
  this.walletId = fields.authority.walletId;
@@ -6620,18 +6599,9 @@ class PreparedEvmFamilySignerProof extends EcdsaCapabilityManifestProof {
6620
6599
  }
6621
6600
 
6622
6601
  class RegisteredEvmFamilySignerProof extends EcdsaCapabilityManifestProof {
6623
- kind = "registered_evm_family_signer";
6624
- capability;
6625
- signerId;
6626
- walletId;
6627
- authority;
6628
- scope;
6629
- materialOwner;
6630
- signingRootId;
6631
- signingRootVersion;
6632
- registeredPublicFacts;
6633
6602
  constructor(fields) {
6634
6603
  super();
6604
+ this.kind = "registered_evm_family_signer";
6635
6605
  this.capability = fields.preparedSigner.capability;
6636
6606
  this.signerId = fields.preparedSigner.signerId;
6637
6607
  this.walletId = fields.preparedSigner.walletId;
@@ -6645,13 +6615,9 @@ class RegisteredEvmFamilySignerProof extends EcdsaCapabilityManifestProof {
6645
6615
  }
6646
6616
 
6647
6617
  class EncryptedEcdsaPendingCandidateProof extends EcdsaCapabilityManifestProof {
6648
- kind = "encrypted_ecdsa_pending_candidate";
6649
- sealingKeyId;
6650
- iv12B64u;
6651
- ciphertextB64u;
6652
- ciphertextDigest;
6653
6618
  constructor(fields) {
6654
6619
  super();
6620
+ this.kind = "encrypted_ecdsa_pending_candidate";
6655
6621
  this.sealingKeyId = fields.sealingKeyId;
6656
6622
  this.iv12B64u = fields.iv12B64u;
6657
6623
  this.ciphertextB64u = fields.ciphertextB64u;
@@ -6660,14 +6626,9 @@ class EncryptedEcdsaPendingCandidateProof extends EcdsaCapabilityManifestProof {
6660
6626
  }
6661
6627
 
6662
6628
  class EcdsaActivationBindingProof extends EcdsaCapabilityManifestProof {
6663
- kind = "ecdsa_activation_binding";
6664
- targetManifest;
6665
- signer;
6666
- roleLocalBinding;
6667
- bindingDigest;
6668
- durableMaterialRef;
6669
6629
  constructor(fields) {
6670
6630
  super();
6631
+ this.kind = "ecdsa_activation_binding";
6671
6632
  this.targetManifest = fields.targetManifest;
6672
6633
  this.signer = fields.signer;
6673
6634
  this.roleLocalBinding = fields.roleLocalBinding;
@@ -6677,24 +6638,18 @@ class EcdsaActivationBindingProof extends EcdsaCapabilityManifestProof {
6677
6638
  }
6678
6639
 
6679
6640
  class PreparedEcdsaActivationCandidateProof extends EcdsaCapabilityManifestProof {
6680
- kind = "prepared_ecdsa_activation_candidate";
6681
- activationBinding;
6682
- encryptedPending;
6683
6641
  constructor(fields) {
6684
6642
  super();
6643
+ this.kind = "prepared_ecdsa_activation_candidate";
6685
6644
  this.activationBinding = fields.activationBinding;
6686
6645
  this.encryptedPending = fields.encryptedPending;
6687
6646
  }
6688
6647
  }
6689
6648
 
6690
6649
  class EcdsaServerActivationCommandProof extends EcdsaCapabilityManifestProof {
6691
- kind = "ecdsa_server_activation_command";
6692
- correlationId;
6693
- expectedGeneration;
6694
- requestDigest;
6695
- canonicalRequest;
6696
6650
  constructor(fields) {
6697
6651
  super();
6652
+ this.kind = "ecdsa_server_activation_command";
6698
6653
  this.correlationId = fields.correlationId;
6699
6654
  this.expectedGeneration = fields.expectedGeneration;
6700
6655
  this.requestDigest = fields.requestDigest;
@@ -6703,13 +6658,9 @@ class EcdsaServerActivationCommandProof extends EcdsaCapabilityManifestProof {
6703
6658
  }
6704
6659
 
6705
6660
  class EcdsaServerActivationReceiptProof extends EcdsaCapabilityManifestProof {
6706
- kind = "ecdsa_server_activation_receipt";
6707
- lifecycleId;
6708
- activationDigest;
6709
- activatedAt;
6710
- protocolReceipt;
6711
6661
  constructor(fields) {
6712
6662
  super();
6663
+ this.kind = "ecdsa_server_activation_receipt";
6713
6664
  this.lifecycleId = fields.lifecycleId;
6714
6665
  this.activationDigest = fields.activationDigest;
6715
6666
  this.activatedAt = fields.activatedAt;
@@ -6718,13 +6669,9 @@ class EcdsaServerActivationReceiptProof extends EcdsaCapabilityManifestProof {
6718
6669
  }
6719
6670
 
6720
6671
  class EcdsaServerActivationCommitProof extends EcdsaCapabilityManifestProof {
6721
- kind = "ecdsa_server_activation_commit";
6722
- correlationId;
6723
- activationRequestDigest;
6724
- serverGeneration;
6725
- serverActivationReceipt;
6726
6672
  constructor(fields) {
6727
6673
  super();
6674
+ this.kind = "ecdsa_server_activation_commit";
6728
6675
  this.correlationId = fields.correlationId;
6729
6676
  this.activationRequestDigest = fields.activationRequestDigest;
6730
6677
  this.serverGeneration = fields.serverGeneration;
@@ -6733,14 +6680,9 @@ class EcdsaServerActivationCommitProof extends EcdsaCapabilityManifestProof {
6733
6680
  }
6734
6681
 
6735
6682
  class PreparedEcdsaActivationJournalProof extends EcdsaCapabilityManifestProof {
6736
- kind = "activation_prepared";
6737
- journalId;
6738
- expectedManifest;
6739
- activationCommand;
6740
- candidate;
6741
- createdAt;
6742
6683
  constructor(fields) {
6743
6684
  super();
6685
+ this.kind = "activation_prepared";
6744
6686
  this.journalId = fields.journalId;
6745
6687
  this.expectedManifest = fields.expectedManifest;
6746
6688
  this.activationCommand = fields.activationCommand;
@@ -6750,15 +6692,9 @@ class PreparedEcdsaActivationJournalProof extends EcdsaCapabilityManifestProof {
6750
6692
  }
6751
6693
 
6752
6694
  class ServerCommittedEcdsaActivationJournalProof extends EcdsaCapabilityManifestProof {
6753
- kind = "server_activation_committed";
6754
- journalId;
6755
- expectedManifest;
6756
- activationCommand;
6757
- candidate;
6758
- createdAt;
6759
- serverActivation;
6760
6695
  constructor(fields) {
6761
6696
  super();
6697
+ this.kind = "server_activation_committed";
6762
6698
  this.journalId = fields.journalId;
6763
6699
  this.expectedManifest = fields.expectedManifest;
6764
6700
  this.activationCommand = fields.activationCommand;
@@ -6769,20 +6705,9 @@ class ServerCommittedEcdsaActivationJournalProof extends EcdsaCapabilityManifest
6769
6705
  }
6770
6706
 
6771
6707
  class DurableEcdsaMaterialBindingProof extends EcdsaCapabilityManifestProof {
6772
- kind = "durable_ecdsa_material";
6773
- materialActivation;
6774
- routerAbEcdsaDerivationNormalSigning;
6775
- roleLocalPublicFacts;
6776
- roleLocalBinding;
6777
- durableMaterialRef;
6778
- bindingDigest;
6779
- lifecycleId;
6780
- ciphertextDigest;
6781
- activationDigest;
6782
- activatedAt;
6783
- runtimePolicyScope;
6784
6708
  constructor(fields) {
6785
6709
  super();
6710
+ this.kind = "durable_ecdsa_material";
6786
6711
  this.materialActivation = fields.materialActivation;
6787
6712
  this.routerAbEcdsaDerivationNormalSigning = fields.routerAbEcdsaDerivationNormalSigning;
6788
6713
  this.roleLocalPublicFacts = fields.roleLocalPublicFacts;
@@ -6798,13 +6723,9 @@ class DurableEcdsaMaterialBindingProof extends EcdsaCapabilityManifestProof {
6798
6723
  }
6799
6724
 
6800
6725
  class ValidatedEncryptedEcdsaReadyMaterialProof extends EcdsaCapabilityManifestProof {
6801
- kind = "encrypted_ecdsa_ready_material";
6802
- binding;
6803
- sealingKeyId;
6804
- iv12B64u;
6805
- ciphertextB64u;
6806
6726
  constructor(fields) {
6807
6727
  super();
6728
+ this.kind = "encrypted_ecdsa_ready_material";
6808
6729
  this.binding = fields.binding;
6809
6730
  this.sealingKeyId = fields.sealingKeyId;
6810
6731
  this.iv12B64u = fields.iv12B64u;
@@ -6813,14 +6734,9 @@ class ValidatedEncryptedEcdsaReadyMaterialProof extends EcdsaCapabilityManifestP
6813
6734
  }
6814
6735
 
6815
6736
  class ActiveEcdsaCapabilityManifestProof extends EcdsaCapabilityManifestProof {
6816
- kind = "active_ecdsa_capability_manifest";
6817
- identity;
6818
- signer;
6819
- activation;
6820
- durableMaterial;
6821
- committedAt;
6822
6737
  constructor(fields) {
6823
6738
  super();
6739
+ this.kind = "active_ecdsa_capability_manifest";
6824
6740
  this.identity = fields.identity;
6825
6741
  this.signer = fields.signer;
6826
6742
  this.activation = fields.activation;
@@ -6830,12 +6746,9 @@ class ActiveEcdsaCapabilityManifestProof extends EcdsaCapabilityManifestProof {
6830
6746
  }
6831
6747
 
6832
6748
  class ReplacedEcdsaCapabilityManifestProof extends EcdsaCapabilityManifestProof {
6833
- kind = "replaced_ecdsa_capability_manifest";
6834
- identity;
6835
- signer;
6836
- retirement;
6837
6749
  constructor(fields) {
6838
6750
  super();
6751
+ this.kind = "replaced_ecdsa_capability_manifest";
6839
6752
  this.identity = fields.identity;
6840
6753
  this.signer = fields.signer;
6841
6754
  this.retirement = fields.retirement;
@@ -7164,7 +7077,6 @@ function activeManifestMatchesWalletCustodyImport(input) {
7164
7077
  }
7165
7078
 
7166
7079
  class FinalizationControlError extends Error {
7167
- kind;
7168
7080
  constructor(kind, message) {
7169
7081
  super(message);
7170
7082
  this.name = "FinalizationControlError";
@@ -8418,7 +8330,6 @@ async function readActivationJournalRows(context) {
8418
8330
  }
8419
8331
 
8420
8332
  class IndexedDbEcdsaCapabilityManifestStore {
8421
- manager;
8422
8333
  constructor(manager = seamsWalletDB) {
8423
8334
  this.manager = manager;
8424
8335
  }
@@ -8608,8 +8519,8 @@ class IndexedDbEcdsaCapabilityManifestStore {
8608
8519
  };
8609
8520
  } catch (error) {
8610
8521
  if (error instanceof FinalizationControlError) {
8611
- const digest2 = await persistenceDigest(error.kind === "corrupt" ? "journal_corrupt" : "journal_conflict", selector, error.message);
8612
- return error.kind === "corrupt" ? { kind: "corrupt", corruptionDigest: digest2 } : { kind: "exact_record_conflict", conflictDigest: digest2 };
8522
+ const digest = await persistenceDigest(error.kind === "corrupt" ? "journal_corrupt" : "journal_conflict", selector, error.message);
8523
+ return error.kind === "corrupt" ? { kind: "corrupt", corruptionDigest: digest } : { kind: "exact_record_conflict", conflictDigest: digest };
8613
8524
  }
8614
8525
  if (isConstraintError(error)) {
8615
8526
  return {
@@ -9090,11 +9001,11 @@ class IndexedDbEcdsaCapabilityManifestStore {
9090
9001
  try {
9091
9002
  activeProof = assertActiveProofInput(input);
9092
9003
  } catch (error) {
9093
- const selector2 = selectorFromJournal(input.committedJournal);
9004
+ const selector = selectorFromJournal(input.committedJournal);
9094
9005
  return {
9095
9006
  kind: "corrupt",
9096
- selector: selector2,
9097
- corruptionDigest: await persistenceDigest("finalization_input_corrupt", selector2, errorMessage2(error))
9007
+ selector,
9008
+ corruptionDigest: await persistenceDigest("finalization_input_corrupt", selector, errorMessage2(error))
9098
9009
  };
9099
9010
  }
9100
9011
  const selector = selectorFromManifest(activeProof.activeManifest);
@@ -9122,15 +9033,15 @@ class IndexedDbEcdsaCapabilityManifestStore {
9122
9033
  };
9123
9034
  } catch (error) {
9124
9035
  if (error instanceof FinalizationControlError) {
9125
- const digest2 = await persistenceDigest(error.kind === "corrupt" ? "finalization_corrupt" : "finalization_conflict", selector, error.message);
9036
+ const digest = await persistenceDigest(error.kind === "corrupt" ? "finalization_corrupt" : "finalization_conflict", selector, error.message);
9126
9037
  return error.kind === "corrupt" ? {
9127
9038
  kind: "corrupt",
9128
9039
  selector,
9129
- corruptionDigest: digest2
9040
+ corruptionDigest: digest
9130
9041
  } : {
9131
9042
  kind: "exact_record_conflict",
9132
9043
  selector,
9133
- conflictDigest: digest2
9044
+ conflictDigest: digest
9134
9045
  };
9135
9046
  }
9136
9047
  if (isConstraintError(error)) {
@@ -9572,10 +9483,10 @@ function activationCommitCeremonyId(record) {
9572
9483
  "idempotencyKey",
9573
9484
  "publicFacts"
9574
9485
  ]);
9575
- const ceremonyId2 = String(record.registrationCeremonyId || "").trim();
9576
- if (!ceremonyId2)
9486
+ const ceremonyId = String(record.registrationCeremonyId || "").trim();
9487
+ if (!ceremonyId)
9577
9488
  throw new Error("ECDSA activation operation ceremony identity is invalid");
9578
- return ceremonyId2;
9489
+ return ceremonyId;
9579
9490
  }
9580
9491
  if (record.operation === "wallet_add_signer_activate_v2") {
9581
9492
  requireExactKeys4(record, "ECDSA activation operation", [
@@ -9584,10 +9495,10 @@ function activationCommitCeremonyId(record) {
9584
9495
  "activationCorrelationId",
9585
9496
  "publicFacts"
9586
9497
  ]);
9587
- const ceremonyId2 = String(record.addSignerCeremonyId || "").trim();
9588
- if (!ceremonyId2)
9498
+ const ceremonyId = String(record.addSignerCeremonyId || "").trim();
9499
+ if (!ceremonyId)
9589
9500
  throw new Error("ECDSA activation operation ceremony identity is invalid");
9590
- return ceremonyId2;
9501
+ return ceremonyId;
9591
9502
  }
9592
9503
  const hasRegistrationId = Object.hasOwn(record, "registrationCeremonyId");
9593
9504
  const hasAddSignerId = Object.hasOwn(record, "addSignerCeremonyId");
@@ -9613,8 +9524,8 @@ function assertCanonicalRequestMatchesVerifiedCeremony(input) {
9613
9524
  if (!String(request.idempotencyKey || "").trim()) {
9614
9525
  throw new Error("ECDSA activation operation requires an idempotency key");
9615
9526
  }
9616
- const publicFacts2 = parseRouterAbEcdsaVerifiedClientActivationFactsV1(request.publicFacts);
9617
- if (!verifiedClientActivationFactsEqual(publicFacts2, input.clientActivation)) {
9527
+ const publicFacts = parseRouterAbEcdsaVerifiedClientActivationFactsV1(request.publicFacts);
9528
+ if (!verifiedClientActivationFactsEqual(publicFacts, input.clientActivation)) {
9618
9529
  throw new Error("ECDSA activation operation changed the verified client facts");
9619
9530
  }
9620
9531
  return;
@@ -9623,8 +9534,8 @@ function assertCanonicalRequestMatchesVerifiedCeremony(input) {
9623
9534
  if (parseCorrelationId(request.activationCorrelationId) !== input.planInput.journalId) {
9624
9535
  throw new Error("ECDSA activation operation changed the activation correlation");
9625
9536
  }
9626
- const publicFacts2 = parseRouterAbEcdsaVerifiedClientActivationFactsV1(request.publicFacts);
9627
- if (!verifiedClientActivationFactsEqual(publicFacts2, input.clientActivation)) {
9537
+ const publicFacts = parseRouterAbEcdsaVerifiedClientActivationFactsV1(request.publicFacts);
9538
+ if (!verifiedClientActivationFactsEqual(publicFacts, input.clientActivation)) {
9628
9539
  throw new Error("ECDSA activation operation changed the verified client facts");
9629
9540
  }
9630
9541
  return;
@@ -9846,14 +9757,9 @@ class MpcHydrationProof {
9846
9757
  }
9847
9758
  }
9848
9759
  class MpcUseLiveRuntimeHydrationPlanProof extends MpcHydrationProof {
9849
- kind = "use_live_runtime";
9850
- capability;
9851
- materialOwner;
9852
- authority;
9853
- runtime;
9854
- materialActivation;
9855
9760
  constructor(fields) {
9856
9761
  super();
9762
+ this.kind = "use_live_runtime";
9857
9763
  this.capability = fields.materialActivation.capability;
9858
9764
  this.materialOwner = fields.materialActivation.materialOwner;
9859
9765
  this.authority = fields.authority;
@@ -9863,14 +9769,9 @@ class MpcUseLiveRuntimeHydrationPlanProof extends MpcHydrationProof {
9863
9769
  }
9864
9770
 
9865
9771
  class MpcRehydrateMaterialActivationHydrationPlanProof extends MpcHydrationProof {
9866
- kind = "rehydrate_material_activation";
9867
- capability;
9868
- materialOwner;
9869
- authority;
9870
- materialActivation;
9871
- sealedMaterial;
9872
9772
  constructor(fields) {
9873
9773
  super();
9774
+ this.kind = "rehydrate_material_activation";
9874
9775
  this.capability = fields.materialActivation.capability;
9875
9776
  this.materialOwner = fields.materialActivation.materialOwner;
9876
9777
  this.authority = fields.authority;
@@ -9879,17 +9780,21 @@ class MpcRehydrateMaterialActivationHydrationPlanProof extends MpcHydrationProof
9879
9780
  }
9880
9781
  }
9881
9782
  class MpcBlockedCapabilityHydrationPlanProof extends MpcHydrationProof {
9882
- kind = "blocked";
9783
+ constructor() {
9784
+ super(...arguments);
9785
+ this.kind = "blocked";
9786
+ }
9883
9787
  }
9884
9788
 
9885
9789
  class MpcMissingCapabilityHydrationPlanProof extends MpcBlockedCapabilityHydrationPlanProof {
9886
- capability = null;
9887
- reason = "missing_capability";
9790
+ constructor() {
9791
+ super(...arguments);
9792
+ this.capability = null;
9793
+ this.reason = "missing_capability";
9794
+ }
9888
9795
  }
9889
9796
 
9890
9797
  class MpcKnownCapabilityBlockedHydrationPlanProof extends MpcBlockedCapabilityHydrationPlanProof {
9891
- capability;
9892
- reason;
9893
9798
  constructor(fields) {
9894
9799
  super();
9895
9800
  this.capability = fields.capability;
@@ -9911,10 +9816,9 @@ function buildBlockedMpcCapabilityHydrationPlan(fields) {
9911
9816
 
9912
9817
  // src/core/signingEngine/session/material/restorableMpcMaterialRef.internal.ts
9913
9818
  class RestorableMpcMaterialReference {
9914
- kind = "restorable_mpc_material_ref";
9915
- durableMaterialRef;
9916
- protocolProof = true;
9917
9819
  constructor(durableMaterialRef) {
9820
+ this.kind = "restorable_mpc_material_ref";
9821
+ this.protocolProof = true;
9918
9822
  this.durableMaterialRef = durableMaterialRef;
9919
9823
  this.protocolProof;
9920
9824
  }
@@ -10009,10 +9913,12 @@ function resolveEcdsaCapabilityHydration(input) {
10009
9913
 
10010
9914
  // src/core/signingEngine/workerManager/workers/opaqueEcdsaPresignAuthority.ts
10011
9915
  class OpaqueEcdsaPresignAuthorityV1 {
10012
- sessions = new Map;
10013
- materials = new Map;
10014
- operationTails = new Map;
10015
- generation = 0;
9916
+ constructor() {
9917
+ this.sessions = new Map;
9918
+ this.materials = new Map;
9919
+ this.operationTails = new Map;
9920
+ this.generation = 0;
9921
+ }
10016
9922
  async initialize(input) {
10017
9923
  const generation = this.generation;
10018
9924
  return await this.serialize(input.presignSessionId, () => {
@@ -10578,8 +10484,8 @@ function finalizeWalletCustodyEcdsaRoleLocalActivation(input) {
10578
10484
  }
10579
10485
  function assertRegistrationActivationReceiptTimestamp(expiresAtMs, receipt) {
10580
10486
  const activation = receipt.ecdsa_activation;
10581
- const nowMs2 = Date.now();
10582
- if (activation.activated_at_ms > expiresAtMs || activation.activated_at_ms > nowMs2 + 60000) {
10487
+ const nowMs = Date.now();
10488
+ if (activation.activated_at_ms > expiresAtMs || activation.activated_at_ms > nowMs + 60000) {
10583
10489
  throw new Error("Router A/B ECDSA activation receipt timestamp is outside ceremony policy");
10584
10490
  }
10585
10491
  }
@@ -11328,10 +11234,10 @@ function isDerivationWasmInitFailureMessage(message) {
11328
11234
  }
11329
11235
  function classifyEcdsaDerivationWorkerFailure(error) {
11330
11236
  if (error && typeof error === "object") {
11331
- const message2 = typeof error.message === "string" ? String(error.message).trim() : "";
11237
+ const message = typeof error.message === "string" ? String(error.message).trim() : "";
11332
11238
  const code = typeof error.code === "string" ? String(error.code).trim() : "";
11333
11239
  const coreCode = typeof error.coreCode === "string" ? String(error.coreCode).trim() : "";
11334
- const resolvedMessage = message2 || safeErrorMessage(error);
11240
+ const resolvedMessage = message || safeErrorMessage(error);
11335
11241
  if (isDerivationWasmInitFailureMessage(resolvedMessage)) {
11336
11242
  return {
11337
11243
  message: resolvedMessage,
@@ -11425,11 +11331,11 @@ function holderOrdinaryExportRequestDigest(material) {
11425
11331
  if (typeof method !== "function") {
11426
11332
  throw new Error("ECDSA holder ordinary-export digest method is unavailable");
11427
11333
  }
11428
- const digest2 = Reflect.apply(method, material, []);
11429
- if (typeof digest2 !== "string" || digest2.trim().length === 0) {
11334
+ const digest = Reflect.apply(method, material, []);
11335
+ if (typeof digest !== "string" || digest.trim().length === 0) {
11430
11336
  throw new Error("ECDSA holder ordinary-export digest is invalid");
11431
11337
  }
11432
- return digest2;
11338
+ return digest;
11433
11339
  }
11434
11340
  function holderFinalizeOrdinaryExport(material, inputJson) {
11435
11341
  const method = Reflect.get(material, "finalize_ordinary_export");
@@ -11928,14 +11834,14 @@ async function handleEcdsaDerivationClientMessage(request) {
11928
11834
  if (request.type === EcdsaDerivationClientCustomRequestType.PrewarmEcdsaRegistrationCrypto) {
11929
11835
  const prewarmStartedAt = nowMs();
11930
11836
  await initializeEcdsaDerivationOperationWasm(EcdsaDerivationClientCustomRequestType.PrewarmEcdsaRegistrationCrypto);
11931
- const wasmInitWaitMs2 = roundMs(nowMs() - prewarmStartedAt);
11837
+ const wasmInitWaitMs = roundMs(nowMs() - prewarmStartedAt);
11932
11838
  return {
11933
11839
  type: EcdsaDerivationClientCustomResponseType.PrewarmEcdsaRegistrationCryptoSuccess,
11934
11840
  payload: {
11935
11841
  kind: "ecdsa_registration_crypto_prewarm_result_v1",
11936
- wasmInitMs: wasmInitWaitMs2
11842
+ wasmInitMs: wasmInitWaitMs
11937
11843
  },
11938
- wasmInitWaitMs: wasmInitWaitMs2,
11844
+ wasmInitWaitMs,
11939
11845
  wasmCallMs: 0
11940
11846
  };
11941
11847
  }
@@ -534,10 +534,13 @@ function isAttachPresignToOnlinePort(value) {
534
534
 
535
535
  // src/core/signingEngine/workerManager/workerDeferred.ts
536
536
  class WorkerDeferred {
537
- promise;
538
- resolveValue = null;
539
- rejectValue = null;
540
537
  constructor() {
538
+ this.resolveValue = null;
539
+ this.rejectValue = null;
540
+ this.capture = (resolve, reject) => {
541
+ this.resolveValue = resolve;
542
+ this.rejectValue = reject;
543
+ };
541
544
  this.promise = new Promise(this.capture);
542
545
  }
543
546
  resolve(value) {
@@ -550,10 +553,6 @@ class WorkerDeferred {
550
553
  throw new Error("Worker deferred rejecter is unavailable");
551
554
  this.rejectValue(error);
552
555
  }
553
- capture = (resolve, reject) => {
554
- this.resolveValue = resolve;
555
- this.rejectValue = reject;
556
- };
557
556
  }
558
557
 
559
558
  // src/core/signingEngine/workerManager/workers/ecdsa-online-client.worker.ts