@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
@@ -48,7 +48,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
48
48
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
49
49
|
});
|
50
50
|
|
51
|
-
// node_modules/viem/_esm/utils/data/isHex.js
|
51
|
+
// ../node_modules/viem/_esm/utils/data/isHex.js
|
52
52
|
function isHex(value6, { strict: strict2 = true } = {}) {
|
53
53
|
if (!value6)
|
54
54
|
return false;
|
@@ -57,19 +57,18 @@ function isHex(value6, { strict: strict2 = true } = {}) {
|
|
57
57
|
return strict2 ? /^0x[0-9a-fA-F]*$/.test(value6) : value6.startsWith("0x");
|
58
58
|
}
|
59
59
|
|
60
|
-
// node_modules/viem/_esm/utils/data/size.js
|
60
|
+
// ../node_modules/viem/_esm/utils/data/size.js
|
61
61
|
function size21(value6) {
|
62
62
|
if (isHex(value6, { strict: false }))
|
63
63
|
return Math.ceil((value6.length - 2) / 2);
|
64
64
|
return value6.length;
|
65
65
|
}
|
66
|
-
var init_size = () => {
|
67
|
-
};
|
66
|
+
var init_size = () => {};
|
68
67
|
|
69
|
-
// node_modules/viem/_esm/errors/version.js
|
70
|
-
var version = "2.
|
68
|
+
// ../node_modules/viem/_esm/errors/version.js
|
69
|
+
var version = "2.24.3";
|
71
70
|
|
72
|
-
// node_modules/viem/_esm/errors/base.js
|
71
|
+
// ../node_modules/viem/_esm/errors/base.js
|
73
72
|
function walk(err, fn) {
|
74
73
|
if (fn?.(err))
|
75
74
|
return err;
|
@@ -157,7 +156,7 @@ var init_base = __esm(() => {
|
|
157
156
|
};
|
158
157
|
});
|
159
158
|
|
160
|
-
// node_modules/viem/_esm/errors/abi.js
|
159
|
+
// ../node_modules/viem/_esm/errors/abi.js
|
161
160
|
var AbiEncodingLengthMismatchError, BytesSizeMismatchError, UnsupportedPackedAbiType;
|
162
161
|
var init_abi = __esm(() => {
|
163
162
|
init_base();
|
@@ -187,7 +186,7 @@ var init_abi = __esm(() => {
|
|
187
186
|
};
|
188
187
|
});
|
189
188
|
|
190
|
-
// node_modules/viem/_esm/errors/data.js
|
189
|
+
// ../node_modules/viem/_esm/errors/data.js
|
191
190
|
var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
|
192
191
|
var init_data = __esm(() => {
|
193
192
|
init_base();
|
@@ -203,7 +202,7 @@ var init_data = __esm(() => {
|
|
203
202
|
};
|
204
203
|
});
|
205
204
|
|
206
|
-
// node_modules/viem/_esm/utils/data/pad.js
|
205
|
+
// ../node_modules/viem/_esm/utils/data/pad.js
|
207
206
|
function pad(hexOrBytes, { dir: dir2, size: size22 = 32 } = {}) {
|
208
207
|
if (typeof hexOrBytes === "string")
|
209
208
|
return padHex(hexOrBytes, { dir: dir2, size: size22 });
|
@@ -241,7 +240,7 @@ var init_pad = __esm(() => {
|
|
241
240
|
init_data();
|
242
241
|
});
|
243
242
|
|
244
|
-
// node_modules/viem/_esm/errors/encoding.js
|
243
|
+
// ../node_modules/viem/_esm/errors/encoding.js
|
245
244
|
var IntegerOutOfRangeError, SizeOverflowError;
|
246
245
|
var init_encoding = __esm(() => {
|
247
246
|
init_base();
|
@@ -257,7 +256,7 @@ var init_encoding = __esm(() => {
|
|
257
256
|
};
|
258
257
|
});
|
259
258
|
|
260
|
-
// node_modules/viem/_esm/utils/data/trim.js
|
259
|
+
// ../node_modules/viem/_esm/utils/data/trim.js
|
261
260
|
function trim(hexOrBytes, { dir: dir2 = "left" } = {}) {
|
262
261
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
263
262
|
let sliceLength = 0;
|
@@ -276,7 +275,7 @@ function trim(hexOrBytes, { dir: dir2 = "left" } = {}) {
|
|
276
275
|
return data;
|
277
276
|
}
|
278
277
|
|
279
|
-
// node_modules/viem/_esm/utils/encoding/fromHex.js
|
278
|
+
// ../node_modules/viem/_esm/utils/encoding/fromHex.js
|
280
279
|
function assertSize(hexOrBytes, { size: size22 }) {
|
281
280
|
if (size21(hexOrBytes) > size22)
|
282
281
|
throw new SizeOverflowError({
|
@@ -305,7 +304,7 @@ var init_fromHex = __esm(() => {
|
|
305
304
|
init_size();
|
306
305
|
});
|
307
306
|
|
308
|
-
// node_modules/viem/_esm/utils/encoding/toHex.js
|
307
|
+
// ../node_modules/viem/_esm/utils/encoding/toHex.js
|
309
308
|
function toHex(value6, opts = {}) {
|
310
309
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
311
310
|
return numberToHex(value6, opts);
|
@@ -377,7 +376,7 @@ var init_toHex = __esm(() => {
|
|
377
376
|
encoder2 = /* @__PURE__ */ new TextEncoder;
|
378
377
|
});
|
379
378
|
|
380
|
-
// node_modules/viem/_esm/utils/encoding/toBytes.js
|
379
|
+
// ../node_modules/viem/_esm/utils/encoding/toBytes.js
|
381
380
|
function toBytes(value6, opts = {}) {
|
382
381
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
383
382
|
return numberToBytes(value6, opts);
|
@@ -482,8 +481,7 @@ function aoutput(out, instance) {
|
|
482
481
|
throw new Error("digestInto() expects output buffer of length at least " + min4);
|
483
482
|
}
|
484
483
|
}
|
485
|
-
var init__assert = () => {
|
486
|
-
};
|
484
|
+
var init__assert = () => {};
|
487
485
|
|
488
486
|
// ../node_modules/@noble/hashes/esm/_u64.js
|
489
487
|
function fromBig(n, le = false) {
|
@@ -751,7 +749,7 @@ var init_sha3 = __esm(() => {
|
|
751
749
|
shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
752
750
|
});
|
753
751
|
|
754
|
-
// node_modules/viem/_esm/utils/hash/keccak256.js
|
752
|
+
// ../node_modules/viem/_esm/utils/hash/keccak256.js
|
755
753
|
function keccak256(value6, to_) {
|
756
754
|
const to = to_ || "hex";
|
757
755
|
const bytes = keccak_256(isHex(value6, { strict: false }) ? toBytes(value6) : value6);
|
@@ -765,7 +763,7 @@ var init_keccak256 = __esm(() => {
|
|
765
763
|
init_toHex();
|
766
764
|
});
|
767
765
|
|
768
|
-
// node_modules/viem/_esm/errors/address.js
|
766
|
+
// ../node_modules/viem/_esm/errors/address.js
|
769
767
|
var InvalidAddressError;
|
770
768
|
var init_address = __esm(() => {
|
771
769
|
init_base();
|
@@ -782,7 +780,7 @@ var init_address = __esm(() => {
|
|
782
780
|
};
|
783
781
|
});
|
784
782
|
|
785
|
-
// node_modules/viem/_esm/utils/lru.js
|
783
|
+
// ../node_modules/viem/_esm/utils/lru.js
|
786
784
|
var LruMap;
|
787
785
|
var init_lru = __esm(() => {
|
788
786
|
LruMap = class LruMap extends Map {
|
@@ -816,7 +814,7 @@ var init_lru = __esm(() => {
|
|
816
814
|
};
|
817
815
|
});
|
818
816
|
|
819
|
-
// node_modules/viem/_esm/utils/address/getAddress.js
|
817
|
+
// ../node_modules/viem/_esm/utils/address/getAddress.js
|
820
818
|
function checksumAddress(address_, chainId) {
|
821
819
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
822
820
|
return checksumAddressCache.get(`${address_}.${chainId}`);
|
@@ -843,7 +841,7 @@ var init_getAddress = __esm(() => {
|
|
843
841
|
checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
844
842
|
});
|
845
843
|
|
846
|
-
// node_modules/viem/_esm/utils/address/isAddress.js
|
844
|
+
// ../node_modules/viem/_esm/utils/address/isAddress.js
|
847
845
|
function isAddress(address, options) {
|
848
846
|
const { strict: strict2 = true } = options ?? {};
|
849
847
|
const cacheKey = `${address}.${strict2}`;
|
@@ -869,12 +867,12 @@ var init_isAddress = __esm(() => {
|
|
869
867
|
isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
870
868
|
});
|
871
869
|
|
872
|
-
// node_modules/viem/_esm/utils/data/concat.js
|
870
|
+
// ../node_modules/viem/_esm/utils/data/concat.js
|
873
871
|
function concatHex(values7) {
|
874
872
|
return `0x${values7.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
875
873
|
}
|
876
874
|
|
877
|
-
// node_modules/viem/_esm/utils/data/slice.js
|
875
|
+
// ../node_modules/viem/_esm/utils/data/slice.js
|
878
876
|
function slice(value6, start5, end6, { strict: strict2 } = {}) {
|
879
877
|
if (isHex(value6, { strict: false }))
|
880
878
|
return sliceHex(value6, start5, end6, {
|
@@ -920,7 +918,7 @@ var init_slice = __esm(() => {
|
|
920
918
|
init_size();
|
921
919
|
});
|
922
920
|
|
923
|
-
// node_modules/viem/_esm/utils/regex.js
|
921
|
+
// ../node_modules/viem/_esm/utils/regex.js
|
924
922
|
var arrayRegex, bytesRegex, integerRegex;
|
925
923
|
var init_regex = __esm(() => {
|
926
924
|
arrayRegex = /^(.*)\[([0-9]*)\]$/;
|
@@ -928,7 +926,7 @@ var init_regex = __esm(() => {
|
|
928
926
|
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)?$/;
|
929
927
|
});
|
930
928
|
|
931
|
-
// node_modules/viem/_esm/errors/cursor.js
|
929
|
+
// ../node_modules/viem/_esm/errors/cursor.js
|
932
930
|
var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
|
933
931
|
var init_cursor = __esm(() => {
|
934
932
|
init_base();
|
@@ -951,7 +949,7 @@ var init_cursor = __esm(() => {
|
|
951
949
|
};
|
952
950
|
});
|
953
951
|
|
954
|
-
// node_modules/viem/_esm/utils/cursor.js
|
952
|
+
// ../node_modules/viem/_esm/utils/cursor.js
|
955
953
|
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
956
954
|
const cursor = Object.create(staticCursor);
|
957
955
|
cursor.bytes = bytes;
|
@@ -1124,7 +1122,7 @@ var init_cursor2 = __esm(() => {
|
|
1124
1122
|
};
|
1125
1123
|
});
|
1126
1124
|
|
1127
|
-
// node_modules/viem/_esm/constants/unit.js
|
1125
|
+
// ../node_modules/viem/_esm/constants/unit.js
|
1128
1126
|
var gweiUnits;
|
1129
1127
|
var init_unit = __esm(() => {
|
1130
1128
|
gweiUnits = {
|
@@ -1133,7 +1131,7 @@ var init_unit = __esm(() => {
|
|
1133
1131
|
};
|
1134
1132
|
});
|
1135
1133
|
|
1136
|
-
// node_modules/viem/_esm/utils/unit/formatUnits.js
|
1134
|
+
// ../node_modules/viem/_esm/utils/unit/formatUnits.js
|
1137
1135
|
function formatUnits(value6, decimals) {
|
1138
1136
|
let display = value6.toString();
|
1139
1137
|
const negative2 = display.startsWith("-");
|
@@ -1148,7 +1146,7 @@ function formatUnits(value6, decimals) {
|
|
1148
1146
|
return `${negative2 ? "-" : ""}${integer3 || "0"}${fraction ? `.${fraction}` : ""}`;
|
1149
1147
|
}
|
1150
1148
|
|
1151
|
-
// node_modules/viem/_esm/utils/unit/formatGwei.js
|
1149
|
+
// ../node_modules/viem/_esm/utils/unit/formatGwei.js
|
1152
1150
|
function formatGwei(wei, unit = "wei") {
|
1153
1151
|
return formatUnits(wei, gweiUnits[unit]);
|
1154
1152
|
}
|
@@ -1156,7 +1154,7 @@ var init_formatGwei = __esm(() => {
|
|
1156
1154
|
init_unit();
|
1157
1155
|
});
|
1158
1156
|
|
1159
|
-
// node_modules/viem/_esm/errors/transaction.js
|
1157
|
+
// ../node_modules/viem/_esm/errors/transaction.js
|
1160
1158
|
function prettyPrint(args2) {
|
1161
1159
|
const entries3 = Object.entries(args2).map(([key, value6]) => {
|
1162
1160
|
if (value6 === undefined || value6 === false)
|
@@ -1205,7 +1203,7 @@ var init_transaction = __esm(() => {
|
|
1205
1203
|
};
|
1206
1204
|
});
|
1207
1205
|
|
1208
|
-
// node_modules/viem/_esm/errors/node.js
|
1206
|
+
// ../node_modules/viem/_esm/errors/node.js
|
1209
1207
|
var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError;
|
1210
1208
|
var init_node = __esm(() => {
|
1211
1209
|
init_formatGwei();
|
@@ -1384,7 +1382,7 @@ var init_node = __esm(() => {
|
|
1384
1382
|
});
|
1385
1383
|
});
|
1386
1384
|
|
1387
|
-
// node_modules/viem/_esm/utils/formatters/formatter.js
|
1385
|
+
// ../node_modules/viem/_esm/utils/formatters/formatter.js
|
1388
1386
|
function defineFormatter(type2, format7) {
|
1389
1387
|
return ({ exclude: exclude3, format: overrides }) => {
|
1390
1388
|
return {
|
@@ -1406,7 +1404,7 @@ function defineFormatter(type2, format7) {
|
|
1406
1404
|
};
|
1407
1405
|
}
|
1408
1406
|
|
1409
|
-
// node_modules/viem/_esm/constants/number.js
|
1407
|
+
// ../node_modules/viem/_esm/constants/number.js
|
1410
1408
|
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;
|
1411
1409
|
var init_number = __esm(() => {
|
1412
1410
|
maxInt8 = 2n ** (8n - 1n) - 1n;
|
@@ -1772,7 +1770,7 @@ var init_sha256 = __esm(() => {
|
|
1772
1770
|
sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256);
|
1773
1771
|
});
|
1774
1772
|
|
1775
|
-
// node_modules/viem/_esm/errors/chain.js
|
1773
|
+
// ../node_modules/viem/_esm/errors/chain.js
|
1776
1774
|
var InvalidChainIdError;
|
1777
1775
|
var init_chain = __esm(() => {
|
1778
1776
|
init_base();
|
@@ -2101,8 +2099,7 @@ var tracingFunction = (name) => {
|
|
2101
2099
|
};
|
2102
2100
|
};
|
2103
2101
|
var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
|
2104
|
-
var genConstructor = function* () {
|
2105
|
-
}.constructor;
|
2102
|
+
var genConstructor = function* () {}.constructor;
|
2106
2103
|
|
2107
2104
|
// ../node_modules/effect/dist/esm/Hash.js
|
2108
2105
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
|
@@ -2449,8 +2446,7 @@ var StructuralCommitPrototype = {
|
|
2449
2446
|
...StructuralPrototype
|
2450
2447
|
};
|
2451
2448
|
var Base = /* @__PURE__ */ function() {
|
2452
|
-
function Base2() {
|
2453
|
-
}
|
2449
|
+
function Base2() {}
|
2454
2450
|
Base2.prototype = CommitPrototype;
|
2455
2451
|
return Base2;
|
2456
2452
|
}();
|
@@ -5953,8 +5949,7 @@ var Reference = () => (id, options) => {
|
|
5953
5949
|
Error.stackTraceLimit = 2;
|
5954
5950
|
const creationError = new Error;
|
5955
5951
|
Error.stackTraceLimit = limit;
|
5956
|
-
function ReferenceClass() {
|
5957
|
-
}
|
5952
|
+
function ReferenceClass() {}
|
5958
5953
|
Object.setPrototypeOf(ReferenceClass, ReferenceProto);
|
5959
5954
|
ReferenceClass.key = id;
|
5960
5955
|
ReferenceClass.defaultValue = options.defaultValue;
|
@@ -8894,8 +8889,7 @@ var prettyErrorMessage = (u) => {
|
|
8894
8889
|
if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
|
8895
8890
|
return u["toString"]();
|
8896
8891
|
}
|
8897
|
-
} catch {
|
8898
|
-
}
|
8892
|
+
} catch {}
|
8899
8893
|
return stringifyCircular(u);
|
8900
8894
|
};
|
8901
8895
|
var locationRegex = /\((.*)\)/g;
|
@@ -9469,8 +9463,7 @@ var zip2 = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => map9(th
|
|
9469
9463
|
var zipLeft = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => as(that, a)));
|
9470
9464
|
var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, () => that));
|
9471
9465
|
var never = /* @__PURE__ */ asyncInterrupt(() => {
|
9472
|
-
const interval = setInterval(() => {
|
9473
|
-
}, 2 ** 31 - 1);
|
9466
|
+
const interval = setInterval(() => {}, 2 ** 31 - 1);
|
9474
9467
|
return sync(() => clearInterval(interval));
|
9475
9468
|
});
|
9476
9469
|
var interruptFiber = (self) => flatMap6(fiberId, (fiberId2) => pipe(self, interruptAsFiber(fiberId2)));
|
@@ -13290,16 +13283,11 @@ class Const {
|
|
13290
13283
|
get value() {
|
13291
13284
|
return this.effect;
|
13292
13285
|
}
|
13293
|
-
onStart(_context, _effect, _parent, _fiber) {
|
13294
|
-
}
|
13295
|
-
|
13296
|
-
}
|
13297
|
-
|
13298
|
-
}
|
13299
|
-
onSuspend(_fiber) {
|
13300
|
-
}
|
13301
|
-
onResume(_fiber) {
|
13302
|
-
}
|
13286
|
+
onStart(_context, _effect, _parent, _fiber) {}
|
13287
|
+
onEnd(_value, _fiber) {}
|
13288
|
+
onEffect(_fiber, _effect) {}
|
13289
|
+
onSuspend(_fiber) {}
|
13290
|
+
onResume(_fiber) {}
|
13303
13291
|
map(f) {
|
13304
13292
|
return new ProxySupervisor(this, pipe(this.value, map9(f)));
|
13305
13293
|
}
|
@@ -13773,8 +13761,7 @@ class FiberRuntime extends Class {
|
|
13773
13761
|
return whileLoop({
|
13774
13762
|
while: () => !isDone3,
|
13775
13763
|
body,
|
13776
|
-
step: () => {
|
13777
|
-
}
|
13764
|
+
step: () => {}
|
13778
13765
|
});
|
13779
13766
|
}
|
13780
13767
|
return null;
|
@@ -23304,7 +23291,7 @@ class TrieIterator {
|
|
23304
23291
|
}
|
23305
23292
|
}
|
23306
23293
|
var isTrie = (u) => hasProperty(u, TrieTypeId);
|
23307
|
-
// node_modules/viem/_esm/utils/encoding/toRlp.js
|
23294
|
+
// ../node_modules/viem/_esm/utils/encoding/toRlp.js
|
23308
23295
|
init_base();
|
23309
23296
|
init_cursor2();
|
23310
23297
|
init_toBytes();
|
@@ -23396,7 +23383,7 @@ function getSizeOfLength(length4) {
|
|
23396
23383
|
return 4;
|
23397
23384
|
throw new BaseError("Length is too large.");
|
23398
23385
|
}
|
23399
|
-
// node_modules/viem/_esm/utils/formatters/transaction.js
|
23386
|
+
// ../node_modules/viem/_esm/utils/formatters/transaction.js
|
23400
23387
|
init_fromHex();
|
23401
23388
|
var transactionType = {
|
23402
23389
|
"0x0": "legacy",
|
@@ -23459,7 +23446,7 @@ function formatTransaction(transaction) {
|
|
23459
23446
|
var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
|
23460
23447
|
function formatAuthorizationList(authorizationList) {
|
23461
23448
|
return authorizationList.map((authorization) => ({
|
23462
|
-
|
23449
|
+
address: authorization.address,
|
23463
23450
|
chainId: Number(authorization.chainId),
|
23464
23451
|
nonce: Number(authorization.nonce),
|
23465
23452
|
r: authorization.r,
|
@@ -23468,7 +23455,7 @@ function formatAuthorizationList(authorizationList) {
|
|
23468
23455
|
}));
|
23469
23456
|
}
|
23470
23457
|
|
23471
|
-
// node_modules/viem/_esm/utils/formatters/block.js
|
23458
|
+
// ../node_modules/viem/_esm/utils/formatters/block.js
|
23472
23459
|
function formatBlock(block) {
|
23473
23460
|
const transactions = (block.transactions ?? []).map((transaction) => {
|
23474
23461
|
if (typeof transaction === "string")
|
@@ -23495,7 +23482,7 @@ function formatBlock(block) {
|
|
23495
23482
|
}
|
23496
23483
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
23497
23484
|
|
23498
|
-
// node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
23485
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
23499
23486
|
init_toBytes();
|
23500
23487
|
init_toHex();
|
23501
23488
|
function blobsToCommitments(parameters) {
|
@@ -23508,7 +23495,7 @@ function blobsToCommitments(parameters) {
|
|
23508
23495
|
return to === "bytes" ? commitments : commitments.map((x) => bytesToHex2(x));
|
23509
23496
|
}
|
23510
23497
|
|
23511
|
-
// node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
23498
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
23512
23499
|
init_toBytes();
|
23513
23500
|
init_toHex();
|
23514
23501
|
function blobsToProofs(parameters) {
|
@@ -23525,10 +23512,10 @@ function blobsToProofs(parameters) {
|
|
23525
23512
|
return to === "bytes" ? proofs : proofs.map((x) => bytesToHex2(x));
|
23526
23513
|
}
|
23527
23514
|
|
23528
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23515
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23529
23516
|
init_toHex();
|
23530
23517
|
|
23531
|
-
// node_modules/viem/_esm/utils/hash/sha256.js
|
23518
|
+
// ../node_modules/viem/_esm/utils/hash/sha256.js
|
23532
23519
|
init_sha256();
|
23533
23520
|
init_toBytes();
|
23534
23521
|
init_toHex();
|
@@ -23540,7 +23527,7 @@ function sha2562(value6, to_) {
|
|
23540
23527
|
return toHex(bytes);
|
23541
23528
|
}
|
23542
23529
|
|
23543
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23530
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23544
23531
|
function commitmentToVersionedHash(parameters) {
|
23545
23532
|
const { commitment, version: version2 = 1 } = parameters;
|
23546
23533
|
const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
|
@@ -23549,7 +23536,7 @@ function commitmentToVersionedHash(parameters) {
|
|
23549
23536
|
return to === "bytes" ? versionedHash : bytesToHex2(versionedHash);
|
23550
23537
|
}
|
23551
23538
|
|
23552
|
-
// node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
23539
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
23553
23540
|
function commitmentsToVersionedHashes(parameters) {
|
23554
23541
|
const { commitments, version: version2 } = parameters;
|
23555
23542
|
const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
|
@@ -23564,17 +23551,17 @@ function commitmentsToVersionedHashes(parameters) {
|
|
23564
23551
|
return hashes;
|
23565
23552
|
}
|
23566
23553
|
|
23567
|
-
// node_modules/viem/_esm/constants/blob.js
|
23554
|
+
// ../node_modules/viem/_esm/constants/blob.js
|
23568
23555
|
var blobsPerTransaction = 6;
|
23569
23556
|
var bytesPerFieldElement = 32;
|
23570
23557
|
var fieldElementsPerBlob = 4096;
|
23571
23558
|
var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
|
23572
23559
|
var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - 1 - 1 * fieldElementsPerBlob * blobsPerTransaction;
|
23573
23560
|
|
23574
|
-
// node_modules/viem/_esm/constants/kzg.js
|
23561
|
+
// ../node_modules/viem/_esm/constants/kzg.js
|
23575
23562
|
var versionedHashVersionKzg = 1;
|
23576
23563
|
|
23577
|
-
// node_modules/viem/_esm/errors/blob.js
|
23564
|
+
// ../node_modules/viem/_esm/errors/blob.js
|
23578
23565
|
init_base();
|
23579
23566
|
|
23580
23567
|
class BlobSizeTooLargeError extends BaseError {
|
@@ -23613,7 +23600,7 @@ class InvalidVersionedHashVersionError extends BaseError {
|
|
23613
23600
|
}
|
23614
23601
|
}
|
23615
23602
|
|
23616
|
-
// node_modules/viem/_esm/utils/blob/toBlobs.js
|
23603
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobs.js
|
23617
23604
|
init_cursor2();
|
23618
23605
|
init_size();
|
23619
23606
|
init_toBytes();
|
@@ -23652,7 +23639,7 @@ function toBlobs(parameters) {
|
|
23652
23639
|
return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex2(x.bytes));
|
23653
23640
|
}
|
23654
23641
|
|
23655
|
-
// node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
23642
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
23656
23643
|
function toBlobSidecars(parameters) {
|
23657
23644
|
const { data, kzg, to } = parameters;
|
23658
23645
|
const blobs = parameters.blobs ?? toBlobs({ data, to });
|
@@ -23668,7 +23655,7 @@ function toBlobSidecars(parameters) {
|
|
23668
23655
|
return sidecars;
|
23669
23656
|
}
|
23670
23657
|
|
23671
|
-
// node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
23658
|
+
// ../node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
23672
23659
|
init_transaction();
|
23673
23660
|
function getTransactionType(transaction) {
|
23674
23661
|
if (transaction.type)
|
@@ -23688,7 +23675,7 @@ function getTransactionType(transaction) {
|
|
23688
23675
|
throw new InvalidSerializableTransactionError({ transaction });
|
23689
23676
|
}
|
23690
23677
|
|
23691
|
-
// node_modules/viem/_esm/utils/formatters/log.js
|
23678
|
+
// ../node_modules/viem/_esm/utils/formatters/log.js
|
23692
23679
|
function formatLog(log3, { args: args2, eventName } = {}) {
|
23693
23680
|
return {
|
23694
23681
|
...log3,
|
@@ -23701,7 +23688,7 @@ function formatLog(log3, { args: args2, eventName } = {}) {
|
|
23701
23688
|
};
|
23702
23689
|
}
|
23703
23690
|
|
23704
|
-
// node_modules/viem/_esm/utils/chain/defineChain.js
|
23691
|
+
// ../node_modules/viem/_esm/utils/chain/defineChain.js
|
23705
23692
|
function defineChain(chain) {
|
23706
23693
|
return {
|
23707
23694
|
formatters: undefined,
|
@@ -23711,7 +23698,7 @@ function defineChain(chain) {
|
|
23711
23698
|
};
|
23712
23699
|
}
|
23713
23700
|
|
23714
|
-
// node_modules/viem/_esm/utils/abi/encodePacked.js
|
23701
|
+
// ../node_modules/viem/_esm/utils/abi/encodePacked.js
|
23715
23702
|
init_abi();
|
23716
23703
|
init_address();
|
23717
23704
|
init_isAddress();
|
@@ -23780,35 +23767,14 @@ function encode6(type2, value6, isArray2 = false) {
|
|
23780
23767
|
throw new UnsupportedPackedAbiType(type2);
|
23781
23768
|
}
|
23782
23769
|
|
23783
|
-
// node_modules/viem/_esm/utils/
|
23784
|
-
|
23785
|
-
|
23786
|
-
|
23787
|
-
|
23788
|
-
|
23789
|
-
function formatTransactionReceipt(transactionReceipt) {
|
23790
|
-
const receipt = {
|
23791
|
-
...transactionReceipt,
|
23792
|
-
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
23793
|
-
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
23794
|
-
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
23795
|
-
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
23796
|
-
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
23797
|
-
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
23798
|
-
to: transactionReceipt.to ? transactionReceipt.to : null,
|
23799
|
-
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
23800
|
-
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
23801
|
-
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
23802
|
-
};
|
23803
|
-
if (transactionReceipt.blobGasPrice)
|
23804
|
-
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
23805
|
-
if (transactionReceipt.blobGasUsed)
|
23806
|
-
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
23807
|
-
return receipt;
|
23808
|
-
}
|
23809
|
-
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
23770
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
23771
|
+
init_toHex();
|
23772
|
+
|
23773
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
23774
|
+
init_transaction();
|
23775
|
+
init_toHex();
|
23810
23776
|
|
23811
|
-
// node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
23777
|
+
// ../node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
23812
23778
|
init_number();
|
23813
23779
|
init_address();
|
23814
23780
|
init_base();
|
@@ -23822,9 +23788,10 @@ function assertTransactionEIP7702(transaction) {
|
|
23822
23788
|
const { authorizationList } = transaction;
|
23823
23789
|
if (authorizationList) {
|
23824
23790
|
for (const authorization of authorizationList) {
|
23825
|
-
const {
|
23826
|
-
|
23827
|
-
|
23791
|
+
const { chainId } = authorization;
|
23792
|
+
const address = authorization.address;
|
23793
|
+
if (!isAddress(address))
|
23794
|
+
throw new InvalidAddressError({ address });
|
23828
23795
|
if (chainId < 0)
|
23829
23796
|
throw new InvalidChainIdError({ chainId });
|
23830
23797
|
}
|
@@ -23884,29 +23851,7 @@ function assertTransactionLegacy(transaction) {
|
|
23884
23851
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
23885
23852
|
}
|
23886
23853
|
|
23887
|
-
// node_modules/viem/_esm/utils/transaction/
|
23888
|
-
init_transaction();
|
23889
|
-
init_toHex();
|
23890
|
-
|
23891
|
-
// node_modules/viem/_esm/experimental/eip7702/utils/serializeAuthorizationList.js
|
23892
|
-
init_toHex();
|
23893
|
-
function serializeAuthorizationList(authorizationList) {
|
23894
|
-
if (!authorizationList || authorizationList.length === 0)
|
23895
|
-
return [];
|
23896
|
-
const serializedAuthorizationList = [];
|
23897
|
-
for (const authorization of authorizationList) {
|
23898
|
-
const { contractAddress, chainId, nonce, ...signature } = authorization;
|
23899
|
-
serializedAuthorizationList.push([
|
23900
|
-
chainId ? toHex(chainId) : "0x",
|
23901
|
-
contractAddress,
|
23902
|
-
nonce ? toHex(nonce) : "0x",
|
23903
|
-
...toYParitySignatureArray({}, signature)
|
23904
|
-
]);
|
23905
|
-
}
|
23906
|
-
return serializedAuthorizationList;
|
23907
|
-
}
|
23908
|
-
|
23909
|
-
// node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
23854
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
23910
23855
|
init_address();
|
23911
23856
|
init_transaction();
|
23912
23857
|
init_isAddress();
|
@@ -23929,7 +23874,7 @@ function serializeAccessList(accessList) {
|
|
23929
23874
|
return serializedAccessList;
|
23930
23875
|
}
|
23931
23876
|
|
23932
|
-
// node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
23877
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
23933
23878
|
function serializeTransaction(transaction, signature) {
|
23934
23879
|
const type2 = getTransactionType(transaction);
|
23935
23880
|
if (type2 === "eip1559")
|
@@ -24123,7 +24068,53 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
24123
24068
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
24124
24069
|
}
|
24125
24070
|
|
24126
|
-
// node_modules/viem/_esm/
|
24071
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
24072
|
+
function serializeAuthorizationList(authorizationList) {
|
24073
|
+
if (!authorizationList || authorizationList.length === 0)
|
24074
|
+
return [];
|
24075
|
+
const serializedAuthorizationList = [];
|
24076
|
+
for (const authorization of authorizationList) {
|
24077
|
+
const { chainId, nonce, ...signature } = authorization;
|
24078
|
+
const contractAddress = authorization.address;
|
24079
|
+
serializedAuthorizationList.push([
|
24080
|
+
chainId ? toHex(chainId) : "0x",
|
24081
|
+
contractAddress,
|
24082
|
+
nonce ? toHex(nonce) : "0x",
|
24083
|
+
...toYParitySignatureArray({}, signature)
|
24084
|
+
]);
|
24085
|
+
}
|
24086
|
+
return serializedAuthorizationList;
|
24087
|
+
}
|
24088
|
+
|
24089
|
+
// ../node_modules/viem/_esm/utils/formatters/transactionReceipt.js
|
24090
|
+
init_fromHex();
|
24091
|
+
var receiptStatuses = {
|
24092
|
+
"0x0": "reverted",
|
24093
|
+
"0x1": "success"
|
24094
|
+
};
|
24095
|
+
function formatTransactionReceipt(transactionReceipt) {
|
24096
|
+
const receipt = {
|
24097
|
+
...transactionReceipt,
|
24098
|
+
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
24099
|
+
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
24100
|
+
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
24101
|
+
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
24102
|
+
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
24103
|
+
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
24104
|
+
to: transactionReceipt.to ? transactionReceipt.to : null,
|
24105
|
+
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
24106
|
+
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
24107
|
+
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
24108
|
+
};
|
24109
|
+
if (transactionReceipt.blobGasPrice)
|
24110
|
+
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
24111
|
+
if (transactionReceipt.blobGasUsed)
|
24112
|
+
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
24113
|
+
return receipt;
|
24114
|
+
}
|
24115
|
+
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
24116
|
+
|
24117
|
+
// ../node_modules/viem/_esm/index.js
|
24127
24118
|
init_toBytes();
|
24128
24119
|
init_toHex();
|
24129
24120
|
// src/schema.ts
|
@@ -24185,6 +24176,10 @@ var Bytes32 = BytesToHex.pipe(exports_Schema.filter((x) => x.length === 66 || `E
|
|
24185
24176
|
function asBytes32(x) {
|
24186
24177
|
return parse3(Bytes32, x);
|
24187
24178
|
}
|
24179
|
+
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"));
|
24180
|
+
function parseAddress(address) {
|
24181
|
+
return parse3(Address, address);
|
24182
|
+
}
|
24188
24183
|
|
24189
24184
|
// src/chain.ts
|
24190
24185
|
var supportedChains = {
|