@capxul/mcp 2.6.1 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.mjs";
3
- import { t as import_eventemitter3 } from "./eventemitter3-BAR9woZ4.mjs";
4
- import { t as require_lib } from "./lib-DYnihSM4.mjs";
2
+ import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
3
+ import { t as import_eventemitter3 } from "./eventemitter3-CtD_UIP9.mjs";
4
+ import { t as require_lib } from "./lib-C5eHZg-C.mjs";
5
5
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
6
  import { createHash, randomBytes } from "node:crypto";
7
7
  import { createServer } from "node:http";
@@ -28,7 +28,7 @@ import { getChainId, getCode, readContract, signTypedData } from "viem/actions";
28
28
  import { getAction } from "viem/utils";
29
29
  import { baseSepolia } from "viem/chains";
30
30
  //#region src/approvals.ts
31
- const DEFAULT_TTL_MS$1 = 60 * 6e4;
31
+ const DEFAULT_TTL_MS$1 = 36e5;
32
32
  const DEFAULT_MAX_ENTRIES = 1e3;
33
33
  var InMemoryApprovalStore = class {
34
34
  entries = /* @__PURE__ */ new Map();
@@ -70,8 +70,8 @@ var InMemoryApprovalStore = class {
70
70
  }
71
71
  };
72
72
  const REQUIRED_MCP_SCOPE = "mcp:tools";
73
- const DEFAULT_CODE_TTL_MS = 5 * 6e4;
74
- const DEFAULT_ACCESS_TOKEN_TTL_MS = 60 * 6e4;
73
+ const DEFAULT_CODE_TTL_MS = 3e5;
74
+ const DEFAULT_ACCESS_TOKEN_TTL_MS = 36e5;
75
75
  const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
