@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.
@@ -1,8 +1,8 @@
1
- import { r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.mjs";
2
- import { n as require_lib$9, t as require_lib$8 } from "./lib-BuBlVXhu.mjs";
3
- import { a as require_lib$10, i as require_lib$11, n as require_lib$12, t as require_lib$13 } from "./lib-6VZsqqnl.mjs";
4
- import { n as require_lib$14, r as require_lib$15, t as require_lib$16 } from "./lib-CQ_IHsde.mjs";
5
- import { n as require_hash, t as require_lib$17 } from "./lib-CQ44Cugp.mjs";
1
+ import { r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
2
+ import { n as require_lib$9, t as require_lib$8 } from "./lib-CLDSz8qo.mjs";
3
+ import { a as require_lib$10, i as require_lib$11, n as require_lib$12, t as require_lib$13 } from "./lib-xFNz3osG.mjs";
4
+ import { n as require_lib$14, r as require_lib$15, t as require_lib$16 } from "./lib-DGJKxDqZ.mjs";
5
+ import { n as require_hash, t as require_lib$17 } from "./lib-BKZICsbj.mjs";
6
6
  //#region ../../node_modules/.pnpm/@ethersproject+abstract-provider@5.8.0/node_modules/@ethersproject/abstract-provider/lib/_version.js
7
7
  var require__version$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -506,8 +506,10 @@ var require_lib$6 = /* @__PURE__ */ __commonJSMin(((exports) => {
506
506
  }
507
507
  if (network.chainId !== 0 && network.chainId !== standard.chainId) logger.throwArgumentError("network chainId mismatch", "network", network);
508
508
  var defaultProvider = network._defaultProvider || null;
509
- if (defaultProvider == null && standard._defaultProvider) if (isRenetworkable(standard._defaultProvider)) defaultProvider = standard._defaultProvider.renetwork(network);
510
- else defaultProvider = standard._defaultProvider;
509
+ if (defaultProvider == null && standard._defaultProvider) {
510
+ if (isRenetworkable(standard._defaultProvider)) defaultProvider = standard._defaultProvider.renetwork(network);
511
+ else defaultProvider = standard._defaultProvider;
512
+ }
511
513
  return {
512
514
  name: network.name,
513
515
  chainId: standard.chainId,
@@ -862,7 +864,7 @@ var require_geturl = /* @__PURE__ */ __commonJSMin(((exports) => {
862
864
  body: null
863
865
  };
864
866
  resp.on("data", function(chunk) {
865
- if (response.body == null) response.body = new Uint8Array(0);
867
+ if (response.body == null) response.body = /* @__PURE__ */ new Uint8Array(0);
866
868
  response.body = (0, bytes_1.concat)([response.body, chunk]);
867
869
  });
868
870
  resp.on("end", function() {
@@ -1084,7 +1086,7 @@ var require_lib$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
1084
1086
  var url = null;
1085
1087
  var options = { method: "GET" };
1086
1088
  var allow304 = false;
1087
- var timeout = 120 * 1e3;
1089
+ var timeout = 12e4;
1088
1090
  if (typeof connection === "string") url = connection;
1089
1091
  else if (typeof connection === "object") {
1090
1092
  if (connection == null || connection.url == null) logger.throwArgumentError("missing URL", "connection.url", connection);
@@ -2228,7 +2230,7 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
2228
2230
  function numPad(value) {
2229
2231
  var result = (0, bytes_1.arrayify)(value);
2230
2232
  if (result.length > 32) throw new Error("internal; should not happen");
2231
- var padded = new Uint8Array(32);
2233
+ var padded = /* @__PURE__ */ new Uint8Array(32);
2232
2234
  padded.set(result, 32 - result.length);
2233
2235
  return padded;
2234
2236
  }
@@ -2953,32 +2955,30 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
2953
2955
  });
2954
2956
  runners.push(runner);
2955
2957
  break;
2956
- case "filter":
2957
- if (!event._inflight) {
2958
- event._inflight = true;
2959
- if (event._lastBlockNumber === -2) event._lastBlockNumber = blockNumber - 1;
2960
- var filter_1 = event.filter;
2961
- filter_1.fromBlock = event._lastBlockNumber + 1;
2962
- filter_1.toBlock = blockNumber;
2963
- var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;
2964
- if (minFromBlock > filter_1.fromBlock) filter_1.fromBlock = minFromBlock;
2965
- if (filter_1.fromBlock < 0) filter_1.fromBlock = 0;
2966
- var runner = _this.getLogs(filter_1).then(function(logs) {
2967
- event._inflight = false;
2968
- if (logs.length === 0) return;
2969
- logs.forEach(function(log) {
2970
- if (log.blockNumber > event._lastBlockNumber) event._lastBlockNumber = log.blockNumber;
2971
- _this._emitted["b:" + log.blockHash] = log.blockNumber;
2972
- _this._emitted["t:" + log.transactionHash] = log.blockNumber;
2973
- _this.emit(filter_1, log);
2974
- });
2975
- }).catch(function(error) {
2976
- _this.emit("error", error);
2977
- event._inflight = false;
2958
+ case "filter": if (!event._inflight) {
2959
+ event._inflight = true;
2960
+ if (event._lastBlockNumber === -2) event._lastBlockNumber = blockNumber - 1;
2961
+ var filter_1 = event.filter;
2962
+ filter_1.fromBlock = event._lastBlockNumber + 1;
2963
+ filter_1.toBlock = blockNumber;
2964
+ var minFromBlock = filter_1.toBlock - _this._maxFilterBlockRange;
2965
+ if (minFromBlock > filter_1.fromBlock) filter_1.fromBlock = minFromBlock;
2966
+ if (filter_1.fromBlock < 0) filter_1.fromBlock = 0;
2967
+ var runner = _this.getLogs(filter_1).then(function(logs) {
2968
+ event._inflight = false;
2969
+ if (logs.length === 0) return;
2970
+ logs.forEach(function(log) {
2971
+ if (log.blockNumber > event._lastBlockNumber) event._lastBlockNumber = log.blockNumber;
2972
+ _this._emitted["b:" + log.blockHash] = log.blockNumber;
2973
+ _this._emitted["t:" + log.transactionHash] = log.blockNumber;
2974
+ _this.emit(filter_1, log);
2978
2975
  });
2979
- runners.push(runner);
2980
- }
2981
- break;
2976
+ }).catch(function(error) {
2977
+ _this.emit("error", error);
2978
+ event._inflight = false;
2979
+ });
2980
+ runners.push(runner);
2981
+ }
2982
2982
  }
2983
2983
  });
2984
2984
  this._lastBlockNumber = blockNumber;
@@ -3291,7 +3291,6 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3291
3291
  error
3292
3292
  })];
3293
3293
  }
3294
- return [2];
3295
3294
  }
3296
3295
  });
