@capxul/mcp 2.6.0 → 2.7.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 { t as __commonJSMin } from "./chunk-2rV9d50f.mjs";
2
- import { t as require_lib$1 } from "./lib-DYnihSM4.mjs";
3
- import { n as require_lib$2, t as require_lib$3 } from "./lib-BuBlVXhu.mjs";
4
- import { a as require_lib$4, i as require_lib$5, n as require_lib$6, t as require_lib$7 } from "./lib-6VZsqqnl.mjs";
5
- import { r as require_lib$8, t as require_lib$9 } from "./lib-CQ_IHsde.mjs";
1
+ import { t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
2
+ import { t as require_lib$1 } from "./lib-C5eHZg-C.mjs";
3
+ import { n as require_lib$2, t as require_lib$3 } from "./lib-CLDSz8qo.mjs";
4
+ import { a as require_lib$4, i as require_lib$5, n as require_lib$6, t as require_lib$7 } from "./lib-xFNz3osG.mjs";
5
+ import { r as require_lib$8, t as require_lib$9 } from "./lib-DGJKxDqZ.mjs";
6
6
  //#region ../../node_modules/.pnpm/@ethersproject+abi@5.8.0/node_modules/@ethersproject/abi/lib/_version.js
7
7
  var require__version = /* @__PURE__ */ __commonJSMin(((exports) => {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -132,13 +132,15 @@ var require_fragments = /* @__PURE__ */ __commonJSMin(((exports) => {
132
132
  }
133
133
  }
134
134
  if (node.state.allowName) {
135
- if (node.name !== "") if (node.name === "indexed") {
136
- if (!allowIndexed) throwError(i);
137
- if (node.indexed) throwError(i);
138
- node.indexed = true;
139
- node.name = "";
140
- } else if (checkModifier(node.type, node.name)) node.name = "";
141
- else node.state.allowName = false;
135
+ if (node.name !== "") {
136
+ if (node.name === "indexed") {
137
+ if (!allowIndexed) throwError(i);
138
+ if (node.indexed) throwError(i);
139
+ node.indexed = true;
140
+ node.name = "";
141
+ } else if (checkModifier(node.type, node.name)) node.name = "";
142
+ else node.state.allowName = false;
143
+ }
142
144
  }
143
145
  break;
144
146
  case "[":
@@ -814,11 +816,13 @@ var require_abstract_coder = /* @__PURE__ */ __commonJSMin(((exports) => {
814
816
  };
815
817
  Reader.prototype._peekBytes = function(offset, length, loose) {
816
818
  var alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;
817
- if (this._offset + alignedLength > this._data.length) if (this.allowLoose && loose && this._offset + length <= this._data.length) alignedLength = length;
818
- else logger.throwError("data out-of-bounds", logger_1.Logger.errors.BUFFER_OVERRUN, {
819
- length: this._data.length,
820
- offset: this._offset + alignedLength
821
- });
819
+ if (this._offset + alignedLength > this._data.length) {
820
+ if (this.allowLoose && loose && this._offset + length <= this._data.length) alignedLength = length;
821
+ else logger.throwError("data out-of-bounds", logger_1.Logger.errors.BUFFER_OVERRUN, {
822
+ length: this._data.length,
823
+ offset: this._offset + alignedLength
824
+ });
825
+ }
822
826
  return this._data.slice(this._offset, this._offset + alignedLength);
823
827
  };
824
828
  Reader.prototype.subReader = function(offset) {
@@ -1861,7 +1865,6 @@ var require_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
1861
1865
  errorName = error.name;
1862
1866
  errorSignature = error.format();
1863
1867
  } catch (error) {}
1864
- break;
1865
1868
  }
1866
1869
  return logger.throwError("call revert exception" + message, logger_1.Logger.errors.CALL_EXCEPTION, {
1867
1870
  method: functionFragment.format(),
@@ -1919,11 +1922,12 @@ var require_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
1919
1922
  if (values.length !== eventFragment.inputs.length) logger.throwArgumentError("event arguments/values mismatch", "values", values);
1920
1923
  eventFragment.inputs.forEach(function(param, index) {
1921
1924
  var value = values[index];
1922
- if (param.indexed) if (param.type === "string") topics.push((0, hash_1.id)(value));
1923
- else if (param.type === "bytes") topics.push((0, keccak256_1.keccak256)(value));
1924
- else if (param.baseType === "tuple" || param.baseType === "array") throw new Error("not implemented");
1925
- else topics.push(_this._abiCoder.encode([param.type], [value]));
1926
- else {
1925
+ if (param.indexed) {
1926
+ if (param.type === "string") topics.push((0, hash_1.id)(value));
1927
+ else if (param.type === "bytes") topics.push((0, keccak256_1.keccak256)(value));
1928
+ else if (param.baseType === "tuple" || param.baseType === "array") throw new Error("not implemented");
1929
+ else topics.push(_this._abiCoder.encode([param.type], [value]));
1930
+ } else {
1927
1931
  dataTypes.push(param);
1928
1932
  dataValues.push(value);
1929
1933
  }
@@ -1948,17 +1952,18 @@ var require_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
1948
1952
  var nonIndexed = [];
1949
1953
  var dynamic = [];
1950
1954
  eventFragment.inputs.forEach(function(param, index) {
1951
- if (param.indexed) if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") {
1952
- indexed.push(fragments_1.ParamType.fromObject({
1953
- type: "bytes32",
1954
- name: param.name
1955
- }));
1956
- dynamic.push(true);
1955
+ if (param.indexed) {
1956
+ if (param.type === "string" || param.type === "bytes" || param.baseType === "tuple" || param.baseType === "array") {
1957
+ indexed.push(fragments_1.ParamType.fromObject({
1958
+ type: "bytes32",
1959
+ name: param.name
1960
+ }));
1961
+ dynamic.push(true);
1962
+ } else {
1963
+ indexed.push(param);
1964
+ dynamic.push(false);
1965
+ }
1957
1966
  } else {
1958
- indexed.push(param);
1959
- dynamic.push(false);
1960
- }
1961
- else {
1962
1967
  nonIndexed.push(param);
1963
1968
  dynamic.push(false);
1964
1969
  }
@@ -1968,20 +1973,21 @@ var require_interface = /* @__PURE__ */ __commonJSMin(((exports) => {
1968
1973
  var result = [];
1969
1974
  var nonIndexedIndex = 0, indexedIndex = 0;
1970
1975
  eventFragment.inputs.forEach(function(param, index) {
1971
- if (param.indexed) if (resultIndexed == null) result[index] = new Indexed({
1972
- _isIndexed: true,
1973
- hash: null
1974
- });
1975
- else if (dynamic[index]) result[index] = new Indexed({
1976
- _isIndexed: true,
1977
- hash: resultIndexed[indexedIndex++]
1978
- });
1979
- else try {
1980
- result[index] = resultIndexed[indexedIndex++];
1981
- } catch (error) {
1982
- result[index] = error;
1983
- }
1984
- else try {
1976
+ if (param.indexed) {
1977
+ if (resultIndexed == null) result[index] = new Indexed({
1978
+ _isIndexed: true,
1979
+ hash: null
1980
+ });
1981
+ else if (dynamic[index]) result[index] = new Indexed({
1982
+ _isIndexed: true,
1983
+ hash: resultIndexed[indexedIndex++]
1984
+ });
1985
+ else try {
1986
+ result[index] = resultIndexed[indexedIndex++];
1987
+ } catch (error) {
1988
+ result[index] = error;
1989
+ }
1990
+ } else try {
1985
1991
  result[index] = resultNonIndexed[nonIndexedIndex++];
1986
1992
  } catch (error) {
1987
1993
  result[index] = error;
@@ -1,6 +1,6 @@
1
- import { r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.mjs";
2
- import { t as require_lib$5 } from "./lib-DYnihSM4.mjs";
3
- import { n as require_lib$7, t as require_lib$6 } from "./lib-BuBlVXhu.mjs";
1
+ import { r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
2
+ import { t as require_lib$5 } from "./lib-C5eHZg-C.mjs";
3
+ import { n as require_lib$7, t as require_lib$6 } from "./lib-CLDSz8qo.mjs";
4
4
  //#region ../../node_modules/.pnpm/bn.js@5.2.3/node_modules/bn.js/lib/bn.js
5
5
  var require_bn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6
6
  (function(module$1, exports$1) {
@@ -61,10 +61,12 @@ var require_bn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
61
61
  start++;
62
62
  this.negative = 1;
63
63
  }
64
- if (start < number.length) if (base === 16) this._parseHex(number, start, endian);
65
- else {
66
- this._parseBase(number, base, start);
67
- if (endian === "le") this._initArray(this.toArray(), base, endian);
64
+ if (start < number.length) {
65
+ if (base === 16) this._parseHex(number, start, endian);
66
+ else {
67
+ this._parseBase(number, base, start);
68
+ if (endian === "le") this._initArray(this.toArray(), base, endian);
69
+ }
68
70
  }
69
71
  };
70
72
  BN.prototype._initNumber = function _initNumber(number, base, endian) {
@@ -2676,13 +2678,15 @@ var require_bignumber = /* @__PURE__ */ __commonJSMin(((exports) => {
2676
2678
  return logger.throwError("this platform does not support BigInt", logger_1.Logger.errors.UNSUPPORTED_OPERATION, { value: this.toString() });
2677
2679
  };
2678
2680
  BigNumber.prototype.toString = function() {
2679
- if (arguments.length > 0) if (arguments[0] === 10) {
2680
- if (!_warnedToStringRadix) {
2681
- _warnedToStringRadix = true;
2682
- logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed");
2683
- }
2684
- } else if (arguments[0] === 16) logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});
2685
- else logger.throwError("BigNumber.toString does not accept parameters", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});
2681
+ if (arguments.length > 0) {
2682
+ if (arguments[0] === 10) {
2683
+ if (!_warnedToStringRadix) {
2684
+ _warnedToStringRadix = true;
2685
+ logger.warn("BigNumber.toString does not accept any parameters; base-10 is assumed");
2686
+ }
2687
+ } else if (arguments[0] === 16) logger.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});
2688
+ else logger.throwError("BigNumber.toString does not accept parameters", logger_1.Logger.errors.UNEXPECTED_ARGUMENT, {});
2689
+ }
2686
2690
  return toBN(this).toString(10);
2687
2691
  };
2688
2692
  BigNumber.prototype.toHexString = function() {
@@ -2709,14 +2713,16 @@ var require_bignumber = /* @__PURE__ */ __commonJSMin(((exports) => {
2709
2713
  var anyValue = value;
2710
2714
  if (typeof anyValue === "bigint") return BigNumber.from(anyValue.toString());
2711
2715
  if ((0, bytes_1.isBytes)(anyValue)) return BigNumber.from((0, bytes_1.hexlify)(anyValue));
2712
- if (anyValue) if (anyValue.toHexString) {
2713
- var hex = anyValue.toHexString();
2714
- if (typeof hex === "string") return BigNumber.from(hex);
2715
- } else {
2716
- var hex = anyValue._hex;
2717
- if (hex == null && anyValue.type === "BigNumber") hex = anyValue.hex;
2718
- if (typeof hex === "string") {
2719
- if ((0, bytes_1.isHexString)(hex) || hex[0] === "-" && (0, bytes_1.isHexString)(hex.substring(1))) return BigNumber.from(hex);
2716
+ if (anyValue) {
2717
+ if (anyValue.toHexString) {
2718
+ var hex = anyValue.toHexString();
2719
+ if (typeof hex === "string") return BigNumber.from(hex);
2720
+ } else {
2721
+ var hex = anyValue._hex;
2722
+ if (hex == null && anyValue.type === "BigNumber") hex = anyValue.hex;
2723
+ if (typeof hex === "string") {
2724
+ if ((0, bytes_1.isHexString)(hex) || hex[0] === "-" && (0, bytes_1.isHexString)(hex.substring(1))) return BigNumber.from(hex);
2725
+ }
2720
2726
  }
2721
2727
  }
2722
2728
  return logger.throwArgumentError("invalid BigNumber value", "value", value);
@@ -2852,15 +2858,16 @@ var require_fixednumber = /* @__PURE__ */ __commonJSMin(((exports) => {
2852
2858
  var signed = true;
2853
2859
  var width = 128;
2854
2860
  var decimals = 18;
2855
- if (typeof value === "string") if (value === "fixed") {} else if (value === "ufixed") signed = false;
2856
- else {
2857
- var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);
2858
- if (!match) logger.throwArgumentError("invalid fixed format", "format", value);
2859
- signed = match[1] !== "u";
2860
- width = parseInt(match[2]);
2861
- decimals = parseInt(match[3]);
2862
- }
2863
- else if (value) {
2861
+ if (typeof value === "string") {
2862
+ if (value === "fixed") {} else if (value === "ufixed") signed = false;
2863
+ else {
2864
+ var match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);
2865
+ if (!match) logger.throwArgumentError("invalid fixed format", "format", value);
2866
+ signed = match[1] !== "u";
2867
+ width = parseInt(match[2]);
2868
+ decimals = parseInt(match[3]);
2869
+ }
2870
+ } else if (value) {
2864
2871
  var check = function(key, type, defaultValue) {
2865
2872
  if (value[key] == null) return defaultValue;
2866
2873
  if (typeof value[key] !== type) logger.throwArgumentError("invalid fixed format (" + key + " not " + type + ")", "format." + key, value[key]);
@@ -3434,7 +3441,7 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
3434
3441
  if (!(0, bytes_1.isHexString)(address, 20)) logger.throwArgumentError("invalid address", "address", address);
3435
3442
  address = address.toLowerCase();
3436
3443
  var chars = address.substring(2).split("");
3437
- var expanded = new Uint8Array(40);
3444
+ var expanded = /* @__PURE__ */ new Uint8Array(40);
3438
3445
  for (var i = 0; i < 40; i++) expanded[i] = chars[i].charCodeAt(0);
3439
3446
  var hashed = (0, bytes_1.arrayify)((0, keccak256_1.keccak256)(expanded));
3440
3447
  for (var i = 0; i < 40; i += 2) {