76
76
  var InMemoryOAuthProvider = class {
77
77
  issuer;
@@ -240,7 +240,7 @@ function normalizeEmail(email) {
240
240
  }
241
241
  //#endregion
242
242
  //#region package.json
243
- var version$2 = "2.6.1";
243
+ var version$2 = "2.8.0";
244
244
  //#endregion
245
245
  //#region ../../packages/errors/src/chain-cause.ts
246
246
  /**
@@ -364,6 +364,69 @@ function chainCauseProperties(chain) {
364
364
  };
365
365
  }
366
366
  /**
367
+ * Safe (safe-contracts v1.4.1) revert codes. The contracts revert with these
368
+ * short strings to save gas; the sentence lives in the Safe docs
369
+ * (`docs/error_codes.md`). Every Safe on the Capxul rail is this version.
370
+ */
371
+ const SAFE_REVERT_REASONS = {
372
+ GS000: "could not finish initialization",
373
+ GS001: "threshold needs to be defined",
374
+ GS010: "not enough gas to execute Safe transaction",
375
+ GS011: "could not pay gas costs with ether",
376
+ GS012: "could not pay gas costs with token",
377
+ GS013: "Safe transaction failed when gasPrice and safeTxGas were 0",
378
+ GS020: "signatures data too short",
379
+ GS021: "invalid contract signature location: inside static part",
380
+ GS022: "invalid contract signature location: length not present",
381
+ GS023: "invalid contract signature location: data not complete",
382
+ GS024: "invalid contract signature provided",
383
+ GS025: "hash has not been approved",
384
+ GS026: "invalid owner provided",
385
+ GS030: "only owners can approve a hash",
386
+ GS031: "method can only be called from this contract",
387
+ GS100: "modules have already been initialized",
388
+ GS101: "invalid module address provided",
389
+ GS102: "module has already been added",
390
+ GS103: "invalid prevModule, module pair provided",
391
+ GS104: "method can only be called from an enabled module",
392
+ GS105: "invalid starting point for fetching paginated modules",
393
+ GS106: "invalid page size for fetching paginated modules",
394
+ GS200: "owners have already been set up",
395
+ GS201: "threshold cannot exceed owner count",
396
+ GS202: "threshold needs to be greater than 0",
397
+ GS203: "invalid owner address provided",
398
+ GS204: "address is already an owner",
399
+ GS205: "invalid prevOwner, owner pair provided",
400
+ GS300: "guard does not implement IERC165",
401
+ GS400: "fallback handler cannot be set to self"
402
+ };
403
+ /**
404
+ * `Error(GS205: invalid prevOwner, owner pair provided)`, or the bare selector
405
+ * when the name is unknown. Safe codes travel only as the `message` of an
406
+ * `Error(string)` revert, so only that argument is expanded from
407
+ * {@link SAFE_REVERT_REASONS}; every other argument reads `name=value`, even
408
+ * when a custom error's field happens to hold a `GS` string.
409
+ */
410
+ function revertSummaryText(revert) {
411
+ if (revert.name === null) return revert.selector === "0x" ? "empty revert" : `unknown selector ${revert.selector}`;
412
+ const args = Object.entries(revert.args).map(([name, value]) => {
413
+ const reason = revert.name === "Error" && name === "message" ? SAFE_REVERT_REASONS[value] : void 0;
414
+ return reason === void 0 ? `${name}=${value}` : `${value}: ${reason}`;
415
+ }).join(", ");
416
+ return `${revert.name}(${args})`;
417
+ }
418
+ /**
419
+ * The cause in one line for an issue description: the decoded revert first,
420
+ * because the provider's own message masks the raw revert data (`reason:
421
+ * [REDACTED]`), then the provider's words. `undefined` when the cause carries
422
+ * neither, so the caller falls back to the error message.
423
+ */
424
+ function chainCauseSummary(chain) {
425
+ const revert = chain.revert === void 0 ? void 0 : revertSummaryText(chain.revert);
426
+ if (revert === void 0) return chain.providerMessage;
427
+ return chain.providerMessage === void 0 ? revert : `${revert}; ${chain.providerMessage}`;
428
+ }
429
+ /**
367
430
  * The error-tracking fingerprint for a failure: the code, the one-word cause,
368
431
  * and the operation. PostHog groups `$exception` rows by this value, so one
369
432
  * issue is one cause at one operation instead of every provider failure in
@@ -381,6 +444,7 @@ const CAPXUL_ERROR_CODES = [
381
444
  "SMART_ACCOUNT_MISSING",
382
445
  "PLAYER_NOT_FOUND",
383
446
  "ACCOUNT_NOT_FOUND",
447
+ "ACCOUNT_CLAIMED_BY_OTHER_SIGNER",
384
448
  "PROVIDER_ERROR",
385
449
  "CAPABILITY_UNAVAILABLE",
386
450
  "INVALID_INPUT",
@@ -411,7 +475,7 @@ const CAPXUL_ERROR_CODES = [
411
475
  * code rename forces this set to move with it) stops the two sides of the wire
412
476
  * from drifting and silently splitting one outcome across two streams.
413
477
  */
414
- const EXPECTED_OPERATION_OUTCOMES = new Set([
478
+ const EXPECTED_OPERATION_OUTCOMES = /* @__PURE__ */ new Set([
415
479
  "INVALID_INPUT",
416
480
  "NOT_AUTHENTICATED",
417
481
  "SMART_ACCOUNT_MISSING",
@@ -480,6 +544,14 @@ const Errors = {
480
544
  smartAccountMissing: (authUserId) => new CapxulError("SMART_ACCOUNT_MISSING", "Smart account not provisioned", { details: { authUserId } }),
481
545
  playerNotFound: (playerId) => new CapxulError("PLAYER_NOT_FOUND", playerId ? `Openfort player ${playerId} not found` : "Openfort player not found", playerId === void 0 ? void 0 : { details: { playerId } }),
482
546
  accountNotFound: (accountId) => new CapxulError("ACCOUNT_NOT_FOUND", accountId ? `Openfort account ${accountId} not found` : "Openfort account not found", accountId === void 0 ? void 0 : { details: { accountId } }),
547
+ /**
548
+ * The Safe at this email's address is deployed and its owner is neither the
549
+ * Capxul bootstrap owner nor the caller's signer. The claim
550
+ * `swapOwner(bootstrap → signer)` cannot succeed: only the on-chain owner
551
+ * can hand the account over. Read from `getOwners()` before any
552
+ * UserOperation is built (2026-09-02), so no simulation and no retry.
553
+ */
554
+ accountClaimedByOtherSigner: (details) => new CapxulError("ACCOUNT_CLAIMED_BY_OTHER_SIGNER", "This account is already owned by a different signer.", { details }),
483
555
  providerError: (provider, operation, cause, opts) => {
484
556
  const details = {
485
557
  ...opts?.details,
@@ -812,22 +884,24 @@ function buildCapxulSafeInitializer(owner) {
812
884
  functionName: "enableModules",
813
885
  args: [[SAFE_4337_MODULE]]
814
886
  });
887
+ const enableModulesByteLen = BigInt((enableModulesCall.length - 2) / 2);
888
+ const multiSendPayload = encodePacked([
889
+ "uint8",
890
+ "address",
891
+ "uint256",
892
+ "uint256",
893
+ "bytes"
894
+ ], [
895
+ 1,
896
+ SAFE_MODULE_SETUP,
897
+ 0n,
898
+ enableModulesByteLen,
899
+ enableModulesCall
900
+ ]);
815
901
  const setupData = encodeFunctionData({
816
902
  abi: multiSendAbi$2,
817
903
  functionName: "multiSend",
818
- args: [encodePacked([
819
- "uint8",
820
- "address",
821
- "uint256",
822
- "uint256",
823
- "bytes"
824
- ], [
825
- 1,
826
- SAFE_MODULE_SETUP,
827
- 0n,
828
- BigInt((enableModulesCall.length - 2) / 2),
829
- enableModulesCall
830
- ])]
904
+ args: [multiSendPayload]
831
905
  });
832
906
  return encodeFunctionData({
833
907
  abi: safeSetupAbi$1,
@@ -897,11 +971,13 @@ function deriveCapxulSafeAddressForOwner(input) {
897
971
  email: input.email,
898
972
  namespace: input.namespace
899
973
  });
974
+ const salt = keccak256(encodePacked(["bytes32", "uint256"], [keccak256(initializer), saltNonce]));
975
+ const deploymentCode = concat([SAFE_PROXY_CREATION_CODE, encodeAbiParameters([{ type: "uint256" }], [BigInt(SAFE_L2_SINGLETON)])]);
900
976
  return getContractAddress({
901
977
  opcode: "CREATE2",
902
978
  from: SAFE_PROXY_FACTORY,
903
- salt: keccak256(encodePacked(["bytes32", "uint256"], [keccak256(initializer), saltNonce])),
904
- bytecodeHash: keccak256(concat([SAFE_PROXY_CREATION_CODE, encodeAbiParameters([{ type: "uint256" }], [BigInt(SAFE_L2_SINGLETON)])]))
979
+ salt,
980
+ bytecodeHash: keccak256(deploymentCode)
905
981
  }).toLowerCase();
906
982
  }
907
983
  /** Canonical ERC-4337 EntryPoint v0.7 address (same on every chain). */
@@ -1852,22 +1928,24 @@ function buildCapxulOrgInitializer(input) {
1852
1928
  functionName: "enableModules",
1853
1929
  args: [[SAFE_4337_MODULE]]
1854
1930
  });
1931
+ const enableModulesByteLen = BigInt((enableModulesCall.length - 2) / 2);
1932
+ const multiSendPayload = encodePacked([
1933
+ "uint8",
1934
+ "address",
1935
+ "uint256",
1936
+ "uint256",
1937
+ "bytes"
1938
+ ], [
1939
+ 1,
1940
+ SAFE_MODULE_SETUP,
1941
+ 0n,
1942
+ enableModulesByteLen,
1943
+ enableModulesCall
1944
+ ]);
1855
1945
  const setupData = encodeFunctionData({
1856
1946
  abi: multiSendAbi$1,
1857
1947
  functionName: "multiSend",
1858
- args: [encodePacked([
1859
- "uint8",
1860
- "address",
1861
- "uint256",
1862
- "uint256",
1863
- "bytes"
1864
- ], [
1865
- 1,
1866
- SAFE_MODULE_SETUP,
1867
- 0n,
1868
- BigInt((enableModulesCall.length - 2) / 2),
1869
- enableModulesCall
1870
- ])]
1948
+ args: [multiSendPayload]
1871
1949
  });
1872
1950
  return encodeFunctionData({
1873
1951
  abi: safeSetupAbi,
@@ -1891,11 +1969,13 @@ function deriveCapxulOrgAddress(input) {
1891
1969
  email: input.email,
1892
1970
  orgHandle
1893
1971
  });
1972
+ const salt = keccak256(encodePacked(["bytes32", "uint256"], [keccak256(initializer), saltNonce]));
1973
+ const deploymentCode = concat([SAFE_PROXY_CREATION_CODE, encodeAbiParameters([{ type: "uint256" }], [BigInt(SAFE_L2_SINGLETON)])]);
1894
1974
  return getContractAddress({
1895
1975
  opcode: "CREATE2",
1896
1976
  from: SAFE_PROXY_FACTORY,
1897
- salt: keccak256(encodePacked(["bytes32", "uint256"], [keccak256(initializer), saltNonce])),
1898
- bytecodeHash: keccak256(concat([SAFE_PROXY_CREATION_CODE, encodeAbiParameters([{ type: "uint256" }], [BigInt(SAFE_L2_SINGLETON)])]))
1977
+ salt,
1978
+ bytecodeHash: keccak256(deploymentCode)
1899
1979
  }).toLowerCase();
1900
1980
  }
1901
1981
  10n ** BigInt(6);
@@ -5511,7 +5591,7 @@ function parseCliArgs(argv, env = process.env) {
5511
5591
  let portRaw = env.CAPXUL_MCP_PORT ?? "8788";
5512
5592
  let approvalBaseUrl = env.CAPXUL_MCP_APPROVAL_URL ?? "http://localhost:5998";
5513
5593
  let stdio = false;
5514
- const valueFlags = new Map([
5594
+ const valueFlags = /* @__PURE__ */ new Map([
5515
5595
  ["--mode", (value) => {
5516
5596
  const parsed = parseMode(value);
5517
5597
  if (parsed.kind === "error") return parsed;
@@ -5718,7 +5798,7 @@ function validateDevConvexUrl(input) {
5718
5798
  }
5719
5799
  //#endregion
5720
5800
  //#region src/pending-auth.ts
5721
- const PENDING_TTL_MS = 10 * 6e4;
5801
+ const PENDING_TTL_MS = 6e5;
5722
5802
  function cacheKey(email) {
5723
5803
  return email.trim().toLowerCase();
5724
5804
  }
@@ -5770,11 +5850,27 @@ var PendingAuthStore = class {
5770
5850
  //#region ../../packages/sdk/src/domain/identity/model.ts
5771
5851
  const WRONG = { refused: "WRONG_STATE" };
5772
5852
  /** org-lifecycle.ts:173-184, lifted verbatim. */
5853
+ /**
5854
+ * Causes that do not change on a retry: the same request reverts, is refused,
5855
+ * or fails the same pre-flight again. A retry re-enters the same lane and
5856
+ * fails the same way (the GS205 loop of 2026-09-02).
5857
+ */
5858
+ const DEFINITIVE_PROVIDER_MODES = /* @__PURE__ */ new Set([
5859
+ "auth-origin-mismatch",
5860
+ "app-env-allowlist",
5861
+ "no-secure-context",
5862
+ "revert",
5863
+ "insufficient-balance",
5864
+ "insufficient-allowance",
5865
+ "rejected",
5866
+ "unauthorized"
5867
+ ]);
5773
5868
  const isRetryable = (failure) => {
5774
5869
  if (failure.code === "CANCELLED" || failure.code === "SIGNER_REJECTED") return true;
5775
5870
  if (failure.code === "PROVIDER_ERROR") {
5776
- const mode = failure.mode;
5777
- return mode !== "auth-origin-mismatch" && mode !== "app-env-allowlist" && mode !== "no-secure-context";
5871
+ const chainRetryable = failure.error?.chain?.retryable;
5872
+ if (chainRetryable !== void 0) return chainRetryable;
5873
+ return !DEFINITIVE_PROVIDER_MODES.has(failure.mode);
5778
5874
  }
5779
5875
  return failure.code === "NETWORK_ERROR" || failure.code === "UNKNOWN";
5780
5876
  };
@@ -6406,10 +6502,11 @@ const boot = (spec, options = {}) => Effect.gen(function* () {
6406
6502
  const outcome = spec.transition(state, event);
6407
6503
  if ("refused" in outcome) return Effect.succeed(state);
6408
6504
  return Ref.set(cell, outcome.next).pipe(Effect.tap(() => {
6409
- return emit(applied(state, outcome.next, event, cursor.slot, cursor.epoch, {
6505
+ const record = applied(state, outcome.next, event, cursor.slot, cursor.epoch, {
6410
6506
  invocation: cursor.invocation,
6411
6507
  startedAt: cursor.startedAt
6412
- })).pipe(Effect.andThen(Effect.sync(() => {
6508
+ });
6509
+ return emit(record).pipe(Effect.andThen(Effect.sync(() => {
6413
6510
  notify(outcome.next);
6414
6511
  })));
6415
6512
  }), Effect.as(outcome.next));
@@ -7068,7 +7165,7 @@ function stringifyValueForError(value) {
7068
7165
  });
7069
7166
  if (str.length > MAX_VALUE_FOR_ERROR_LEN) {
7070
7167
  const rest = "[...truncated]";
7071
- let truncateAt = MAX_VALUE_FOR_ERROR_LEN - 14;
7168
+ let truncateAt = 16370;
7072
7169
  const codePoint = str.codePointAt(truncateAt - 1);
7073
7170
  if (codePoint !== void 0 && codePoint > 65535) truncateAt -= 1;
7074
7171
  return str.substring(0, truncateAt) + rest;
@@ -7085,11 +7182,13 @@ function convexToJsonInternal(value, originalValue, context, includeTopLevelUnde
7085
7182
  if (value < MIN_INT64 || MAX_INT64 < value) throw new Error(`BigInt ${value} does not fit into a 64-bit signed integer.`);
7086
7183
  return { $integer: bigIntToBase64(value) };
7087
7184
  }
7088
- if (typeof value === "number") if (isSpecial(value)) {
7089
- const buffer = /* @__PURE__ */ new ArrayBuffer(8);
7090
- new DataView(buffer).setFloat64(0, value, LITTLE_ENDIAN);
7091
- return { $float: fromByteArray(new Uint8Array(buffer)) };
7092
- } else return value;
7185
+ if (typeof value === "number") {
7186
+ if (isSpecial(value)) {
7187
+ const buffer = /* @__PURE__ */ new ArrayBuffer(8);
7188
+ new DataView(buffer).setFloat64(0, value, LITTLE_ENDIAN);
7189
+ return { $float: fromByteArray(new Uint8Array(buffer)) };
7190
+ } else return value;
7191
+ }
7093
7192
  if (typeof value === "boolean") return value;
7094
7193
  if (typeof value === "string") return value;
7095
7194
  if (value instanceof ArrayBuffer) return { $bytes: fromByteArray(new Uint8Array(value)) };
@@ -7828,7 +7927,8 @@ var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key
7828
7927
  value
7829
7928
  }) : obj[key] = value;
7830
7929
  var __publicField$11 = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
7831
- var _a, _b;
7930
+ var _a;
7931
+ var _b;
7832
7932
  const IDENTIFYING_FIELD = Symbol.for("ConvexError");
7833
7933
  var ConvexError = class extends (_b = Error, _a = IDENTIFYING_FIELD, _b) {
7834
7934
  constructor(data) {
@@ -7856,9 +7956,10 @@ function isFunctionHandle(s) {
7856
7956
  }
7857
7957
  function getFunctionAddress(functionReference) {
7858
7958
  let functionAddress;
7859
- if (typeof functionReference === "string") if (isFunctionHandle(functionReference)) functionAddress = { functionHandle: functionReference };
7860
- else functionAddress = { name: functionReference };
7861
- else if (functionReference[functionName]) functionAddress = { name: functionReference[functionName] };
7959
+ if (typeof functionReference === "string") {
7960
+ if (isFunctionHandle(functionReference)) functionAddress = { functionHandle: functionReference };
7961
+ else functionAddress = { name: functionReference };
7962
+ } else if (functionReference[functionName]) functionAddress = { name: functionReference[functionName] };
7862
7963
  else {
7863
7964
  const referencePath = extractReferencePath(functionReference);
7864
7965
  if (!referencePath) throw new Error(`${functionReference} is not a functionReference`);
@@ -8541,7 +8642,7 @@ const moneyExecutionContract = {
8541
8642
  };
8542
8643
  //#endregion
8543
8644
  //#region ../../packages/sdk/package.json
8544
- var version = "2.6.1";
8645
+ var version = "2.8.0";
8545
8646
  //#endregion
8546
8647
  //#region ../../packages/sdk/src/telemetry/capture-exception.ts
8547
8648
  /** Fixed, leak-safe message — the raw error message may carry PII and never ships. */
@@ -8820,12 +8921,13 @@ function sanitizeChainDetail(source, detail) {
8820
8921
  for (const key of [
8821
8922
  "chain_upstream",
8822
8923
  "chain_method",
8823
- "chain_revert_name",
8824
- "chain_revert_selector"
8924
+ "chain_revert_name"
8825
8925
  ]) {
8826
8926
  const value = source[key];
8827
8927
  if (typeof value === "string" && ENUMERATED_DETAIL_RE.test(value)) detail[key] = value;
8828
8928
  }
8929
+ const selector = source.chain_revert_selector;
8930
+ if (typeof selector === "string" && REVERT_SELECTOR_RE.test(selector)) detail.chain_revert_selector = selector;
8829
8931
  if (typeof source.chain_retryable === "boolean") detail.chain_retryable = source.chain_retryable;
8830
8932
  const chainHttpStatus = source.chain_http_status;
8831
8933
  if (typeof chainHttpStatus === "number" && Number.isInteger(chainHttpStatus) && chainHttpStatus >= 100 && chainHttpStatus <= 599) detail.chain_http_status = chainHttpStatus;
@@ -8851,6 +8953,8 @@ function sanitizeFailureDetail(input) {
8851
8953
  }
8852
8954
  /** Enumerated codes only (`convex`, `no-secure-context`, `bootstrap-encode`); free text fails. */
8853
8955
  const ENUMERATED_DETAIL_RE = /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/u;
8956
+ /** A four-byte revert selector, or the bare `0x` of an empty revert. */
8957
+ const REVERT_SELECTOR_RE = /^0x(?:[0-9a-fA-F]{8})?$/u;
8854
8958
  function normalizeOperation$1(value) {
8855
8959
  return typeof value === "string" && /^[A-Za-z0-9_][A-Za-z0-9_.-]{0,255}$/u.test(value) ? value : "unknown";
8856
8960
  }
@@ -9160,7 +9264,7 @@ const paymentAttemptReleases = /* @__PURE__ */ new Set();
9160
9264
  let paymentAttemptPagehideInstalled = false;
9161
9265
  function randomPaymentRequestKey() {
9162
9266
  try {
9163
- return `pay_${Array.from(crypto.getRandomValues(new Uint8Array(16)), (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
9267
+ return `pay_${Array.from(crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16)), (byte) => byte.toString(16).padStart(2, "0")).join("")}`;
9164
9268
  } catch (cause) {
9165
9269
  throw Errors.providerError("sdk", "paymentRequestKey", cause);
9166
9270
  }
@@ -9366,7 +9470,8 @@ function makeFinancialOpsMethods(deps) {
9366
9470
  };
9367
9471
  let requestKey;
9368
9472
  try {
9369
- requestKey = await paymentRequestKeyLifecycle(`personal-pay:${requestKeyScope}:${deps.actor.authSession()?.authUserId ?? "signed-out"}`, input, input.requestKey);
9473
+ const actorId = deps.actor.authSession()?.authUserId ?? "signed-out";
9474
+ requestKey = await paymentRequestKeyLifecycle(`personal-pay:${requestKeyScope}:${actorId}`, input, input.requestKey);
9370
9475
  } catch (cause) {
9371
9476
  return {
9372
9477
  ok: false,
@@ -10146,7 +10251,7 @@ const postHogOtlpEndpoints = (host) => {
10146
10251
  };
10147
10252
  };
10148
10253
  const ENGINEERING_CAPXUL_ENV_SET = new Set(ENGINEERING_CAPXUL_ENVS);
10149
- const ENGINEERING_PRODUCERS = new Set(["browser", "server"]);
10254
+ const ENGINEERING_PRODUCERS = /* @__PURE__ */ new Set(["browser", "server"]);
10150
10255
  const PUBLIC_POSTHOG_AUTHORIZATION = /^Bearer phc_[A-Za-z0-9_-]{1,191}$/u;
10151
10256
  const SAFE_RESOURCE_VALUE = /^[A-Za-z0-9][A-Za-z0-9._+@/-]{0,127}$/u;
10152
10257
  const validateEngineeringTelemetryConfig = (config) => {
@@ -10303,7 +10408,7 @@ function authSessionFromBetterAuth$1(token, user) {
10303
10408
  authUserId: toAuthUserId(user.id),
10304
10409
  email: toEmail(user.email),
10305
10410
  token: toSessionToken(token),
10306
- expiresAt: toEpochMs(Date.now() + 10080 * 60 * 1e3)
10411
+ expiresAt: toEpochMs(Date.now() + 6048e5)
10307
10412
  };
10308
10413
  }
10309
10414
  async function safeJson$1(res) {
@@ -10694,7 +10799,7 @@ function authSessionFromBetterAuth(token, user) {
10694
10799
  authUserId: toAuthUserId(user.id),
10695
10800
  email: toEmail(user.email),
10696
10801
  token: toSessionToken(token),
10697
- expiresAt: toEpochMs(Date.now() + 10080 * 60 * 1e3)
10802
+ expiresAt: toEpochMs(Date.now() + 6048e5)
10698
10803
  };
10699
10804
  }
10700
10805
  async function safeJson(res) {
@@ -11021,7 +11126,7 @@ const DEFAULT_RETRY = {
11021
11126
  baseDelayMs: 400
11022
11127
  };
11023
11128
  /** Request-side statuses a proxy or backend returns while momentarily unable to serve. */
11024
- const TRANSIENT_HTTP_STATUSES = new Set([
11129
+ const TRANSIENT_HTTP_STATUSES = /* @__PURE__ */ new Set([
11025
11130
  408,
11026
11131
  425,
11027
11132
  429
@@ -11559,9 +11664,10 @@ var LocalSyncState = class {
11559
11664
  type: "Remove",
11560
11665
  queryId: localQuery.id
11561
11666
  };
11562
- if (this.paused) if (this.pendingQuerySetModifications.has(localQuery.id)) this.pendingQuerySetModifications.delete(localQuery.id);
11563
- else this.pendingQuerySetModifications.set(localQuery.id, remove);
11564
- else this.querySetVersion = newVersion;
11667
+ if (this.paused) {
11668
+ if (this.pendingQuerySetModifications.has(localQuery.id)) this.pendingQuerySetModifications.delete(localQuery.id);
11669
+ else this.pendingQuerySetModifications.set(localQuery.id, remove);
11670
+ } else this.querySetVersion = newVersion;
11565
11671
  return {
11566
11672
  type: "ModifyQuerySet",
11567
11673
  baseVersion,
@@ -12053,7 +12159,6 @@ function parseServerMessage(encoded) {
12053
12159
  ts: u64ToLong(encoded.endVersion.ts)
12054
12160
  }
12055
12161
  };
12056
- default:
12057
12162
  }
12058
12163
  }
12059
12164
  function encodeClientMessage(message) {
@@ -12071,7 +12176,6 @@ function encodeClientMessage(message) {
12071
12176
  ...message,
12072
12177
  maxObservedTimestamp: void 0
12073
12178
  };
12074
- default:
12075
12179
  }
12076
12180
  }
12077
12181
  //#endregion
@@ -12242,8 +12346,10 @@ var WebSocketManager = class {
12242
12346
  clientTs: monotonicMillis()
12243
12347
  });
12244
12348
  }
12245
- if (this.lastCloseReason !== "InitialConnect") if (this.lastCloseReason) this.logger.log("WebSocket reconnected at", prettyNow(), "after disconnect due to", this.lastCloseReason);
12246
- else this.logger.log("WebSocket reconnected at", prettyNow());
12349
+ if (this.lastCloseReason !== "InitialConnect") {
12350
+ if (this.lastCloseReason) this.logger.log("WebSocket reconnected at", prettyNow(), "after disconnect due to", this.lastCloseReason);
12351
+ else this.logger.log("WebSocket reconnected at", prettyNow());
12352
+ }
12247
12353
  this.connectionCount += 1;
12248
12354
  this.lastCloseReason = null;
12249
12355
  if (this.pendingNetworkRecoveryInfo !== null) {
@@ -12678,7 +12784,7 @@ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key,
12678
12784
  value
12679
12785
  }) : obj[key] = value;
12680
12786
  var __publicField$3 = (obj, key, value) => __defNormalProp$3(obj, typeof key !== "symbol" ? key + "" : key, value);
12681
- const MAXIMUM_REFRESH_DELAY = 480 * 60 * 60 * 1e3;
12787
+ const MAXIMUM_REFRESH_DELAY = 1728e6;
12682
12788
  const MAX_TOKEN_CONFIRMATION_ATTEMPTS = 2;
12683
12789
  var AuthenticationManager = class {
12684
12790
  constructor(syncState, callbacks, config) {
@@ -12798,19 +12904,20 @@ var AuthenticationManager = class {
12798
12904
  this._logVerbose("refetching auth token");
12799
12905
  const token = await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken, { forceRefreshToken: true });
12800
12906
  if (token.isFromOutdatedConfig) return;
12801
- if (token.value) if (this.syncState.isNewAuth(token.value)) {
12802
- this.setAuthState({
12803
- state: "waitingForServerConfirmationOfFreshToken",
12804
- hadAuth: this.syncState.hasAuth(),
12805
- token: token.value,
12907
+ if (token.value) {
12908
+ if (this.syncState.isNewAuth(token.value)) {
12909
+ this.setAuthState({
12910
+ state: "waitingForServerConfirmationOfFreshToken",
12911
+ hadAuth: this.syncState.hasAuth(),
12912
+ token: token.value,
12913
+ config: this.authState.config
12914
+ });
12915
+ this.authenticate(token.value);
12916
+ } else this.setAuthState({
12917
+ state: "notRefetching",
12806
12918
  config: this.authState.config
12807
12919
  });
12808
- this.authenticate(token.value);
12809
- } else this.setAuthState({
12810
- state: "notRefetching",
12811
- config: this.authState.config
12812
- });
12813
- else {
12920
+ } else {
12814
12921
  this._logVerbose("refetching token failed");
12815
12922
  if (this.syncState.hasAuth()) this.clearAuth();
12816
12923
  this.setAndReportAuthFailed(this.authState.config.onAuthChange);
@@ -12886,13 +12993,7 @@ var AuthenticationManager = class {
12886
12993
  switch (newAuth.state) {
12887
12994
  case "waitingForScheduledRefetch":
12888
12995
  case "notRefetching":
12889
- case "noAuth":
12890
- this.tokenConfirmationAttempts = 0;
12891
- break;
12892
- case "waitingForServerConfirmationOfFreshToken":
12893
- case "waitingForServerConfirmationOfCachedToken":
12894
- case "initialRefetch": break;
12895
- default:
12996
+ case "noAuth": this.tokenConfirmationAttempts = 0;
12896
12997
  }
12897
12998
  if (this.authState.state === "waitingForScheduledRefetch") clearTimeout(this.authState.refetchTokenTimeoutId);
12898
12999
  this.authState = newAuth;
@@ -13106,7 +13207,6 @@ var BaseConvexClient = class {
13106
13207
  this.webSocketManager.terminate();
13107
13208
  throw error;
13108
13209
  }
13109
- default:
13110
13210
  }
13111
13211
  return { hasSyncedPastLastReconnect: this.hasSyncedPastLastReconnect() };
13112
13212
  },
@@ -13496,7 +13596,7 @@ var BaseConvexClient = class {
13496
13596
  tryReportLongDisconnect() {
13497
13597
  if (!this.debug) return;
13498
13598
  const timeOfOldestRequest = this.connectionState().timeOfOldestInflightRequest;
13499
- if (timeOfOldestRequest === null || Date.now() - timeOfOldestRequest.getTime() <= 60 * 1e3) return;
13599
+ if (timeOfOldestRequest === null || Date.now() - timeOfOldestRequest.getTime() <= 6e4) return;
13500
13600
  const endpoint = `${this.address}/api/debug_event`;
13501
13601
  fetch(endpoint, {
13502
13602
  method: "POST",
@@ -14122,7 +14222,7 @@ var ConvexCallPortTag = class extends Context.Service()("@capxul/sdk/ports/Conve
14122
14222
  //#endregion
14123
14223
  //#region ../../packages/sdk/src/adapters/convex-call/ConvexCallAdapter.ts
14124
14224
  /** Exact floor-first allowlist; every additional handler must migrate its validator first. */
14125
- const OBSERVED_CONVEX_ACTIONS = new Set([
14225
+ const OBSERVED_CONVEX_ACTIONS = /* @__PURE__ */ new Set([
14126
14226
  "smartAccount/actions:claim",
14127
14227
  "org/actions:prepareFounderAccount",
14128
14228
  "org/actions:prepareBootstrap",
@@ -14130,12 +14230,12 @@ const OBSERVED_CONVEX_ACTIONS = new Set([
14130
14230
  "org/actions:resumeBootstrapSubmission",
14131
14231
  "org/actions:confirmBootstrap"
14132
14232
  ]);
14133
- const OBSERVED_CONVEX_QUERIES = new Set([
14233
+ const OBSERVED_CONVEX_QUERIES = /* @__PURE__ */ new Set([
14134
14234
  "identity/queries:loadByAuthUserId",
14135
14235
  "smartAccount/queries:loadByAuthUserId",
14136
14236
  "org/lifecycle:load"
14137
14237
  ]);
14138
- const OBSERVED_CONVEX_MUTATIONS = new Set([
14238
+ const OBSERVED_CONVEX_MUTATIONS = /* @__PURE__ */ new Set([
14139
14239
  "identity/mutations:create",
14140
14240
  "identity/mutations:update",
14141
14241
  "identity/mutations:completeOnboarding",
@@ -14259,7 +14359,7 @@ function mapToCapxulError(operation, err) {
14259
14359
  function mapToConvexCallError(operation, err) {
14260
14360
  return convexCallErrorFromCapxul(operation, mapToCapxulError(operation, err));
14261
14361
  }
14262
- const TRANSPORT_ERROR_CODES = new Set([
14362
+ const TRANSPORT_ERROR_CODES = /* @__PURE__ */ new Set([
14263
14363
  "EAI_AGAIN",
14264
14364
  "ECONNREFUSED",
14265
14365
  "ECONNRESET",
@@ -15736,7 +15836,7 @@ const SHA256_K = [
15736
15836
  function sha256Hex(input) {
15737
15837
  const padded = padSha256Message(new TextEncoder().encode(input));
15738
15838
  const view = new DataView(padded.buffer, padded.byteOffset, padded.byteLength);
15739
- const words = new Uint32Array(64);
15839
+ const words = /* @__PURE__ */ new Uint32Array(64);
15740
15840
  let h0 = SHA256_INITIAL_HASH[0];
15741
15841
  let h1 = SHA256_INITIAL_HASH[1];
15742
15842
  let h2 = SHA256_INITIAL_HASH[2];
@@ -16685,9 +16785,10 @@ var parseHeaders_default = (rawHeaders) => {
16685
16785
  key = line.substring(0, i).trim().toLowerCase();
16686
16786
  val = line.substring(i + 1).trim();
16687
16787
  if (!key || parsed[key] && ignoreDuplicateOf[key]) return;
16688
- if (key === "set-cookie") if (parsed[key]) parsed[key].push(val);
16689
- else parsed[key] = [val];
16690
- else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
16788
+ if (key === "set-cookie") {
16789
+ if (parsed[key]) parsed[key].push(val);
16790
+ else parsed[key] = [val];
16791
+ } else parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
16691
16792
  });
16692
16793
  return parsed;
16693
16794
  };
@@ -17050,7 +17151,7 @@ var require_delayed_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =>
17050
17151
  function DelayedStream() {
17051
17152
  this.source = null;
17052
17153
  this.dataSize = 0;
17053
- this.maxDataSize = 1024 * 1024;
17154
+ this.maxDataSize = 1048576;
17054
17155
  this.pauseStream = true;
17055
17156
  this._maxDataSizeExceeded = false;
17056
17157
  this._released = false;
@@ -17130,7 +17231,7 @@ var require_combined_stream = /* @__PURE__ */ __commonJSMin(((exports, module) =
17130
17231
  this.writable = false;
17131
17232
  this.readable = true;
17132
17233
  this.dataSize = 0;
17133
- this.maxDataSize = 2 * 1024 * 1024;
17234
+ this.maxDataSize = 2097152;
17134
17235
  this.pauseStreams = true;
17135
17236
  this._released = false;
17136
17237
  this._streams = [];
@@ -24511,7 +24612,8 @@ var require_abort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24511
24612
  //#endregion
24512
24613
  //#region ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/iterate.js
24513
24614
  var require_iterate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24514
- var async = require_async(), abort = require_abort();
24615
+ var async = require_async();
24616
+ var abort = require_abort();
24515
24617
  module.exports = iterate;
24516
24618
  /**
24517
24619
  * Iterates over each job object
@@ -24577,7 +24679,8 @@ var require_state = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24577
24679
  //#endregion
24578
24680
  //#region ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/lib/terminator.js
24579
24681
  var require_terminator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24580
- var abort = require_abort(), async = require_async();
24682
+ var abort = require_abort();
24683
+ var async = require_async();
24581
24684
  module.exports = terminator;
24582
24685
  /**
24583
24686
  * Terminates jobs in the attached state context
@@ -24595,7 +24698,9 @@ var require_terminator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24595
24698
  //#endregion
24596
24699
  //#region ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/parallel.js
24597
24700
  var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24598
- var iterate = require_iterate(), initState = require_state(), terminator = require_terminator();
24701
+ var iterate = require_iterate();
24702
+ var initState = require_state();
24703
+ var terminator = require_terminator();
24599
24704
  module.exports = parallel;
24600
24705
  /**
24601
24706
  * Runs iterator over provided array elements in parallel
@@ -24626,7 +24731,9 @@ var require_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24626
24731
  //#endregion
24627
24732
  //#region ../../node_modules/.pnpm/asynckit@0.4.0/node_modules/asynckit/serialOrdered.js
24628
24733
  var require_serialOrdered = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24629
- var iterate = require_iterate(), initState = require_state(), terminator = require_terminator();
24734
+ var iterate = require_iterate();
24735
+ var initState = require_state();
24736
+ var terminator = require_terminator();
24630
24737
  module.exports = serialOrdered;
24631
24738
  module.exports.ascending = ascending;
24632
24739
  module.exports.descending = descending;
@@ -25378,13 +25485,15 @@ var require_es_set_tostringtag = /* @__PURE__ */ __commonJSMin(((exports, module
25378
25485
  var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
25379
25486
  var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
25380
25487
  if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") throw new $TypeError("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
25381
- if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) if ($defineProperty) $defineProperty(object, toStringTag, {
25382
- configurable: !nonConfigurable,
25383
- enumerable: false,
25384
- value,
25385
- writable: false
25386
- });
25387
- else object[toStringTag] = value;
25488
+ if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
25489
+ if ($defineProperty) $defineProperty(object, toStringTag, {
25490
+ configurable: !nonConfigurable,
25491
+ enumerable: false,
25492
+ value,
25493
+ writable: false
25494
+ });
25495
+ else object[toStringTag] = value;
25496
+ }
25388
25497
  };
25389
25498
  }));
25390
25499
  //#endregion
@@ -25459,15 +25568,16 @@ var FormData_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
25459
25568
  if (!options.knownLength) this._valuesToMeasure.push(value);
25460
25569
  };
25461
25570
  FormData.prototype._lengthRetriever = function(value, callback) {
25462
- if (hasOwn(value, "fd")) if (value.end != void 0 && value.end != Infinity && value.start != void 0) callback(null, value.end + 1 - (value.start ? value.start : 0));
25463
- else fs.stat(value.path, function(err, stat) {
25464
- if (err) {
25465
- callback(err);
25466
- return;
25467
- }
25468
- callback(null, stat.size - (value.start ? value.start : 0));
25469
- });
25470
- else if (hasOwn(value, "httpVersion")) callback(null, Number(value.headers["content-length"]));
25571
+ if (hasOwn(value, "fd")) {
25572
+ if (value.end != void 0 && value.end != Infinity && value.start != void 0) callback(null, value.end + 1 - (value.start ? value.start : 0));
25573
+ else fs.stat(value.path, function(err, stat) {
25574
+ if (err) {
25575
+ callback(err);
25576
+ return;
25577
+ }
25578
+ callback(null, stat.size - (value.start ? value.start : 0));
25579
+ });
25580
+ } else if (hasOwn(value, "httpVersion")) callback(null, Number(value.headers["content-length"]));
25471
25581
  else if (hasOwn(value, "httpModule")) {
25472
25582
  value.on("response", function(response) {
25473
25583
  value.pause();
@@ -26638,15 +26748,16 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26638
26748
  let templateIndex = 0;
26639
26749
  let starIndex = -1;
26640
26750
  let matchIndex = 0;
26641
- while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") {
26642
- starIndex = templateIndex;
26643
- matchIndex = searchIndex;
26644
- templateIndex++;
26645
- } else {
26646
- searchIndex++;
26647
- templateIndex++;
26648
- }
26649
- else if (starIndex !== -1) {
26751
+ while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
26752
+ if (template[templateIndex] === "*") {
26753
+ starIndex = templateIndex;
26754
+ matchIndex = searchIndex;
26755
+ templateIndex++;
26756
+ } else {
26757
+ searchIndex++;
26758
+ templateIndex++;
26759
+ }
26760
+ } else if (starIndex !== -1) {
26650
26761
  templateIndex = starIndex + 1;
26651
26762
  matchIndex++;
26652
26763
  searchIndex = matchIndex;
@@ -26916,9 +27027,11 @@ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) =>
26916
27027
  let forceColor;
26917
27028
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) forceColor = 0;
26918
27029
  else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) forceColor = 1;
26919
- if ("FORCE_COLOR" in env) if (env.FORCE_COLOR === "true") forceColor = 1;
26920
- else if (env.FORCE_COLOR === "false") forceColor = 0;
26921
- else forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
27030
+ if ("FORCE_COLOR" in env) {
27031
+ if (env.FORCE_COLOR === "true") forceColor = 1;
27032
+ else if (env.FORCE_COLOR === "false") forceColor = 0;
27033
+ else forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
27034
+ }
26922
27035
  function translateLevel(level) {
26923
27036
  if (level === 0) return false;
26924
27037
  return {
@@ -27330,16 +27443,19 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27330
27443
  req.onSocket(socket);
27331
27444
  return;
27332
27445
  }
27333
- onerror(/* @__PURE__ */ new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``));
27446
+ const err = /* @__PURE__ */ new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
27447
+ onerror(err);
27334
27448
  };
27335
27449
  if (typeof this.callback !== "function") {
27336
27450
  onerror(/* @__PURE__ */ new Error("`callback` is not defined"));
27337
27451
  return;
27338
27452
  }
27339
- if (!this.promisifiedCallback) if (this.callback.length >= 3) {
27340
- debug("Converting legacy callback function to promise");
27341
- this.promisifiedCallback = promisify_1.default(this.callback);
27342
- } else this.promisifiedCallback = this.callback;
27453
+ if (!this.promisifiedCallback) {
27454
+ if (this.callback.length >= 3) {
27455
+ debug("Converting legacy callback function to promise");
27456
+ this.promisifiedCallback = promisify_1.default(this.callback);
27457
+ } else this.promisifiedCallback = this.callback;
27458
+ }
27343
27459
  if (typeof timeoutMs === "number" && timeoutMs > 0) timeoutId = setTimeout(ontimeout, timeoutMs);
27344
27460
  if ("port" in opts && typeof opts.port !== "number") opts.port = Number(opts.port);
27345
27461
  try {
@@ -27899,7 +28015,7 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
27899
28015
  function wrap(protocols) {
27900
28016
  var exports$1 = {
27901
28017
  maxRedirects: 21,
27902
- maxBodyLength: 10 * 1024 * 1024
28018
+ maxBodyLength: 10485760
27903
28019
  };
27904
28020
  var nativeProtocols = {};
27905
28021
  Object.keys(protocols).forEach(function(scheme) {
@@ -28094,7 +28210,7 @@ var AxiosTransformStream = class extends stream.Transform {
28094
28210
  constructor(options) {
28095
28211
  options = utils_default.toFlatObject(options, {
28096
28212
  maxRate: 0,
28097
- chunkSize: 64 * 1024,
28213
+ chunkSize: 65536,
28098
28214
  minChunkSize: 100,
28099
28215
  timeWindow: 500,
28100
28216
  ticksRate: 2,
@@ -28349,7 +28465,7 @@ const callbackify = (fn, reducer) => {
28349
28465
  };
28350
28466
  //#endregion
28351
28467
  //#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/helpers/shouldBypassProxy.js
28352
- const LOOPBACK_HOSTNAMES = new Set(["localhost"]);
28468
+ const LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
28353
28469
  const isIPv4Loopback = (host) => {
28354
28470
  const parts = host.split(".");
28355
28471
  if (parts.length !== 4) return false;
@@ -28660,10 +28776,11 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
28660
28776
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
28661
28777
  let agent = cache.get(key);
28662
28778
  if (agent) return agent;
28663
- agent = new import_dist.default(userHttpsAgent && userHttpsAgent.options ? {
28779
+ const merged = userHttpsAgent && userHttpsAgent.options ? {
28664
28780
  ...userHttpsAgent.options,
28665
28781
  ...agentOptions
28666
- } : agentOptions);
28782
+ } : agentOptions;
28783
+ agent = new import_dist.default(merged);
28667
28784
  if (userHttpsAgent && userHttpsAgent.options) {
28668
28785
  const originTLSOptions = { ...userHttpsAgent.options };
28669
28786
  const callback = agent.callback;
@@ -29108,12 +29225,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
29108
29225
  delete res.headers["content-encoding"];
29109
29226
  }
29110
29227
  break;
29111
- case "zstd":
29112
- if (isZstdSupported) {
29113
- streams.push(zlib.createZstdDecompress(zstdOptions));
29114
- delete res.headers["content-encoding"];
29115
- }
29116
- break;
29228
+ case "zstd": if (isZstdSupported) {
29229
+ streams.push(zlib.createZstdDecompress(zstdOptions));
29230
+ delete res.headers["content-encoding"];
29231
+ }
29117
29232
  }
29118
29233
  }
29119
29234
  responseStream = streams.length > 1 ? stream.pipeline(streams, utils_default.noop) : streams[0];
@@ -29192,7 +29307,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
29192
29307
  });
29193
29308
  const boundSockets = /* @__PURE__ */ new Set();
29194
29309
  req.on("socket", function handleRequestSocket(socket) {
29195
- socket.setKeepAlive(true, 1e3 * 60);
29310
+ socket.setKeepAlive(true, 6e4);
29196
29311
  if (!socket[kAxiosSocketListener]) {
29197
29312
  socket.on("error", function handleSocketError(err) {
29198
29313
  const current = socket[kAxiosCurrentReq];
@@ -29629,7 +29744,7 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
29629
29744
  };
29630
29745
  //#endregion
29631
29746
  //#region ../../node_modules/.pnpm/axios@1.17.0/node_modules/axios/lib/adapters/fetch.js
29632
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
29747
+ const DEFAULT_CHUNK_SIZE = 65536;
29633
29748
  const { isFunction } = utils_default;
29634
29749
  /**
29635
29750
  * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
@@ -30164,11 +30279,13 @@ var Axios$1 = class {
30164
30279
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
30165
30280
  advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
30166
30281
  }, false);
30167
- if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
30168
- else validator_default.assertOptions(paramsSerializer, {
30169
- encode: validators.function,
30170
- serialize: validators.function
30171
- }, true);
30282
+ if (paramsSerializer != null) {
30283
+ if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
30284
+ else validator_default.assertOptions(paramsSerializer, {
30285
+ encode: validators.function,
30286
+ serialize: validators.function
30287
+ }, true);
30288
+ }
30172
30289
  if (config.allowAbsoluteUrls !== void 0) {} else if (this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
30173
30290
  else config.allowAbsoluteUrls = true;
30174
30291
  validator_default.assertOptions(config, {
@@ -30524,7 +30641,7 @@ const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, C
30524
30641
  //#endregion
30525
30642
  //#region ../../node_modules/.pnpm/axios-retry@4.5.0_axios@1.17.0/node_modules/axios-retry/dist/esm/index.js
30526
30643
  var import_is_retry_allowed = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
30527
- const denyList = new Set([
30644
+ const denyList = /* @__PURE__ */ new Set([
30528
30645
  "ENOTFOUND",
30529
30646
  "ENETUNREACH",
30530
30647
  "UNABLE_TO_GET_ISSUER_CERT",
@@ -30721,9 +30838,11 @@ var a$13 = class extends Error {
30721
30838
  super(t), this.field = e, this.name = "RequiredError";
30722
30839
  }
30723
30840
  };
30724
- const i$8 = "https://example.com", o$16 = function(e, t, s) {
30841
+ const i$8 = "https://example.com";
30842
+ const o$16 = function(e, t, s) {
30725
30843
  if (null == s) throw new a$13(t, `Required parameter ${t} was null or undefined when calling ${e}.`);
30726
- }, r$17 = async function(e, t) {
30844
+ };
30845
+ const r$17 = async function(e, t) {
30727
30846
  if (t && t.accessToken) e.Authorization = "Bearer " + ("function" == typeof t.accessToken ? await t.accessToken() : await t.accessToken);
30728
30847
  };
30729
30848
  function h$2(e, t, s = "") {
@@ -30732,12 +30851,15 @@ function h$2(e, t, s = "") {
30732
30851
  const c$8 = function(e, ...t) {
30733
30852
  const s = new URLSearchParams(e.search);
30734
30853
  h$2(s, t), e.search = s.toString();
30735
- }, u$4 = function(e, t, s) {
30854
+ };
30855
+ const u$4 = function(e, t, s) {
30736
30856
  const n = "string" != typeof e;
30737
30857
  return (n && s && s.isJsonMime ? s.isJsonMime(t.headers["Content-Type"]) : n) ? JSON.stringify(void 0 !== e ? e : {}) : e || "";
30738
- }, d$6 = function(e) {
30858
+ };
30859
+ const d$6 = function(e) {
30739
30860
  return e.pathname + e.search + e.hash;
30740
- }, l$4 = function(e, t, s, n) {
30861
+ };
30862
+ const l$4 = function(e, t, s, n) {
30741
30863
  return (a = t, i = s) => {
30742
30864
  const o = {
30743
30865
  ...e.options,
@@ -30745,7 +30867,8 @@ const c$8 = function(e, ...t) {
30745
30867
  };
30746
30868
  return a.request(o);
30747
30869
  };
30748
- }, p$6 = function(t) {
30870
+ };
30871
+ const p$6 = function(t) {
30749
30872
  const n = function(e) {
30750
30873
  return {
30751
30874
  createAccount: async (t, s = {}) => {
@@ -30835,16 +30958,20 @@ const c$8 = function(e, ...t) {
30835
30958
  }(t);
30836
30959
  return {
30837
30960
  async createAccount(a, i) {
30838
- return l$4(await n.createAccount(a, i), axios, s$12, t);
30961
+ const o = await n.createAccount(a, i);
30962
+ return l$4(o, axios, s$12, t);
30839
30963
  },
30840
30964
  async disableAccount(a, i) {
30841
- return l$4(await n.disableAccount(a, i), axios, s$12, t);
30965
+ const o = await n.disableAccount(a, i);
30966
+ return l$4(o, axios, s$12, t);
30842
30967
  },
30843
30968
  async getAccount(a, i, o) {
30844
- return l$4(await n.getAccount(a, i, o), axios, s$12, t);
30969
+ const r = await n.getAccount(a, i, o);
30970
+ return l$4(r, axios, s$12, t);
30845
30971
  },
30846
30972
  async getAccounts(a, i, o, r, h, c, u, d) {
30847
- return l$4(await n.getAccounts(a, i, o, r, h, c, u, d), axios, s$12, t);
30973
+ const p = await n.getAccounts(a, i, o, r, h, c, u, d);
30974
+ return l$4(p, axios, s$12, t);
30848
30975
  }
30849
30976
  };
30850
30977
  };
@@ -31015,25 +31142,32 @@ const w = function(t) {
31015
31142
  }(t);
31016
31143
  return {
31017
31144
  async createAccountV2(a, i) {
31018
- return l$4(await n.createAccountV2(a, i), axios, s$12, t);
31145
+ const o = await n.createAccountV2(a, i);
31146
+ return l$4(o, axios, s$12, t);
31019
31147
  },
31020
31148
  async exportAccountShare(a, i) {
31021
- return l$4(await n.exportAccountShare(a, i), axios, s$12, t);
31149
+ const o = await n.exportAccountShare(a, i);
31150
+ return l$4(o, axios, s$12, t);
31022
31151
  },
31023
31152
  async getAccountV2(a, i) {
31024
- return l$4(await n.getAccountV2(a, i), axios, s$12, t);
31153
+ const o = await n.getAccountV2(a, i);
31154
+ return l$4(o, axios, s$12, t);
31025
31155
  },
31026
31156
  async getAccountsV2(a, i, o, r, h, c, u, d, p, P) {
31027
- return l$4(await n.getAccountsV2(a, i, o, r, h, c, u, d, p, P), axios, s$12, t);
31157
+ const w = await n.getAccountsV2(a, i, o, r, h, c, u, d, p, P);
31158
+ return l$4(w, axios, s$12, t);
31028
31159
  },
31029
31160
  async getSignerIdByAddress(a, i) {
31030
- return l$4(await n.getSignerIdByAddress(a, i), axios, s$12, t);
31161
+ const o = await n.getSignerIdByAddress(a, i);
31162
+ return l$4(o, axios, s$12, t);
31031
31163
  },
31032
31164
  async removeAccount(a, i) {
31033
- return l$4(await n.removeAccount(a, i), axios, s$12, t);
31165
+ const o = await n.removeAccount(a, i);
31166
+ return l$4(o, axios, s$12, t);
31034
31167
  },
31035
31168
  async switchChainV2(a, i) {
31036
- return l$4(await n.switchChainV2(a, i), axios, s$12, t);
31169
+ const o = await n.switchChainV2(a, i);
31170
+ return l$4(o, axios, s$12, t);
31037
31171
  }
31038
31172
  };
31039
31173
  };
@@ -31588,79 +31722,104 @@ const m$3 = function(t) {
31588
31722
  }(t);
31589
31723
  return {
31590
31724
  async authenticateSIWE(a, i) {
31591
- return l$4(await n.authenticateSIWE(a, i), axios, s$12, t);
31725
+ const o = await n.authenticateSIWE(a, i);
31726
+ return l$4(o, axios, s$12, t);
31592
31727
  },
31593
31728
  async getJwks(a, i) {
31594
- return l$4(await n.getJwks(a, i), axios, s$12, t);
31729
+ const o = await n.getJwks(a, i);
31730
+ return l$4(o, axios, s$12, t);
31595
31731
  },
31596
31732
  async initOAuth(a, i, o) {
31597
- return l$4(await n.initOAuth(a, i, o), axios, s$12, t);
31733
+ const r = await n.initOAuth(a, i, o);
31734
+ return l$4(r, axios, s$12, t);
31598
31735
  },
31599
31736
  async initSIWE(a, i, o) {
31600
- return l$4(await n.initSIWE(a, i, o), axios, s$12, t);
31737
+ const r = await n.initSIWE(a, i, o);
31738
+ return l$4(r, axios, s$12, t);
31601
31739
  },
31602
31740
  async linkEmail(a, i, o) {
31603
- return l$4(await n.linkEmail(a, i, o), axios, s$12, t);
31741
+ const r = await n.linkEmail(a, i, o);
31742
+ return l$4(r, axios, s$12, t);
31604
31743
  },
31605
31744
  async linkOAuth(a, i, o) {
31606
- return l$4(await n.linkOAuth(a, i, o), axios, s$12, t);
31745
+ const r = await n.linkOAuth(a, i, o);
31746
+ return l$4(r, axios, s$12, t);
31607
31747
  },
31608
31748
  async linkSIWE(a, i) {
31609
- return l$4(await n.linkSIWE(a, i), axios, s$12, t);
31749
+ const o = await n.linkSIWE(a, i);
31750
+ return l$4(o, axios, s$12, t);
31610
31751
  },
31611
31752
  async linkThirdParty(a, i, o) {
31612
- return l$4(await n.linkThirdParty(a, i, o), axios, s$12, t);
31753
+ const r = await n.linkThirdParty(a, i, o);
31754
+ return l$4(r, axios, s$12, t);
31613
31755
  },
31614
31756
  async loginEmailPassword(a, i, o) {
31615
- return l$4(await n.loginEmailPassword(a, i, o), axios, s$12, t);
31757
+ const r = await n.loginEmailPassword(a, i, o);
31758
+ return l$4(r, axios, s$12, t);
31616
31759
  },
31617
31760
  async loginWithIdToken(a, i) {
31618
- return l$4(await n.loginWithIdToken(a, i), axios, s$12, t);
31761
+ const o = await n.loginWithIdToken(a, i);
31762
+ return l$4(o, axios, s$12, t);
31619
31763
  },
31620
31764
  async logout(a, i) {
31621
- return l$4(await n.logout(a, i), axios, s$12, t);
31765
+ const o = await n.logout(a, i);
31766
+ return l$4(o, axios, s$12, t);
31622
31767
  },
31623
31768
  async me(a) {
31624
- return l$4(await n.me(a), axios, s$12, t);
31769
+ const i = await n.me(a);
31770
+ return l$4(i, axios, s$12, t);
31625
31771
  },
31626
31772
  async poolOAuth(a, i) {
31627
- return l$4(await n.poolOAuth(a, i), axios, s$12, t);
31773
+ const o = await n.poolOAuth(a, i);
31774
+ return l$4(o, axios, s$12, t);
31628
31775
  },
31629
31776
  async refresh(a, i) {
31630
- return l$4(await n.refresh(a, i), axios, s$12, t);
31777
+ const o = await n.refresh(a, i);
31778
+ return l$4(o, axios, s$12, t);
31631
31779
  },
31632
31780
  async registerGuest(a, i) {
31633
- return l$4(await n.registerGuest(a, i), axios, s$12, t);
31781
+ const o = await n.registerGuest(a, i);
31782
+ return l$4(o, axios, s$12, t);
31634
31783
  },
31635
31784
  async requestEmailVerification(a, i) {
31636
- return l$4(await n.requestEmailVerification(a, i), axios, s$12, t);
31785
+ const o = await n.requestEmailVerification(a, i);
31786
+ return l$4(o, axios, s$12, t);
31637
31787
  },
31638
31788
  async requestResetPassword(a, i) {
31639
- return l$4(await n.requestResetPassword(a, i), axios, s$12, t);
31789
+ const o = await n.requestResetPassword(a, i);
31790
+ return l$4(o, axios, s$12, t);
31640
31791
  },
31641
31792
  async resetPassword(a, i) {
31642
- return l$4(await n.resetPassword(a, i), axios, s$12, t);
31793
+ const o = await n.resetPassword(a, i);
31794
+ return l$4(o, axios, s$12, t);
31643
31795
  },
31644
31796
  async signupEmailPassword(a, i, o) {
31645
- return l$4(await n.signupEmailPassword(a, i, o), axios, s$12, t);
31797
+ const r = await n.signupEmailPassword(a, i, o);
31798
+ return l$4(r, axios, s$12, t);
31646
31799
  },
31647
31800
  async thirdParty(a, i, o) {
31648
- return l$4(await n.thirdParty(a, i, o), axios, s$12, t);
31801
+ const r = await n.thirdParty(a, i, o);
31802
+ return l$4(r, axios, s$12, t);
31649
31803
  },
31650
31804
  async unlinkEmail(a, i) {
31651
- return l$4(await n.unlinkEmail(a, i), axios, s$12, t);
31805
+ const o = await n.unlinkEmail(a, i);
31806
+ return l$4(o, axios, s$12, t);
31652
31807
  },
31653
31808
  async unlinkOAuth(a, i) {
31654
- return l$4(await n.unlinkOAuth(a, i), axios, s$12, t);
31809
+ const o = await n.unlinkOAuth(a, i);
31810
+ return l$4(o, axios, s$12, t);
31655
31811
  },
31656
31812
  async unlinkSIWE(a, i) {
31657
- return l$4(await n.unlinkSIWE(a, i), axios, s$12, t);
31813
+ const o = await n.unlinkSIWE(a, i);
31814
+ return l$4(o, axios, s$12, t);
31658
31815
  },
31659
31816
  async verifyEmail(a, i) {
31660
- return l$4(await n.verifyEmail(a, i), axios, s$12, t);
31817
+ const o = await n.verifyEmail(a, i);
31818
+ return l$4(o, axios, s$12, t);
31661
31819
  },
31662
31820
  async verifyOAuthToken(a, i) {
31663
- return l$4(await n.verifyOAuthToken(a, i), axios, s$12, t);
31821
+ const o = await n.verifyOAuthToken(a, i);
31822
+ return l$4(o, axios, s$12, t);
31664
31823
  }
31665
31824
  };
31666
31825
  };
@@ -32619,130 +32778,172 @@ const R$1 = function(t) {
32619
32778
  }(t);
32620
32779
  return {
32621
32780
  async accountInfoPost(a, i) {
32622
- return l$4(await n.accountInfoPost(a, i), axios, s$12, t);
32781
+ const o = await n.accountInfoPost(a, i);
32782
+ return l$4(o, axios, s$12, t);
32623
32783
  },
32624
32784
  async changeEmailPost(a, i) {
32625
- return l$4(await n.changeEmailPost(a, i), axios, s$12, t);
32785
+ const o = await n.changeEmailPost(a, i);
32786
+ return l$4(o, axios, s$12, t);
32626
32787
  },
32627
32788
  async changePasswordPost(a, i) {
32628
- return l$4(await n.changePasswordPost(a, i), axios, s$12, t);
32789
+ const o = await n.changePasswordPost(a, i);
32790
+ return l$4(o, axios, s$12, t);
32629
32791
  },
32630
32792
  async checkVerificationOtp(a, i) {
32631
- return l$4(await n.checkVerificationOtp(a, i), axios, s$12, t);
32793
+ const o = await n.checkVerificationOtp(a, i);
32794
+ return l$4(o, axios, s$12, t);
32632
32795
  },
32633
32796
  async emailOtpResetPasswordPost(a, i) {
32634
- return l$4(await n.emailOtpResetPasswordPost(a, i), axios, s$12, t);
32797
+ const o = await n.emailOtpResetPasswordPost(a, i);
32798
+ return l$4(o, axios, s$12, t);
32635
32799
  },
32636
32800
  async emailOtpSendVerificationOtpPost(a, i) {
32637
- return l$4(await n.emailOtpSendVerificationOtpPost(a, i), axios, s$12, t);
32801
+ const o = await n.emailOtpSendVerificationOtpPost(a, i);
32802
+ return l$4(o, axios, s$12, t);
32638
32803
  },
32639
32804
  async emailOtpVerifyEmailPost(a, i) {
32640
- return l$4(await n.emailOtpVerifyEmailPost(a, i), axios, s$12, t);
32805
+ const o = await n.emailOtpVerifyEmailPost(a, i);
32806
+ return l$4(o, axios, s$12, t);
32641
32807
  },
32642
32808
  async forgetPasswordEmailOtpPost(a, i) {
32643
- return l$4(await n.forgetPasswordEmailOtpPost(a, i), axios, s$12, t);
32809
+ const o = await n.forgetPasswordEmailOtpPost(a, i);
32810
+ return l$4(o, axios, s$12, t);
32644
32811
  },
32645
32812
  async forgetPasswordPost(a, i) {
32646
- return l$4(await n.forgetPasswordPost(a, i), axios, s$12, t);
32813
+ const o = await n.forgetPasswordPost(a, i);
32814
+ return l$4(o, axios, s$12, t);
32647
32815
  },
32648
32816
  async getAccessTokenPost(a, i) {
32649
- return l$4(await n.getAccessTokenPost(a, i), axios, s$12, t);
32817
+ const o = await n.getAccessTokenPost(a, i);
32818
+ return l$4(o, axios, s$12, t);
32650
32819
  },
32651
32820
  async getSessionGet(a, i) {
32652
- return l$4(await n.getSessionGet(a, i), axios, s$12, t);
32821
+ const o = await n.getSessionGet(a, i);
32822
+ return l$4(o, axios, s$12, t);
32653
32823
  },
32654
32824
  async linkSiweListWalletsGet(a) {
32655
- return l$4(await n.linkSiweListWalletsGet(a), axios, s$12, t);
32825
+ const i = await n.linkSiweListWalletsGet(a);
32826
+ return l$4(i, axios, s$12, t);
32656
32827
  },
32657
32828
  async linkSiweNoncePost(a, i) {
32658
- return l$4(await n.linkSiweNoncePost(a, i), axios, s$12, t);
32829
+ const o = await n.linkSiweNoncePost(a, i);
32830
+ return l$4(o, axios, s$12, t);
32659
32831
  },
32660
32832
  async linkSiweUnlinkPost(a, i) {
32661
- return l$4(await n.linkSiweUnlinkPost(a, i), axios, s$12, t);
32833
+ const o = await n.linkSiweUnlinkPost(a, i);
32834
+ return l$4(o, axios, s$12, t);
32662
32835
  },
32663
32836
  async linkSiweVerifyPost(a, i) {
32664
- return l$4(await n.linkSiweVerifyPost(a, i), axios, s$12, t);
32837
+ const o = await n.linkSiweVerifyPost(a, i);
32838
+ return l$4(o, axios, s$12, t);
32665
32839
  },
32666
32840
  async linkSocialPost(a, i) {
32667
- return l$4(await n.linkSocialPost(a, i), axios, s$12, t);
32841
+ const o = await n.linkSocialPost(a, i);
32842
+ return l$4(o, axios, s$12, t);
32668
32843
  },
32669
32844
  async listAccountsGet(a) {
32670
- return l$4(await n.listAccountsGet(a), axios, s$12, t);
32845
+ const i = await n.listAccountsGet(a);
32846
+ return l$4(i, axios, s$12, t);
32671
32847
  },
32672
32848
  async listSessionsGet(a) {
32673
- return l$4(await n.listSessionsGet(a), axios, s$12, t);
32849
+ const i = await n.listSessionsGet(a);
32850
+ return l$4(i, axios, s$12, t);
32674
32851
  },
32675
32852
  async phoneNumberForgetPasswordPost(a, i) {
32676
- return l$4(await n.phoneNumberForgetPasswordPost(a, i), axios, s$12, t);
32853
+ const o = await n.phoneNumberForgetPasswordPost(a, i);
32854
+ return l$4(o, axios, s$12, t);
32677
32855
  },
32678
32856
  async phoneNumberRequestPasswordResetPost(a, i) {
32679
- return l$4(await n.phoneNumberRequestPasswordResetPost(a, i), axios, s$12, t);
32857
+ const o = await n.phoneNumberRequestPasswordResetPost(a, i);
32858
+ return l$4(o, axios, s$12, t);
32680
32859
  },
32681
32860
  async phoneNumberResetPasswordPost(a, i) {
32682
- return l$4(await n.phoneNumberResetPasswordPost(a, i), axios, s$12, t);
32861
+ const o = await n.phoneNumberResetPasswordPost(a, i);
32862
+ return l$4(o, axios, s$12, t);
32683
32863
  },
32684
32864
  async phoneNumberSendOtpPost(a, i) {
32685
- return l$4(await n.phoneNumberSendOtpPost(a, i), axios, s$12, t);
32865
+ const o = await n.phoneNumberSendOtpPost(a, i);
32866
+ return l$4(o, axios, s$12, t);
32686
32867
  },
32687
32868
  async phoneNumberVerifyPost(a, i) {
32688
- return l$4(await n.phoneNumberVerifyPost(a, i), axios, s$12, t);
32869
+ const o = await n.phoneNumberVerifyPost(a, i);
32870
+ return l$4(o, axios, s$12, t);
32689
32871
  },
32690
32872
  async refreshTokenPost(a, i) {
32691
- return l$4(await n.refreshTokenPost(a, i), axios, s$12, t);
32873
+ const o = await n.refreshTokenPost(a, i);
32874
+ return l$4(o, axios, s$12, t);
32692
32875
  },
32693
32876
  async requestPasswordResetPost(a, i) {
32694
- return l$4(await n.requestPasswordResetPost(a, i), axios, s$12, t);
32877
+ const o = await n.requestPasswordResetPost(a, i);
32878
+ return l$4(o, axios, s$12, t);
32695
32879
  },
32696
32880
  async resetPasswordPost(a, i) {
32697
- return l$4(await n.resetPasswordPost(a, i), axios, s$12, t);
32881
+ const o = await n.resetPasswordPost(a, i);
32882
+ return l$4(o, axios, s$12, t);
32698
32883
  },
32699
32884
  async resetPasswordTokenGet(a, i, o) {
32700
- return l$4(await n.resetPasswordTokenGet(a, i, o), axios, s$12, t);
32885
+ const r = await n.resetPasswordTokenGet(a, i, o);
32886
+ return l$4(r, axios, s$12, t);
32701
32887
  },
32702
32888
  async revokeOtherSessionsPost(a, i) {
32703
- return l$4(await n.revokeOtherSessionsPost(a, i), axios, s$12, t);
32889
+ const o = await n.revokeOtherSessionsPost(a, i);
32890
+ return l$4(o, axios, s$12, t);
32704
32891
  },
32705
32892
  async revokeSessionPost(a, i) {
32706
- return l$4(await n.revokeSessionPost(a, i), axios, s$12, t);
32893
+ const o = await n.revokeSessionPost(a, i);
32894
+ return l$4(o, axios, s$12, t);
32707
32895
  },
32708
32896
  async revokeSessionsPost(a, i) {
32709
- return l$4(await n.revokeSessionsPost(a, i), axios, s$12, t);
32897
+ const o = await n.revokeSessionsPost(a, i);
32898
+ return l$4(o, axios, s$12, t);
32710
32899
  },
32711
32900
  async sendVerificationEmailPost(a, i) {
32712
- return l$4(await n.sendVerificationEmailPost(a, i), axios, s$12, t);
32901
+ const o = await n.sendVerificationEmailPost(a, i);
32902
+ return l$4(o, axios, s$12, t);
32713
32903
  },
32714
32904
  async signInAnonymousPost(a) {
32715
- return l$4(await n.signInAnonymousPost(a), axios, s$12, t);
32905
+ const i = await n.signInAnonymousPost(a);
32906
+ return l$4(i, axios, s$12, t);
32716
32907
  },
32717
32908
  async signInEmailOtpPost(a, i) {
32718
- return l$4(await n.signInEmailOtpPost(a, i), axios, s$12, t);
32909
+ const o = await n.signInEmailOtpPost(a, i);
32910
+ return l$4(o, axios, s$12, t);
32719
32911
  },
32720
32912
  async signInEmailPost(a, i) {
32721
- return l$4(await n.signInEmailPost(a, i), axios, s$12, t);
32913
+ const o = await n.signInEmailPost(a, i);
32914
+ return l$4(o, axios, s$12, t);
32722
32915
  },
32723
32916
  async signInPhoneNumberPost(a, i) {
32724
- return l$4(await n.signInPhoneNumberPost(a, i), axios, s$12, t);
32917
+ const o = await n.signInPhoneNumberPost(a, i);
32918
+ return l$4(o, axios, s$12, t);
32725
32919
  },
32726
32920
  async signOutPost(a, i) {
32727
- return l$4(await n.signOutPost(a, i), axios, s$12, t);
32921
+ const o = await n.signOutPost(a, i);
32922
+ return l$4(o, axios, s$12, t);
32728
32923
  },
32729
32924
  async signUpEmailPost(a, i) {
32730
- return l$4(await n.signUpEmailPost(a, i), axios, s$12, t);
32925
+ const o = await n.signUpEmailPost(a, i);
32926
+ return l$4(o, axios, s$12, t);
32731
32927
  },
32732
32928
  async siweNoncePost(a, i) {
32733
- return l$4(await n.siweNoncePost(a, i), axios, s$12, t);
32929
+ const o = await n.siweNoncePost(a, i);
32930
+ return l$4(o, axios, s$12, t);
32734
32931
  },
32735
32932
  async siweVerifyPost(a, i) {
32736
- return l$4(await n.siweVerifyPost(a, i), axios, s$12, t);
32933
+ const o = await n.siweVerifyPost(a, i);
32934
+ return l$4(o, axios, s$12, t);
32737
32935
  },
32738
32936
  async socialSignIn(a, i) {
32739
- return l$4(await n.socialSignIn(a, i), axios, s$12, t);
32937
+ const o = await n.socialSignIn(a, i);
32938
+ return l$4(o, axios, s$12, t);
32740
32939
  },
32741
32940
  async unlinkAccountPost(a, i) {
32742
- return l$4(await n.unlinkAccountPost(a, i), axios, s$12, t);
32941
+ const o = await n.unlinkAccountPost(a, i);
32942
+ return l$4(o, axios, s$12, t);
32743
32943
  },
32744
32944
  async verifyEmailGet(a, i, o) {
32745
- return l$4(await n.verifyEmailGet(a, i, o), axios, s$12, t);
32945
+ const r = await n.verifyEmailGet(a, i, o);
32946
+ return l$4(r, axios, s$12, t);
32746
32947
  }
32747
32948
  };
32748
32949
  };
@@ -32923,10 +33124,12 @@ const b = function(t) {
32923
33124
  }(t);
32924
33125
  return {
32925
33126
  async handleChainRpcRequest(a, i, o) {
32926
- return l$4(await n.handleChainRpcRequest(a, i, o), axios, s$12, t);
33127
+ const r = await n.handleChainRpcRequest(a, i, o);
33128
+ return l$4(r, axios, s$12, t);
32927
33129
  },
32928
33130
  async handleRpcRequest(a, i) {
32929
- return l$4(await n.handleRpcRequest(a, i), axios, s$12, t);
33131
+ const o = await n.handleRpcRequest(a, i);
33132
+ return l$4(o, axios, s$12, t);
32930
33133
  }
32931
33134
  };
32932
33135
  };
@@ -33050,19 +33253,24 @@ const S = function(t) {
33050
33253
  }(t);
33051
33254
  return {
33052
33255
  async createSession(a, i, o) {
33053
- return l$4(await n.createSession(a, i, o), axios, s$12, t);
33256
+ const r = await n.createSession(a, i, o);
33257
+ return l$4(r, axios, s$12, t);
33054
33258
  },
33055
33259
  async getPlayerSessions(a, i, o, r, h, c) {
33056
- return l$4(await n.getPlayerSessions(a, i, o, r, h, c), axios, s$12, t);
33260
+ const u = await n.getPlayerSessions(a, i, o, r, h, c);
33261
+ return l$4(u, axios, s$12, t);
33057
33262
  },
33058
33263
  async getSession(a, i, o) {
33059
- return l$4(await n.getSession(a, i, o), axios, s$12, t);
33264
+ const r = await n.getSession(a, i, o);
33265
+ return l$4(r, axios, s$12, t);
33060
33266
  },
33061
33267
  async revokeSession(a, i, o) {
33062
- return l$4(await n.revokeSession(a, i, o), axios, s$12, t);
33268
+ const r = await n.revokeSession(a, i, o);
33269
+ return l$4(r, axios, s$12, t);
33063
33270
  },
33064
33271
  async signatureSession(a, i, o) {
33065
- return l$4(await n.signatureSession(a, i, o), axios, s$12, t);
33272
+ const r = await n.signatureSession(a, i, o);
33273
+ return l$4(r, axios, s$12, t);
33066
33274
  }
33067
33275
  };
33068
33276
  };
@@ -33194,19 +33402,24 @@ const k$1 = function(t) {
33194
33402
  }(t);
33195
33403
  return {
33196
33404
  async createTransactionIntent(a, i, o) {
33197
- return l$4(await n.createTransactionIntent(a, i, o), axios, s$12, t);
33405
+ const r = await n.createTransactionIntent(a, i, o);
33406
+ return l$4(r, axios, s$12, t);
33198
33407
  },
33199
33408
  async estimateTransactionIntentCost(a, i) {
33200
- return l$4(await n.estimateTransactionIntentCost(a, i), axios, s$12, t);
33409
+ const o = await n.estimateTransactionIntentCost(a, i);
33410
+ return l$4(o, axios, s$12, t);
33201
33411
  },
33202
33412
  async getTransactionIntent(a, i, o) {
33203
- return l$4(await n.getTransactionIntent(a, i, o), axios, s$12, t);
33413
+ const r = await n.getTransactionIntent(a, i, o);
33414
+ return l$4(r, axios, s$12, t);
33204
33415
  },
33205
33416
  async getTransactionIntents(a, i, o, r, h, c, u, d, p, P) {
33206
- return l$4(await n.getTransactionIntents(a, i, o, r, h, c, u, d, p, P), axios, s$12, t);
33417
+ const w = await n.getTransactionIntents(a, i, o, r, h, c, u, d, p, P);
33418
+ return l$4(w, axios, s$12, t);
33207
33419
  },
33208
33420
  async signature(a, i, o) {
33209
- return l$4(await n.signature(a, i, o), axios, s$12, t);
33421
+ const r = await n.signature(a, i, o);
33422
+ return l$4(r, axios, s$12, t);
33210
33423
  }
33211
33424
  };
33212
33425
  };
@@ -33379,25 +33592,32 @@ const q = function(t) {
33379
33592
  }(t);
33380
33593
  return {
33381
33594
  async deleteUser(a, i) {
33382
- return l$4(await n.deleteUser(a, i), axios, s$12, t);
33595
+ const o = await n.deleteUser(a, i);
33596
+ return l$4(o, axios, s$12, t);
33383
33597
  },
33384
33598
  async getAuthUser(a, i) {
33385
- return l$4(await n.getAuthUser(a, i), axios, s$12, t);
33599
+ const o = await n.getAuthUser(a, i);
33600
+ return l$4(o, axios, s$12, t);
33386
33601
  },
33387
33602
  async getAuthUsers(a, i, o, r, h, c, u, d, p, P) {
33388
- return l$4(await n.getAuthUsers(a, i, o, r, h, c, u, d, p, P), axios, s$12, t);
33603
+ const w = await n.getAuthUsers(a, i, o, r, h, c, u, d, p, P);
33604
+ return l$4(w, axios, s$12, t);
33389
33605
  },
33390
33606
  async getUserWallet(a, i) {
33391
- return l$4(await n.getUserWallet(a, i), axios, s$12, t);
33607
+ const o = await n.getUserWallet(a, i);
33608
+ return l$4(o, axios, s$12, t);
33392
33609
  },
33393
33610
  async meV2(a) {
33394
- return l$4(await n.meV2(a), axios, s$12, t);
33611
+ const i = await n.meV2(a);
33612
+ return l$4(i, axios, s$12, t);
33395
33613
  },
33396
33614
  async pregenerateUserV2(a, i) {
33397
- return l$4(await n.pregenerateUserV2(a, i), axios, s$12, t);
33615
+ const o = await n.pregenerateUserV2(a, i);
33616
+ return l$4(o, axios, s$12, t);
33398
33617
  },
33399
33618
  async thirdPartyV2(a, i) {
33400
- return l$4(await n.thirdPartyV2(a, i), axios, s$12, t);
33619
+ const o = await n.thirdPartyV2(a, i);
33620
+ return l$4(o, axios, s$12, t);
33401
33621
  }
33402
33622
  };
33403
33623
  };
@@ -33478,11 +33698,11 @@ var U$1 = class {
33478
33698
  nativeAppIdentifier: s.nativeAppIdentifier
33479
33699
  };
33480
33700
  this.config = { backend: A$2(n) };
33481
- const i = A$2({
33701
+ const a = {
33482
33702
  basePath: `${s.basePath}/iam/v2/auth`,
33483
33703
  accessToken: "",
33484
33704
  nativeAppIdentifier: s.nativeAppIdentifier
33485
- });
33705
+ }, i = A$2(a);
33486
33706
  this.authenticationApi = new y$3(this.config.backend, void 0, this.axiosInstance), this.authApi = new f$1(i, void 0, this.axiosInstance), this.userApi = new I(this.config.backend, void 0, this.axiosInstance), this.transactionIntentsApi = new v(this.config.backend, void 0, this.axiosInstance), this.accountsApi = new P(this.config.backend, void 0, this.axiosInstance), this.accountsV2Api = new g(this.config.backend, void 0, this.axiosInstance), this.sessionsApi = new T$2(this.config.backend, void 0, this.axiosInstance), this.rpcApi = new O$3(this.config.backend, void 0, this.axiosInstance);
33487
33707
  }
33488
33708
  setupInterceptors() {
@@ -33599,7 +33819,9 @@ const _$1 = {
33599
33819
  OPERATION_NOT_SUPPORTED: "OPERATION_NOT_SUPPORTED",
33600
33820
  LOGOUT_ERROR: "LOGOUT_ERROR",
33601
33821
  UNKNOWN_ERROR: "UNKNOWN_ERROR"
33602
- }, E$4 = _$1, O$2 = _$1;
33822
+ };
33823
+ const E$4 = _$1;
33824
+ const O$2 = _$1;
33603
33825
  //#endregion
33604
33826
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/core/errors/openfortError.js
33605
33827
  var t$20 = class t$20 extends Error {
@@ -33673,7 +33895,19 @@ var a$12 = class a$12 extends t$20 {
33673
33895
  };
33674
33896
  //#endregion
33675
33897
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/types/types.js
33676
- var E$3, A$1, e$10, T$1, t$19, n$12, o$13, O$1, _, C$2, N$1, c$6, a$11;
33898
+ var E$3;
33899
+ var A$1;
33900
+ var e$10;
33901
+ var T$1;
33902
+ var t$19;
33903
+ var n$12;
33904
+ var o$13;
33905
+ var O$1;
33906
+ var _;
33907
+ var C$2;
33908
+ var N$1;
33909
+ var c$6;
33910
+ var a$11;
33677
33911
  (function(E) {
33678
33912
  E[E.NONE = 0] = "NONE", E[E.UNAUTHENTICATED = 1] = "UNAUTHENTICATED", E[E.EMBEDDED_SIGNER_NOT_CONFIGURED = 2] = "EMBEDDED_SIGNER_NOT_CONFIGURED", E[E.CREATING_ACCOUNT = 3] = "CREATING_ACCOUNT", E[E.READY = 4] = "READY";
33679
33913
  })(E$3 || (E$3 = {})), function(E) {
@@ -34781,7 +35015,7 @@ var l$3 = class {
34781
35015
  });
34782
35016
  }
34783
35017
  getChallengeBytes() {
34784
- return crypto.getRandomValues(new Uint8Array(32));
35018
+ return crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(32));
34785
35019
  }
34786
35020
  async deriveKeyFromAssertion(e) {
34787
35021
  const r = e.getClientExtensionResults();
@@ -34867,7 +35101,7 @@ var l$3 = class {
34867
35101
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/utils/crypto.js
34868
35102
  function t$17() {
34869
35103
  if ("undefined" != typeof crypto && crypto.randomUUID) return crypto.randomUUID();
34870
- const t = new Uint8Array(16);
35104
+ const t = /* @__PURE__ */ new Uint8Array(16);
34871
35105
  return crypto.getRandomValues(t), t[6] = 15 & t[6] | 64, t[8] = 63 & t[8] | 128, [...t].map((t, r) => {
34872
35106
  const n = t.toString(16).padStart(2, "0");
34873
35107
  return [
@@ -34962,7 +35196,8 @@ var s$9 = class s$9 {
34962
35196
  const r = await t.get(o$15.ACCOUNT);
34963
35197
  if (!r) return null;
34964
35198
  try {
34965
- return new s$9(JSON.parse(r));
35199
+ const e = JSON.parse(r);
35200
+ return new s$9(e);
34966
35201
  } catch {
34967
35202
  return null;
34968
35203
  }
@@ -35021,7 +35256,8 @@ function D$1(D) {
35021
35256
  }
35022
35257
  //#endregion
35023
35258
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/version.js
35024
- const o$10 = "1.3.6", t$15 = "@openfort/openfort-js";
35259
+ const o$10 = "1.3.6";
35260
+ const t$15 = "@openfort/openfort-js";
35025
35261
  //#endregion
35026
35262
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/core/errors/sentry.js
35027
35263
  const r$10 = "https://64a03e4967fb4dad3ecb914918c777b6@o4504593015242752.ingest.us.sentry.io/4509292415287296";
@@ -35088,7 +35324,7 @@ var n$10 = class n$10 {
35088
35324
  }
35089
35325
  static async init({ sentry: e, configuration: o }) {
35090
35326
  if (e) return void (n$10.sentry = e);
35091
- const a = await import("./esm-D2-zCfAo.mjs");
35327
+ const a = await import("./esm-DUNJOL6b.mjs");
35092
35328
  n$10.sentry = new a.BrowserClient({
35093
35329
  dsn: r$10,
35094
35330
  integrations: [],
@@ -35134,7 +35370,8 @@ function t$14(...t) {
35134
35370
  }
35135
35371
  //#endregion
35136
35372
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/utils/observe.js
35137
- const t$13 = /* @__PURE__ */ new Map(), n$9 = /* @__PURE__ */ new Map();
35373
+ const t$13 = /* @__PURE__ */ new Map();
35374
+ const n$9 = /* @__PURE__ */ new Map();
35138
35375
  let o$7 = 0;
35139
35376
  function e$6(e, s, c) {
35140
35377
  const f = ++o$7, i = () => t$13.get(e) || [], r = () => {
@@ -35463,7 +35700,8 @@ var t$11 = class {
35463
35700
  };
35464
35701
  //#endregion
35465
35702
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/evm/JsonRpcError.js
35466
- var R, E$2;
35703
+ var R;
35704
+ var E$2;
35467
35705
  (function(R) {
35468
35706
  R[R.UNAUTHORIZED = 4100] = "UNAUTHORIZED", R[R.UNSUPPORTED_METHOD = 4200] = "UNSUPPORTED_METHOD";
35469
35707
  })(R || (R = {})), function(R) {
@@ -35482,7 +35720,8 @@ const n$8 = [
35482
35720
  "chainId",
35483
35721
  "chainName",
35484
35722
  "nativeCurrency"
35485
- ], a$9 = (a) => {
35723
+ ];
35724
+ const a$9 = (a) => {
35486
35725
  if (!a || "object" != typeof a) throw new A(E$2.INVALID_PARAMS, "Invalid chain parameter: expected an object");
35487
35726
  if (!((e) => n$8.every((r) => r in e))(a)) throw new A(E$2.INVALID_PARAMS, `Invalid chain parameter. The following properties are required: ${n$8.join(", ")}`);
35488
35727
  if (!a.chainName || "" === a.chainName.trim()) throw new A(E$2.INVALID_PARAMS, "chainName cannot be empty");
@@ -35498,7 +35737,8 @@ const n$8 = [
35498
35737
  rpcUrls: a.rpcUrls || [],
35499
35738
  nativeCurrency: a.nativeCurrency
35500
35739
  };
35501
- }, i$6 = async ({ params: n, rpcProvider: i, storage: t }) => {
35740
+ };
35741
+ const i$6 = async ({ params: n, rpcProvider: i, storage: t }) => {
35502
35742
  if (!n || !Array.isArray(n) || 0 === n.length) throw new A(E$2.INVALID_PARAMS, "Invalid parameters for wallet_addEthereumChain");
35503
35743
  const c = a$9(n[0]), o = parseInt(c.chainId, 16), { chainId: s } = await i.detectNetwork();
35504
35744
  return o !== s && null;
@@ -35601,12 +35841,12 @@ const t$10 = async (t) => {
35601
35841
  }, t = { OpenfortMessage: [{
35602
35842
  name: "hashedMessage",
35603
35843
  type: "bytes32"
35604
- }] }, a = { hashedMessage: g }, { _TypedDataEncoder: s } = await import("./lib-S7tWZSeq.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
35844
+ }] }, a = { hashedMessage: g }, { _TypedDataEncoder: s } = await import("./lib-BxePH7nf.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
35605
35845
  g = s.hash(e, t, a);
35606
35846
  }
35607
35847
  const P = await s.sign(g, !1, !1);
35608
35848
  if (i && n && [T$1.UPGRADEABLE_V5, T$1.UPGRADEABLE_V6].includes(d)) {
35609
- const { id: e } = await import("./lib-S7tWZSeq.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), { defaultAbiCoder: t } = await import("./lib-DY_aksO0.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), { hexConcat: a } = await import("./lib-CQVjg2KA.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), s = a([e("createAccountWithNonce(address,bytes32,bool)").slice(0, 10), t.encode([
35849
+ const { id: e } = await import("./lib-BxePH7nf.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), { defaultAbiCoder: t } = await import("./lib-DrRsvTcx.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), { hexConcat: a } = await import("./lib-CBkhBVvk.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), s = a([e("createAccountWithNonce(address,bytes32,bool)").slice(0, 10), t.encode([
35610
35850
  "address",
35611
35851
  "bytes32",
35612
35852
  "bool"
@@ -35678,7 +35918,7 @@ const t$9 = async ({ params: t, signer: o, account: n }) => {
35678
35918
  const i = t[0], d = t[1];
35679
35919
  if (!d || !i) throw new A(E$2.INVALID_PARAMS, "personal_sign requires an address and a message");
35680
35920
  if (d.toLowerCase() !== n.address.toLowerCase()) throw new A(E$2.INVALID_PARAMS, "personal_sign requires the signer to be the from address");
35681
- const { hashMessage: p } = await import("./lib-S7tWZSeq.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
35921
+ const { hashMessage: p } = await import("./lib-BxePH7nf.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
35682
35922
  return await t$10({
35683
35923
  hash: p(n$11(i)),
35684
35924
  implementationType: n.implementationType || n.type,
@@ -35819,8 +36059,7 @@ const o$5 = async ({ params: o, signer: i, account: r, authentication: s, backen
35819
36059
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/utils/authorization.js
35820
36060
  var import_lib = require_lib();
35821
36061
  function r$6(r) {
35822
- const { address: n, chainId: e, nonce: i } = r;
35823
- return (0, import_lib.keccak256)(`0x05${function(t, r, n) {
36062
+ const { address: n, chainId: e, nonce: i } = r, s = `0x05${function(t, r, n) {
35824
36063
  const e = (t, r) => {
35825
36064
  if (t < 56) return (r + t).toString(16).padStart(2, "0");
35826
36065
  const n = t.toString(16), e = Math.ceil(n.length / 2);
@@ -35838,7 +36077,8 @@ function r$6(r) {
35838
36077
  return r.length % 2 != 0 && (r = `0${r}`), 0 === r.length ? "80" : 2 === r.length && parseInt(r, 16) < 128 ? r : e(r.length / 2, 128) + r;
35839
36078
  }).join("");
35840
36079
  return `0x${e(i.length / 2, 192)}${i}`;
35841
- }(e, n, i).slice(2)}`);
36080
+ }(e, n, i).slice(2)}`;
36081
+ return (0, import_lib.keccak256)(s);
35842
36082
  }
35843
36083
  async function n$7(t) {
35844
36084
  const { authorization: n, signer: e } = t, i = r$6(n), o = await e.sign(i, !1, !1), s = o.startsWith("0x") ? o.slice(2) : o, a = `0x${s.slice(0, 64)}`, c = `0x${s.slice(64, 128)}`, d = s.slice(128, 130), h = parseInt(d, 16);
@@ -35996,7 +36236,8 @@ const r$5 = [
35996
36236
  "domain",
35997
36237
  "primaryType",
35998
36238
  "message"
35999
- ], n$5 = (a, n) => {
36239
+ ];
36240
+ const n$5 = (a, n) => {
36000
36241
  let s;
36001
36242
  if ("string" == typeof a) try {
36002
36243
  s = JSON.parse(a);
@@ -36011,14 +36252,15 @@ const r$5 = [
36011
36252
  const d = s.domain?.chainId;
36012
36253
  if (d && ("string" == typeof d && (d.startsWith("0x") ? s.domain.chainId = parseInt(d, 16) : s.domain.chainId = parseInt(d, 10)), s.domain.chainId !== n)) throw new A(E$2.INVALID_PARAMS, `Invalid chainId, expected ${n}`);
36013
36254
  return s;
36014
- }, s$6 = async ({ params: r, method: s, signer: d, implementationType: i, rpcProvider: o, account: p }) => {
36255
+ };
36256
+ const s$6 = async ({ params: r, method: s, signer: d, implementationType: i, rpcProvider: o, account: p }) => {
36015
36257
  const c = r[0], h = r[1];
36016
36258
  if (!c || !h) throw new A(E$2.INVALID_PARAMS, `${s} requires an address and a typed data JSON`);
36017
36259
  const { chainId: m } = await o.detectNetwork(), I = n$5(h, m), y = { ...I.types };
36018
36260
  delete y.EIP712Domain;
36019
- const { _TypedDataEncoder: A$4 } = await import("./lib-S7tWZSeq.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
36261
+ const { _TypedDataEncoder: A$4 } = await import("./lib-BxePH7nf.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), w = A$4.hash(I.domain, y, I.message);
36020
36262
  return await t$10({
36021
- hash: A$4.hash(I.domain, y, I.message),
36263
+ hash: w,
36022
36264
  implementationType: i,
36023
36265
  chainId: m,
36024
36266
  signer: d,
@@ -36066,7 +36308,7 @@ var E$1 = class {
36066
36308
  async getRpcProvider() {
36067
36309
  if (!this.#o) {
36068
36310
  const s = (await s$9.fromStorage(this.#t))?.chainId || (this.#s ? Number(Object.keys(this.#s)[0]) : void 0) || 8453;
36069
- await import("./lib-BPNIfCSS.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then((t) => {
36311
+ await import("./lib-DQFX8e0j.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then((t) => {
36070
36312
  const e = this.#s ? this.#s[s] : void 0;
36071
36313
  this.#o = new t.StaticJsonRpcProvider(e ?? t$12[s]);
36072
36314
  });
@@ -36093,7 +36335,7 @@ var E$1 = class {
36093
36335
  if (!a || !r) throw new A(R.UNAUTHORIZED, "Unauthorized - call eth_requestAccounts first");
36094
36336
  const { chainId: n } = await (await this.getRpcProvider()).detectNetwork(), [h] = s.params || [];
36095
36337
  h.chainId || (h.chainId = n.toString());
36096
- const c = s$8(h), { serialize: p } = await import("./lib-Cs29vVRx.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), w = (t) => ({
36338
+ const c = s$8(h), { serialize: p } = await import("./lib-Cc6HXyt-.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), w = (t) => ({
36097
36339
  legacy: 0,
36098
36340
  eip2930: 1,
36099
36341
  eip1559: 2
@@ -36102,9 +36344,9 @@ var E$1 = class {
36102
36344
  gasLimit: u,
36103
36345
  to: c.to ?? void 0,
36104
36346
  type: w(c.type)
36105
- }, f = p(g), { keccak256: S } = await import("./lib-CMLhJW3x.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), A$3 = S(f);
36347
+ }, f = p(g), { keccak256: S } = await import("./lib-CbXTRod6.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), A$3 = S(f);
36106
36348
  await this.#i();
36107
- const R$2 = await i.sign(A$3, !1, !1), { splitSignature: v } = await import("./lib-CQVjg2KA.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
36349
+ const R$2 = await i.sign(A$3, !1, !1), { splitSignature: v } = await import("./lib-CBkhBVvk.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
36108
36350
  return p(g, v(R$2));
36109
36351
  }
36110
36352
  case "eth_sendTransaction": {
@@ -36198,7 +36440,7 @@ var E$1 = class {
36198
36440
  await this.#i();
36199
36441
  try {
36200
36442
  const e = parseInt(s.params[0].chainId, 16);
36201
- await t.switchChain({ chainId: e }), await import("./lib-BPNIfCSS.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then((t) => {
36443
+ await t.switchChain({ chainId: e }), await import("./lib-DQFX8e0j.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then((t) => {
36202
36444
  const s = this.#s ? this.#s[e] : void 0;
36203
36445
  this.#o = new t.StaticJsonRpcProvider(s ?? t$12[e]);
36204
36446
  }), this.#r.emit(C$1.CHAIN_CHANGED, r$11(e));
@@ -36356,7 +36598,15 @@ var r$4 = class extends Error {
36356
36598
  var a$4 = "penpal";
36357
36599
  //#endregion
36358
36600
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/messaging/browserMessenger/guards.js
36359
- const t$5 = (e) => "object" == typeof e && null !== e, p$2 = (e) => "function" == typeof e, o$4 = (p) => t$5(p) && p.namespace === "penpal", y$2 = (e) => "SYN" === e.type, n$3 = (e) => "ACK1" === e.type, c$3 = (e) => "ACK2" === e.type, a$3 = (e) => "CALL" === e.type, f = (e) => "REPLY" === e.type, m$2 = (e) => "DESTROY" === e.type;
36601
+ const t$5 = (e) => "object" == typeof e && null !== e;
36602
+ const p$2 = (e) => "function" == typeof e;
36603
+ const o$4 = (p) => t$5(p) && p.namespace === "penpal";
36604
+ const y$2 = (e) => "SYN" === e.type;
36605
+ const n$3 = (e) => "ACK1" === e.type;
36606
+ const c$3 = (e) => "ACK2" === e.type;
36607
+ const a$3 = (e) => "CALL" === e.type;
36608
+ const f = (e) => "REPLY" === e.type;
36609
+ const m$2 = (e) => "DESTROY" === e.type;
36360
36610
  //#endregion
36361
36611
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/messaging/browserMessenger/PenpalBugError.js
36362
36612
  var e$3 = class extends Error {
@@ -36367,13 +36617,18 @@ var e$3 = class extends Error {
36367
36617
  //#endregion
36368
36618
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/messaging/browserMessenger/backwardCompatibility.js
36369
36619
  const p$1 = "deprecated-penpal";
36370
- var i$3, o$3;
36620
+ var i$3;
36621
+ var o$3;
36371
36622
  (function(e) {
36372
36623
  e.Call = "call", e.Reply = "reply", e.Syn = "syn", e.SynAck = "synAck", e.Ack = "ack";
36373
36624
  })(i$3 || (i$3 = {})), function(e) {
36374
36625
  e.Fulfilled = "fulfilled", e.Rejected = "rejected";
36375
36626
  }(o$3 || (o$3 = {}));
36376
- const u$2 = (e) => t$5(e) && "penpal" in e, d$4 = (e) => e.split("."), s$5 = (e) => e.join("."), c$2 = (e) => new e$3(`Unexpected message to translate: ${JSON.stringify(e)}`), m$1 = (e) => {
36627
+ const u$2 = (e) => t$5(e) && "penpal" in e;
36628
+ const d$4 = (e) => e.split(".");
36629
+ const s$5 = (e) => e.join(".");
36630
+ const c$2 = (e) => new e$3(`Unexpected message to translate: ${JSON.stringify(e)}`);
36631
+ const m$1 = (e) => {
36377
36632
  if (e.penpal === i$3.Syn) return {
36378
36633
  namespace: a$4,
36379
36634
  channel: void 0,
@@ -36417,7 +36672,8 @@ const u$2 = (e) => t$5(e) && "penpal" in e, d$4 = (e) => e.split("."), s$5 = (e)
36417
36672
  } : { value: e.returnValue }
36418
36673
  };
36419
36674
  throw c$2(e);
36420
- }, h$1 = (n) => {
36675
+ };
36676
+ const h$1 = (n) => {
36421
36677
  if (n$3(n)) return {
36422
36678
  penpal: i$3.SynAck,
36423
36679
  methodNames: n.methodPaths.map(s$5)
@@ -36646,7 +36902,8 @@ const a$2 = (a) => ({
36646
36902
  message: a.message,
36647
36903
  stack: a.stack,
36648
36904
  penpalCode: a instanceof r$4 ? a.code : void 0
36649
- }), n$2 = ({ name: a, message: n, stack: s, penpalCode: o }) => {
36905
+ });
36906
+ const n$2 = ({ name: a, message: n, stack: s, penpalCode: o }) => {
36650
36907
  const r = o ? new r$4(o, n) : new Error(n);
36651
36908
  return r.name = a, r.stack = s, r;
36652
36909
  };
@@ -36659,10 +36916,12 @@ const s$3 = (t, n = []) => {
36659
36916
  p$2(u) ? c.push([...n, e]) : t$5(u) && c.push(...s$3(u, [...n, e]));
36660
36917
  }
36661
36918
  return c;
36662
- }, t$3 = (s, t) => {
36919
+ };
36920
+ const t$3 = (s, t) => {
36663
36921
  const n = s.reduce((o, s) => t$5(o) ? o[s] : void 0, t);
36664
36922
  return p$2(n) ? n : void 0;
36665
- }, n$1 = (o) => o.join(".");
36923
+ };
36924
+ const n$1 = (o) => o.join(".");
36666
36925
  //#endregion
36667
36926
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/messaging/browserMessenger/Reply.js
36668
36927
  var s$2 = class {
@@ -36684,7 +36943,8 @@ const i$2 = (r, a, t) => ({
36684
36943
  value: a$2(t),
36685
36944
  isSerializedErrorInstance: !0
36686
36945
  } : { value: t }
36687
- }), l$2 = (e, l, c, d) => {
36946
+ });
36947
+ const l$2 = (e, l, c, d) => {
36688
36948
  let m = !1;
36689
36949
  const p = async (p) => {
36690
36950
  if (m) return;
@@ -36727,16 +36987,19 @@ var t$2 = class {
36727
36987
  };
36728
36988
  //#endregion
36729
36989
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/messaging/browserMessenger/connectRemoteProxy.js
36730
- const l$1 = new Set([
36990
+ const l$1 = /* @__PURE__ */ new Set([
36731
36991
  "apply",
36732
36992
  "call",
36733
36993
  "bind"
36734
- ]), i$1 = (e, t, r = []) => new Proxy(r.length ? () => {} : Object.create(null), {
36994
+ ]);
36995
+ const i$1 = (e, t, r = []) => new Proxy(r.length ? () => {} : Object.create(null), {
36735
36996
  get(o, a) {
36736
36997
  if ("then" !== a) return r.length && l$1.has(a) ? Reflect.get(o, a) : i$1(e, t, [...r, a]);
36737
36998
  },
36738
36999
  apply: (t, o, a) => e(r, a)
36739
- }), c$1 = (e) => new r$4("CONNECTION_DESTROYED", `Method call ${n$1(e)}() failed due to destroyed connection`), d$3 = (l, d, m) => {
37000
+ });
37001
+ const c$1 = (e) => new r$4("CONNECTION_DESTROYED", `Method call ${n$1(e)}() failed due to destroyed connection`);
37002
+ const d$3 = (l, d, m) => {
36740
37003
  let h = !1;
36741
37004
  const p = /* @__PURE__ */ new Map(), f$2 = (e) => {
36742
37005
  if (!f(e)) return;
@@ -36863,7 +37126,8 @@ const p = ({ messenger: p, methods: h, timeout: l, channel: f, log: S }) => {
36863
37126
  };
36864
37127
  //#endregion
36865
37128
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/wallets/messaging/browserMessenger/connect.js
36866
- const a$1 = /* @__PURE__ */ new WeakSet(), m = ({ messenger: m, methods: c = {}, timeout: i, channel: d, log: h }) => {
37129
+ const a$1 = /* @__PURE__ */ new WeakSet();
37130
+ const m = ({ messenger: m, methods: c = {}, timeout: i, channel: d, log: h }) => {
36867
37131
  if (!m) throw new r$4("INVALID_ARGUMENT", "messenger must be defined");
36868
37132
  if (a$1.has(m)) throw new r$4("INVALID_ARGUMENT", "A messenger can only be used for a single connection");
36869
37133
  a$1.add(m);
@@ -37589,9 +37853,9 @@ var k = class {
37589
37853
  if (!i) throw new s$11(E$4.MISSING_SIGNER, "No account found");
37590
37854
  const n = { ...t };
37591
37855
  delete n.EIP712Domain;
37592
- const { _TypedDataEncoder: d } = await import("./lib-S7tWZSeq.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
37856
+ const { _TypedDataEncoder: d } = await import("./lib-BxePH7nf.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1)), h = d.hash(e, n, r);
37593
37857
  return await t$10({
37594
- hash: d.hash(e, n, r),
37858
+ hash: h,
37595
37859
  implementationType: i.implementationType || i.type,
37596
37860
  chainId: Number(i.chainId),
37597
37861
  signer: s,
@@ -38284,7 +38548,8 @@ var r = class {
38284
38548
  };
38285
38549
  //#endregion
38286
38550
  //#region ../../node_modules/.pnpm/@openfort+openfort-js@1.3.6/node_modules/@openfort/openfort-js/dist/sdk/src/utils/promiseUtils.js
38287
- const e = {}, l = (l, t) => {
38551
+ const e = {};
38552
+ const l = (l, t) => {
38288
38553
  let n = e[t];
38289
38554
  return n || (n = l().finally(() => {
38290
38555
  delete e[t], n = null;
@@ -38511,7 +38776,7 @@ function clearStaleOpenfortBrowserStorage(publishableKey) {
38511
38776
  * tagging them `stale-openfort-cache` would delete the triage signal the tag
38512
38777
  * exists to carry.
38513
38778
  */
38514
- const STALE_USER_ERROR_CODES = new Set(["USER_NOT_FOUND"]);
38779
+ const STALE_USER_ERROR_CODES = /* @__PURE__ */ new Set(["USER_NOT_FOUND"]);
38515
38780
  /**
38516
38781
  * The one predicate that opens the heal. It reads the Openfort error code and
38517
38782
  * never the message text (ADR-0023 R4). It walks the cause chain the way
@@ -39441,7 +39706,7 @@ function clearAuthCacheEffect(authCache) {
39441
39706
  return authCache.clearSession.pipe(Effect.mapError((cause) => Errors.providerError("auth-cache", "clearSession", cause)), Effect.andThen(authCache.clearJwt.pipe(Effect.mapError((cause) => Errors.providerError("auth-cache", "clearJwt", cause)))));
39442
39707
  }
39443
39708
  function cryptoRandomId() {
39444
- const bytes = new Uint8Array(8);
39709
+ const bytes = /* @__PURE__ */ new Uint8Array(8);
39445
39710
  if (typeof globalThis.crypto !== "undefined" && typeof globalThis.crypto.getRandomValues === "function") globalThis.crypto.getRandomValues(bytes);
39446
39711
  else for (let i = 0; i < bytes.length; i++) bytes[i] = Math.floor(Math.random() * 256);
39447
39712
  return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
@@ -40890,7 +41155,7 @@ const organizationPaymentExecutionUnavailable = () => Promise.resolve({
40890
41155
  const holdingsContract = { current: makeFunctionReference(CAPXUL_FUNCTIONS["holdings/actions"].current) };
40891
41156
  //#endregion
40892
41157
  //#region ../../packages/sdk/src/domain/money/primary-holding.ts
40893
- const CURRENCY_BY_TOKEN_SYMBOL = new Map([["USDX", toCurrencyCode("USD")]]);
41158
+ const CURRENCY_BY_TOKEN_SYMBOL = /* @__PURE__ */ new Map([["USDX", toCurrencyCode("USD")]]);
40894
41159
  /**
40895
41160
  * The designated display asset: the payable row holding the most money, or
40896
41161
  * `null` when no row is payable.
@@ -42349,7 +42614,7 @@ const isSmartAccountDeployed = async (client, address) => {
42349
42614
  */
42350
42615
  let oxModule = null;
42351
42616
  try {
42352
- oxModule = { importPromise: import("./_esm-BJMBPEEJ.mjs") };
42617
+ oxModule = { importPromise: import("./_esm-CD_IfzIg.mjs") };
42353
42618
  } catch (error) {}
42354
42619
  async function getOxModule() {
42355
42620
  if (!oxModule) throw new Error("The 'ox' package is required for WebAuthn functionality. Please install it: npm install ox");
@@ -42483,9 +42748,8 @@ async function signUserOperation(parameters) {
42483
42748
  signer,
42484
42749
  dynamic: isWebAuthnAccount(localOwner),
42485
42750
  data: await (async () => {
42486
- if (isWebAuthnAccount(localOwner)) return getWebAuthnSignature({
42487
- owner: localOwner,
42488
- hash: hashTypedData({
42751
+ if (isWebAuthnAccount(localOwner)) {
42752
+ const safeHash = hashTypedData({
42489
42753
  domain: {
42490
42754
  chainId,
42491
42755
  verifyingContract: safe4337ModuleAddress
@@ -42493,8 +42757,12 @@ async function signUserOperation(parameters) {
42493
42757
  types: entryPoint.version === "0.6" ? EIP712_SAFE_OPERATION_TYPE_V06 : EIP712_SAFE_OPERATION_TYPE_V07,
42494
42758
  primaryType: "SafeOp",
42495
42759
  message
42496
- })
42497
- });
42760
+ });
42761
+ return getWebAuthnSignature({
42762
+ owner: localOwner,
42763
+ hash: safeHash
42764
+ });
42765
+ }
42498
42766
  return localOwner.signTypedData({
42499
42767
  domain: {
42500
42768
  chainId,
@@ -43019,10 +43287,11 @@ const encodeInternalTransaction = (tx) => {
43019
43287
  ]).slice(2);
43020
43288
  };
43021
43289
  const encodeMultiSend = (txs) => {
43290
+ const data = `0x${txs.map((tx) => encodeInternalTransaction(tx)).join("")}`;
43022
43291
  return encodeFunctionData({
43023
43292
  abi: multiSendAbi,
43024
43293
  functionName: "multiSend",
43025
- args: [`0x${txs.map((tx) => encodeInternalTransaction(tx)).join("")}`]
43294
+ args: [data]
43026
43295
  });
43027
43296
  };
43028
43297
  const get7579LaunchPadInitData = ({ safe4337ModuleAddress, safeSingletonAddress, erc7579LaunchpadAddress, safeWebAuthnSharedSignerAddress, owners, validators, executors, fallbacks, hooks, attesters, threshold, attestersThreshold }) => {
@@ -43082,67 +43351,68 @@ const getInitializerCode = async ({ owners, threshold, safeModuleSetupAddress, s
43082
43351
  attesters,
43083
43352
  attestersThreshold
43084
43353
  });
43354
+ const initHash = keccak256(encodeAbiParameters([
43355
+ {
43356
+ internalType: "address",
43357
+ name: "singleton",
43358
+ type: "address"
43359
+ },
43360
+ {
43361
+ internalType: "address[]",
43362
+ name: "owners",
43363
+ type: "address[]"
43364
+ },
43365
+ {
43366
+ internalType: "uint256",
43367
+ name: "threshold",
43368
+ type: "uint256"
43369
+ },
43370
+ {
43371
+ internalType: "address",
43372
+ name: "setupTo",
43373
+ type: "address"
43374
+ },
43375
+ {
43376
+ internalType: "bytes",
43377
+ name: "setupData",
43378
+ type: "bytes"
43379
+ },
43380
+ {
43381
+ internalType: "contract ISafe7579",
43382
+ name: "safe7579",
43383
+ type: "address"
43384
+ },
43385
+ {
43386
+ internalType: "struct ModuleInit[]",
43387
+ name: "validators",
43388
+ type: "tuple[]",
43389
+ components: [{
43390
+ internalType: "address",
43391
+ name: "module",
43392
+ type: "address"
43393
+ }, {
43394
+ internalType: "bytes",
43395
+ name: "initData",
43396
+ type: "bytes"
43397
+ }]
43398
+ }
43399
+ ], [
43400
+ initData.singleton,
43401
+ initData.owners,
43402
+ initData.threshold,
43403
+ initData.setupTo,
43404
+ initData.setupData,
43405
+ initData.safe7579,
43406
+ initData.validators.map((validator) => ({
43407
+ module: validator.address,
43408
+ initData: validator.context
43409
+ }))
43410
+ ]));
43085
43411
  return encodeFunctionData({
43086
43412
  abi: preValidationSetupAbi,
43087
43413
  functionName: "preValidationSetup",
43088
43414
  args: [
43089
- keccak256(encodeAbiParameters([
43090
- {
43091
- internalType: "address",
43092
- name: "singleton",
43093
- type: "address"
43094
- },
43095
- {
43096
- internalType: "address[]",
43097
- name: "owners",
43098
- type: "address[]"
43099
- },
43100
- {
43101
- internalType: "uint256",
43102
- name: "threshold",
43103
- type: "uint256"
43104
- },
43105
- {
43106
- internalType: "address",
43107
- name: "setupTo",
43108
- type: "address"
43109
- },
43110
- {
43111
- internalType: "bytes",
43112
- name: "setupData",
43113
- type: "bytes"
43114
- },
43115
- {
43116
- internalType: "contract ISafe7579",
43117
- name: "safe7579",
43118
- type: "address"
43119
- },
43120
- {
43121
- internalType: "struct ModuleInit[]",
43122
- name: "validators",
43123
- type: "tuple[]",
43124
- components: [{
43125
- internalType: "address",
43126
- name: "module",
43127
- type: "address"
43128
- }, {
43129
- internalType: "bytes",
43130
- name: "initData",
43131
- type: "bytes"
43132
- }]
43133
- }
43134
- ], [
43135
- initData.singleton,
43136
- initData.owners,
43137
- initData.threshold,
43138
- initData.setupTo,
43139
- initData.setupData,
43140
- initData.safe7579,
43141
- initData.validators.map((validator) => ({
43142
- module: validator.address,
43143
- initData: validator.context
43144
- }))
43145
- ])),
43415
+ initHash,
43146
43416
  zeroAddress,
43147
43417
  "0x"
43148
43418
  ]
@@ -43192,6 +43462,7 @@ const getInitializerCode = async ({ owners, threshold, safeModuleSetupAddress, s
43192
43462
  ...tx,
43193
43463
  operation: 0
43194
43464
  });
43465
+ const multiSendCallData = encodeMultiSend(multiCalls);
43195
43466
  return encodeFunctionData({
43196
43467
  abi: setupAbi,
43197
43468
  functionName: "setup",
@@ -43199,7 +43470,7 @@ const getInitializerCode = async ({ owners, threshold, safeModuleSetupAddress, s
43199
43470
  ownerAddresses,
43200
43471
  threshold,
43201
43472
  multiSendAddress,
43202
- encodeMultiSend(multiCalls),
43473
+ multiSendCallData,
43203
43474
  safe4337ModuleAddress,
43204
43475
  paymentToken,
43205
43476
  payment,
@@ -43305,9 +43576,10 @@ const getAccountAddress = async ({ client, owners, threshold, safeModuleSetupAdd
43305
43576
  paymentReceiver
43306
43577
  });
43307
43578
  const deploymentCode = encodePacked(["bytes", "uint256"], [proxyCreationCode, hexToBigInt(erc7579LaunchpadAddress ?? safeSingletonAddress)]);
43579
+ const salt = keccak256(encodePacked(["bytes32", "uint256"], [keccak256(encodePacked(["bytes"], [initializer])), saltNonce]));
43308
43580
  return getContractAddress({
43309
43581
  from: safeProxyFactoryAddress,
43310
- salt: keccak256(encodePacked(["bytes32", "uint256"], [keccak256(encodePacked(["bytes"], [initializer])), saltNonce])),
43582
+ salt,
43311
43583
  bytecode: deploymentCode,
43312
43584
  opcode: "CREATE2"
43313
43585
  });
@@ -43583,6 +43855,39 @@ async function toSafeSmartAccount(parameters) {
43583
43855
  });
43584
43856
  },
43585
43857
  async getStubSignature() {
43858
+ const signatures = owners.map((owner) => {
43859
+ let signer = safeWebAuthnSharedSignerAddress;
43860
+ let dynamic = true;
43861
+ let data = "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
43862
+ if (isWebAuthnAccount(owner)) data = encodeAbiParameters([
43863
+ {
43864
+ name: "authenticatorData",
43865
+ type: "bytes"
43866
+ },
43867
+ {
43868
+ name: "clientDataJSON",
43869
+ type: "string"
43870
+ },
43871
+ {
43872
+ name: "signature",
43873
+ type: "uint256[2]"
43874
+ }
43875
+ ], [
43876
+ "0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d00000000",
43877
+ "\"origin\":\"http://somelargdomainheresothatwehaveenoughbytes.com\",\"crossOrigin\":false",
43878
+ [44941127272049826721201904734628716258498742255959991581049806490182030242267n, 9910254599581058084911561569808925251374718953855182016200087235935345969636n]
43879
+ ]);
43880
+ else {
43881
+ signer = owner.address;
43882
+ dynamic = false;
43883
+ }
43884
+ if (!signer) throw new Error("No signer found");
43885
+ return {
43886
+ signer,
43887
+ data,
43888
+ dynamic
43889
+ };
43890
+ });
43586
43891
  return encodePacked([
43587
43892
  "uint48",
43588
43893
  "uint48",
@@ -43590,39 +43895,7 @@ async function toSafeSmartAccount(parameters) {
43590
43895
  ], [
43591
43896
  0,
43592
43897
  0,
43593
- concatSignatures(owners.map((owner) => {
43594
- let signer = safeWebAuthnSharedSignerAddress;
43595
- let dynamic = true;
43596
- let data = "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c";
43597
- if (isWebAuthnAccount(owner)) data = encodeAbiParameters([
43598
- {
43599
- name: "authenticatorData",
43600
- type: "bytes"
43601
- },
43602
- {
43603
- name: "clientDataJSON",
43604
- type: "string"
43605
- },
43606
- {
43607
- name: "signature",
43608
- type: "uint256[2]"
43609
- }
43610
- ], [
43611
- "0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d00000000",
43612
- "\"origin\":\"http://somelargdomainheresothatwehaveenoughbytes.com\",\"crossOrigin\":false",
43613
- [44941127272049826721201904734628716258498742255959991581049806490182030242267n, 9910254599581058084911561569808925251374718953855182016200087235935345969636n]
43614
- ]);
43615
- else {
43616
- signer = owner.address;
43617
- dynamic = false;
43618
- }
43619
- if (!signer) throw new Error("No signer found");
43620
- return {
43621
- signer,
43622
- data,
43623
- dynamic
43624
- };
43625
- }))
43898
+ concatSignatures(signatures)
43626
43899
  ]);
43627
43900
  },
43628
43901
  async sign({ hash }) {
@@ -43643,7 +43916,7 @@ async function toSafeSmartAccount(parameters) {
43643
43916
  primaryType: "SafeMessage",
43644
43917
  message: { message: generateSafeMessageMessage(message) }
43645
43918
  });
43646
- const signatureBytes = concatSignatures(await Promise.all(localOwners.map(async (localOwner) => {
43919
+ const signatures = await Promise.all(localOwners.map(async (localOwner) => {
43647
43920
  let signer = safeWebAuthnSharedSignerAddress;
43648
43921
  let data;
43649
43922
  let dynamic = true;
@@ -43662,19 +43935,19 @@ async function toSafeSmartAccount(parameters) {
43662
43935
  dynamic,
43663
43936
  data
43664
43937
  };
43665
- })));
43938
+ }));
43939
+ const signatureBytes = concatSignatures(signatures);
43666
43940
  return erc7579LaunchpadAddress ? concat([zeroAddress, signatureBytes]) : signatureBytes;
43667
43941
  },
43668
43942
  async signTypedData(typedData) {
43669
43943
  if (localOwners.length < Number(threshold)) throw new Error("Owners length mismatch, currently not supported");
43670
43944
  if (erc7579LaunchpadAddress && version === "1.5.0") throw new Error("Safe 7579 & version 1.5.0 are not compatible");
43671
- const signatureBytes = concatSignatures(await Promise.all(localOwners.map(async (localOwner) => {
43945
+ const signatures = await Promise.all(localOwners.map(async (localOwner) => {
43672
43946
  let signer = safeWebAuthnSharedSignerAddress;
43673
43947
  let data;
43674
43948
  let dynamic = true;
43675
- if (isWebAuthnAccount(localOwner)) data = await getWebAuthnSignature({
43676
- owner: localOwner,
43677
- hash: hashTypedData({
43949
+ if (isWebAuthnAccount(localOwner)) {
43950
+ const messageHash = hashTypedData({
43678
43951
  domain: {
43679
43952
  chainId: await getMemoizedChainId(),
43680
43953
  verifyingContract: await this.getAddress()
@@ -43685,9 +43958,12 @@ async function toSafeSmartAccount(parameters) {
43685
43958
  }] },
43686
43959
  primaryType: "SafeMessage",
43687
43960
  message: { message: generateSafeMessageMessage(typedData) }
43688
- })
43689
- });
43690
- else {
43961
+ });
43962
+ data = await getWebAuthnSignature({
43963
+ owner: localOwner,
43964
+ hash: messageHash
43965
+ });
43966
+ } else {
43691
43967
  signer = localOwner.address;
43692
43968
  data = adjustVInSignature("eth_signTypedData", await localOwner.signTypedData({
43693
43969
  domain: {
@@ -43709,7 +43985,8 @@ async function toSafeSmartAccount(parameters) {
43709
43985
  dynamic,
43710
43986
  data
43711
43987
  };
43712
- })));
43988
+ }));
43989
+ const signatureBytes = concatSignatures(signatures);
43713
43990
  return erc7579LaunchpadAddress ? concat([zeroAddress, signatureBytes]) : signatureBytes;
43714
43991
  },
43715
43992
  async signUserOperation(parameters) {
@@ -44227,16 +44504,18 @@ var LiveOrgDeploymentAdapter = class {
44227
44504
  }
44228
44505
  async #deployProxy(input) {
44229
44506
  if (this.#sendOrgProxyDeployUserOperation !== void 0) {
44507
+ const initializerHex = buildCapxulOrgInitializer({ founderPersonalSafe: input.founderPersonalSafe });
44508
+ const saltNonceHex = computeCapxulOrgSaltNonce({
44509
+ email: input.email,
44510
+ orgHandle: input.orgHandle
44511
+ });
44230
44512
  const createProxyCallData = encodeFunctionData({
44231
44513
  abi: safeProxyFactoryAbi,
44232
44514
  functionName: "createProxyWithNonce",
44233
44515
  args: [
44234
44516
  SAFE_L2_SINGLETON,
44235
- buildCapxulOrgInitializer({ founderPersonalSafe: input.founderPersonalSafe }),
44236
- computeCapxulOrgSaltNonce({
44237
- email: input.email,
44238
- orgHandle: input.orgHandle
44239
- })
44517
+ initializerHex,
44518
+ saltNonceHex
44240
44519
  ]
44241
44520
  });
44242
44521
  await this.#sendOrgProxyDeployUserOperation({
@@ -44261,16 +44540,18 @@ var LiveOrgDeploymentAdapter = class {
44261
44540
  setupTransactions: []
44262
44541
  });
44263
44542
  if (founderSafe.address.toLowerCase() !== input.founderPersonalSafe.toLowerCase()) throw Errors.invalidInput("founderPersonalSafe", "permissionless personal Safe address does not match backend founder Safe");
44543
+ const initializer = buildCapxulOrgInitializer({ founderPersonalSafe: input.founderPersonalSafe });
44544
+ const saltNonce = computeCapxulOrgSaltNonce({
44545
+ email: input.email,
44546
+ orgHandle: input.orgHandle
44547
+ });
44264
44548
  const createProxyCall = encodeFunctionData({
44265
44549
  abi: safeProxyFactoryAbi,
44266
44550
  functionName: "createProxyWithNonce",
44267
44551
  args: [
44268
44552
  SAFE_L2_SINGLETON,
44269
- buildCapxulOrgInitializer({ founderPersonalSafe: input.founderPersonalSafe }),
44270
- computeCapxulOrgSaltNonce({
44271
- email: input.email,
44272
- orgHandle: input.orgHandle
44273
- })
44553
+ initializer,
44554
+ saltNonce
44274
44555
  ]
44275
44556
  });
44276
44557
  const bundler = makeSponsoredBundlerClient({
@@ -44662,7 +44943,7 @@ async function postServerException(error, errorKind, operation, properties, cont
44662
44943
  $exception_level: "error",
44663
44944
  $exception_fingerprint: failureFingerprint(errorKind, mode, operation),
44664
44945
  $issue_name: issueName(errorKind, mode, chain, operation),
44665
- $issue_description: safeText(chain?.providerMessage ?? message),
44946
+ $issue_description: safeText((chain === void 0 ? void 0 : chainCauseSummary(chain)) ?? message),
44666
44947
  $exception_list: [{
44667
44948
  type: errorKind,
44668
44949
  value: message,
@@ -45009,14 +45290,14 @@ const ADDRESS_HEX = /^0x[0-9a-fA-F]{40}$/;
45009
45290
  const BYTES32_HEX = /^0x[0-9a-fA-F]{64}$/;
45010
45291
  const EVEN_DATA_HEX = /^0x(?:[0-9a-fA-F]{2})*$/;
45011
45292
  const QUANTITY_HEX = /^(?:0x0|0x[1-9a-fA-F][0-9a-fA-F]*)$/;
45012
- const EVIDENCE_RPC_METHODS = new Set([
45293
+ const EVIDENCE_RPC_METHODS = /* @__PURE__ */ new Set([
45013
45294
  "eth_call",
45014
45295
  "eth_getBlockByNumber",
45015
45296
  "eth_getCode",
45016
45297
  "eth_getLogs",
45017
45298
  "eth_getTransactionReceipt"
45018
45299
  ]);
45019
- const BUNDLER_RPC_METHODS = new Set([
45300
+ const BUNDLER_RPC_METHODS = /* @__PURE__ */ new Set([
45020
45301
  "eth_sendUserOperation",
45021
45302
  "eth_estimateUserOperationGas",
45022
45303
  "eth_getUserOperationReceipt",
@@ -45038,13 +45319,13 @@ function rpcProviderError(operation, cause, chainId) {
45038
45319
  return Errors.providerError(rpcProviderRole(chainId, method), operation, cause);
45039
45320
  }
45040
45321
  /** The modes the next upstream may not share: a throttle, a timeout, a dead upstream. */
45041
- const TRANSIENT_MODES = new Set([
45322
+ const TRANSIENT_MODES = /* @__PURE__ */ new Set([
45042
45323
  "rate-limited",
45043
45324
  "timeout",
45044
45325
  "upstream-down"
45045
45326
  ]);
45046
45327
  /** ERC-4337 validation refusals (`-3250x`) and the bundler's invalid-params answer. */
45047
- const BUNDLER_REJECTION_CODES = new Set([
45328
+ const BUNDLER_REJECTION_CODES = /* @__PURE__ */ new Set([
45048
45329
  -32500,
45049
45330
  -32501,
45050
45331
  -32502,
@@ -45223,7 +45504,7 @@ function boundedRevertDetails(revert, bundlerMessage) {
45223
45504
  const RATE_LIMITED_RPC_CODE = -32005;
45224
45505
  const RATE_LIMIT_MESSAGE = /rate limit|too many requests|throttl|capacity/iu;
45225
45506
  /** Alchemy's free tier caps `eth_getLogs` at 10 blocks; evidence reads span thousands. */
45226
- const WIDE_LOG_READS = new Set(["eth_getLogs"]);
45507
+ const WIDE_LOG_READS = /* @__PURE__ */ new Set(["eth_getLogs"]);
45227
45508
  function stripSlash(url) {
45228
45509
  return url.replace(/\/+$/u, "");
45229
45510
  }
@@ -46338,7 +46619,7 @@ function createDevSignerSessionStorage() {
46338
46619
  }
46339
46620
  //#endregion
46340
46621
  //#region src/session-store.ts
46341
- const DEFAULT_TTL_MS = 720 * 6e4;
46622
+ const DEFAULT_TTL_MS = 432e5;
46342
46623
  const DEFAULT_MAX_SESSIONS = 1e4;
46343
46624
  var InMemorySessionStore = class {
46344
46625
  sessions = /* @__PURE__ */ new Map();