3297
3296
  });
@@ -3323,7 +3322,6 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3323
3322
  error
3324
3323
  })];
3325
3324
  }
3326
- return [2];
3327
3325
  }
3328
3326
  });
3329
3327
  });
@@ -3355,7 +3353,6 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3355
3353
  error
3356
3354
  })];
3357
3355
  }
3358
- return [2];
3359
3356
  }
3360
3357
  });
3361
3358
  });
@@ -3387,7 +3384,6 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3387
3384
  error
3388
3385
  })];
3389
3386
  }
3390
- return [2];
3391
3387
  }
3392
3388
  });
3393
3389
  });
@@ -3422,7 +3418,6 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3422
3418
  error
3423
3419
  })];
3424
3420
  }
3425
- return [2];
3426
3421
  }
3427
3422
  });
3428
3423
  });
@@ -3658,21 +3653,19 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3658
3653
  error_8 = _a.sent();
3659
3654
  if (error_8.code === logger_1.Logger.errors.SERVER_ERROR) throw error_8;
3660
3655
  return [3, 5];
3661
- case 5:
3662
- try {
3663
- return [2, (0, bytes_1.hexlify)(result)];
3664
- } catch (error) {
3665
- return [2, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, {
3666
- method: "call",
3667
- params: {
3668
- transaction,
3669
- blockTag
3670
- },
3671
- result,
3672
- error
3673
- })];
3674
- }
3675
- return [2];
3656
+ case 5: try {
3657
+ return [2, (0, bytes_1.hexlify)(result)];
3658
+ } catch (error) {
3659
+ return [2, logger.throwError("bad result from backend", logger_1.Logger.errors.SERVER_ERROR, {
3660
+ method: "call",
3661
+ params: {
3662
+ transaction,
3663
+ blockTag
3664
+ },
3665
+ result,
3666
+ error
3667
+ })];
3668
+ }
3676
3669
  }
