@inco/js 0.1.21 → 0.1.23

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.
@@ -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.22.23";
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 SizeExceedsPaddingSizeError;
185
184
  var init_data = __esm(() => {
186
185
  init_base();
@@ -191,7 +190,7 @@ var init_data = __esm(() => {
191
190
  };
192
191
  });
193
192
 
194
- // node_modules/viem/_esm/utils/data/pad.js
193
+ // ../node_modules/viem/_esm/utils/data/pad.js
195
194
  function pad(hexOrBytes, { dir: dir2, size: size22 = 32 } = {}) {
196
195
  if (typeof hexOrBytes === "string")
197
196
  return padHex(hexOrBytes, { dir: dir2, size: size22 });
@@ -229,7 +228,7 @@ var init_pad = __esm(() => {
229
228
  init_data();
230
229
  });
231
230
 
232
- // node_modules/viem/_esm/errors/encoding.js
231
+ // ../node_modules/viem/_esm/errors/encoding.js
233
232
  var IntegerOutOfRangeError, SizeOverflowError;
234
233
  var init_encoding = __esm(() => {
235
234
  init_base();
@@ -245,7 +244,7 @@ var init_encoding = __esm(() => {
245
244
  };
246
245
  });
247
246
 
248
- // node_modules/viem/_esm/utils/encoding/fromHex.js
247
+ // ../node_modules/viem/_esm/utils/encoding/fromHex.js
249
248
  function assertSize(hexOrBytes, { size: size22 }) {
250
249
  if (size21(hexOrBytes) > size22)
251
250
  throw new SizeOverflowError({
@@ -258,7 +257,7 @@ var init_fromHex = __esm(() => {
258
257
  init_size();
259
258
  });
260
259
 
261
- // node_modules/viem/_esm/utils/encoding/toHex.js
260
+ // ../node_modules/viem/_esm/utils/encoding/toHex.js
262
261
  function toHex(value6, opts = {}) {
263
262
  if (typeof value6 === "number" || typeof value6 === "bigint")
264
263
  return numberToHex(value6, opts);
@@ -330,7 +329,7 @@ var init_toHex = __esm(() => {
330
329
  encoder2 = /* @__PURE__ */ new TextEncoder;
331
330
  });
332
331
 
333
- // node_modules/viem/_esm/utils/encoding/toBytes.js
332
+ // ../node_modules/viem/_esm/utils/encoding/toBytes.js
334
333
  function toBytes(value6, opts = {}) {
335
334
  if (typeof value6 === "number" || typeof value6 === "bigint")
336
335
  return numberToBytes(value6, opts);
@@ -435,8 +434,7 @@ function aoutput(out, instance) {
435
434
  throw new Error("digestInto() expects output buffer of length at least " + min4);
436
435
  }
437
436
  }
438
- var init__assert = () => {
439
- };
437
+ var init__assert = () => {};
440
438
 
441
439
  // ../node_modules/@noble/hashes/esm/_u64.js
442
440
  function fromBig(n, le = false) {
@@ -698,7 +696,7 @@ var init_sha3 = __esm(() => {
698
696
  shake256 = /* @__PURE__ */ genShake(31, 136, 256 / 8);
699
697
  });
700
698
 
701
- // node_modules/viem/_esm/utils/hash/keccak256.js
699
+ // ../node_modules/viem/_esm/utils/hash/keccak256.js
702
700
  function keccak256(value6, to_) {
703
701
  const to = to_ || "hex";
704
702
  const bytes = keccak_256(isHex(value6, { strict: false }) ? toBytes(value6) : value6);
@@ -712,7 +710,7 @@ var init_keccak256 = __esm(() => {
712
710
  init_toHex();
713
711
  });
714
712
 
715
- // node_modules/viem/_esm/errors/address.js
713
+ // ../node_modules/viem/_esm/errors/address.js
716
714
  var InvalidAddressError;
717
715
  var init_address = __esm(() => {
718
716
  init_base();
@@ -729,7 +727,7 @@ var init_address = __esm(() => {
729
727
  };
730
728
  });
731
729
 
732
- // node_modules/viem/_esm/utils/lru.js
730
+ // ../node_modules/viem/_esm/utils/lru.js
733
731
  var LruMap;
734
732
  var init_lru = __esm(() => {
735
733
  LruMap = class LruMap extends Map {
@@ -763,7 +761,7 @@ var init_lru = __esm(() => {
763
761
  };
764
762
  });
765
763
 
766
- // node_modules/viem/_esm/utils/address/getAddress.js
764
+ // ../node_modules/viem/_esm/utils/address/getAddress.js
767
765
  function checksumAddress(address_, chainId) {
768
766
  if (checksumAddressCache.has(`${address_}.${chainId}`))
769
767
  return checksumAddressCache.get(`${address_}.${chainId}`);
@@ -790,7 +788,7 @@ var init_getAddress = __esm(() => {
790
788
  checksumAddressCache = /* @__PURE__ */ new LruMap(8192);
791
789
  });
792
790
 
793
- // node_modules/viem/_esm/utils/address/isAddress.js
791
+ // ../node_modules/viem/_esm/utils/address/isAddress.js
794
792
  function isAddress(address, options) {
795
793
  const { strict: strict2 = true } = options ?? {};
796
794
  const cacheKey = `${address}.${strict2}`;
@@ -816,12 +814,12 @@ var init_isAddress = __esm(() => {
816
814
  isAddressCache = /* @__PURE__ */ new LruMap(8192);
817
815
  });
818
816
 
819
- // node_modules/viem/_esm/utils/data/concat.js
817
+ // ../node_modules/viem/_esm/utils/data/concat.js
820
818
  function concatHex(values7) {
821
819
  return `0x${values7.reduce((acc, x) => acc + x.replace("0x", ""), "")}`;
822
820
  }
823
821
 
824
- // node_modules/viem/_esm/utils/regex.js
822
+ // ../node_modules/viem/_esm/utils/regex.js
825
823
  var arrayRegex, bytesRegex, integerRegex;
826
824
  var init_regex = __esm(() => {
827
825
  arrayRegex = /^(.*)\[([0-9]*)\]$/;
@@ -1231,8 +1229,7 @@ var require_bn = __commonJS((exports2, module2) => {
1231
1229
  }
1232
1230
  function inherits(ctor, superCtor) {
1233
1231
  ctor.super_ = superCtor;
1234
- var TempCtor = function() {
1235
- };
1232
+ var TempCtor = function() {};
1236
1233
  TempCtor.prototype = superCtor.prototype;
1237
1234
  ctor.prototype = new TempCtor;
1238
1235
  ctor.prototype.constructor = ctor;
@@ -1267,8 +1264,7 @@ var require_bn = __commonJS((exports2, module2) => {
1267
1264
  } else {
1268
1265
  Buffer2 = require("buffer").Buffer;
1269
1266
  }
1270
- } catch (e) {
1271
- }
1267
+ } catch (e) {}
1272
1268
  BN.isBN = function isBN(num) {
1273
1269
  if (num instanceof BN) {
1274
1270
  return true;
@@ -2969,8 +2965,7 @@ var require_bn = __commonJS((exports2, module2) => {
2969
2965
  }
2970
2966
  maskedWords.length = s;
2971
2967
  }
2972
- if (s === 0) {
2973
- } else if (this.length > s) {
2968
+ if (s === 0) {} else if (this.length > s) {
2974
2969
  this.length -= s;
2975
2970
  for (i = 0;i < this.length; i++) {
2976
2971
  this.words[i] = this.words[i + s];
@@ -4274,8 +4269,7 @@ var require_brorand = __commonJS((exports2, module2) => {
4274
4269
  Rand.prototype._rand = function _rand(n) {
4275
4270
  return crypto.randomBytes(n);
4276
4271
  };
4277
- } catch (e) {
4278
- }
4272
+ } catch (e) {}
4279
4273
  }
4280
4274
  var crypto;
4281
4275
  });
@@ -4602,8 +4596,7 @@ var require_inherits_browser = __commonJS((exports2, module2) => {
4602
4596
  module2.exports = function inherits(ctor, superCtor) {
4603
4597
  if (superCtor) {
4604
4598
  ctor.super_ = superCtor;
4605
- var TempCtor = function() {
4606
- };
4599
+ var TempCtor = function() {};
4607
4600
  TempCtor.prototype = superCtor.prototype;
4608
4601
  ctor.prototype = new TempCtor;
4609
4602
  ctor.prototype.constructor = ctor;
@@ -5367,8 +5360,7 @@ var require_mont = __commonJS((exports2, module2) => {
5367
5360
  MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
5368
5361
  return Point.fromJSON(this, obj);
5369
5362
  };
5370
- Point.prototype.precompute = function precompute() {
5371
- };
5363
+ Point.prototype.precompute = function precompute() {};
5372
5364
  Point.prototype._encode = function _encode() {
5373
5365
  return this.getX().toArray("be", this.curve.p.byteLength());
5374
5366
  };
@@ -9006,8 +8998,7 @@ var require_node_gyp_build = __commonJS((exports2, module2) => {
9006
8998
  var name = runtimeRequire(path.join(dir2, "package.json")).name.toUpperCase().replace(/-/g, "_");
9007
8999
  if (process.env[name + "_PREBUILD"])
9008
9000
  dir2 = process.env[name + "_PREBUILD"];
9009
- } catch (err) {
9010
- }
9001
+ } catch (err) {}
9011
9002
  if (!prebuildsOnly) {
9012
9003
  var release2 = getFirst(path.join(dir2, "build/Release"), matchBuild);
9013
9004
  if (release2)
@@ -9478,7 +9469,7 @@ var require_lib = __commonJS((exports2, module2) => {
9478
9469
 
9479
9470
  // ../node_modules/secp256k1/bindings.js
9480
9471
  var require_bindings = __commonJS((exports2, module2) => {
9481
- var __dirname = "/Users/amaury/Workspace/inco/inco-monorepo/node_modules/secp256k1";
9472
+ var __dirname = "/home/silas/code/inco-monorepo/node_modules/secp256k1";
9482
9473
  var addon = require_node_gyp_build2()(__dirname);
9483
9474
  module2.exports = require_lib()(new addon.Secp256k1);
9484
9475
  });
@@ -10891,8 +10882,7 @@ var tracingFunction = (name) => {
10891
10882
  };
10892
10883
  };
10893
10884
  var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
10894
- var genConstructor = function* () {
10895
- }.constructor;
10885
+ var genConstructor = function* () {}.constructor;
10896
10886
 
10897
10887
  // ../node_modules/effect/dist/esm/Hash.js
10898
10888
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
@@ -11239,8 +11229,7 @@ var StructuralCommitPrototype = {
11239
11229
  ...StructuralPrototype
11240
11230
  };
11241
11231
  var Base = /* @__PURE__ */ function() {
11242
- function Base2() {
11243
- }
11232
+ function Base2() {}
11244
11233
  Base2.prototype = CommitPrototype;
11245
11234
  return Base2;
11246
11235
  }();
@@ -14743,8 +14732,7 @@ var Reference = () => (id, options) => {
14743
14732
  Error.stackTraceLimit = 2;
14744
14733
  const creationError = new Error;
14745
14734
  Error.stackTraceLimit = limit;
14746
- function ReferenceClass() {
14747
- }
14735
+ function ReferenceClass() {}
14748
14736
  Object.setPrototypeOf(ReferenceClass, ReferenceProto);
14749
14737
  ReferenceClass.key = id;
14750
14738
  ReferenceClass.defaultValue = options.defaultValue;
@@ -17684,8 +17672,7 @@ var prettyErrorMessage = (u) => {
17684
17672
  if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
17685
17673
  return u["toString"]();
17686
17674
  }
17687
- } catch {
17688
- }
17675
+ } catch {}
17689
17676
  return stringifyCircular(u);
17690
17677
  };
17691
17678
  var locationRegex = /\((.*)\)/g;
@@ -18259,8 +18246,7 @@ var zip2 = /* @__PURE__ */ dual(2, (self2, that) => flatMap6(self2, (a) => map9(
18259
18246
  var zipLeft = /* @__PURE__ */ dual(2, (self2, that) => flatMap6(self2, (a) => as(that, a)));
18260
18247
  var zipRight = /* @__PURE__ */ dual(2, (self2, that) => flatMap6(self2, () => that));
18261
18248
  var never = /* @__PURE__ */ asyncInterrupt(() => {
18262
- const interval = setInterval(() => {
18263
- }, 2 ** 31 - 1);
18249
+ const interval = setInterval(() => {}, 2 ** 31 - 1);
18264
18250
  return sync(() => clearInterval(interval));
18265
18251
  });
18266
18252
  var interruptFiber = (self2) => flatMap6(fiberId, (fiberId2) => pipe(self2, interruptAsFiber(fiberId2)));
@@ -22080,16 +22066,11 @@ class Const {
22080
22066
  get value() {
22081
22067
  return this.effect;
22082
22068
  }
22083
- onStart(_context, _effect, _parent, _fiber) {
22084
- }
22085
- onEnd(_value, _fiber) {
22086
- }
22087
- onEffect(_fiber, _effect) {
22088
- }
22089
- onSuspend(_fiber) {
22090
- }
22091
- onResume(_fiber) {
22092
- }
22069
+ onStart(_context, _effect, _parent, _fiber) {}
22070
+ onEnd(_value, _fiber) {}
22071
+ onEffect(_fiber, _effect) {}
22072
+ onSuspend(_fiber) {}
22073
+ onResume(_fiber) {}
22093
22074
  map(f) {
22094
22075
  return new ProxySupervisor(this, pipe(this.value, map9(f)));
22095
22076
  }
@@ -22563,8 +22544,7 @@ class FiberRuntime extends Class {
22563
22544
  return whileLoop({
22564
22545
  while: () => !isDone3,
22565
22546
  body,
22566
- step: () => {
22567
- }
22547
+ step: () => {}
22568
22548
  });
22569
22549
  }
22570
22550
  return null;
@@ -32094,7 +32074,7 @@ class TrieIterator {
32094
32074
  }
32095
32075
  }
32096
32076
  var isTrie = (u) => hasProperty(u, TrieTypeId);
32097
- // node_modules/viem/_esm/utils/abi/encodePacked.js
32077
+ // ../node_modules/viem/_esm/utils/abi/encodePacked.js
32098
32078
  init_abi();
32099
32079
  init_address();
32100
32080
  init_isAddress();
@@ -32163,7 +32143,7 @@ function encode6(type2, value6, isArray2 = false) {
32163
32143
  throw new UnsupportedPackedAbiType(type2);
32164
32144
  }
32165
32145
 
32166
- // node_modules/viem/_esm/index.js
32146
+ // ../node_modules/viem/_esm/index.js
32167
32147
  init_toBytes();
32168
32148
  init_toHex();
32169
32149
  // src/schema.ts
@@ -32225,6 +32205,10 @@ var Bytes32 = BytesToHex.pipe(exports_Schema.filter((x) => x.length === 66 || `E
32225
32205
  function asBytes32(x) {
32226
32206
  return parse3(Bytes32, x);
32227
32207
  }
32208
+ 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"));
32209
+ function parseAddress(address) {
32210
+ return parse3(Address, address);
32211
+ }
32228
32212
 
32229
32213
  // src/handle.ts
32230
32214
  var import_sha32 = __toESM(require_sha3());
@@ -32953,7 +32937,7 @@ function toSecp256k1Keypair(kp) {
32953
32937
  }
32954
32938
  };
32955
32939
  }
32956
- async function generateSecp256k1Keypair() {
32940
+ function generateSecp256k1Keypair() {
32957
32941
  return toSecp256k1Keypair(secp256k1.genKeyPair());
32958
32942
  }
32959
32943
  function encodeSecp256k1PublicKey(pub) {
@@ -33936,8 +33920,7 @@ class BinaryReader {
33936
33920
  let start5 = this.pos;
33937
33921
  switch (wireType) {
33938
33922
  case WireType.Varint:
33939
- while (this.buf[this.pos++] & 128) {
33940
- }
33923
+ while (this.buf[this.pos++] & 128) {}
33941
33924
  break;
33942
33925
  case WireType.Bit64:
33943
33926
  this.pos += 4;
@@ -34571,14 +34554,12 @@ function mapKeyToReflect(key, type2) {
34571
34554
  case ScalarType.FIXED64:
34572
34555
  try {
34573
34556
  return protoInt64.uParse(key);
34574
- } catch (_a) {
34575
- }
34557
+ } catch (_a) {}
34576
34558
  break;
34577
34559
  default:
34578
34560
  try {
34579
34561
  return protoInt64.parse(key);
34580
- } catch (_b) {
34581
- }
34562
+ } catch (_b) {}
34582
34563
  break;
34583
34564
  }
34584
34565
  return key;
@@ -37266,8 +37247,7 @@ class ConnectError extends Error {
37266
37247
  if (desc) {
37267
37248
  try {
37268
37249
  details.push(fromBinary(desc, data.value));
37269
- } catch (_) {
37270
- }
37250
+ } catch (_) {}
37271
37251
  }
37272
37252
  }
37273
37253
  return details;
@@ -38016,11 +37996,9 @@ function runStreamingCall(opt) {
38016
37996
  var _a, _b;
38017
37997
  const it = opt.req.message[Symbol.asyncIterator]();
38018
37998
  if (!doneCalled) {
38019
- (_a = it.throw) === null || _a === undefined || _a.call(it, this.reason).catch(() => {
38020
- });
37999
+ (_a = it.throw) === null || _a === undefined || _a.call(it, this.reason).catch(() => {});
38021
38000
  }
38022
- (_b = it.return) === null || _b === undefined || _b.call(it).catch(() => {
38023
- });
38001
+ (_b = it.return) === null || _b === undefined || _b.call(it).catch(() => {});
38024
38002
  });
38025
38003
  return next5(req).then((res) => {
38026
38004
  return Object.assign(Object.assign({}, res), { message: {
@@ -38410,10 +38388,10 @@ function pulumiCovalidatorGrpc(chain) {
38410
38388
  return `https://grpc.${chain.name.toLowerCase()}.covalidator.denver.inco.org`;
38411
38389
  }
38412
38390
  function denverDevnetCovalidatorGrpc(chain) {
38413
- return getCovalidatorGrpcHelper(chain, "devnet", "lightning");
38391
+ return getCovalidatorGrpcHelper(chain, "devnet", "denver");
38414
38392
  }
38415
38393
  function denverTestnetCovalidatorGrpc(chain) {
38416
- return getCovalidatorGrpcHelper(chain, "testnet", "lightning");
38394
+ return getCovalidatorGrpcHelper(chain, "testnet", "denver");
38417
38395
  }
38418
38396
  function camelToDashCase(str) {
38419
38397
  return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();