@inco/js 0.1.22 → 0.1.24
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/binary.d.ts +3 -0
- package/dist/encryption/index.cjs +127 -132
- package/dist/encryption/index.mjs +127 -132
- package/dist/index.cjs +138 -141
- package/dist/index.mjs +138 -141
- package/dist/lite/ecies.d.ts +1 -1
- package/dist/lite/index.cjs +13752 -13673
- package/dist/lite/index.d.ts +3 -2
- package/dist/lite/index.mjs +17320 -17303
- package/dist/lite/lightning.d.ts +99 -0
- package/dist/local/index.cjs +2573 -25
- package/dist/local/index.mjs +7837 -5352
- package/dist/reencryption/index.cjs +127 -132
- package/dist/reencryption/index.mjs +127 -132
- package/dist/viem.d.ts +52 -53
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -41,7 +41,7 @@ var __export = (target, all) => {
|
|
41
41
|
};
|
42
42
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
43
43
|
|
44
|
-
// node_modules/viem/_esm/utils/data/isHex.js
|
44
|
+
// ../node_modules/viem/_esm/utils/data/isHex.js
|
45
45
|
function isHex(value6, { strict: strict2 = true } = {}) {
|
46
46
|
if (!value6)
|
47
47
|
return false;
|
@@ -50,19 +50,18 @@ function isHex(value6, { strict: strict2 = true } = {}) {
|
|
50
50
|
return strict2 ? /^0x[0-9a-fA-F]*$/.test(value6) : value6.startsWith("0x");
|
51
51
|
}
|
52
52
|
|
53
|
-
// node_modules/viem/_esm/utils/data/size.js
|
53
|
+
// ../node_modules/viem/_esm/utils/data/size.js
|
54
54
|
function size21(value6) {
|
55
55
|
if (isHex(value6, { strict: false }))
|
56
56
|
return Math.ceil((value6.length - 2) / 2);
|
57
57
|
return value6.length;
|
58
58
|
}
|
59
|
-
var init_size = () => {
|
60
|
-
};
|
59
|
+
var init_size = () => {};
|
61
60
|
|
62
|
-
// node_modules/viem/_esm/errors/version.js
|
63
|
-
var version = "2.
|
61
|
+
// ../node_modules/viem/_esm/errors/version.js
|
62
|
+
var version = "2.24.3";
|
64
63
|
|
65
|
-
// node_modules/viem/_esm/errors/base.js
|
64
|
+
// ../node_modules/viem/_esm/errors/base.js
|
66
65
|
function walk(err, fn) {
|
67
66
|
if (fn?.(err))
|
68
67
|
return err;
|
@@ -150,7 +149,7 @@ var init_base = __esm(() => {
|
|
150
149
|
};
|
151
150
|
});
|
152
151
|
|
153
|
-
// node_modules/viem/_esm/errors/abi.js
|
152
|
+
// ../node_modules/viem/_esm/errors/abi.js
|
154
153
|
var AbiEncodingLengthMismatchError, BytesSizeMismatchError, UnsupportedPackedAbiType;
|
155
154
|
var init_abi = __esm(() => {
|
156
155
|
init_base();
|
@@ -180,7 +179,7 @@ var init_abi = __esm(() => {
|
|
180
179
|
};
|
181
180
|
});
|
182
181
|
|
183
|
-
// node_modules/viem/_esm/errors/data.js
|
182
|
+
// ../node_modules/viem/_esm/errors/data.js
|
184
183
|
var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
|
185
184
|
var init_data = __esm(() => {
|
186
185
|
init_base();
|
@@ -196,7 +195,7 @@ var init_data = __esm(() => {
|
|
196
195
|
};
|
197
196
|
});
|
198
197
|
|
199
|
-
// node_modules/viem/_esm/utils/data/pad.js
|
198
|
+
// ../node_modules/viem/_esm/utils/data/pad.js
|
200
199
|
function pad(hexOrBytes, { dir: dir2, size: size22 = 32 } = {}) {
|
201
200
|
if (typeof hexOrBytes === "string")
|
202
201
|
return padHex(hexOrBytes, { dir: dir2, size: size22 });
|
@@ -234,7 +233,7 @@ var init_pad = __esm(() => {
|
|
234
233
|
init_data();
|
235
234
|
});
|
236
235
|
|
237
|
-
// node_modules/viem/_esm/errors/encoding.js
|
236
|
+
// ../node_modules/viem/_esm/errors/encoding.js
|
238
237
|
var IntegerOutOfRangeError, SizeOverflowError;
|
239
238
|
var init_encoding = __esm(() => {
|
240
239
|
init_base();
|
@@ -250,7 +249,7 @@ var init_encoding = __esm(() => {
|
|
250
249
|
};
|
251
250
|
});
|
252
251
|
|
253
|
-
// node_modules/viem/_esm/utils/data/trim.js
|
252
|
+
// ../node_modules/viem/_esm/utils/data/trim.js
|
254
253
|
function trim(hexOrBytes, { dir: dir2 = "left" } = {}) {
|
255
254
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
256
255
|
let sliceLength = 0;
|
@@ -269,7 +268,7 @@ function trim(hexOrBytes, { dir: dir2 = "left" } = {}) {
|
|
269
268
|
return data;
|
270
269
|
}
|
271
270
|
|
272
|
-
// node_modules/viem/_esm/utils/encoding/fromHex.js
|
271
|
+
// ../node_modules/viem/_esm/utils/encoding/fromHex.js
|
273
272
|
function assertSize(hexOrBytes, { size: size22 }) {
|
274
273
|
if (size21(hexOrBytes) > size22)
|
275
274
|
throw new SizeOverflowError({
|
@@ -298,7 +297,7 @@ var init_fromHex = __esm(() => {
|
|
298
297
|
init_size();
|
299
298
|
});
|
300
299
|
|
301
|
-
// node_modules/viem/_esm/utils/encoding/toHex.js
|
300
|
+
// ../node_modules/viem/_esm/utils/encoding/toHex.js
|
302
301
|
function toHex(value6, opts = {}) {
|
303
302
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
304
303
|
return numberToHex(value6, opts);
|
@@ -370,7 +369,7 @@ var init_toHex = __esm(() => {
|
|
370
369
|
encoder2 = /* @__PURE__ */ new TextEncoder;
|
371
370
|
});
|
372
371
|
|
373
|
-
// node_modules/viem/_esm/utils/encoding/toBytes.js
|
372
|
+
// ../node_modules/viem/_esm/utils/encoding/toBytes.js
|
374
373
|
function toBytes(value6, opts = {}) {
|
375
374
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
376
375
|
return numberToBytes(value6, opts);
|
@@ -475,8 +474,7 @@ function aoutput(out, instance) {
|
|
475
474
|
throw new Error("digestInto() expects output buffer of length at least " + min4);
|
476
475
|
}
|
477
476
|
}
|
478
|
-
var init__assert = () => {
|
479
|
-
};
|
477
|
+
var init__assert = () => {};
|
480
478
|
|
481
479
|
// ../node_modules/@noble/hashes/esm/_u64.js
|
482
480
|
function fromBig(n, le = false) {
|
@@ -744,7 +742,7 @@ var init_sha3 = __esm(() => {
|
|
744
742
|
shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
745
743
|
});
|
746
744
|
|
747
|
-
// node_modules/viem/_esm/utils/hash/keccak256.js
|
745
|
+
// ../node_modules/viem/_esm/utils/hash/keccak256.js
|
748
746
|
function keccak256(value6, to_) {
|
749
747
|
const to = to_ || "hex";
|
750
748
|
const bytes = keccak_256(isHex(value6, { strict: false }) ? toBytes(value6) : value6);
|
@@ -758,7 +756,7 @@ var init_keccak256 = __esm(() => {
|
|
758
756
|
init_toHex();
|
759
757
|
});
|
760
758
|
|
761
|
-
// node_modules/viem/_esm/errors/address.js
|
759
|
+
// ../node_modules/viem/_esm/errors/address.js
|
762
760
|
var InvalidAddressError;
|
763
761
|
var init_address = __esm(() => {
|
764
762
|
init_base();
|
@@ -775,7 +773,7 @@ var init_address = __esm(() => {
|
|
775
773
|
};
|
776
774
|
});
|
777
775
|
|
778
|
-
// node_modules/viem/_esm/utils/lru.js
|
776
|
+
// ../node_modules/viem/_esm/utils/lru.js
|
779
777
|
var LruMap;
|
780
778
|
var init_lru = __esm(() => {
|
781
779
|
LruMap = class LruMap extends Map {
|
@@ -809,7 +807,7 @@ var init_lru = __esm(() => {
|
|
809
807
|
};
|
810
808
|
});
|
811
809
|
|
812
|
-
// node_modules/viem/_esm/utils/address/getAddress.js
|
810
|
+
// ../node_modules/viem/_esm/utils/address/getAddress.js
|
813
811
|
function checksumAddress(address_, chainId) {
|
814
812
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
815
813
|
return checksumAddressCache.get(`${address_}.${chainId}`);
|
@@ -836,7 +834,7 @@ var init_getAddress = __esm(() => {
|
|
836
834
|
checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
837
835
|
});
|
838
836
|
|
839
|
-
// node_modules/viem/_esm/utils/address/isAddress.js
|
837
|
+
// ../node_modules/viem/_esm/utils/address/isAddress.js
|
840
838
|
function isAddress(address, options) {
|
841
839
|
const { strict: strict2 = true } = options ?? {};
|
842
840
|
const cacheKey = `${address}.${strict2}`;
|
@@ -862,12 +860,12 @@ var init_isAddress = __esm(() => {
|
|
862
860
|
isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
863
861
|
});
|
864
862
|
|
865
|
-
// node_modules/viem/_esm/utils/data/concat.js
|
863
|
+
// ../node_modules/viem/_esm/utils/data/concat.js
|
866
864
|
function concatHex(values7) {
|
867
865
|
return `0x${values7.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
868
866
|
}
|
869
867
|
|
870
|
-
// node_modules/viem/_esm/utils/data/slice.js
|
868
|
+
// ../node_modules/viem/_esm/utils/data/slice.js
|
871
869
|
function slice(value6, start5, end6, { strict: strict2 } = {}) {
|
872
870
|
if (isHex(value6, { strict: false }))
|
873
871
|
return sliceHex(value6, start5, end6, {
|
@@ -913,7 +911,7 @@ var init_slice = __esm(() => {
|
|
913
911
|
init_size();
|
914
912
|
});
|
915
913
|
|
916
|
-
// node_modules/viem/_esm/utils/regex.js
|
914
|
+
// ../node_modules/viem/_esm/utils/regex.js
|
917
915
|
var arrayRegex, bytesRegex, integerRegex;
|
918
916
|
var init_regex = __esm(() => {
|
919
917
|
arrayRegex = /^(.*)\[([0-9]*)\]$/;
|
@@ -921,7 +919,7 @@ var init_regex = __esm(() => {
|
|
921
919
|
integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
922
920
|
});
|
923
921
|
|
924
|
-
// node_modules/viem/_esm/errors/cursor.js
|
922
|
+
// ../node_modules/viem/_esm/errors/cursor.js
|
925
923
|
var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
|
926
924
|
var init_cursor = __esm(() => {
|
927
925
|
init_base();
|
@@ -944,7 +942,7 @@ var init_cursor = __esm(() => {
|
|
944
942
|
};
|
945
943
|
});
|
946
944
|
|
947
|
-
// node_modules/viem/_esm/utils/cursor.js
|
945
|
+
// ../node_modules/viem/_esm/utils/cursor.js
|
948
946
|
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
949
947
|
const cursor = Object.create(staticCursor);
|
950
948
|
cursor.bytes = bytes;
|
@@ -1117,7 +1115,7 @@ var init_cursor2 = __esm(() => {
|
|
1117
1115
|
};
|
1118
1116
|
});
|
1119
1117
|
|
1120
|
-
// node_modules/viem/_esm/constants/unit.js
|
1118
|
+
// ../node_modules/viem/_esm/constants/unit.js
|
1121
1119
|
var gweiUnits;
|
1122
1120
|
var init_unit = __esm(() => {
|
1123
1121
|
gweiUnits = {
|
@@ -1126,7 +1124,7 @@ var init_unit = __esm(() => {
|
|
1126
1124
|
};
|
1127
1125
|
});
|
1128
1126
|
|
1129
|
-
// node_modules/viem/_esm/utils/unit/formatUnits.js
|
1127
|
+
// ../node_modules/viem/_esm/utils/unit/formatUnits.js
|
1130
1128
|
function formatUnits(value6, decimals) {
|
1131
1129
|
let display = value6.toString();
|
1132
1130
|
const negative2 = display.startsWith("-");
|
@@ -1141,7 +1139,7 @@ function formatUnits(value6, decimals) {
|
|
1141
1139
|
return `${negative2 ? "-" : ""}${integer3 || "0"}${fraction ? `.${fraction}` : ""}`;
|
1142
1140
|
}
|
1143
1141
|
|
1144
|
-
// node_modules/viem/_esm/utils/unit/formatGwei.js
|
1142
|
+
// ../node_modules/viem/_esm/utils/unit/formatGwei.js
|
1145
1143
|
function formatGwei(wei, unit = "wei") {
|
1146
1144
|
return formatUnits(wei, gweiUnits[unit]);
|
1147
1145
|
}
|
@@ -1149,7 +1147,7 @@ var init_formatGwei = __esm(() => {
|
|
1149
1147
|
init_unit();
|
1150
1148
|
});
|
1151
1149
|
|
1152
|
-
// node_modules/viem/_esm/errors/transaction.js
|
1150
|
+
// ../node_modules/viem/_esm/errors/transaction.js
|
1153
1151
|
function prettyPrint(args2) {
|
1154
1152
|
const entries3 = Object.entries(args2).map(([key, value6]) => {
|
1155
1153
|
if (value6 === undefined || value6 === false)
|
@@ -1198,7 +1196,7 @@ var init_transaction = __esm(() => {
|
|
1198
1196
|
};
|
1199
1197
|
});
|
1200
1198
|
|
1201
|
-
// node_modules/viem/_esm/errors/node.js
|
1199
|
+
// ../node_modules/viem/_esm/errors/node.js
|
1202
1200
|
var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError;
|
1203
1201
|
var init_node = __esm(() => {
|
1204
1202
|
init_formatGwei();
|
@@ -1377,7 +1375,7 @@ var init_node = __esm(() => {
|
|
1377
1375
|
});
|
1378
1376
|
});
|
1379
1377
|
|
1380
|
-
// node_modules/viem/_esm/utils/formatters/formatter.js
|
1378
|
+
// ../node_modules/viem/_esm/utils/formatters/formatter.js
|
1381
1379
|
function defineFormatter(type2, format7) {
|
1382
1380
|
return ({ exclude: exclude3, format: overrides }) => {
|
1383
1381
|
return {
|
@@ -1399,7 +1397,7 @@ function defineFormatter(type2, format7) {
|
|
1399
1397
|
};
|
1400
1398
|
}
|
1401
1399
|
|
1402
|
-
// node_modules/viem/_esm/constants/number.js
|
1400
|
+
// ../node_modules/viem/_esm/constants/number.js
|
1403
1401
|
var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;
|
1404
1402
|
var init_number = __esm(() => {
|
1405
1403
|
maxInt8 = 2n ** (8n - 1n) - 1n;
|
@@ -1765,7 +1763,7 @@ var init_sha256 = __esm(() => {
|
|
1765
1763
|
sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256);
|
1766
1764
|
});
|
1767
1765
|
|
1768
|
-
// node_modules/viem/_esm/errors/chain.js
|
1766
|
+
// ../node_modules/viem/_esm/errors/chain.js
|
1769
1767
|
var InvalidChainIdError;
|
1770
1768
|
var init_chain = __esm(() => {
|
1771
1769
|
init_base();
|
@@ -2114,6 +2112,7 @@ var exports_src = {};
|
|
2114
2112
|
__export(exports_src, {
|
2115
2113
|
supportedChains: () => supportedChains,
|
2116
2114
|
parseJson: () => parseJson2,
|
2115
|
+
parseAddress: () => parseAddress,
|
2117
2116
|
parse: () => parse3,
|
2118
2117
|
padLeft: () => padLeft,
|
2119
2118
|
normaliseToHex: () => normaliseToHex,
|
@@ -2138,7 +2137,8 @@ __export(exports_src, {
|
|
2138
2137
|
HexString: () => HexString,
|
2139
2138
|
HandleTypeName: () => HandleTypeName,
|
2140
2139
|
HANDLE_VERSION: () => HANDLE_VERSION,
|
2141
|
-
Bytes32: () => Bytes32
|
2140
|
+
Bytes32: () => Bytes32,
|
2141
|
+
Address: () => Address
|
2142
2142
|
});
|
2143
2143
|
module.exports = __toCommonJS(exports_src);
|
2144
2144
|
|
@@ -2460,8 +2460,7 @@ var tracingFunction = (name) => {
|
|
2460
2460
|
};
|
2461
2461
|
};
|
2462
2462
|
var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
|
2463
|
-
var genConstructor = function* () {
|
2464
|
-
}.constructor;
|
2463
|
+
var genConstructor = function* () {}.constructor;
|
2465
2464
|
|
2466
2465
|
// ../node_modules/effect/dist/esm/Hash.js
|
2467
2466
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
|
@@ -2808,8 +2807,7 @@ var StructuralCommitPrototype = {
|
|
2808
2807
|
...StructuralPrototype
|
2809
2808
|
};
|
2810
2809
|
var Base = /* @__PURE__ */ function() {
|
2811
|
-
function Base2() {
|
2812
|
-
}
|
2810
|
+
function Base2() {}
|
2813
2811
|
Base2.prototype = CommitPrototype;
|
2814
2812
|
return Base2;
|
2815
2813
|
}();
|
@@ -6312,8 +6310,7 @@ var Reference = () => (id, options) => {
|
|
6312
6310
|
Error.stackTraceLimit = 2;
|
6313
6311
|
const creationError = new Error;
|
6314
6312
|
Error.stackTraceLimit = limit;
|
6315
|
-
function ReferenceClass() {
|
6316
|
-
}
|
6313
|
+
function ReferenceClass() {}
|
6317
6314
|
Object.setPrototypeOf(ReferenceClass, ReferenceProto);
|
6318
6315
|
ReferenceClass.key = id;
|
6319
6316
|
ReferenceClass.defaultValue = options.defaultValue;
|
@@ -9253,8 +9250,7 @@ var prettyErrorMessage = (u) => {
|
|
9253
9250
|
if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
|
9254
9251
|
return u["toString"]();
|
9255
9252
|
}
|
9256
|
-
} catch {
|
9257
|
-
}
|
9253
|
+
} catch {}
|
9258
9254
|
return stringifyCircular(u);
|
9259
9255
|
};
|
9260
9256
|
var locationRegex = /\((.*)\)/g;
|
@@ -9828,8 +9824,7 @@ var zip2 = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => map9(th
|
|
9828
9824
|
var zipLeft = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => as(that, a)));
|
9829
9825
|
var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, () => that));
|
9830
9826
|
var never = /* @__PURE__ */ asyncInterrupt(() => {
|
9831
|
-
const interval = setInterval(() => {
|
9832
|
-
}, 2 ** 31 - 1);
|
9827
|
+
const interval = setInterval(() => {}, 2 ** 31 - 1);
|
9833
9828
|
return sync(() => clearInterval(interval));
|
9834
9829
|
});
|
9835
9830
|
var interruptFiber = (self) => flatMap6(fiberId, (fiberId2) => pipe(self, interruptAsFiber(fiberId2)));
|
@@ -13649,16 +13644,11 @@ class Const {
|
|
13649
13644
|
get value() {
|
13650
13645
|
return this.effect;
|
13651
13646
|
}
|
13652
|
-
onStart(_context, _effect, _parent, _fiber) {
|
13653
|
-
}
|
13654
|
-
|
13655
|
-
}
|
13656
|
-
|
13657
|
-
}
|
13658
|
-
onSuspend(_fiber) {
|
13659
|
-
}
|
13660
|
-
onResume(_fiber) {
|
13661
|
-
}
|
13647
|
+
onStart(_context, _effect, _parent, _fiber) {}
|
13648
|
+
onEnd(_value, _fiber) {}
|
13649
|
+
onEffect(_fiber, _effect) {}
|
13650
|
+
onSuspend(_fiber) {}
|
13651
|
+
onResume(_fiber) {}
|
13662
13652
|
map(f) {
|
13663
13653
|
return new ProxySupervisor(this, pipe(this.value, map9(f)));
|
13664
13654
|
}
|
@@ -14132,8 +14122,7 @@ class FiberRuntime extends Class {
|
|
14132
14122
|
return whileLoop({
|
14133
14123
|
while: () => !isDone3,
|
14134
14124
|
body,
|
14135
|
-
step: () => {
|
14136
|
-
}
|
14125
|
+
step: () => {}
|
14137
14126
|
});
|
14138
14127
|
}
|
14139
14128
|
return null;
|
@@ -23663,7 +23652,7 @@ class TrieIterator {
|
|
23663
23652
|
}
|
23664
23653
|
}
|
23665
23654
|
var isTrie = (u) => hasProperty(u, TrieTypeId);
|
23666
|
-
// node_modules/viem/_esm/utils/encoding/toRlp.js
|
23655
|
+
// ../node_modules/viem/_esm/utils/encoding/toRlp.js
|
23667
23656
|
init_base();
|
23668
23657
|
init_cursor2();
|
23669
23658
|
init_toBytes();
|
@@ -23755,7 +23744,7 @@ function getSizeOfLength(length4) {
|
|
23755
23744
|
return 4;
|
23756
23745
|
throw new BaseError("Length is too large.");
|
23757
23746
|
}
|
23758
|
-
// node_modules/viem/_esm/utils/formatters/transaction.js
|
23747
|
+
// ../node_modules/viem/_esm/utils/formatters/transaction.js
|
23759
23748
|
init_fromHex();
|
23760
23749
|
var transactionType = {
|
23761
23750
|
"0x0": "legacy",
|
@@ -23818,7 +23807,7 @@ function formatTransaction(transaction) {
|
|
23818
23807
|
var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
|
23819
23808
|
function formatAuthorizationList(authorizationList) {
|
23820
23809
|
return authorizationList.map((authorization) => ({
|
23821
|
-
|
23810
|
+
address: authorization.address,
|
23822
23811
|
chainId: Number(authorization.chainId),
|
23823
23812
|
nonce: Number(authorization.nonce),
|
23824
23813
|
r: authorization.r,
|
@@ -23827,7 +23816,7 @@ function formatAuthorizationList(authorizationList) {
|
|
23827
23816
|
}));
|
23828
23817
|
}
|
23829
23818
|
|
23830
|
-
// node_modules/viem/_esm/utils/formatters/block.js
|
23819
|
+
// ../node_modules/viem/_esm/utils/formatters/block.js
|
23831
23820
|
function formatBlock(block) {
|
23832
23821
|
const transactions = (block.transactions ?? []).map((transaction) => {
|
23833
23822
|
if (typeof transaction === "string")
|
@@ -23854,7 +23843,7 @@ function formatBlock(block) {
|
|
23854
23843
|
}
|
23855
23844
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
23856
23845
|
|
23857
|
-
// node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
23846
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
23858
23847
|
init_toBytes();
|
23859
23848
|
init_toHex();
|
23860
23849
|
function blobsToCommitments(parameters) {
|
@@ -23867,7 +23856,7 @@ function blobsToCommitments(parameters) {
|
|
23867
23856
|
return to === "bytes" ? commitments : commitments.map((x) => bytesToHex2(x));
|
23868
23857
|
}
|
23869
23858
|
|
23870
|
-
// node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
23859
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
23871
23860
|
init_toBytes();
|
23872
23861
|
init_toHex();
|
23873
23862
|
function blobsToProofs(parameters) {
|
@@ -23884,10 +23873,10 @@ function blobsToProofs(parameters) {
|
|
23884
23873
|
return to === "bytes" ? proofs : proofs.map((x) => bytesToHex2(x));
|
23885
23874
|
}
|
23886
23875
|
|
23887
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23876
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23888
23877
|
init_toHex();
|
23889
23878
|
|
23890
|
-
// node_modules/viem/_esm/utils/hash/sha256.js
|
23879
|
+
// ../node_modules/viem/_esm/utils/hash/sha256.js
|
23891
23880
|
init_sha256();
|
23892
23881
|
init_toBytes();
|
23893
23882
|
init_toHex();
|
@@ -23899,7 +23888,7 @@ function sha2562(value6, to_) {
|
|
23899
23888
|
return toHex(bytes);
|
23900
23889
|
}
|
23901
23890
|
|
23902
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23891
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23903
23892
|
function commitmentToVersionedHash(parameters) {
|
23904
23893
|
const { commitment, version: version2 = 1 } = parameters;
|
23905
23894
|
const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
|
@@ -23908,7 +23897,7 @@ function commitmentToVersionedHash(parameters) {
|
|
23908
23897
|
return to === "bytes" ? versionedHash : bytesToHex2(versionedHash);
|
23909
23898
|
}
|
23910
23899
|
|
23911
|
-
// node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
23900
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
23912
23901
|
function commitmentsToVersionedHashes(parameters) {
|
23913
23902
|
const { commitments, version: version2 } = parameters;
|
23914
23903
|
const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
|
@@ -23923,17 +23912,17 @@ function commitmentsToVersionedHashes(parameters) {
|
|
23923
23912
|
return hashes;
|
23924
23913
|
}
|
23925
23914
|
|
23926
|
-
// node_modules/viem/_esm/constants/blob.js
|
23915
|
+
// ../node_modules/viem/_esm/constants/blob.js
|
23927
23916
|
var blobsPerTransaction = 6;
|
23928
23917
|
var bytesPerFieldElement = 32;
|
23929
23918
|
var fieldElementsPerBlob = 4096;
|
23930
23919
|
var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
|
23931
23920
|
var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - 1 - 1 * fieldElementsPerBlob * blobsPerTransaction;
|
23932
23921
|
|
23933
|
-
// node_modules/viem/_esm/constants/kzg.js
|
23922
|
+
// ../node_modules/viem/_esm/constants/kzg.js
|
23934
23923
|
var versionedHashVersionKzg = 1;
|
23935
23924
|
|
23936
|
-
// node_modules/viem/_esm/errors/blob.js
|
23925
|
+
// ../node_modules/viem/_esm/errors/blob.js
|
23937
23926
|
init_base();
|
23938
23927
|
|
23939
23928
|
class BlobSizeTooLargeError extends BaseError {
|
@@ -23972,7 +23961,7 @@ class InvalidVersionedHashVersionError extends BaseError {
|
|
23972
23961
|
}
|
23973
23962
|
}
|
23974
23963
|
|
23975
|
-
// node_modules/viem/_esm/utils/blob/toBlobs.js
|
23964
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobs.js
|
23976
23965
|
init_cursor2();
|
23977
23966
|
init_size();
|
23978
23967
|
init_toBytes();
|
@@ -24011,7 +24000,7 @@ function toBlobs(parameters) {
|
|
24011
24000
|
return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex2(x.bytes));
|
24012
24001
|
}
|
24013
24002
|
|
24014
|
-
// node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
24003
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
24015
24004
|
function toBlobSidecars(parameters) {
|
24016
24005
|
const { data, kzg, to } = parameters;
|
24017
24006
|
const blobs = parameters.blobs ?? toBlobs({ data, to });
|
@@ -24027,7 +24016,7 @@ function toBlobSidecars(parameters) {
|
|
24027
24016
|
return sidecars;
|
24028
24017
|
}
|
24029
24018
|
|
24030
|
-
// node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
24019
|
+
// ../node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
24031
24020
|
init_transaction();
|
24032
24021
|
function getTransactionType(transaction) {
|
24033
24022
|
if (transaction.type)
|
@@ -24047,7 +24036,7 @@ function getTransactionType(transaction) {
|
|
24047
24036
|
throw new InvalidSerializableTransactionError({ transaction });
|
24048
24037
|
}
|
24049
24038
|
|
24050
|
-
// node_modules/viem/_esm/utils/formatters/log.js
|
24039
|
+
// ../node_modules/viem/_esm/utils/formatters/log.js
|
24051
24040
|
function formatLog(log3, { args: args2, eventName } = {}) {
|
24052
24041
|
return {
|
24053
24042
|
...log3,
|
@@ -24060,7 +24049,7 @@ function formatLog(log3, { args: args2, eventName } = {}) {
|
|
24060
24049
|
};
|
24061
24050
|
}
|
24062
24051
|
|
24063
|
-
// node_modules/viem/_esm/utils/chain/defineChain.js
|
24052
|
+
// ../node_modules/viem/_esm/utils/chain/defineChain.js
|
24064
24053
|
function defineChain(chain) {
|
24065
24054
|
return {
|
24066
24055
|
formatters: undefined,
|
@@ -24070,7 +24059,7 @@ function defineChain(chain) {
|
|
24070
24059
|
};
|
24071
24060
|
}
|
24072
24061
|
|
24073
|
-
// node_modules/viem/_esm/utils/abi/encodePacked.js
|
24062
|
+
// ../node_modules/viem/_esm/utils/abi/encodePacked.js
|
24074
24063
|
init_abi();
|
24075
24064
|
init_address();
|
24076
24065
|
init_isAddress();
|
@@ -24139,35 +24128,14 @@ function encode6(type2, value6, isArray2 = false) {
|
|
24139
24128
|
throw new UnsupportedPackedAbiType(type2);
|
24140
24129
|
}
|
24141
24130
|
|
24142
|
-
// node_modules/viem/_esm/utils/
|
24143
|
-
|
24144
|
-
|
24145
|
-
|
24146
|
-
|
24147
|
-
|
24148
|
-
function formatTransactionReceipt(transactionReceipt) {
|
24149
|
-
const receipt = {
|
24150
|
-
...transactionReceipt,
|
24151
|
-
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
24152
|
-
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
24153
|
-
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
24154
|
-
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
24155
|
-
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
24156
|
-
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
24157
|
-
to: transactionReceipt.to ? transactionReceipt.to : null,
|
24158
|
-
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
24159
|
-
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
24160
|
-
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
24161
|
-
};
|
24162
|
-
if (transactionReceipt.blobGasPrice)
|
24163
|
-
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
24164
|
-
if (transactionReceipt.blobGasUsed)
|
24165
|
-
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
24166
|
-
return receipt;
|
24167
|
-
}
|
24168
|
-
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
24131
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
24132
|
+
init_toHex();
|
24133
|
+
|
24134
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
24135
|
+
init_transaction();
|
24136
|
+
init_toHex();
|
24169
24137
|
|
24170
|
-
// node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
24138
|
+
// ../node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
24171
24139
|
init_number();
|
24172
24140
|
init_address();
|
24173
24141
|
init_base();
|
@@ -24181,9 +24149,10 @@ function assertTransactionEIP7702(transaction) {
|
|
24181
24149
|
const { authorizationList } = transaction;
|
24182
24150
|
if (authorizationList) {
|
24183
24151
|
for (const authorization of authorizationList) {
|
24184
|
-
const {
|
24185
|
-
|
24186
|
-
|
24152
|
+
const { chainId } = authorization;
|
24153
|
+
const address = authorization.address;
|
24154
|
+
if (!isAddress(address))
|
24155
|
+
throw new InvalidAddressError({ address });
|
24187
24156
|
if (chainId < 0)
|
24188
24157
|
throw new InvalidChainIdError({ chainId });
|
24189
24158
|
}
|
@@ -24243,29 +24212,7 @@ function assertTransactionLegacy(transaction) {
|
|
24243
24212
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
24244
24213
|
}
|
24245
24214
|
|
24246
|
-
// node_modules/viem/_esm/utils/transaction/
|
24247
|
-
init_transaction();
|
24248
|
-
init_toHex();
|
24249
|
-
|
24250
|
-
// node_modules/viem/_esm/experimental/eip7702/utils/serializeAuthorizationList.js
|
24251
|
-
init_toHex();
|
24252
|
-
function serializeAuthorizationList(authorizationList) {
|
24253
|
-
if (!authorizationList || authorizationList.length === 0)
|
24254
|
-
return [];
|
24255
|
-
const serializedAuthorizationList = [];
|
24256
|
-
for (const authorization of authorizationList) {
|
24257
|
-
const { contractAddress, chainId, nonce, ...signature } = authorization;
|
24258
|
-
serializedAuthorizationList.push([
|
24259
|
-
chainId ? toHex(chainId) : "0x",
|
24260
|
-
contractAddress,
|
24261
|
-
nonce ? toHex(nonce) : "0x",
|
24262
|
-
...toYParitySignatureArray({}, signature)
|
24263
|
-
]);
|
24264
|
-
}
|
24265
|
-
return serializedAuthorizationList;
|
24266
|
-
}
|
24267
|
-
|
24268
|
-
// node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
24215
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
24269
24216
|
init_address();
|
24270
24217
|
init_transaction();
|
24271
24218
|
init_isAddress();
|
@@ -24288,7 +24235,7 @@ function serializeAccessList(accessList) {
|
|
24288
24235
|
return serializedAccessList;
|
24289
24236
|
}
|
24290
24237
|
|
24291
|
-
// node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
24238
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
24292
24239
|
function serializeTransaction(transaction, signature) {
|
24293
24240
|
const type2 = getTransactionType(transaction);
|
24294
24241
|
if (type2 === "eip1559")
|
@@ -24482,7 +24429,53 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
24482
24429
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
24483
24430
|
}
|
24484
24431
|
|
24485
|
-
// node_modules/viem/_esm/
|
24432
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
24433
|
+
function serializeAuthorizationList(authorizationList) {
|
24434
|
+
if (!authorizationList || authorizationList.length === 0)
|
24435
|
+
return [];
|
24436
|
+
const serializedAuthorizationList = [];
|
24437
|
+
for (const authorization of authorizationList) {
|
24438
|
+
const { chainId, nonce, ...signature } = authorization;
|
24439
|
+
const contractAddress = authorization.address;
|
24440
|
+
serializedAuthorizationList.push([
|
24441
|
+
chainId ? toHex(chainId) : "0x",
|
24442
|
+
contractAddress,
|
24443
|
+
nonce ? toHex(nonce) : "0x",
|
24444
|
+
...toYParitySignatureArray({}, signature)
|
24445
|
+
]);
|
24446
|
+
}
|
24447
|
+
return serializedAuthorizationList;
|
24448
|
+
}
|
24449
|
+
|
24450
|
+
// ../node_modules/viem/_esm/utils/formatters/transactionReceipt.js
|
24451
|
+
init_fromHex();
|
24452
|
+
var receiptStatuses = {
|
24453
|
+
"0x0": "reverted",
|
24454
|
+
"0x1": "success"
|
24455
|
+
};
|
24456
|
+
function formatTransactionReceipt(transactionReceipt) {
|
24457
|
+
const receipt = {
|
24458
|
+
...transactionReceipt,
|
24459
|
+
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
24460
|
+
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
24461
|
+
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
24462
|
+
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
24463
|
+
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
24464
|
+
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
24465
|
+
to: transactionReceipt.to ? transactionReceipt.to : null,
|
24466
|
+
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
24467
|
+
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
24468
|
+
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
24469
|
+
};
|
24470
|
+
if (transactionReceipt.blobGasPrice)
|
24471
|
+
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
24472
|
+
if (transactionReceipt.blobGasUsed)
|
24473
|
+
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
24474
|
+
return receipt;
|
24475
|
+
}
|
24476
|
+
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
24477
|
+
|
24478
|
+
// ../node_modules/viem/_esm/index.js
|
24486
24479
|
init_toBytes();
|
24487
24480
|
init_toHex();
|
24488
24481
|
// src/schema.ts
|
@@ -24544,6 +24537,10 @@ var Bytes32 = BytesToHex.pipe(exports_Schema.filter((x) => x.length === 66 || `E
|
|
24544
24537
|
function asBytes32(x) {
|
24545
24538
|
return parse3(Bytes32, x);
|
24546
24539
|
}
|
24540
|
+
var Address = HexString.pipe(exports_Schema.filter((s) => s.length === 42 || `Address must be a 20-byte '0x'-prefixed hex string, but got: ${s}`), exports_Schema.brand("Address"));
|
24541
|
+
function parseAddress(address) {
|
24542
|
+
return parse3(Address, address);
|
24543
|
+
}
|
24547
24544
|
// src/chain.ts
|
24548
24545
|
var supportedChains = {
|
24549
24546
|
baseSepolia: 84532,
|
@@ -24635,7 +24632,7 @@ function assertUint8(value6) {
|
|
24635
24632
|
throw new Error(`Invalid uint8 value: ${value6}`);
|
24636
24633
|
}
|
24637
24634
|
}
|
24638
|
-
// node_modules/viem/_esm/op-stack/contracts.js
|
24635
|
+
// ../node_modules/viem/_esm/op-stack/contracts.js
|
24639
24636
|
var contracts = {
|
24640
24637
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
24641
24638
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
@@ -24649,7 +24646,7 @@ var contracts = {
|
|
24649
24646
|
}
|
24650
24647
|
};
|
24651
24648
|
|
24652
|
-
// node_modules/viem/_esm/op-stack/formatters.js
|
24649
|
+
// ../node_modules/viem/_esm/op-stack/formatters.js
|
24653
24650
|
init_fromHex();
|
24654
24651
|
var formatters = {
|
24655
24652
|
block: /* @__PURE__ */ defineBlock({
|
@@ -24696,7 +24693,7 @@ var formatters = {
|
|
24696
24693
|
})
|
24697
24694
|
};
|
24698
24695
|
|
24699
|
-
// node_modules/viem/_esm/op-stack/serializers.js
|
24696
|
+
// ../node_modules/viem/_esm/op-stack/serializers.js
|
24700
24697
|
init_address();
|
24701
24698
|
init_isAddress();
|
24702
24699
|
init_toHex();
|
@@ -24741,14 +24738,14 @@ function assertTransactionDeposit(transaction) {
|
|
24741
24738
|
throw new InvalidAddressError({ address: to });
|
24742
24739
|
}
|
24743
24740
|
|
24744
|
-
// node_modules/viem/_esm/op-stack/chainConfig.js
|
24741
|
+
// ../node_modules/viem/_esm/op-stack/chainConfig.js
|
24745
24742
|
var chainConfig = {
|
24746
24743
|
contracts,
|
24747
24744
|
formatters,
|
24748
24745
|
serializers
|
24749
24746
|
};
|
24750
24747
|
|
24751
|
-
// node_modules/viem/_esm/chains/definitions/anvil.js
|
24748
|
+
// ../node_modules/viem/_esm/chains/definitions/anvil.js
|
24752
24749
|
var anvil = /* @__PURE__ */ defineChain({
|
24753
24750
|
id: 31337,
|
24754
24751
|
name: "Anvil",
|
@@ -24764,7 +24761,7 @@ var anvil = /* @__PURE__ */ defineChain({
|
|
24764
24761
|
}
|
24765
24762
|
}
|
24766
24763
|
});
|
24767
|
-
// node_modules/viem/_esm/chains/definitions/baseSepolia.js
|
24764
|
+
// ../node_modules/viem/_esm/chains/definitions/baseSepolia.js
|
24768
24765
|
var sourceId = 11155111;
|
24769
24766
|
var baseSepolia = /* @__PURE__ */ defineChain({
|
24770
24767
|
...chainConfig,
|
@@ -24816,7 +24813,7 @@ var baseSepolia = /* @__PURE__ */ defineChain({
|
|
24816
24813
|
testnet: true,
|
24817
24814
|
sourceId
|
24818
24815
|
});
|
24819
|
-
// node_modules/viem/_esm/chains/definitions/monadTestnet.js
|
24816
|
+
// ../node_modules/viem/_esm/chains/definitions/monadTestnet.js
|
24820
24817
|
var monadTestnet = /* @__PURE__ */ defineChain({
|
24821
24818
|
id: 10143,
|
24822
24819
|
name: "Monad Testnet",
|
@@ -24844,7 +24841,7 @@ var monadTestnet = /* @__PURE__ */ defineChain({
|
|
24844
24841
|
},
|
24845
24842
|
testnet: true
|
24846
24843
|
});
|
24847
|
-
// node_modules/viem/_esm/chains/definitions/sepolia.js
|
24844
|
+
// ../node_modules/viem/_esm/chains/definitions/sepolia.js
|
24848
24845
|
var sepolia = /* @__PURE__ */ defineChain({
|
24849
24846
|
id: 11155111,
|
24850
24847
|
name: "Sepolia",
|