3677
3670
  });
3678
3671
  });
@@ -3721,7 +3714,6 @@ var require_base_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
3721
3714
  error
3722
3715
  })];
3723
3716
  }
3724
- return [2];
3725
3717
  }
3726
3718
  });
3727
3719
  });
@@ -4641,23 +4633,24 @@ var require_lib$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
4641
4633
  case 3: return [4, this.getFeeData()];
4642
4634
  case 4:
4643
4635
  feeData = _a.sent();
4644
- if (tx.type == null) if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {
4645
- tx.type = 2;
4646
- if (tx.gasPrice != null) {
4647
- gasPrice = tx.gasPrice;
4648
- delete tx.gasPrice;
4649
- tx.maxFeePerGas = gasPrice;
4650
- tx.maxPriorityFeePerGas = gasPrice;
4651
- } else {
4652
- if (tx.maxFeePerGas == null) tx.maxFeePerGas = feeData.maxFeePerGas;
4653
- if (tx.maxPriorityFeePerGas == null) tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
4654
- }
4655
- } else if (feeData.gasPrice != null) {
4656
- if (hasEip1559) logger.throwError("network does not support EIP-1559", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "populateTransaction" });
4657
- if (tx.gasPrice == null) tx.gasPrice = feeData.gasPrice;
4658
- tx.type = 0;
4659
- } else logger.throwError("failed to get consistent fee data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "signer.getFeeData" });
4660
- else if (tx.type === 2) {
4636
+ if (tx.type == null) {
4637
+ if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {
4638
+ tx.type = 2;
4639
+ if (tx.gasPrice != null) {
4640
+ gasPrice = tx.gasPrice;
4641
+ delete tx.gasPrice;
4642
+ tx.maxFeePerGas = gasPrice;
4643
+ tx.maxPriorityFeePerGas = gasPrice;
4644
+ } else {
4645
+ if (tx.maxFeePerGas == null) tx.maxFeePerGas = feeData.maxFeePerGas;
4646
+ if (tx.maxPriorityFeePerGas == null) tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
4647
+ }
4648
+ } else if (feeData.gasPrice != null) {
4649
+ if (hasEip1559) logger.throwError("network does not support EIP-1559", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "populateTransaction" });
4650
+ if (tx.gasPrice == null) tx.gasPrice = feeData.gasPrice;
4651
+ tx.type = 0;
4652
+ } else logger.throwError("failed to get consistent fee data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation: "signer.getFeeData" });
4653
+ } else if (tx.type === 2) {
4661
4654
  if (tx.maxFeePerGas == null) tx.maxFeePerGas = feeData.maxFeePerGas;
4662
4655
  if (tx.maxPriorityFeePerGas == null) tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
4663
4656
  }
@@ -5436,7 +5429,6 @@ var require_json_rpc_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
5436
5429
  case "getLogs":
5437
5430
  if (params.filter && params.filter.address != null) params.filter.address = getLowerCase(params.filter.address);
5438
5431
  return ["eth_getLogs", [params.filter]];
5439
- default: break;
5440
5432
  }
5441
5433
  return null;
5442
5434
  };
@@ -5790,7 +5782,10 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
5790
5782
  this._deflate = null;
5791
5783
  this._inflate = null;
5792
5784
  this.params = null;
5793
- if (!zlibLimiter) zlibLimiter = new Limiter(this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10);
5785
+ if (!zlibLimiter) {
5786
+ const concurrency = this._options.concurrencyLimit !== void 0 ? this._options.concurrencyLimit : 10;
5787
+ zlibLimiter = new Limiter(concurrency);
5788
+ }
5794
5789
  }
