@inco/js 0.1.20 → 0.1.21
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/encryption/index.cjs +47 -34
- package/dist/encryption/index.mjs +47 -34
- package/dist/generated/lightning.d.ts +252 -6
- package/dist/index.cjs +47 -34
- package/dist/index.mjs +47 -34
- package/dist/lite/index.cjs +341 -57
- package/dist/lite/index.mjs +4040 -3694
- package/dist/local/index.cjs +31 -878
- package/dist/local/index.mjs +5358 -6142
- package/dist/local/local-node.d.ts +1 -2
- package/dist/reencryption/index.cjs +311 -40
- package/dist/reencryption/index.mjs +311 -40
- package/dist/viem.d.ts +53 -52
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -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 SizeExceedsPaddingSizeError;
|
191
192
|
var init_data = __esm(() => {
|
192
193
|
init_base();
|
@@ -197,7 +198,7 @@ var init_data = __esm(() => {
|
|
197
198
|
};
|
198
199
|
});
|
199
200
|
|
200
|
-
//
|
201
|
+
// node_modules/viem/_esm/utils/data/pad.js
|
201
202
|
function pad(hexOrBytes, { dir: dir2, size: size22 = 32 } = {}) {
|
202
203
|
if (typeof hexOrBytes === "string")
|
203
204
|
return padHex(hexOrBytes, { dir: dir2, size: size22 });
|
@@ -235,7 +236,7 @@ var init_pad = __esm(() => {
|
|
235
236
|
init_data();
|
236
237
|
});
|
237
238
|
|
238
|
-
//
|
239
|
+
// node_modules/viem/_esm/errors/encoding.js
|
239
240
|
var IntegerOutOfRangeError, SizeOverflowError;
|
240
241
|
var init_encoding = __esm(() => {
|
241
242
|
init_base();
|
@@ -251,7 +252,7 @@ var init_encoding = __esm(() => {
|
|
251
252
|
};
|
252
253
|
});
|
253
254
|
|
254
|
-
//
|
255
|
+
// node_modules/viem/_esm/utils/encoding/fromHex.js
|
255
256
|
function assertSize(hexOrBytes, { size: size22 }) {
|
256
257
|
if (size21(hexOrBytes) > size22)
|
257
258
|
throw new SizeOverflowError({
|
@@ -264,7 +265,7 @@ var init_fromHex = __esm(() => {
|
|
264
265
|
init_size();
|
265
266
|
});
|
266
267
|
|
267
|
-
//
|
268
|
+
// node_modules/viem/_esm/utils/encoding/toHex.js
|
268
269
|
function toHex(value6, opts = {}) {
|
269
270
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
270
271
|
return numberToHex(value6, opts);
|
@@ -336,7 +337,7 @@ var init_toHex = __esm(() => {
|
|
336
337
|
encoder2 = /* @__PURE__ */ new TextEncoder;
|
337
338
|
});
|
338
339
|
|
339
|
-
//
|
340
|
+
// node_modules/viem/_esm/utils/encoding/toBytes.js
|
340
341
|
function toBytes(value6, opts = {}) {
|
341
342
|
if (typeof value6 === "number" || typeof value6 === "bigint")
|
342
343
|
return numberToBytes(value6, opts);
|
@@ -441,7 +442,8 @@ function aoutput(out, instance) {
|
|
441
442
|
throw new Error("digestInto() expects output buffer of length at least " + min4);
|
442
443
|
}
|
443
444
|
}
|
444
|
-
var init__assert = () => {
|
445
|
+
var init__assert = () => {
|
446
|
+
};
|
445
447
|
|
446
448
|
// ../node_modules/@noble/hashes/esm/_u64.js
|
447
449
|
function fromBig(n, le = false) {
|
@@ -703,7 +705,7 @@ var init_sha3 = __esm(() => {
|
|
703
705
|
shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
|
704
706
|
});
|
705
707
|
|
706
|
-
//
|
708
|
+
// node_modules/viem/_esm/utils/hash/keccak256.js
|
707
709
|
function keccak256(value6, to_) {
|
708
710
|
const to = to_ || "hex";
|
709
711
|
const bytes = keccak_256(isHex(value6, { strict: false }) ? toBytes(value6) : value6);
|
@@ -717,7 +719,7 @@ var init_keccak256 = __esm(() => {
|
|
717
719
|
init_toHex();
|
718
720
|
});
|
719
721
|
|
720
|
-
//
|
722
|
+
// node_modules/viem/_esm/errors/address.js
|
721
723
|
var InvalidAddressError;
|
722
724
|
var init_address = __esm(() => {
|
723
725
|
init_base();
|
@@ -734,7 +736,7 @@ var init_address = __esm(() => {
|
|
734
736
|
};
|
735
737
|
});
|
736
738
|
|
737
|
-
//
|
739
|
+
// node_modules/viem/_esm/utils/lru.js
|
738
740
|
var LruMap;
|
739
741
|
var init_lru = __esm(() => {
|
740
742
|
LruMap = class LruMap extends Map {
|
@@ -768,7 +770,7 @@ var init_lru = __esm(() => {
|
|
768
770
|
};
|
769
771
|
});
|
770
772
|
|
771
|
-
//
|
773
|
+
// node_modules/viem/_esm/utils/address/getAddress.js
|
772
774
|
function checksumAddress(address_, chainId) {
|
773
775
|
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
774
776
|
return checksumAddressCache.get(`${address_}.${chainId}`);
|
@@ -795,7 +797,7 @@ var init_getAddress = __esm(() => {
|
|
795
797
|
checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
|
796
798
|
});
|
797
799
|
|
798
|
-
//
|
800
|
+
// node_modules/viem/_esm/utils/address/isAddress.js
|
799
801
|
function isAddress(address, options) {
|
800
802
|
const { strict: strict2 = true } = options ?? {};
|
801
803
|
const cacheKey = `${address}.${strict2}`;
|
@@ -821,12 +823,12 @@ var init_isAddress = __esm(() => {
|
|
821
823
|
isAddressCache = /* @__PURE__ */ new LruMap(8192);
|
822
824
|
});
|
823
825
|
|
824
|
-
//
|
826
|
+
// node_modules/viem/_esm/utils/data/concat.js
|
825
827
|
function concatHex(values7) {
|
826
828
|
return `0x${values7.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
|
827
829
|
}
|
828
830
|
|
829
|
-
//
|
831
|
+
// node_modules/viem/_esm/utils/regex.js
|
830
832
|
var arrayRegex, bytesRegex, integerRegex;
|
831
833
|
var init_regex = __esm(() => {
|
832
834
|
arrayRegex = /^(.*)\[([0-9]*)\]$/;
|
@@ -2563,7 +2565,8 @@ var tracingFunction = (name) => {
|
|
2563
2565
|
};
|
2564
2566
|
};
|
2565
2567
|
var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
|
2566
|
-
var genConstructor = function* () {
|
2568
|
+
var genConstructor = function* () {
|
2569
|
+
}.constructor;
|
2567
2570
|
|
2568
2571
|
// ../node_modules/effect/dist/esm/Hash.js
|
2569
2572
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
|
@@ -2910,7 +2913,8 @@ var StructuralCommitPrototype = {
|
|
2910
2913
|
...StructuralPrototype
|
2911
2914
|
};
|
2912
2915
|
var Base = /* @__PURE__ */ function() {
|
2913
|
-
function Base2() {
|
2916
|
+
function Base2() {
|
2917
|
+
}
|
2914
2918
|
Base2.prototype = CommitPrototype;
|
2915
2919
|
return Base2;
|
2916
2920
|
}();
|
@@ -6413,7 +6417,8 @@ var Reference = () => (id, options) => {
|
|
6413
6417
|
Error.stackTraceLimit = 2;
|
6414
6418
|
const creationError = new Error;
|
6415
6419
|
Error.stackTraceLimit = limit;
|
6416
|
-
function ReferenceClass() {
|
6420
|
+
function ReferenceClass() {
|
6421
|
+
}
|
6417
6422
|
Object.setPrototypeOf(ReferenceClass, ReferenceProto);
|
6418
6423
|
ReferenceClass.key = id;
|
6419
6424
|
ReferenceClass.defaultValue = options.defaultValue;
|
@@ -9353,7 +9358,8 @@ var prettyErrorMessage = (u) => {
|
|
9353
9358
|
if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
|
9354
9359
|
return u["toString"]();
|
9355
9360
|
}
|
9356
|
-
} catch {
|
9361
|
+
} catch {
|
9362
|
+
}
|
9357
9363
|
return stringifyCircular(u);
|
9358
9364
|
};
|
9359
9365
|
var locationRegex = /\((.*)\)/g;
|
@@ -9927,7 +9933,8 @@ var zip2 = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => map9(th
|
|
9927
9933
|
var zipLeft = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => as(that, a)));
|
9928
9934
|
var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, () => that));
|
9929
9935
|
var never = /* @__PURE__ */ asyncInterrupt(() => {
|
9930
|
-
const interval = setInterval(() => {
|
9936
|
+
const interval = setInterval(() => {
|
9937
|
+
}, 2 ** 31 - 1);
|
9931
9938
|
return sync(() => clearInterval(interval));
|
9932
9939
|
});
|
9933
9940
|
var interruptFiber = (self) => flatMap6(fiberId, (fiberId2) => pipe(self, interruptAsFiber(fiberId2)));
|
@@ -13747,11 +13754,16 @@ class Const {
|
|
13747
13754
|
get value() {
|
13748
13755
|
return this.effect;
|
13749
13756
|
}
|
13750
|
-
onStart(_context, _effect, _parent, _fiber) {
|
13751
|
-
|
13752
|
-
|
13753
|
-
|
13754
|
-
|
13757
|
+
onStart(_context, _effect, _parent, _fiber) {
|
13758
|
+
}
|
13759
|
+
onEnd(_value, _fiber) {
|
13760
|
+
}
|
13761
|
+
onEffect(_fiber, _effect) {
|
13762
|
+
}
|
13763
|
+
onSuspend(_fiber) {
|
13764
|
+
}
|
13765
|
+
onResume(_fiber) {
|
13766
|
+
}
|
13755
13767
|
map(f) {
|
13756
13768
|
return new ProxySupervisor(this, pipe(this.value, map9(f)));
|
13757
13769
|
}
|
@@ -14225,7 +14237,8 @@ class FiberRuntime extends Class {
|
|
14225
14237
|
return whileLoop({
|
14226
14238
|
while: () => !isDone3,
|
14227
14239
|
body,
|
14228
|
-
step: () => {
|
14240
|
+
step: () => {
|
14241
|
+
}
|
14229
14242
|
});
|
14230
14243
|
}
|
14231
14244
|
return null;
|
@@ -23755,7 +23768,7 @@ class TrieIterator {
|
|
23755
23768
|
}
|
23756
23769
|
}
|
23757
23770
|
var isTrie = (u) => hasProperty(u, TrieTypeId);
|
23758
|
-
//
|
23771
|
+
// node_modules/viem/_esm/utils/abi/encodePacked.js
|
23759
23772
|
init_abi();
|
23760
23773
|
init_address();
|
23761
23774
|
init_isAddress();
|
@@ -23824,7 +23837,7 @@ function encode6(type2, value6, isArray2 = false) {
|
|
23824
23837
|
throw new UnsupportedPackedAbiType(type2);
|
23825
23838
|
}
|
23826
23839
|
|
23827
|
-
//
|
23840
|
+
// node_modules/viem/_esm/index.js
|
23828
23841
|
init_toBytes();
|
23829
23842
|
init_toHex();
|
23830
23843
|
// src/schema.ts
|