@inco/js 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binary.d.ts +3 -0
- package/dist/encryption/index.cjs +127 -132
- package/dist/encryption/index.mjs +127 -132
- package/dist/index.cjs +138 -141
- package/dist/index.mjs +138 -141
- package/dist/lite/ecies.d.ts +1 -1
- package/dist/lite/index.cjs +13752 -13673
- package/dist/lite/index.d.ts +3 -2
- package/dist/lite/index.mjs +17320 -17303
- package/dist/lite/lightning.d.ts +99 -0
- package/dist/local/index.cjs +2573 -25
- package/dist/local/index.mjs +7837 -5352
- package/dist/reencryption/index.cjs +127 -132
- package/dist/reencryption/index.mjs +127 -132
- package/dist/viem.d.ts +52 -53
- package/package.json +1 -1
package/dist/binary.d.ts
CHANGED
@@ -15,3 +15,6 @@ export declare function bytesToHex(bs: Uint8Array): Hex;
|
|
15
15
|
export declare const Bytes32: Schema.brand<Schema.filter<Schema.transformOrFail<Schema.Union<[typeof Schema.String, Schema.refine<object & Uint8Array<ArrayBufferLike>, Schema.Schema<object, object, never>>]>, Schema.TemplateLiteral<`0x${string}`>, never>>, "Bytes32">;
|
16
16
|
export declare function asBytes32(x: BytesIsh): Bytes32;
|
17
17
|
export type Bytes32 = typeof Bytes32.Type;
|
18
|
+
export type Address = typeof Address.Type;
|
19
|
+
export declare const Address: Schema.brand<Schema.filter<Schema.TemplateLiteral<`0x${string}`>>, "Address">;
|
20
|
+
export declare function parseAddress(address: string): Address;
|
@@ -41,7 +41,7 @@ var __export = (target, all) => {
|
|
41
41
|
};
|
42
42
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
43
43
|
|
44
|
-
// node_modules/viem/_esm/utils/data/isHex.js
|
44
|
+
// ../node_modules/viem/_esm/utils/data/isHex.js
|
45
45
|
function isHex(value6, { strict: strict2 = true } = {}) {
|
46
46
|
if (!value6)
|
47
47
|
return false;
|
@@ -50,19 +50,18 @@ function isHex(value6, { strict: strict2 = true } = {}) {
|
|
50
50
|
return strict2 ? /^0x[0-9a-fA-F]*$/.test(value6) : value6.startsWith("0x");
|
51
51
|
}
|
52
52
|
|
53
|
-
// node_modules/viem/_esm/utils/data/size.js
|
53
|
+
// ../node_modules/viem/_esm/utils/data/size.js
|
54
54
|
function size21(value6) {
|
55
55
|
if (isHex(value6, { strict: false }))
|
56
56
|
return Math.ceil((value6.length - 2) / 2);
|
57
57
|
return value6.length;
|
58
58
|
}
|
59
|
-
var init_size = () => {
|
60
|
-
};
|
59
|
+
var init_size = () => {};
|
61
60
|
|
62
|
-
// node_modules/viem/_esm/errors/version.js
|
63
|
-
var version = "2.
|
61
|
+
// ../node_modules/viem/_esm/errors/version.js
|
62
|
+
var version = "2.24.3";
|
64
63
|
|
65
|
-
// node_modules/viem/_esm/errors/base.js
|
64
|
+
// ../node_modules/viem/_esm/errors/base.js
|
66
65
|
function walk(err, fn) {
|
67
66
|
if (fn?.(err))
|
68
67
|
return err;
|
@@ -150,7 +149,7 @@ var init_base = __esm(() => {
|
|
150
149
|
};
|
151
150
|
});
|
152
151
|
|
153
|
-
// node_modules/viem/_esm/errors/abi.js
|
152
|
+
// ../node_modules/viem/_esm/errors/abi.js
|
154
153
|
var AbiEncodingLengthMismatchError, BytesSizeMismatchError, UnsupportedPackedAbiType;
|
155
154
|
var init_abi = __esm(() => {
|
156
155
|
init_base();
|
@@ -180,7 +179,7 @@ var init_abi = __esm(() => {
|
|
180
179
|
};
|
181
180
|
});
|
182
181
|
|
183
|
-
// node_modules/viem/_esm/errors/data.js
|
182
|
+
// ../node_modules/viem/_esm/errors/data.js
|
184
183
|
var SliceOffsetOutOfBoundsError, SizeExceedsPaddingSizeError;
|
185
184
|
var init_data = __esm(() => {
|
186
185
|
init_base();
|
@@ -196,7 +195,7 @@ var init_data = __esm(() => {
|
|
196
195
|
};
|
197
196
|
});
|
198
197
|
|
199
|
-
// node_modules/viem/_esm/utils/data/pad.js
|
198
|
+
// ../node_modules/viem/_esm/utils/data/pad.js
|
200
199
|
function pad(hexOrBytes, { dir: dir2, size: size22 = 32 } = {}) {
|
201
200
|
if (typeof hexOrBytes === "string")
|
202
201
|
return padHex(hexOrBytes, { dir: dir2, size: size22 });
|
@@ -234,7 +233,7 @@ var init_pad = __esm(() => {
|
|
234
233
|
init_data();
|
235
234
|
});
|
236
235
|
|
237
|
-
// node_modules/viem/_esm/errors/encoding.js
|
236
|
+
// ../node_modules/viem/_esm/errors/encoding.js
|
238
237
|
var IntegerOutOfRangeError, SizeOverflowError;
|
239
238
|
var init_encoding = __esm(() => {
|
240
239
|
init_base();
|
@@ -250,7 +249,7 @@ var init_encoding = __esm(() => {
|
|
250
249
|
};
|
251
250
|
});
|
252
251
|
|
253
|
-
// node_modules/viem/_esm/utils/data/trim.js
|
252
|
+
// ../node_modules/viem/_esm/utils/data/trim.js
|
254
253
|
function trim(hexOrBytes, { dir: dir2 = "left" } = {}) {
|
255
254
|
let data = typeof hexOrBytes === "string" ? hexOrBytes.replace("0x", "") : hexOrBytes;
|
256
255
|
let sliceLength = 0;
|
@@ -269,7 +268,7 @@ function trim(hexOrBytes, { dir: dir2 = "left" } = {}) {
|
|
269
268
|
return data;
|
270
269
|
}
|
271
270
|
|
272
|
-
// node_modules/viem/_esm/utils/encoding/fromHex.js
|
271
|
+
// ../node_modules/viem/_esm/utils/encoding/fromHex.js
|
273
272
|
function assertSize(hexOrBytes, { size: size22 }) {
|
274
273
|
if (size21(hexOrBytes) > size22)
|
275
274
|
throw new SizeOverflowError({
|
@@ -298,7 +297,7 @@ var init_fromHex = __esm(() => {
|
|
298
297
|
init_size();
|
299
298
|
});
|
300
299
|
|
301
|
-
// node_modules/viem/_esm/utils/encoding/toHex.js
|
300
|
+
// ../node_modules/viem/_esm/utils/encoding/toHex.js
|
302
301
|
function toHex(value6, opts = {}) {
|
303
302
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
304
303
|
return numberToHex(value6, opts);
|
@@ -370,7 +369,7 @@ var init_toHex = __esm(() => {
|
|
370
369
|
encoder2 = /* @__PURE__ */ new TextEncoder;
|
371
370
|
});
|
372
371
|
|
373
|
-
// node_modules/viem/_esm/utils/encoding/toBytes.js
|
372
|
+
// ../node_modules/viem/_esm/utils/encoding/toBytes.js
|
374
373
|
function toBytes(value6, opts = {}) {
|
375
374
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
376
375
|
return numberToBytes(value6, opts);
|
@@ -475,8 +474,7 @@ function aoutput(out, instance) {
|
|
475
474
|
throw new Error("digestInto() expects output buffer of length at least " + min4);
|
476
475
|
}
|
477
476
|
}
|
478
|
-
var init__assert = () => {
|
479
|
-
};
|
477
|
+
var init__assert = () => {};
|
480
478
|
|
481
479
|
// ../node_modules/@noble/hashes/esm/_u64.js
|
482
480
|
function fromBig(n, le = false) {
|
@@ -744,7 +742,7 @@ var init_sha3 = __esm(() => {
|
|
744
742
|
shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
745
743
|
});
|
746
744
|
|
747
|
-
// node_modules/viem/_esm/utils/hash/keccak256.js
|
745
|
+
// ../node_modules/viem/_esm/utils/hash/keccak256.js
|
748
746
|
function keccak256(value6, to_) {
|
749
747
|
const to = to_ || "hex";
|
750
748
|
const bytes = keccak_256(isHex(value6, { strict: false }) ? toBytes(value6) : value6);
|
@@ -758,7 +756,7 @@ var init_keccak256 = __esm(() => {
|
|
758
756
|
init_toHex();
|
759
757
|
});
|
760
758
|
|
761
|
-
// node_modules/viem/_esm/errors/address.js
|
759
|
+
// ../node_modules/viem/_esm/errors/address.js
|
762
760
|
var InvalidAddressError;
|
763
761
|
var init_address = __esm(() => {
|
764
762
|
init_base();
|
@@ -775,7 +773,7 @@ var init_address = __esm(() => {
|
|
775
773
|
};
|
776
774
|
});
|
777
775
|
|
778
|
-
// node_modules/viem/_esm/utils/lru.js
|
776
|
+
// ../node_modules/viem/_esm/utils/lru.js
|
779
777
|
var LruMap;
|
780
778
|
var init_lru = __esm(() => {
|
781
779
|
LruMap = class LruMap extends Map {
|
@@ -809,7 +807,7 @@ var init_lru = __esm(() => {
|
|
809
807
|
};
|
810
808
|
});
|
811
809
|
|
812
|
-
// node_modules/viem/_esm/utils/address/getAddress.js
|
810
|
+
// ../node_modules/viem/_esm/utils/address/getAddress.js
|
813
811
|
function checksumAddress(address_, chainId) {
|
814
812
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
815
813
|
return checksumAddressCache.get(`${address_}.${chainId}`);
|
@@ -836,7 +834,7 @@ var init_getAddress = __esm(() => {
|
|
836
834
|
checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
837
835
|
});
|
838
836
|
|
839
|
-
// node_modules/viem/_esm/utils/address/isAddress.js
|
837
|
+
// ../node_modules/viem/_esm/utils/address/isAddress.js
|
840
838
|
function isAddress(address, options) {
|
841
839
|
const { strict: strict2 = true } = options ?? {};
|
842
840
|
const cacheKey = `${address}.${strict2}`;
|
@@ -862,12 +860,12 @@ var init_isAddress = __esm(() => {
|
|
862
860
|
isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
863
861
|
});
|
864
862
|
|
865
|
-
// node_modules/viem/_esm/utils/data/concat.js
|
863
|
+
// ../node_modules/viem/_esm/utils/data/concat.js
|
866
864
|
function concatHex(values7) {
|
867
865
|
return `0x${values7.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
868
866
|
}
|
869
867
|
|
870
|
-
// node_modules/viem/_esm/utils/data/slice.js
|
868
|
+
// ../node_modules/viem/_esm/utils/data/slice.js
|
871
869
|
function slice(value6, start5, end6, { strict: strict2 } = {}) {
|
872
870
|
if (isHex(value6, { strict: false }))
|
873
871
|
return sliceHex(value6, start5, end6, {
|
@@ -913,7 +911,7 @@ var init_slice = __esm(() => {
|
|
913
911
|
init_size();
|
914
912
|
});
|
915
913
|
|
916
|
-
// node_modules/viem/_esm/utils/regex.js
|
914
|
+
// ../node_modules/viem/_esm/utils/regex.js
|
917
915
|
var arrayRegex, bytesRegex, integerRegex;
|
918
916
|
var init_regex = __esm(() => {
|
919
917
|
arrayRegex = /^(.*)\[([0-9]*)\]$/;
|
@@ -921,7 +919,7 @@ var init_regex = __esm(() => {
|
|
921
919
|
integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
|
922
920
|
});
|
923
921
|
|
924
|
-
// node_modules/viem/_esm/errors/cursor.js
|
922
|
+
// ../node_modules/viem/_esm/errors/cursor.js
|
925
923
|
var NegativeOffsetError, PositionOutOfBoundsError, RecursiveReadLimitExceededError;
|
926
924
|
var init_cursor = __esm(() => {
|
927
925
|
init_base();
|
@@ -944,7 +942,7 @@ var init_cursor = __esm(() => {
|
|
944
942
|
};
|
945
943
|
});
|
946
944
|
|
947
|
-
// node_modules/viem/_esm/utils/cursor.js
|
945
|
+
// ../node_modules/viem/_esm/utils/cursor.js
|
948
946
|
function createCursor(bytes, { recursiveReadLimit = 8192 } = {}) {
|
949
947
|
const cursor = Object.create(staticCursor);
|
950
948
|
cursor.bytes = bytes;
|
@@ -1117,7 +1115,7 @@ var init_cursor2 = __esm(() => {
|
|
1117
1115
|
};
|
1118
1116
|
});
|
1119
1117
|
|
1120
|
-
// node_modules/viem/_esm/constants/unit.js
|
1118
|
+
// ../node_modules/viem/_esm/constants/unit.js
|
1121
1119
|
var gweiUnits;
|
1122
1120
|
var init_unit = __esm(() => {
|
1123
1121
|
gweiUnits = {
|
@@ -1126,7 +1124,7 @@ var init_unit = __esm(() => {
|
|
1126
1124
|
};
|
1127
1125
|
});
|
1128
1126
|
|
1129
|
-
// node_modules/viem/_esm/utils/unit/formatUnits.js
|
1127
|
+
// ../node_modules/viem/_esm/utils/unit/formatUnits.js
|
1130
1128
|
function formatUnits(value6, decimals) {
|
1131
1129
|
let display = value6.toString();
|
1132
1130
|
const negative2 = display.startsWith("-");
|
@@ -1141,7 +1139,7 @@ function formatUnits(value6, decimals) {
|
|
1141
1139
|
return `${negative2 ? "-" : ""}${integer3 || "0"}${fraction ? `.${fraction}` : ""}`;
|
1142
1140
|
}
|
1143
1141
|
|
1144
|
-
// node_modules/viem/_esm/utils/unit/formatGwei.js
|
1142
|
+
// ../node_modules/viem/_esm/utils/unit/formatGwei.js
|
1145
1143
|
function formatGwei(wei, unit = "wei") {
|
1146
1144
|
return formatUnits(wei, gweiUnits[unit]);
|
1147
1145
|
}
|
@@ -1149,7 +1147,7 @@ var init_formatGwei = __esm(() => {
|
|
1149
1147
|
init_unit();
|
1150
1148
|
});
|
1151
1149
|
|
1152
|
-
// node_modules/viem/_esm/errors/transaction.js
|
1150
|
+
// ../node_modules/viem/_esm/errors/transaction.js
|
1153
1151
|
function prettyPrint(args2) {
|
1154
1152
|
const entries3 = Object.entries(args2).map(([key, value6]) => {
|
1155
1153
|
if (value6 === undefined || value6 === false)
|
@@ -1198,7 +1196,7 @@ var init_transaction = __esm(() => {
|
|
1198
1196
|
};
|
1199
1197
|
});
|
1200
1198
|
|
1201
|
-
// node_modules/viem/_esm/errors/node.js
|
1199
|
+
// ../node_modules/viem/_esm/errors/node.js
|
1202
1200
|
var ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, NonceTooHighError, NonceTooLowError, NonceMaxValueError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, TransactionTypeNotSupportedError, TipAboveFeeCapError;
|
1203
1201
|
var init_node = __esm(() => {
|
1204
1202
|
init_formatGwei();
|
@@ -1377,7 +1375,7 @@ var init_node = __esm(() => {
|
|
1377
1375
|
});
|
1378
1376
|
});
|
1379
1377
|
|
1380
|
-
// node_modules/viem/_esm/utils/formatters/formatter.js
|
1378
|
+
// ../node_modules/viem/_esm/utils/formatters/formatter.js
|
1381
1379
|
function defineFormatter(type2, format7) {
|
1382
1380
|
return ({ exclude: exclude3, format: overrides }) => {
|
1383
1381
|
return {
|
@@ -1399,7 +1397,7 @@ function defineFormatter(type2, format7) {
|
|
1399
1397
|
};
|
1400
1398
|
}
|
1401
1399
|
|
1402
|
-
// node_modules/viem/_esm/constants/number.js
|
1400
|
+
// ../node_modules/viem/_esm/constants/number.js
|
1403
1401
|
var maxInt8, maxInt16, maxInt24, maxInt32, maxInt40, maxInt48, maxInt56, maxInt64, maxInt72, maxInt80, maxInt88, maxInt96, maxInt104, maxInt112, maxInt120, maxInt128, maxInt136, maxInt144, maxInt152, maxInt160, maxInt168, maxInt176, maxInt184, maxInt192, maxInt200, maxInt208, maxInt216, maxInt224, maxInt232, maxInt240, maxInt248, maxInt256, minInt8, minInt16, minInt24, minInt32, minInt40, minInt48, minInt56, minInt64, minInt72, minInt80, minInt88, minInt96, minInt104, minInt112, minInt120, minInt128, minInt136, minInt144, minInt152, minInt160, minInt168, minInt176, minInt184, minInt192, minInt200, minInt208, minInt216, minInt224, minInt232, minInt240, minInt248, minInt256, maxUint8, maxUint16, maxUint24, maxUint32, maxUint40, maxUint48, maxUint56, maxUint64, maxUint72, maxUint80, maxUint88, maxUint96, maxUint104, maxUint112, maxUint120, maxUint128, maxUint136, maxUint144, maxUint152, maxUint160, maxUint168, maxUint176, maxUint184, maxUint192, maxUint200, maxUint208, maxUint216, maxUint224, maxUint232, maxUint240, maxUint248, maxUint256;
|
1404
1402
|
var init_number = __esm(() => {
|
1405
1403
|
maxInt8 = 2n ** (8n - 1n) - 1n;
|
@@ -1765,7 +1763,7 @@ var init_sha256 = __esm(() => {
|
|
1765
1763
|
sha256 = /* @__PURE__ */ wrapConstructor(() => new SHA256);
|
1766
1764
|
});
|
1767
1765
|
|
1768
|
-
// node_modules/viem/_esm/errors/chain.js
|
1766
|
+
// ../node_modules/viem/_esm/errors/chain.js
|
1769
1767
|
var InvalidChainIdError;
|
1770
1768
|
var init_chain = __esm(() => {
|
1771
1769
|
init_base();
|
@@ -2450,8 +2448,7 @@ var tracingFunction = (name) => {
|
|
2450
2448
|
};
|
2451
2449
|
};
|
2452
2450
|
var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
|
2453
|
-
var genConstructor = function* () {
|
2454
|
-
}.constructor;
|
2451
|
+
var genConstructor = function* () {}.constructor;
|
2455
2452
|
|
2456
2453
|
// ../node_modules/effect/dist/esm/Hash.js
|
2457
2454
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
|
@@ -2798,8 +2795,7 @@ var StructuralCommitPrototype = {
|
|
2798
2795
|
...StructuralPrototype
|
2799
2796
|
};
|
2800
2797
|
var Base = /* @__PURE__ */ function() {
|
2801
|
-
function Base2() {
|
2802
|
-
}
|
2798
|
+
function Base2() {}
|
2803
2799
|
Base2.prototype = CommitPrototype;
|
2804
2800
|
return Base2;
|
2805
2801
|
}();
|
@@ -6302,8 +6298,7 @@ var Reference = () => (id, options) => {
|
|
6302
6298
|
Error.stackTraceLimit = 2;
|
6303
6299
|
const creationError = new Error;
|
6304
6300
|
Error.stackTraceLimit = limit;
|
6305
|
-
function ReferenceClass() {
|
6306
|
-
}
|
6301
|
+
function ReferenceClass() {}
|
6307
6302
|
Object.setPrototypeOf(ReferenceClass, ReferenceProto);
|
6308
6303
|
ReferenceClass.key = id;
|
6309
6304
|
ReferenceClass.defaultValue = options.defaultValue;
|
@@ -9243,8 +9238,7 @@ var prettyErrorMessage = (u) => {
|
|
9243
9238
|
if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
|
9244
9239
|
return u["toString"]();
|
9245
9240
|
}
|
9246
|
-
} catch {
|
9247
|
-
}
|
9241
|
+
} catch {}
|
9248
9242
|
return stringifyCircular(u);
|
9249
9243
|
};
|
9250
9244
|
var locationRegex = /\((.*)\)/g;
|
@@ -9818,8 +9812,7 @@ var zip2 = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => map9(th
|
|
9818
9812
|
var zipLeft = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => as(that, a)));
|
9819
9813
|
var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, () => that));
|
9820
9814
|
var never = /* @__PURE__ */ asyncInterrupt(() => {
|
9821
|
-
const interval = setInterval(() => {
|
9822
|
-
}, 2 ** 31 - 1);
|
9815
|
+
const interval = setInterval(() => {}, 2 ** 31 - 1);
|
9823
9816
|
return sync(() => clearInterval(interval));
|
9824
9817
|
});
|
9825
9818
|
var interruptFiber = (self) => flatMap6(fiberId, (fiberId2) => pipe(self, interruptAsFiber(fiberId2)));
|
@@ -13639,16 +13632,11 @@ class Const {
|
|
13639
13632
|
get value() {
|
13640
13633
|
return this.effect;
|
13641
13634
|
}
|
13642
|
-
onStart(_context, _effect, _parent, _fiber) {
|
13643
|
-
}
|
13644
|
-
|
13645
|
-
}
|
13646
|
-
|
13647
|
-
}
|
13648
|
-
onSuspend(_fiber) {
|
13649
|
-
}
|
13650
|
-
onResume(_fiber) {
|
13651
|
-
}
|
13635
|
+
onStart(_context, _effect, _parent, _fiber) {}
|
13636
|
+
onEnd(_value, _fiber) {}
|
13637
|
+
onEffect(_fiber, _effect) {}
|
13638
|
+
onSuspend(_fiber) {}
|
13639
|
+
onResume(_fiber) {}
|
13652
13640
|
map(f) {
|
13653
13641
|
return new ProxySupervisor(this, pipe(this.value, map9(f)));
|
13654
13642
|
}
|
@@ -14122,8 +14110,7 @@ class FiberRuntime extends Class {
|
|
14122
14110
|
return whileLoop({
|
14123
14111
|
while: () => !isDone3,
|
14124
14112
|
body,
|
14125
|
-
step: () => {
|
14126
|
-
}
|
14113
|
+
step: () => {}
|
14127
14114
|
});
|
14128
14115
|
}
|
14129
14116
|
return null;
|
@@ -23653,7 +23640,7 @@ class TrieIterator {
|
|
23653
23640
|
}
|
23654
23641
|
}
|
23655
23642
|
var isTrie = (u) => hasProperty(u, TrieTypeId);
|
23656
|
-
// node_modules/viem/_esm/utils/encoding/toRlp.js
|
23643
|
+
// ../node_modules/viem/_esm/utils/encoding/toRlp.js
|
23657
23644
|
init_base();
|
23658
23645
|
init_cursor2();
|
23659
23646
|
init_toBytes();
|
@@ -23745,7 +23732,7 @@ function getSizeOfLength(length4) {
|
|
23745
23732
|
return 4;
|
23746
23733
|
throw new BaseError("Length is too large.");
|
23747
23734
|
}
|
23748
|
-
// node_modules/viem/_esm/utils/formatters/transaction.js
|
23735
|
+
// ../node_modules/viem/_esm/utils/formatters/transaction.js
|
23749
23736
|
init_fromHex();
|
23750
23737
|
var transactionType = {
|
23751
23738
|
"0x0": "legacy",
|
@@ -23808,7 +23795,7 @@ function formatTransaction(transaction) {
|
|
23808
23795
|
var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
|
23809
23796
|
function formatAuthorizationList(authorizationList) {
|
23810
23797
|
return authorizationList.map((authorization) => ({
|
23811
|
-
|
23798
|
+
address: authorization.address,
|
23812
23799
|
chainId: Number(authorization.chainId),
|
23813
23800
|
nonce: Number(authorization.nonce),
|
23814
23801
|
r: authorization.r,
|
@@ -23817,7 +23804,7 @@ function formatAuthorizationList(authorizationList) {
|
|
23817
23804
|
}));
|
23818
23805
|
}
|
23819
23806
|
|
23820
|
-
// node_modules/viem/_esm/utils/formatters/block.js
|
23807
|
+
// ../node_modules/viem/_esm/utils/formatters/block.js
|
23821
23808
|
function formatBlock(block) {
|
23822
23809
|
const transactions = (block.transactions ?? []).map((transaction) => {
|
23823
23810
|
if (typeof transaction === "string")
|
@@ -23844,7 +23831,7 @@ function formatBlock(block) {
|
|
23844
23831
|
}
|
23845
23832
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
23846
23833
|
|
23847
|
-
// node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
23834
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToCommitments.js
|
23848
23835
|
init_toBytes();
|
23849
23836
|
init_toHex();
|
23850
23837
|
function blobsToCommitments(parameters) {
|
@@ -23857,7 +23844,7 @@ function blobsToCommitments(parameters) {
|
|
23857
23844
|
return to === "bytes" ? commitments : commitments.map((x) => bytesToHex2(x));
|
23858
23845
|
}
|
23859
23846
|
|
23860
|
-
// node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
23847
|
+
// ../node_modules/viem/_esm/utils/blob/blobsToProofs.js
|
23861
23848
|
init_toBytes();
|
23862
23849
|
init_toHex();
|
23863
23850
|
function blobsToProofs(parameters) {
|
@@ -23874,10 +23861,10 @@ function blobsToProofs(parameters) {
|
|
23874
23861
|
return to === "bytes" ? proofs : proofs.map((x) => bytesToHex2(x));
|
23875
23862
|
}
|
23876
23863
|
|
23877
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23864
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23878
23865
|
init_toHex();
|
23879
23866
|
|
23880
|
-
// node_modules/viem/_esm/utils/hash/sha256.js
|
23867
|
+
// ../node_modules/viem/_esm/utils/hash/sha256.js
|
23881
23868
|
init_sha256();
|
23882
23869
|
init_toBytes();
|
23883
23870
|
init_toHex();
|
@@ -23889,7 +23876,7 @@ function sha2562(value6, to_) {
|
|
23889
23876
|
return toHex(bytes);
|
23890
23877
|
}
|
23891
23878
|
|
23892
|
-
// node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23879
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
|
23893
23880
|
function commitmentToVersionedHash(parameters) {
|
23894
23881
|
const { commitment, version: version2 = 1 } = parameters;
|
23895
23882
|
const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
|
@@ -23898,7 +23885,7 @@ function commitmentToVersionedHash(parameters) {
|
|
23898
23885
|
return to === "bytes" ? versionedHash : bytesToHex2(versionedHash);
|
23899
23886
|
}
|
23900
23887
|
|
23901
|
-
// node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
23888
|
+
// ../node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
|
23902
23889
|
function commitmentsToVersionedHashes(parameters) {
|
23903
23890
|
const { commitments, version: version2 } = parameters;
|
23904
23891
|
const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
|
@@ -23913,17 +23900,17 @@ function commitmentsToVersionedHashes(parameters) {
|
|
23913
23900
|
return hashes;
|
23914
23901
|
}
|
23915
23902
|
|
23916
|
-
// node_modules/viem/_esm/constants/blob.js
|
23903
|
+
// ../node_modules/viem/_esm/constants/blob.js
|
23917
23904
|
var blobsPerTransaction = 6;
|
23918
23905
|
var bytesPerFieldElement = 32;
|
23919
23906
|
var fieldElementsPerBlob = 4096;
|
23920
23907
|
var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
|
23921
23908
|
var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - 1 - 1 * fieldElementsPerBlob * blobsPerTransaction;
|
23922
23909
|
|
23923
|
-
// node_modules/viem/_esm/constants/kzg.js
|
23910
|
+
// ../node_modules/viem/_esm/constants/kzg.js
|
23924
23911
|
var versionedHashVersionKzg = 1;
|
23925
23912
|
|
23926
|
-
// node_modules/viem/_esm/errors/blob.js
|
23913
|
+
// ../node_modules/viem/_esm/errors/blob.js
|
23927
23914
|
init_base();
|
23928
23915
|
|
23929
23916
|
class BlobSizeTooLargeError extends BaseError {
|
@@ -23962,7 +23949,7 @@ class InvalidVersionedHashVersionError extends BaseError {
|
|
23962
23949
|
}
|
23963
23950
|
}
|
23964
23951
|
|
23965
|
-
// node_modules/viem/_esm/utils/blob/toBlobs.js
|
23952
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobs.js
|
23966
23953
|
init_cursor2();
|
23967
23954
|
init_size();
|
23968
23955
|
init_toBytes();
|
@@ -24001,7 +23988,7 @@ function toBlobs(parameters) {
|
|
24001
23988
|
return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex2(x.bytes));
|
24002
23989
|
}
|
24003
23990
|
|
24004
|
-
// node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
23991
|
+
// ../node_modules/viem/_esm/utils/blob/toBlobSidecars.js
|
24005
23992
|
function toBlobSidecars(parameters) {
|
24006
23993
|
const { data, kzg, to } = parameters;
|
24007
23994
|
const blobs = parameters.blobs ?? toBlobs({ data, to });
|
@@ -24017,7 +24004,7 @@ function toBlobSidecars(parameters) {
|
|
24017
24004
|
return sidecars;
|
24018
24005
|
}
|
24019
24006
|
|
24020
|
-
// node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
24007
|
+
// ../node_modules/viem/_esm/utils/transaction/getTransactionType.js
|
24021
24008
|
init_transaction();
|
24022
24009
|
function getTransactionType(transaction) {
|
24023
24010
|
if (transaction.type)
|
@@ -24037,7 +24024,7 @@ function getTransactionType(transaction) {
|
|
24037
24024
|
throw new InvalidSerializableTransactionError({ transaction });
|
24038
24025
|
}
|
24039
24026
|
|
24040
|
-
// node_modules/viem/_esm/utils/formatters/log.js
|
24027
|
+
// ../node_modules/viem/_esm/utils/formatters/log.js
|
24041
24028
|
function formatLog(log3, { args: args2, eventName } = {}) {
|
24042
24029
|
return {
|
24043
24030
|
...log3,
|
@@ -24050,7 +24037,7 @@ function formatLog(log3, { args: args2, eventName } = {}) {
|
|
24050
24037
|
};
|
24051
24038
|
}
|
24052
24039
|
|
24053
|
-
// node_modules/viem/_esm/utils/chain/defineChain.js
|
24040
|
+
// ../node_modules/viem/_esm/utils/chain/defineChain.js
|
24054
24041
|
function defineChain(chain) {
|
24055
24042
|
return {
|
24056
24043
|
formatters: undefined,
|
@@ -24060,7 +24047,7 @@ function defineChain(chain) {
|
|
24060
24047
|
};
|
24061
24048
|
}
|
24062
24049
|
|
24063
|
-
// node_modules/viem/_esm/utils/abi/encodePacked.js
|
24050
|
+
// ../node_modules/viem/_esm/utils/abi/encodePacked.js
|
24064
24051
|
init_abi();
|
24065
24052
|
init_address();
|
24066
24053
|
init_isAddress();
|
@@ -24129,35 +24116,14 @@ function encode6(type2, value6, isArray2 = false) {
|
|
24129
24116
|
throw new UnsupportedPackedAbiType(type2);
|
24130
24117
|
}
|
24131
24118
|
|
24132
|
-
// node_modules/viem/_esm/utils/
|
24133
|
-
|
24134
|
-
|
24135
|
-
|
24136
|
-
|
24137
|
-
|
24138
|
-
function formatTransactionReceipt(transactionReceipt) {
|
24139
|
-
const receipt = {
|
24140
|
-
...transactionReceipt,
|
24141
|
-
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
24142
|
-
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
24143
|
-
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
24144
|
-
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
24145
|
-
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
24146
|
-
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
24147
|
-
to: transactionReceipt.to ? transactionReceipt.to : null,
|
24148
|
-
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
24149
|
-
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
24150
|
-
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
24151
|
-
};
|
24152
|
-
if (transactionReceipt.blobGasPrice)
|
24153
|
-
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
24154
|
-
if (transactionReceipt.blobGasUsed)
|
24155
|
-
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
24156
|
-
return receipt;
|
24157
|
-
}
|
24158
|
-
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
24119
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
24120
|
+
init_toHex();
|
24121
|
+
|
24122
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
24123
|
+
init_transaction();
|
24124
|
+
init_toHex();
|
24159
24125
|
|
24160
|
-
// node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
24126
|
+
// ../node_modules/viem/_esm/utils/transaction/assertTransaction.js
|
24161
24127
|
init_number();
|
24162
24128
|
init_address();
|
24163
24129
|
init_base();
|
@@ -24171,9 +24137,10 @@ function assertTransactionEIP7702(transaction) {
|
|
24171
24137
|
const { authorizationList } = transaction;
|
24172
24138
|
if (authorizationList) {
|
24173
24139
|
for (const authorization of authorizationList) {
|
24174
|
-
const {
|
24175
|
-
|
24176
|
-
|
24140
|
+
const { chainId } = authorization;
|
24141
|
+
const address = authorization.address;
|
24142
|
+
if (!isAddress(address))
|
24143
|
+
throw new InvalidAddressError({ address });
|
24177
24144
|
if (chainId < 0)
|
24178
24145
|
throw new InvalidChainIdError({ chainId });
|
24179
24146
|
}
|
@@ -24233,29 +24200,7 @@ function assertTransactionLegacy(transaction) {
|
|
24233
24200
|
throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
|
24234
24201
|
}
|
24235
24202
|
|
24236
|
-
// node_modules/viem/_esm/utils/transaction/
|
24237
|
-
init_transaction();
|
24238
|
-
init_toHex();
|
24239
|
-
|
24240
|
-
// node_modules/viem/_esm/experimental/eip7702/utils/serializeAuthorizationList.js
|
24241
|
-
init_toHex();
|
24242
|
-
function serializeAuthorizationList(authorizationList) {
|
24243
|
-
if (!authorizationList || authorizationList.length === 0)
|
24244
|
-
return [];
|
24245
|
-
const serializedAuthorizationList = [];
|
24246
|
-
for (const authorization of authorizationList) {
|
24247
|
-
const { contractAddress, chainId, nonce, ...signature } = authorization;
|
24248
|
-
serializedAuthorizationList.push([
|
24249
|
-
chainId ? toHex(chainId) : "0x",
|
24250
|
-
contractAddress,
|
24251
|
-
nonce ? toHex(nonce) : "0x",
|
24252
|
-
...toYParitySignatureArray({}, signature)
|
24253
|
-
]);
|
24254
|
-
}
|
24255
|
-
return serializedAuthorizationList;
|
24256
|
-
}
|
24257
|
-
|
24258
|
-
// node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
24203
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeAccessList.js
|
24259
24204
|
init_address();
|
24260
24205
|
init_transaction();
|
24261
24206
|
init_isAddress();
|
@@ -24278,7 +24223,7 @@ function serializeAccessList(accessList) {
|
|
24278
24223
|
return serializedAccessList;
|
24279
24224
|
}
|
24280
24225
|
|
24281
|
-
// node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
24226
|
+
// ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
|
24282
24227
|
function serializeTransaction(transaction, signature) {
|
24283
24228
|
const type2 = getTransactionType(transaction);
|
24284
24229
|
if (type2 === "eip1559")
|
@@ -24472,7 +24417,53 @@ function toYParitySignatureArray(transaction, signature_) {
|
|
24472
24417
|
return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
|
24473
24418
|
}
|
24474
24419
|
|
24475
|
-
// node_modules/viem/_esm/
|
24420
|
+
// ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
|
24421
|
+
function serializeAuthorizationList(authorizationList) {
|
24422
|
+
if (!authorizationList || authorizationList.length === 0)
|
24423
|
+
return [];
|
24424
|
+
const serializedAuthorizationList = [];
|
24425
|
+
for (const authorization of authorizationList) {
|
24426
|
+
const { chainId, nonce, ...signature } = authorization;
|
24427
|
+
const contractAddress = authorization.address;
|
24428
|
+
serializedAuthorizationList.push([
|
24429
|
+
chainId ? toHex(chainId) : "0x",
|
24430
|
+
contractAddress,
|
24431
|
+
nonce ? toHex(nonce) : "0x",
|
24432
|
+
...toYParitySignatureArray({}, signature)
|
24433
|
+
]);
|
24434
|
+
}
|
24435
|
+
return serializedAuthorizationList;
|
24436
|
+
}
|
24437
|
+
|
24438
|
+
// ../node_modules/viem/_esm/utils/formatters/transactionReceipt.js
|
24439
|
+
init_fromHex();
|
24440
|
+
var receiptStatuses = {
|
24441
|
+
"0x0": "reverted",
|
24442
|
+
"0x1": "success"
|
24443
|
+
};
|
24444
|
+
function formatTransactionReceipt(transactionReceipt) {
|
24445
|
+
const receipt = {
|
24446
|
+
...transactionReceipt,
|
24447
|
+
blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
|
24448
|
+
contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
|
24449
|
+
cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
|
24450
|
+
effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
|
24451
|
+
gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
|
24452
|
+
logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
|
24453
|
+
to: transactionReceipt.to ? transactionReceipt.to : null,
|
24454
|
+
transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
|
24455
|
+
status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
|
24456
|
+
type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
|
24457
|
+
};
|
24458
|
+
if (transactionReceipt.blobGasPrice)
|
24459
|
+
receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
|
24460
|
+
if (transactionReceipt.blobGasUsed)
|
24461
|
+
receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
|
24462
|
+
return receipt;
|
24463
|
+
}
|
24464
|
+
var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
|
24465
|
+
|
24466
|
+
// ../node_modules/viem/_esm/index.js
|
24476
24467
|
init_toBytes();
|
24477
24468
|
init_toHex();
|
24478
24469
|
// src/schema.ts
|
@@ -24534,6 +24525,10 @@ var Bytes32 = BytesToHex.pipe(exports_Schema.filter((x) => x.length === 66 || `E
|
|
24534
24525
|
function asBytes32(x) {
|
24535
24526
|
return parse3(Bytes32, x);
|
24536
24527
|
}
|
24528
|
+
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"));
|
24529
|
+
function parseAddress(address) {
|
24530
|
+
return parse3(Address, address);
|
24531
|
+
}
|
24537
24532
|
|
24538
24533
|
// src/handle.ts
|
24539
24534
|
var import_sha32 = __toESM(require_sha3());
|