5795
5790
  /**
5796
5791
  * @type {String}
@@ -6717,7 +6712,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6717
6712
  const { mask: applyMask, toBuffer } = require_buffer_util();
6718
6713
  const kByteLength = Symbol("kByteLength");
6719
6714
  const maskBuffer = Buffer.alloc(4);
6720
- const RANDOM_POOL_SIZE = 8 * 1024;
6715
+ const RANDOM_POOL_SIZE = 8192;
6721
6716
  let randomPool;
6722
6717
  let randomPoolPointer = RANDOM_POOL_SIZE;
6723
6718
  const DEFAULT = 0;
@@ -6792,12 +6787,13 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6792
6787
  offset = 6;
6793
6788
  }
6794
6789
  let dataLength;
6795
- if (typeof data === "string") if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength];
6796
- else {
6797
- data = Buffer.from(data);
6798
- dataLength = data.length;
6799
- }
6800
- else {
6790
+ if (typeof data === "string") {
6791
+ if ((!options.mask || skipMasking) && options[kByteLength] !== void 0) dataLength = options[kByteLength];
6792
+ else {
6793
+ data = Buffer.from(data);
6794
+ dataLength = data.length;
6795
+ }
6796
+ } else {
6801
6797
  dataLength = data.length;
6802
6798
  merge = options.mask && options.readOnly && !skipMasking;
6803
6799
  }
@@ -6908,15 +6904,16 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6908
6904
  readOnly,
6909
6905
  rsv1: false
6910
6906
  };
6911
- if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([
6912
- this.getBlobData,
6913
- data,
6914
- false,
6915
- options,
6916
- cb
6917
- ]);
6918
- else this.getBlobData(data, false, options, cb);
6919
- else if (this._state !== DEFAULT) this.enqueue([
6907
+ if (isBlob(data)) {
6908
+ if (this._state !== DEFAULT) this.enqueue([
6909
+ this.getBlobData,
6910
+ data,
6911
+ false,
6912
+ options,
6913
+ cb
6914
+ ]);
6915
+ else this.getBlobData(data, false, options, cb);
6916
+ } else if (this._state !== DEFAULT) this.enqueue([
6920
6917
  this.dispatch,
6921
6918
  data,
6922
6919
  false,
@@ -6958,15 +6955,16 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6958
6955
  readOnly,
6959
6956
  rsv1: false
6960
6957
  };
6961
- if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([
6962
- this.getBlobData,
6963
- data,
6964
- false,
6965
- options,
6966
- cb
6967
- ]);
6968
- else this.getBlobData(data, false, options, cb);
6969
- else if (this._state !== DEFAULT) this.enqueue([
6958
+ if (isBlob(data)) {
6959
+ if (this._state !== DEFAULT) this.enqueue([
6960
+ this.getBlobData,
6961
+ data,
6962
+ false,
6963
+ options,
6964
+ cb
6965
+ ]);
6966
+ else this.getBlobData(data, false, options, cb);
6967
+ } else if (this._state !== DEFAULT) this.enqueue([
6970
6968
  this.dispatch,
6971
6969
  data,
6972
6970
  false,
@@ -7027,15 +7025,16 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7027
7025
  readOnly,
7028
7026
  rsv1
7029
7027
  };
7030
- if (isBlob(data)) if (this._state !== DEFAULT) this.enqueue([
7031
- this.getBlobData,
7032
- data,
7033
- this._compress,
7034
- opts,
7035
- cb
7036
- ]);
7037
- else this.getBlobData(data, this._compress, opts, cb);
7038
- else if (this._state !== DEFAULT) this.enqueue([
7028
+ if (isBlob(data)) {
7029
+ if (this._state !== DEFAULT) this.enqueue([
7030
+ this.getBlobData,
7031
+ data,
7032
+ this._compress,
7033
+ opts,
7034
+ cb
7035
+ ]);
7036
+ else this.getBlobData(data, this._compress, opts, cb);
7037
+ } else if (this._state !== DEFAULT) this.enqueue([
7039
7038
  this.dispatch,
7040
7039
  data,
7041
7040
  this._compress,
@@ -7468,51 +7467,54 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7468
7467
  let i = 0;
7469
7468
  for (; i < header.length; i++) {
7470
7469
  code = header.charCodeAt(i);
7471
- if (extensionName === void 0) if (end === -1 && tokenChars[code] === 1) {
7472
- if (start === -1) start = i;
7473
- } else if (i !== 0 && (code === 32 || code === 9)) {
7474
- if (end === -1 && start !== -1) end = i;
7475
- } else if (code === 59 || code === 44) {
7476
- if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
7477
- if (end === -1) end = i;
7478
- const name = header.slice(start, end);
7479
- if (code === 44) {
7480
- push(offers, name, params);
7481
- params = Object.create(null);
7482
- } else extensionName = name;
7483
- start = end = -1;
7484
- } else throw new SyntaxError(`Unexpected character at index ${i}`);
7485
- else if (paramName === void 0) if (end === -1 && tokenChars[code] === 1) {
7486
- if (start === -1) start = i;
7487
- } else if (code === 32 || code === 9) {
7488
- if (end === -1 && start !== -1) end = i;
7489
- } else if (code === 59 || code === 44) {
7490
- if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
7491
- if (end === -1) end = i;
7492
- push(params, header.slice(start, end), true);
7493
- if (code === 44) {
7494
- push(offers, extensionName, params);
7495
- params = Object.create(null);
7496
- extensionName = void 0;
7497
- }
7498
- start = end = -1;
7499
- } else if (code === 61 && start !== -1 && end === -1) {
7500
- paramName = header.slice(start, i);
7501
- start = end = -1;
7502
- } else throw new SyntaxError(`Unexpected character at index ${i}`);
7503
- else if (isEscaping) {
7470
+ if (extensionName === void 0) {
7471
+ if (end === -1 && tokenChars[code] === 1) {
7472
+ if (start === -1) start = i;
7473
+ } else if (i !== 0 && (code === 32 || code === 9)) {
7474
+ if (end === -1 && start !== -1) end = i;
7475
+ } else if (code === 59 || code === 44) {
7476
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
7477
+ if (end === -1) end = i;
7478
+ const name = header.slice(start, end);
7479
+ if (code === 44) {
7480
+ push(offers, name, params);
7481
+ params = Object.create(null);
7482
+ } else extensionName = name;
7483
+ start = end = -1;
7484
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
7485
+ } else if (paramName === void 0) {
7486
+ if (end === -1 && tokenChars[code] === 1) {
7487
+ if (start === -1) start = i;
7488
+ } else if (code === 32 || code === 9) {
7489
+ if (end === -1 && start !== -1) end = i;
7490
+ } else if (code === 59 || code === 44) {
7491
+ if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
7492
+ if (end === -1) end = i;
7493
+ push(params, header.slice(start, end), true);
7494
+ if (code === 44) {
7495
+ push(offers, extensionName, params);
7496
+ params = Object.create(null);
7497
+ extensionName = void 0;
7498
+ }
7499
+ start = end = -1;
7500
+ } else if (code === 61 && start !== -1 && end === -1) {
7501
+ paramName = header.slice(start, i);
7502
+ start = end = -1;
7503
+ } else throw new SyntaxError(`Unexpected character at index ${i}`);
7504
+ } else if (isEscaping) {
7504
7505
  if (tokenChars[code] !== 1) throw new SyntaxError(`Unexpected character at index ${i}`);
7505
7506
  if (start === -1) start = i;
7506
7507
  else if (!mustUnescape) mustUnescape = true;
7507
7508
  isEscaping = false;
7508
- } else if (inQuotes) if (tokenChars[code] === 1) {
7509
- if (start === -1) start = i;
7510
- } else if (code === 34 && start !== -1) {
7511
- inQuotes = false;
7512
- end = i;
7513
- } else if (code === 92) isEscaping = true;
7514
- else throw new SyntaxError(`Unexpected character at index ${i}`);
7515
- else if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true;
7509
+ } else if (inQuotes) {
7510
+ if (tokenChars[code] === 1) {
7511
+ if (start === -1) start = i;
7512
+ } else if (code === 34 && start !== -1) {
7513
+ inQuotes = false;
7514
+ end = i;
7515
+ } else if (code === 92) isEscaping = true;
7516
+ else throw new SyntaxError(`Unexpected character at index ${i}`);
7517
+ } else if (code === 34 && header.charCodeAt(i - 1) === 61) inQuotes = true;
7516
7518
  else if (end === -1 && tokenChars[code] === 1) {
7517
7519
  if (start === -1) start = i;
7518
7520
  } else if (start !== -1 && (code === 32 || code === 9)) {
@@ -7591,7 +7593,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7591
7593
  const { EventTarget: { addEventListener, removeEventListener } } = require_event_target();
7592
7594
  const { format, parse } = require_extension();
7593
7595
  const { toBuffer } = require_buffer_util();
7594
- const closeTimeout = 30 * 1e3;
7596
+ const closeTimeout = 3e4;
7595
7597
  const kAborted = Symbol("kAborted");
7596
7598
  const protocolVersions = [8, 13];
7597
7599
  const readyStates = [
@@ -7635,10 +7637,12 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7635
7637
  this._isServer = false;
7636
7638
  this._redirects = 0;
7637
7639
  if (protocols === void 0) protocols = [];
7638
- else if (!Array.isArray(protocols)) if (typeof protocols === "object" && protocols !== null) {
7639
- options = protocols;
7640
- protocols = [];
7641
- } else protocols = [protocols];
7640
+ else if (!Array.isArray(protocols)) {
7641
+ if (typeof protocols === "object" && protocols !== null) {
7642
+ options = protocols;
7643
+ protocols = [];
7644
+ } else protocols = [protocols];
7645
+ }
7642
7646
  initAsClient(this, address, protocols, options);
7643
7647
  } else {
7644
7648
  this._autoPong = options.autoPong;
@@ -8089,7 +8093,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8089
8093
  allowSynchronousEvents: true,
8090
8094
  autoPong: true,
8091
8095
  protocolVersion: protocolVersions[1],
8092
- maxPayload: 100 * 1024 * 1024,
8096
+ maxPayload: 104857600,
8093
8097
  skipUTF8Validation: false,
8094
8098
  perMessageDeflate: true,
8095
8099
  followRedirects: false,
@@ -8159,8 +8163,10 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8159
8163
  }
8160
8164
  opts.headers["Sec-WebSocket-Protocol"] = protocols.join(",");
8161
8165
  }
8162
- if (opts.origin) if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin;
8163
- else opts.headers.Origin = opts.origin;
8166
+ if (opts.origin) {
8167
+ if (opts.protocolVersion < 13) opts.headers["Sec-WebSocket-Origin"] = opts.origin;
8168
+ else opts.headers.Origin = opts.origin;
8169
+ }
8164
8170
  if (parsedUrl.username || parsedUrl.password) opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
8165
8171
  if (isIpcUrl) {
8166
8172
  const parts = opts.path.split(":");
@@ -8749,7 +8755,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
8749
8755
  options = {
8750
8756
  allowSynchronousEvents: true,
8751
8757
  autoPong: true,
8752
- maxPayload: 100 * 1024 * 1024,
8758
+ maxPayload: 104857600,
8753
8759
  skipUTF8Validation: false,
8754
8760
  perMessageDeflate: false,
8755
8761
  handleProtocols: null,
@@ -8831,9 +8837,10 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
8831
8837
  this._removeListeners();
8832
8838
  this._removeListeners = this._server = null;
8833
8839
  }
8834
- if (this.clients) if (!this.clients.size) process.nextTick(emitClose, this);
8835
- else this._shouldEmitClose = true;
8836
- else process.nextTick(emitClose, this);
8840
+ if (this.clients) {
8841
+ if (!this.clients.size) process.nextTick(emitClose, this);
8842
+ else this._shouldEmitClose = true;
8843
+ } else process.nextTick(emitClose, this);
8837
8844
  } else {
8838
8845
  const server = this._server;
8839
8846
  this._removeListeners();
@@ -9434,9 +9441,7 @@ var require_websocket_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
9434
9441
  case "willPoll":
9435
9442
  case "didPoll":
9436
9443
  case "error": break;
9437
- default:
9438
- console.log("unhandled:", event);
9439
- break;
9444
+ default: console.log("unhandled:", event);
9440
9445
  }
9441
9446
  };
9442
9447
  WebSocketProvider.prototype._stopEvent = function(event) {
@@ -10318,7 +10323,6 @@ var require_etherscan_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
10318
10323
  case "arbitrum-goerli": return "https://api-goerli.arbiscan.io";
10319
10324
  case "optimism": return "https://api-optimistic.etherscan.io";
10320
10325
  case "optimism-goerli": return "https://api-goerli-optimistic.etherscan.io";
10321
- default:
10322
10326
  }
10323
10327
  return logger.throwArgumentError("unsupported network", "network", this.network.name);
10324
10328
  };
@@ -10859,8 +10863,10 @@ var require_fallback_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
10859
10863
  } });
10860
10864
  if (config.start) result.start = config.start;
10861
10865
  if (now) result.duration = now - config.start;
10862
- if (config.done) if (config.error) result.error = config.error;
10863
- else result.result = config.result || null;
10866
+ if (config.done) {
10867
+ if (config.error) result.error = config.error;
10868
+ else result.result = config.result || null;
10869
+ }
10864
10870
  return result;
10865
10871
  }
10866
10872
  function normalizedTally(normalize, quorum) {