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