@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();
|
@@ -3512,8 +3510,7 @@ var tracingFunction = (name) => {
|
|
3512
3510
|
};
|
3513
3511
|
};
|
3514
3512
|
var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
|
3515
|
-
var genConstructor = function* () {
|
3516
|
-
}.constructor;
|
3513
|
+
var genConstructor = function* () {}.constructor;
|
3517
3514
|
|
3518
3515
|
// ../node_modules/effect/dist/esm/Hash.js
|
3519
3516
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
|
@@ -3860,8 +3857,7 @@ var StructuralCommitPrototype = {
|
|
3860
3857
|
...StructuralPrototype
|
3861
3858
|
};
|
3862
3859
|
var Base = /* @__PURE__ */ function() {
|
3863
|
-
function Base2() {
|
3864
|
-
}
|
3860
|
+
function Base2() {}
|
3865
3861
|
Base2.prototype = CommitPrototype;
|
3866
3862
|
return Base2;
|
3867
3863
|
}();
|
@@ -7364,8 +7360,7 @@ var Reference = () => (id, options) => {
|
|
7364
7360
|
Error.stackTraceLimit = 2;
|
7365
7361
|
const creationError = new Error;
|
7366
7362
|
Error.stackTraceLimit = limit;
|
7367
|
-
function ReferenceClass() {
|
7368
|
-
}
|
7363
|
+
function ReferenceClass() {}
|
7369
7364
|
Object.setPrototypeOf(ReferenceClass, ReferenceProto);
|
7370
7365
|
ReferenceClass.key = id;
|
7371
7366
|
ReferenceClass.defaultValue = options.defaultValue;
|
@@ -10305,8 +10300,7 @@ var prettyErrorMessage = (u) => {
|
|
10305
10300
|
if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
|
10306
10301
|
return u["toString"]();
|
10307
10302
|
}
|
10308
|
-
} catch {
|
10309
|
-
}
|
10303
|
+
} catch {}
|
10310
10304
|
return stringifyCircular(u);
|
10311
10305
|
};
|
10312
10306
|
var locationRegex = /\((.*)\)/g;
|
@@ -10880,8 +10874,7 @@ var zip2 = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => map9(th
|
|
10880
10874
|
var zipLeft = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => as(that, a)));
|
10881
10875
|
var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, () => that));
|
10882
10876
|
var never = /* @__PURE__ */ asyncInterrupt(() => {
|
10883
|
-
const interval = setInterval(() => {
|
10884
|
-
}, 2 ** 31 - 1);
|
10877
|
+
const interval = setInterval(() => {}, 2 ** 31 - 1);
|
10885
10878
|
return sync(() => clearInterval(interval));
|
10886
10879
|
});
|
10887
10880
|
var interruptFiber = (self) => flatMap6(fiberId, (fiberId2) => pipe(self, interruptAsFiber(fiberId2)));
|
@@ -14701,16 +14694,11 @@ class Const {
|
|
14701
14694
|
get value() {
|
14702
14695
|
return this.effect;
|
14703
14696
|
}
|
14704
|
-
onStart(_context, _effect, _parent, _fiber) {
|
14705
|
-
}
|
14706
|
-
|
14707
|
-
}
|
14708
|
-
|
14709
|
-
}
|
14710
|
-
onSuspend(_fiber) {
|
14711
|
-
}
|
14712
|
-
onResume(_fiber) {
|
14713
|
-
}
|
14697
|
+
onStart(_context, _effect, _parent, _fiber) {}
|
14698
|
+
onEnd(_value, _fiber) {}
|
14699
|
+
onEffect(_fiber, _effect) {}
|
14700
|
+
onSuspend(_fiber) {}
|
14701
|
+
onResume(_fiber) {}
|
14714
14702
|
map(f) {
|
14715
14703
|
return new ProxySupervisor(this, pipe(this.value, map9(f)));
|
14716
14704
|
}
|
@@ -15184,8 +15172,7 @@ class FiberRuntime extends Class {
|
|
15184
15172
|
return whileLoop({
|
15185
15173
|
while: () => !isDone3,
|
15186
15174
|
body,
|
15187
|
-
step: () => {
|
15188
|
-
}
|
15175
|
+
step: () => {}
|
15189
15176
|
});
|
15190
15177
|
}
|
15191
15178
|
return null;
|
@@ -24715,7 +24702,7 @@ class TrieIterator {
|
|
24715
24702
|
}
|
24716
24703
|
}
|
24717
24704
|
var isTrie = (u) => hasProperty(u, TrieTypeId);
|
24718
|
-
// node_modules/viem/_esm/utils/encoding/toRlp.js
|
24705
|
+
// ../node_modules/viem/_esm/utils/encoding/toRlp.js
|
24719
24706
|
init_base();
|
24720
24707
|
init_cursor2();
|
24721
24708
|
init_toBytes();
|
@@ -24807,7 +24794,7 @@ function getSizeOfLength(length4) {
|
|
24807
24794
|
return 4;
|
24808
24795
|
throw new BaseError("Length is too large.");
|
24809
24796
|
}
|
24810
|
-
// node_modules/viem/_esm/utils/formatters/transaction.js
|
24797
|
+
// ../node_modules/viem/_esm/utils/formatters/transaction.js
|
24811
24798
|
init_fromHex();
|
24812
24799
|
var transactionType = {
|
24813
24800
|
"0x0": "legacy",
|
@@ -24870,7 +24857,7 @@ function formatTransaction(transaction) {
|
|
24870
24857
|
var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
|
24871
24858
|
function formatAuthorizationList(authorizationList) {
|
24872
24859
|
return authorizationList.map((authorization) => ({
|
24873
|
-
|
24860
|
+
address: authorization.address,
|
24874
24861
|
chainId: Number(authorization.chainId),
|
24875
24862
|
nonce: Number(authorization.nonce),
|
24876
24863
|
r: authorization.r,
|
@@ -24879,7 +24866,7 @@ function formatAuthorizationList(authorizationList) {
|
|
24879
24866
|
}));
|
24880
24867
|
}
|
24881
24868
|
|
24882
|
-
// node_modules/viem/_esm/utils/formatters/block.js
|
24869
|
+
// ../node_modules/viem/_esm/utils/formatters/block.js
|
24883
24870
|
function formatBlock(block) {
|
24884
24871
|
const transactions = (block.transactions ?? []).map((transaction) => {
|
24885
24872
|
if (typeof transaction === "string")
|
@@ -24906,7 +24893,7 @@ function formatBlock(block) {
|
|
24906
24893
|
}
|
24907
24894
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
24908
24895
|
|
24909
|
-
// node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
24896
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
24910
24897
|
init_toBytes();
|
24911
24898
|
init_toHex();
|
24912
24899
|
function blobsToCommitments(parameters) {
|
@@ -24919,7 +24906,7 @@ function blobsToCommitments(parameters) {
|
|
24919
24906
|
return to === "bytes" ? commitments : commitments.map((x) => bytesToHex2(x));
|
24920
24907
|
}
|
24921
24908
|
|
24922
|
-
// node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
24909
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
24923
24910
|
init_toBytes();
|
24924
24911
|
init_toHex();
|
24925
24912
|
function blobsToProofs(parameters) {
|
@@ -24936,10 +24923,10 @@ function blobsToProofs(parameters) {
|
|
24936
24923
|
return to === "bytes" ? proofs : proofs.map((x) => bytesToHex2(x));
|
24937
24924
|
}
|
24938
24925
|
|
24939
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
24926
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
24940
24927
|
init_toHex();
|
24941
24928
|
|
24942
|
-
// node_modules/viem/_esm/utils/hash/sha256.js
|
24929
|
+
// ../node_modules/viem/_esm/utils/hash/sha256.js
|
24943
24930
|
init_sha256();
|
24944
24931
|
init_toBytes();
|
24945
24932
|
init_toHex();
|
@@ -24951,7 +24938,7 @@ function sha2562(value6, to_) {
|
|
24951
24938
|
return toHex(bytes);
|
24952
24939
|
}
|
24953
24940
|
|
24954
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
24941
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
24955
24942
|
function commitmentToVersionedHash(parameters) {
|
24956
24943
|
const { commitment, version: version2 = 1 } = parameters;
|
24957
24944
|
const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
|
@@ -24960,7 +24947,7 @@ function commitmentToVersionedHash(parameters) {
|
|
24960
24947
|
return to === "bytes" ? versionedHash : bytesToHex2(versionedHash);
|
24961
24948
|
}
|
24962
24949
|
|
24963
|
-
// node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
24950
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
24964
24951
|
function commitmentsToVersionedHashes(parameters) {
|
24965
24952
|
const { commitments, version: version2 } = parameters;
|
24966
24953
|
const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
|
@@ -24975,17 +24962,17 @@ function commitmentsToVersionedHashes(parameters) {
|
|
24975
24962
|
return hashes;
|
24976
24963
|
}
|
24977
24964
|
|
24978
|
-
// node_modules/viem/_esm/constants/blob.js
|
24965
|
+
// ../node_modules/viem/_esm/constants/blob.js
|
24979
24966
|
var blobsPerTransaction = 6;
|
24980
24967
|
var bytesPerFieldElement = 32;
|
24981
24968
|
var fieldElementsPerBlob = 4096;
|
24982
24969
|
var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
|
24983
24970
|
var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - 1 - 1 * fieldElementsPerBlob * blobsPerTransaction;
|
24984
24971
|
|
24985
|
-
// node_modules/viem/_esm/constants/kzg.js
|
24972
|
+
// ../node_modules/viem/_esm/constants/kzg.js
|
24986
24973
|
var versionedHashVersionKzg = 1;
|
24987
24974
|
|
24988
|
-
// node_modules/viem/_esm/errors/blob.js
|
24975
|
+
// ../node_modules/viem/_esm/errors/blob.js
|
24989
24976
|
init_base();
|
24990
24977
|
|
24991
24978
|
class BlobSizeTooLargeError extends BaseError {
|
@@ -25024,7 +25011,7 @@ class InvalidVersionedHashVersionError extends BaseError {
|
|
25024
25011
|
}
|
25025
25012
|
}
|
25026
25013
|
|
25027
|
-
// node_modules/viem/_esm/utils/blob/toBlobs.js
|
25014
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobs.js
|
25028
25015
|
init_cursor2();
|
25029
25016
|
init_size();
|
25030
25017
|
init_toBytes();
|
@@ -25063,7 +25050,7 @@ function toBlobs(parameters) {
|
|
25063
25050
|
return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex2(x.bytes));
|
25064
25051
|
}
|
25065
25052
|
|
25066
|
-
// node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
25053
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
25067
25054
|
function toBlobSidecars(parameters) {
|
25068
25055
|
const { data, kzg, to } = parameters;
|
25069
25056
|
const blobs = parameters.blobs ?? toBlobs({ data, to });
|
@@ -25079,7 +25066,7 @@ function toBlobSidecars(parameters) {
|
|
25079
25066
|
return sidecars;
|
25080
25067
|
}
|
25081
25068
|
|
25082
|
-
// node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
25069
|
+
// ../node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
25083
25070
|
init_transaction();
|
25084
25071
|
function getTransactionType(transaction) {
|
25085
25072
|
if (transaction.type)
|
@@ -25099,7 +25086,7 @@ function getTransactionType(transaction) {
|
|
25099
25086
|
throw new InvalidSerializableTransactionError({ transaction });
|
25100
25087
|
}
|
25101
25088
|
|
25102
|
-
// node_modules/viem/_esm/utils/formatters/log.js
|
25089
|
+
// ../node_modules/viem/_esm/utils/formatters/log.js
|
25103
25090
|
function formatLog(log3, { args: args2, eventName } = {}) {
|
25104
25091
|
return {
|
25105
25092
|
...log3,
|
@@ -25112,7 +25099,7 @@ function formatLog(log3, { args: args2, eventName } = {}) {
|
|
25112
25099
|
};
|
25113
25100
|
}
|
25114
25101
|
|
25115
|
-
// node_modules/viem/_esm/utils/chain/defineChain.js
|
25102
|
+
// ../node_modules/viem/_esm/utils/chain/defineChain.js
|
25116
25103
|
function defineChain(chain) {
|
25117
25104
|
return {
|
25118
25105
|
formatters: undefined,
|
@@ -25122,7 +25109,7 @@ function defineChain(chain) {
|
|
25122
25109
|
};
|
25123
25110
|
}
|
25124
25111
|
|
25125
|
-
// node_modules/viem/_esm/utils/abi/encodePacked.js
|
25112
|
+
// ../node_modules/viem/_esm/utils/abi/encodePacked.js
|
25126
25113
|
init_abi();
|
25127
25114
|
init_address();
|
25128
25115
|
init_isAddress();
|
@@ -25191,35 +25178,14 @@ function encode6(type2, value6, isArray2 = false) {
|
|
25191
25178
|
throw new UnsupportedPackedAbiType(type2);
|
25192
25179
|
}
|
25193
25180
|
|
25194
|
-
// node_modules/viem/_esm/utils/
|
25195
|
-
|
25196
|
-
|
25197
|
-
|
25198
|
-
|
25199
|
-
|
25200
|
-
function formatTransactionReceipt(transactionReceipt) {
|
25201
|
-
const receipt = {
|
25202
|
-
...transactionReceipt,
|
25203
|
-
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
25204
|
-
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
25205
|
-
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
25206
|
-
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
25207
|
-
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
25208
|
-
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
25209
|
-
to: transactionReceipt.to ? transactionReceipt.to : null,
|
25210
|
-
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
25211
|
-
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
25212
|
-
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
25213
|
-
};
|
25214
|
-
if (transactionReceipt.blobGasPrice)
|
25215
|
-
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
25216
|
-
if (transactionReceipt.blobGasUsed)
|
25217
|
-
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
25218
|
-
return receipt;
|
25219
|
-
}
|
25220
|
-
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
25181
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
25182
|
+
init_toHex();
|
25183
|
+
|
25184
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
25185
|
+
init_transaction();
|
25186
|
+
init_toHex();
|
25221
25187
|
|
25222
|
-
// node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
25188
|
+
// ../node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
25223
25189
|
init_number();
|
25224
25190
|
init_address();
|
25225
25191
|
init_base();
|
@@ -25233,9 +25199,10 @@ function assertTransactionEIP7702(transaction) {
|
|
25233
25199
|
const { authorizationList } = transaction;
|
25234
25200
|
if (authorizationList) {
|
25235
25201
|
for (const authorization of authorizationList) {
|
25236
|
-
const {
|
25237
|
-
|
25238
|
-
|
25202
|
+
const { chainId } = authorization;
|
25203
|
+
const address = authorization.address;
|
25204
|
+
if (!isAddress(address))
|
25205
|
+
throw new InvalidAddressError({ address });
|
25239
25206
|
if (chainId < 0)
|
25240
25207
|
throw new InvalidChainIdError({ chainId });
|
25241
25208
|
}
|
@@ -25295,29 +25262,7 @@ function assertTransactionLegacy(transaction) {
|
|
25295
25262
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
25296
25263
|
}
|
25297
25264
|
|
25298
|
-
// node_modules/viem/_esm/utils/transaction/
|
25299
|
-
init_transaction();
|
25300
|
-
init_toHex();
|
25301
|
-
|
25302
|
-
// node_modules/viem/_esm/experimental/eip7702/utils/serializeAuthorizationList.js
|
25303
|
-
init_toHex();
|
25304
|
-
function serializeAuthorizationList(authorizationList) {
|
25305
|
-
if (!authorizationList || authorizationList.length === 0)
|
25306
|
-
return [];
|
25307
|
-
const serializedAuthorizationList = [];
|
25308
|
-
for (const authorization of authorizationList) {
|
25309
|
-
const { contractAddress, chainId, nonce, ...signature } = authorization;
|
25310
|
-
serializedAuthorizationList.push([
|
25311
|
-
chainId ? toHex(chainId) : "0x",
|
25312
|
-
contractAddress,
|
25313
|
-
nonce ? toHex(nonce) : "0x",
|
25314
|
-
...toYParitySignatureArray({}, signature)
|
25315
|
-
]);
|
25316
|
-
}
|
25317
|
-
return serializedAuthorizationList;
|
25318
|
-
}
|
25319
|
-
|
25320
|
-
// node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
25265
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
25321
25266
|
init_address();
|
25322
25267
|
init_transaction();
|
25323
25268
|
init_isAddress();
|
@@ -25340,7 +25285,7 @@ function serializeAccessList(accessList) {
|
|
25340
25285
|
return serializedAccessList;
|
25341
25286
|
}
|
25342
25287
|
|
25343
|
-
// node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
25288
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
25344
25289
|
function serializeTransaction(transaction, signature) {
|
25345
25290
|
const type2 = getTransactionType(transaction);
|
25346
25291
|
if (type2 === "eip1559")
|
@@ -25534,7 +25479,53 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
25534
25479
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
25535
25480
|
}
|
25536
25481
|
|
25537
|
-
// node_modules/viem/_esm/
|
25482
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
25483
|
+
function serializeAuthorizationList(authorizationList) {
|
25484
|
+
if (!authorizationList || authorizationList.length === 0)
|
25485
|
+
return [];
|
25486
|
+
const serializedAuthorizationList = [];
|
25487
|
+
for (const authorization of authorizationList) {
|
25488
|
+
const { chainId, nonce, ...signature } = authorization;
|
25489
|
+
const contractAddress = authorization.address;
|
25490
|
+
serializedAuthorizationList.push([
|
25491
|
+
chainId ? toHex(chainId) : "0x",
|
25492
|
+
contractAddress,
|
25493
|
+
nonce ? toHex(nonce) : "0x",
|
25494
|
+
...toYParitySignatureArray({}, signature)
|
25495
|
+
]);
|
25496
|
+
}
|
25497
|
+
return serializedAuthorizationList;
|
25498
|
+
}
|
25499
|
+
|
25500
|
+
// ../node_modules/viem/_esm/utils/formatters/transactionReceipt.js
|
25501
|
+
init_fromHex();
|
25502
|
+
var receiptStatuses = {
|
25503
|
+
"0x0": "reverted",
|
25504
|
+
"0x1": "success"
|
25505
|
+
};
|
25506
|
+
function formatTransactionReceipt(transactionReceipt) {
|
25507
|
+
const receipt = {
|
25508
|
+
...transactionReceipt,
|
25509
|
+
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
25510
|
+
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
25511
|
+
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
25512
|
+
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
25513
|
+
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
25514
|
+
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
25515
|
+
to: transactionReceipt.to ? transactionReceipt.to : null,
|
25516
|
+
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
25517
|
+
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
25518
|
+
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
25519
|
+
};
|
25520
|
+
if (transactionReceipt.blobGasPrice)
|
25521
|
+
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
25522
|
+
if (transactionReceipt.blobGasUsed)
|
25523
|
+
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
25524
|
+
return receipt;
|
25525
|
+
}
|
25526
|
+
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
25527
|
+
|
25528
|
+
// ../node_modules/viem/_esm/index.js
|
25538
25529
|
init_toBytes();
|
25539
25530
|
init_toHex();
|
25540
25531
|
// src/schema.ts
|
@@ -25596,6 +25587,10 @@ var Bytes32 = BytesToHex.pipe(exports_Schema.filter((x) => x.length === 66 || `E
|
|
25596
25587
|
function asBytes32(x) {
|
25597
25588
|
return parse3(Bytes32, x);
|
25598
25589
|
}
|
25590
|
+
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"));
|
25591
|
+
function parseAddress(address) {
|
25592
|
+
return parse3(Address, address);
|
25593
|
+
}
|
25599
25594
|
|
25600
25595
|
// src/handle.ts
|
25601
25596
|
var import_sha32 = __toESM(require_sha3(), 1);
|