@inco/js 0.1.31 → 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.
Files changed (102) hide show
  1. package/README.md +28 -57
  2. package/dist/binary.js +67 -0
  3. package/dist/chain.js +24 -0
  4. package/dist/encryption/encryption.js +98 -0
  5. package/dist/encryption/index.cjs +132 -123
  6. package/dist/encryption/index.js +2 -0
  7. package/dist/encryption/index.mjs +132 -123
  8. package/dist/fhevm/fhe-environment.js +8 -0
  9. package/dist/fhevm/fhevm.js +139 -0
  10. package/dist/fhevm/index.js +2 -0
  11. package/dist/fhevm/reencrypt.js +123 -0
  12. package/dist/fhevm/tfhe.js +324 -0
  13. package/dist/fhevm/types.js +26 -0
  14. package/dist/generated/abis/addTwo.js +59 -0
  15. package/dist/generated/abis/inco-fhevm.js +6242 -0
  16. package/dist/generated/abis/index.js +3 -0
  17. package/dist/generated/abis/lightning.js +12489 -0
  18. package/dist/generated/es/cosmos/ics23/v1/proofs_pb.js +198 -0
  19. package/dist/generated/es/cosmos/msg/v1/msg_pb.js +33 -0
  20. package/dist/generated/es/cosmos_proto/cosmos_pb.js +115 -0
  21. package/dist/generated/es/google/api/annotations_pb.js +27 -0
  22. package/dist/generated/es/google/api/http_pb.js +34 -0
  23. package/dist/generated/es/inco/fhe/v1/events_pb.js +21 -0
  24. package/dist/generated/es/inco/fhe/v1/genesis_pb.js +46 -0
  25. package/dist/generated/es/inco/fhe/v1/query_pb.js +108 -0
  26. package/dist/generated/es/inco/fhe/v1/tx_pb.js +108 -0
  27. package/dist/generated/es/inco/fhe/v1/types_pb.js +133 -0
  28. package/dist/generated/es/inco/kms/lite/v1/kms_service_pb.js +43 -0
  29. package/dist/generated/es/inco/kms/lite/v1/types_pb.js +44 -0
  30. package/dist/generated/es/inco/preflight/v1/genesis_pb.js +20 -0
  31. package/dist/generated/es/inco/preflight/v1/query_pb.js +38 -0
  32. package/dist/generated/es/inco/preflight/v1/tx_pb.js +48 -0
  33. package/dist/generated/es/inco/preflight/v1/types_pb.js +34 -0
  34. package/dist/generated/es/kms/base_pb.js +238 -0
  35. package/dist/generated/es/sf/ethereum/type/v2/type_pb.js +571 -0
  36. package/dist/generated/fhe-environments.js +15 -0
  37. package/dist/generated/lightning.js +399 -0
  38. package/dist/generated/local-node.js +8 -0
  39. package/dist/generated/ts/amino/amino.js +8 -0
  40. package/dist/generated/ts/cometbft/abci/v1/types.js +5063 -0
  41. package/dist/generated/ts/cometbft/crypto/v1/keys.js +105 -0
  42. package/dist/generated/ts/cometbft/crypto/v1/proof.js +430 -0
  43. package/dist/generated/ts/cometbft/types/v1/params.js +713 -0
  44. package/dist/generated/ts/cometbft/types/v1/validator.js +353 -0
  45. package/dist/generated/ts/cosmos/app/v1alpha1/module.js +218 -0
  46. package/dist/generated/ts/cosmos/msg/v1/msg.js +8 -0
  47. package/dist/generated/ts/cosmos_proto/cosmos.js +211 -0
  48. package/dist/generated/ts/gogoproto/gogo.js +8 -0
  49. package/dist/generated/ts/google/api/annotations.js +8 -0
  50. package/dist/generated/ts/google/api/http.js +353 -0
  51. package/dist/generated/ts/google/protobuf/descriptor.js +5070 -0
  52. package/dist/generated/ts/google/protobuf/duration.js +90 -0
  53. package/dist/generated/ts/google/protobuf/timestamp.js +90 -0
  54. package/dist/generated/ts/google/protobuf/wrappers.js +506 -0
  55. package/dist/generated/ts/inco/abci/v1/types.js +70 -0
  56. package/dist/generated/ts/inco/fhe/module/v1/module.js +63 -0
  57. package/dist/generated/ts/inco/fhe/v1/events.js +187 -0
  58. package/dist/generated/ts/inco/fhe/v1/genesis.js +711 -0
  59. package/dist/generated/ts/inco/fhe/v1/query.js +1391 -0
  60. package/dist/generated/ts/inco/fhe/v1/tx.js +1233 -0
  61. package/dist/generated/ts/inco/fhe/v1/types.js +985 -0
  62. package/dist/generated/ts/inco/originchain/module/v1/module.js +63 -0
  63. package/dist/generated/ts/inco/originchain/v1/abci.js +328 -0
  64. package/dist/generated/ts/inco/originchain/v1/events.js +213 -0
  65. package/dist/generated/ts/inco/originchain/v1/genesis.js +66 -0
  66. package/dist/generated/ts/inco/originchain/v1/query.js +277 -0
  67. package/dist/generated/ts/inco/originchain/v1/tx.js +137 -0
  68. package/dist/generated/ts/inco/originchain/v1/types.js +200 -0
  69. package/dist/generated/ts/inco/preflight/module/v1/module.js +63 -0
  70. package/dist/generated/ts/inco/preflight/v1/genesis.js +182 -0
  71. package/dist/generated/ts/inco/preflight/v1/query.js +256 -0
  72. package/dist/generated/ts/inco/preflight/v1/tx.js +445 -0
  73. package/dist/generated/ts/inco/preflight/v1/types.js +395 -0
  74. package/dist/handle.js +94 -0
  75. package/dist/index.cjs +140 -131
  76. package/dist/index.js +6 -0
  77. package/dist/index.mjs +140 -131
  78. package/dist/l1/client.js +93 -0
  79. package/dist/l1/index.js +3 -0
  80. package/dist/l1/preflight.js +39 -0
  81. package/dist/lite/deployments.js +17 -0
  82. package/dist/lite/ecies.js +124 -0
  83. package/dist/lite/hadu.js +36 -0
  84. package/dist/lite/index.cjs +186 -146
  85. package/dist/lite/index.js +7 -0
  86. package/dist/lite/index.mjs +3890 -3788
  87. package/dist/lite/lightning.js +179 -0
  88. package/dist/lite/reencrypt.d.ts +1 -0
  89. package/dist/lite/reencrypt.js +148 -0
  90. package/dist/local/index.cjs +25 -2573
  91. package/dist/local/index.js +2 -0
  92. package/dist/local/index.mjs +5352 -7837
  93. package/dist/local/local-node.js +24 -0
  94. package/dist/reencryption/eip712.js +81 -0
  95. package/dist/reencryption/index.cjs +132 -123
  96. package/dist/reencryption/index.js +3 -0
  97. package/dist/reencryption/index.mjs +132 -123
  98. package/dist/reencryption/types.js +2 -0
  99. package/dist/schema.js +15 -0
  100. package/dist/viem.d.ts +53 -52
  101. package/dist/viem.js +8 -0
  102. package/package.json +11 -48
@@ -48,7 +48,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
48
48
  throw Error('Dynamic require of "' + x + '" is not supported');
49
49
  });
50
50
 
51
- // ../node_modules/viem/_esm/utils/data/isHex.js
51
+ // node_modules/viem/_esm/utils/data/isHex.js
52
52
  function isHex(value6, { strict: strict2 = true } = {}) {
53
53
  if (!value6)
54
54
  return false;
@@ -57,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
- // ../node_modules/viem/_esm/utils/data/size.js
60
+ // node_modules/viem/_esm/utils/data/size.js
61
61
  function size21(value6) {
62
62
  if (isHex(value6, { strict: false }))
63
63
  return Math.ceil((value6.length - 2) / 2);
64
64
  return value6.length;
65
65
  }
66
- var init_size = () => {};
66
+ var init_size = () => {
67
+ };
67
68
 
68
- // ../node_modules/viem/_esm/errors/version.js
69
- var version = "2.24.3";
69
+ // node_modules/viem/_esm/errors/version.js
70
+ var version = "2.22.23";
70
71
 
71
- // ../node_modules/viem/_esm/errors/base.js
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
- // ../node_modules/viem/_esm/errors/abi.js
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
- // ../node_modules/viem/_esm/errors/data.js
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
- // ../node_modules/viem/_esm/utils/data/pad.js
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
- // ../node_modules/viem/_esm/errors/encoding.js
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
- // ../node_modules/viem/_esm/utils/data/trim.js
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
- // ../node_modules/viem/_esm/utils/encoding/fromHex.js
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
- // ../node_modules/viem/_esm/utils/encoding/toHex.js
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
- // ../node_modules/viem/_esm/utils/encoding/toBytes.js
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
- // ../node_modules/viem/_esm/utils/hash/keccak256.js
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
- // ../node_modules/viem/_esm/errors/address.js
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
- // ../node_modules/viem/_esm/utils/lru.js
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
- // ../node_modules/viem/_esm/utils/address/getAddress.js
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
- // ../node_modules/viem/_esm/utils/address/isAddress.js
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
- // ../node_modules/viem/_esm/utils/data/concat.js
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
- // ../node_modules/viem/_esm/utils/data/slice.js
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
- // ../node_modules/viem/_esm/utils/regex.js
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
- // ../node_modules/viem/_esm/errors/cursor.js
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
- // ../node_modules/viem/_esm/utils/cursor.js
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
- // ../node_modules/viem/_esm/constants/unit.js
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
- // ../node_modules/viem/_esm/utils/unit/formatUnits.js
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
- // ../node_modules/viem/_esm/utils/unit/formatGwei.js
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
- // ../node_modules/viem/_esm/errors/transaction.js
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
- // ../node_modules/viem/_esm/errors/node.js
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
- // ../node_modules/viem/_esm/utils/formatters/formatter.js
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
- // ../node_modules/viem/_esm/constants/number.js
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
- // ../node_modules/viem/_esm/errors/chain.js
1775
+ // node_modules/viem/_esm/errors/chain.js
1774
1776
  var InvalidChainIdError;
1775
1777
  var init_chain = __esm(() => {
1776
1778
  init_base();
@@ -3510,7 +3512,8 @@ var tracingFunction = (name) => {
3510
3512
  };
3511
3513
  };
3512
3514
  var internalCall = /* @__PURE__ */ tracingFunction("effect_internal_function");
3513
- var genConstructor = function* () {}.constructor;
3515
+ var genConstructor = function* () {
3516
+ }.constructor;
3514
3517
 
3515
3518
  // ../node_modules/effect/dist/esm/Hash.js
3516
3519
  var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => new WeakMap);
@@ -3857,7 +3860,8 @@ var StructuralCommitPrototype = {
3857
3860
  ...StructuralPrototype
3858
3861
  };
3859
3862
  var Base = /* @__PURE__ */ function() {
3860
- function Base2() {}
3863
+ function Base2() {
3864
+ }
3861
3865
  Base2.prototype = CommitPrototype;
3862
3866
  return Base2;
3863
3867
  }();
@@ -7360,7 +7364,8 @@ var Reference = () => (id, options) => {
7360
7364
  Error.stackTraceLimit = 2;
7361
7365
  const creationError = new Error;
7362
7366
  Error.stackTraceLimit = limit;
7363
- function ReferenceClass() {}
7367
+ function ReferenceClass() {
7368
+ }
7364
7369
  Object.setPrototypeOf(ReferenceClass, ReferenceProto);
7365
7370
  ReferenceClass.key = id;
7366
7371
  ReferenceClass.defaultValue = options.defaultValue;
@@ -10300,7 +10305,8 @@ var prettyErrorMessage = (u) => {
10300
10305
  if (hasProperty(u, "toString") && isFunction2(u["toString"]) && u["toString"] !== Object.prototype.toString && u["toString"] !== globalThis.Array.prototype.toString) {
10301
10306
  return u["toString"]();
10302
10307
  }
10303
- } catch {}
10308
+ } catch {
10309
+ }
10304
10310
  return stringifyCircular(u);
10305
10311
  };
10306
10312
  var locationRegex = /\((.*)\)/g;
@@ -10874,7 +10880,8 @@ var zip2 = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => map9(th
10874
10880
  var zipLeft = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, (a) => as(that, a)));
10875
10881
  var zipRight = /* @__PURE__ */ dual(2, (self, that) => flatMap6(self, () => that));
10876
10882
  var never = /* @__PURE__ */ asyncInterrupt(() => {
10877
- const interval = setInterval(() => {}, 2 ** 31 - 1);
10883
+ const interval = setInterval(() => {
10884
+ }, 2 ** 31 - 1);
10878
10885
  return sync(() => clearInterval(interval));
10879
10886
  });
10880
10887
  var interruptFiber = (self) => flatMap6(fiberId, (fiberId2) => pipe(self, interruptAsFiber(fiberId2)));
@@ -14694,11 +14701,16 @@ class Const {
14694
14701
  get value() {
14695
14702
  return this.effect;
14696
14703
  }
14697
- onStart(_context, _effect, _parent, _fiber) {}
14698
- onEnd(_value, _fiber) {}
14699
- onEffect(_fiber, _effect) {}
14700
- onSuspend(_fiber) {}
14701
- onResume(_fiber) {}
14704
+ onStart(_context, _effect, _parent, _fiber) {
14705
+ }
14706
+ onEnd(_value, _fiber) {
14707
+ }
14708
+ onEffect(_fiber, _effect) {
14709
+ }
14710
+ onSuspend(_fiber) {
14711
+ }
14712
+ onResume(_fiber) {
14713
+ }
14702
14714
  map(f) {
14703
14715
  return new ProxySupervisor(this, pipe(this.value, map9(f)));
14704
14716
  }
@@ -15172,7 +15184,8 @@ class FiberRuntime extends Class {
15172
15184
  return whileLoop({
15173
15185
  while: () => !isDone3,
15174
15186
  body,
15175
- step: () => {}
15187
+ step: () => {
15188
+ }
15176
15189
  });
15177
15190
  }
15178
15191
  return null;
@@ -24702,7 +24715,7 @@ class TrieIterator {
24702
24715
  }
24703
24716
  }
24704
24717
  var isTrie = (u) => hasProperty(u, TrieTypeId);
24705
- // ../node_modules/viem/_esm/utils/encoding/toRlp.js
24718
+ // node_modules/viem/_esm/utils/encoding/toRlp.js
24706
24719
  init_base();
24707
24720
  init_cursor2();
24708
24721
  init_toBytes();
@@ -24794,7 +24807,7 @@ function getSizeOfLength(length4) {
24794
24807
  return 4;
24795
24808
  throw new BaseError("Length is too large.");
24796
24809
  }
24797
- // ../node_modules/viem/_esm/utils/formatters/transaction.js
24810
+ // node_modules/viem/_esm/utils/formatters/transaction.js
24798
24811
  init_fromHex();
24799
24812
  var transactionType = {
24800
24813
  "0x0": "legacy",
@@ -24857,7 +24870,7 @@ function formatTransaction(transaction) {
24857
24870
  var defineTransaction = /* @__PURE__ */ defineFormatter("transaction", formatTransaction);
24858
24871
  function formatAuthorizationList(authorizationList) {
24859
24872
  return authorizationList.map((authorization) => ({
24860
- address: authorization.address,
24873
+ contractAddress: authorization.address,
24861
24874
  chainId: Number(authorization.chainId),
24862
24875
  nonce: Number(authorization.nonce),
24863
24876
  r: authorization.r,
@@ -24866,7 +24879,7 @@ function formatAuthorizationList(authorizationList) {
24866
24879
  }));
24867
24880
  }
24868
24881
 
24869
- // ../node_modules/viem/_esm/utils/formatters/block.js
24882
+ // node_modules/viem/_esm/utils/formatters/block.js
24870
24883
  function formatBlock(block) {
24871
24884
  const transactions = (block.transactions ?? []).map((transaction) => {
24872
24885
  if (typeof transaction === "string")
@@ -24893,7 +24906,7 @@ function formatBlock(block) {
24893
24906
  }
24894
24907
  var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
24895
24908
 
24896
- // ../node_modules/viem/_esm/utils/blob/blobsToCommitments.js
24909
+ // node_modules/viem/_esm/utils/blob/blobsToCommitments.js
24897
24910
  init_toBytes();
24898
24911
  init_toHex();
24899
24912
  function blobsToCommitments(parameters) {
@@ -24906,7 +24919,7 @@ function blobsToCommitments(parameters) {
24906
24919
  return to === "bytes" ? commitments : commitments.map((x) => bytesToHex2(x));
24907
24920
  }
24908
24921
 
24909
- // ../node_modules/viem/_esm/utils/blob/blobsToProofs.js
24922
+ // node_modules/viem/_esm/utils/blob/blobsToProofs.js
24910
24923
  init_toBytes();
24911
24924
  init_toHex();
24912
24925
  function blobsToProofs(parameters) {
@@ -24923,10 +24936,10 @@ function blobsToProofs(parameters) {
24923
24936
  return to === "bytes" ? proofs : proofs.map((x) => bytesToHex2(x));
24924
24937
  }
24925
24938
 
24926
- // ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
24939
+ // node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
24927
24940
  init_toHex();
24928
24941
 
24929
- // ../node_modules/viem/_esm/utils/hash/sha256.js
24942
+ // node_modules/viem/_esm/utils/hash/sha256.js
24930
24943
  init_sha256();
24931
24944
  init_toBytes();
24932
24945
  init_toHex();
@@ -24938,7 +24951,7 @@ function sha2562(value6, to_) {
24938
24951
  return toHex(bytes);
24939
24952
  }
24940
24953
 
24941
- // ../node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
24954
+ // node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js
24942
24955
  function commitmentToVersionedHash(parameters) {
24943
24956
  const { commitment, version: version2 = 1 } = parameters;
24944
24957
  const to = parameters.to ?? (typeof commitment === "string" ? "hex" : "bytes");
@@ -24947,7 +24960,7 @@ function commitmentToVersionedHash(parameters) {
24947
24960
  return to === "bytes" ? versionedHash : bytesToHex2(versionedHash);
24948
24961
  }
24949
24962
 
24950
- // ../node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
24963
+ // node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js
24951
24964
  function commitmentsToVersionedHashes(parameters) {
24952
24965
  const { commitments, version: version2 } = parameters;
24953
24966
  const to = parameters.to ?? (typeof commitments[0] === "string" ? "hex" : "bytes");
@@ -24962,17 +24975,17 @@ function commitmentsToVersionedHashes(parameters) {
24962
24975
  return hashes;
24963
24976
  }
24964
24977
 
24965
- // ../node_modules/viem/_esm/constants/blob.js
24978
+ // node_modules/viem/_esm/constants/blob.js
24966
24979
  var blobsPerTransaction = 6;
24967
24980
  var bytesPerFieldElement = 32;
24968
24981
  var fieldElementsPerBlob = 4096;
24969
24982
  var bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;
24970
24983
  var maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction - 1 - 1 * fieldElementsPerBlob * blobsPerTransaction;
24971
24984
 
24972
- // ../node_modules/viem/_esm/constants/kzg.js
24985
+ // node_modules/viem/_esm/constants/kzg.js
24973
24986
  var versionedHashVersionKzg = 1;
24974
24987
 
24975
- // ../node_modules/viem/_esm/errors/blob.js
24988
+ // node_modules/viem/_esm/errors/blob.js
24976
24989
  init_base();
24977
24990
 
24978
24991
  class BlobSizeTooLargeError extends BaseError {
@@ -25011,7 +25024,7 @@ class InvalidVersionedHashVersionError extends BaseError {
25011
25024
  }
25012
25025
  }
25013
25026
 
25014
- // ../node_modules/viem/_esm/utils/blob/toBlobs.js
25027
+ // node_modules/viem/_esm/utils/blob/toBlobs.js
25015
25028
  init_cursor2();
25016
25029
  init_size();
25017
25030
  init_toBytes();
@@ -25050,7 +25063,7 @@ function toBlobs(parameters) {
25050
25063
  return to === "bytes" ? blobs.map((x) => x.bytes) : blobs.map((x) => bytesToHex2(x.bytes));
25051
25064
  }
25052
25065
 
25053
- // ../node_modules/viem/_esm/utils/blob/toBlobSidecars.js
25066
+ // node_modules/viem/_esm/utils/blob/toBlobSidecars.js
25054
25067
  function toBlobSidecars(parameters) {
25055
25068
  const { data, kzg, to } = parameters;
25056
25069
  const blobs = parameters.blobs ?? toBlobs({ data, to });
@@ -25066,7 +25079,7 @@ function toBlobSidecars(parameters) {
25066
25079
  return sidecars;
25067
25080
  }
25068
25081
 
25069
- // ../node_modules/viem/_esm/utils/transaction/getTransactionType.js
25082
+ // node_modules/viem/_esm/utils/transaction/getTransactionType.js
25070
25083
  init_transaction();
25071
25084
  function getTransactionType(transaction) {
25072
25085
  if (transaction.type)
@@ -25086,7 +25099,7 @@ function getTransactionType(transaction) {
25086
25099
  throw new InvalidSerializableTransactionError({ transaction });
25087
25100
  }
25088
25101
 
25089
- // ../node_modules/viem/_esm/utils/formatters/log.js
25102
+ // node_modules/viem/_esm/utils/formatters/log.js
25090
25103
  function formatLog(log3, { args: args2, eventName } = {}) {
25091
25104
  return {
25092
25105
  ...log3,
@@ -25099,7 +25112,7 @@ function formatLog(log3, { args: args2, eventName } = {}) {
25099
25112
  };
25100
25113
  }
25101
25114
 
25102
- // ../node_modules/viem/_esm/utils/chain/defineChain.js
25115
+ // node_modules/viem/_esm/utils/chain/defineChain.js
25103
25116
  function defineChain(chain) {
25104
25117
  return {
25105
25118
  formatters: undefined,
@@ -25109,7 +25122,7 @@ function defineChain(chain) {
25109
25122
  };
25110
25123
  }
25111
25124
 
25112
- // ../node_modules/viem/_esm/utils/abi/encodePacked.js
25125
+ // node_modules/viem/_esm/utils/abi/encodePacked.js
25113
25126
  init_abi();
25114
25127
  init_address();
25115
25128
  init_isAddress();
@@ -25178,14 +25191,35 @@ function encode6(type2, value6, isArray2 = false) {
25178
25191
  throw new UnsupportedPackedAbiType(type2);
25179
25192
  }
25180
25193
 
25181
- // ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
25182
- init_toHex();
25183
-
25184
- // ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
25185
- init_transaction();
25186
- init_toHex();
25194
+ // node_modules/viem/_esm/utils/formatters/transactionReceipt.js
25195
+ init_fromHex();
25196
+ var receiptStatuses = {
25197
+ "0x0": "reverted",
25198
+ "0x1": "success"
25199
+ };
25200
+ function formatTransactionReceipt(transactionReceipt) {
25201
+ const receipt = {
25202
+ ...transactionReceipt,
25203
+ blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
25204
+ contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
25205
+ cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
25206
+ effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
25207
+ gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
25208
+ logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
25209
+ to: transactionReceipt.to ? transactionReceipt.to : null,
25210
+ transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
25211
+ status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
25212
+ type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
25213
+ };
25214
+ if (transactionReceipt.blobGasPrice)
25215
+ receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
25216
+ if (transactionReceipt.blobGasUsed)
25217
+ receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
25218
+ return receipt;
25219
+ }
25220
+ var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
25187
25221
 
25188
- // ../node_modules/viem/_esm/utils/transaction/assertTransaction.js
25222
+ // node_modules/viem/_esm/utils/transaction/assertTransaction.js
25189
25223
  init_number();
25190
25224
  init_address();
25191
25225
  init_base();
@@ -25199,10 +25233,9 @@ function assertTransactionEIP7702(transaction) {
25199
25233
  const { authorizationList } = transaction;
25200
25234
  if (authorizationList) {
25201
25235
  for (const authorization of authorizationList) {
25202
- const { chainId } = authorization;
25203
- const address = authorization.address;
25204
- if (!isAddress(address))
25205
- throw new InvalidAddressError({ address });
25236
+ const { contractAddress, chainId } = authorization;
25237
+ if (!isAddress(contractAddress))
25238
+ throw new InvalidAddressError({ address: contractAddress });
25206
25239
  if (chainId < 0)
25207
25240
  throw new InvalidChainIdError({ chainId });
25208
25241
  }
@@ -25262,7 +25295,29 @@ function assertTransactionLegacy(transaction) {
25262
25295
  throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });
25263
25296
  }
25264
25297
 
25265
- // ../node_modules/viem/_esm/utils/transaction/serializeAccessList.js
25298
+ // node_modules/viem/_esm/utils/transaction/serializeTransaction.js
25299
+ init_transaction();
25300
+ init_toHex();
25301
+
25302
+ // node_modules/viem/_esm/experimental/eip7702/utils/serializeAuthorizationList.js
25303
+ init_toHex();
25304
+ function serializeAuthorizationList(authorizationList) {
25305
+ if (!authorizationList || authorizationList.length === 0)
25306
+ return [];
25307
+ const serializedAuthorizationList = [];
25308
+ for (const authorization of authorizationList) {
25309
+ const { contractAddress, chainId, nonce, ...signature } = authorization;
25310
+ serializedAuthorizationList.push([
25311
+ chainId ? toHex(chainId) : "0x",
25312
+ contractAddress,
25313
+ nonce ? toHex(nonce) : "0x",
25314
+ ...toYParitySignatureArray({}, signature)
25315
+ ]);
25316
+ }
25317
+ return serializedAuthorizationList;
25318
+ }
25319
+
25320
+ // node_modules/viem/_esm/utils/transaction/serializeAccessList.js
25266
25321
  init_address();
25267
25322
  init_transaction();
25268
25323
  init_isAddress();
@@ -25285,7 +25340,7 @@ function serializeAccessList(accessList) {
25285
25340
  return serializedAccessList;
25286
25341
  }
25287
25342
 
25288
- // ../node_modules/viem/_esm/utils/transaction/serializeTransaction.js
25343
+ // node_modules/viem/_esm/utils/transaction/serializeTransaction.js
25289
25344
  function serializeTransaction(transaction, signature) {
25290
25345
  const type2 = getTransactionType(transaction);
25291
25346
  if (type2 === "eip1559")
@@ -25479,53 +25534,7 @@ function toYParitySignatureArray(transaction, signature_) {
25479
25534
  return [yParity_, r === "0x00" ? "0x" : r, s === "0x00" ? "0x" : s];
25480
25535
  }
25481
25536
 
25482
- // ../node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js
25483
- function serializeAuthorizationList(authorizationList) {
25484
- if (!authorizationList || authorizationList.length === 0)
25485
- return [];
25486
- const serializedAuthorizationList = [];
25487
- for (const authorization of authorizationList) {
25488
- const { chainId, nonce, ...signature } = authorization;
25489
- const contractAddress = authorization.address;
25490
- serializedAuthorizationList.push([
25491
- chainId ? toHex(chainId) : "0x",
25492
- contractAddress,
25493
- nonce ? toHex(nonce) : "0x",
25494
- ...toYParitySignatureArray({}, signature)
25495
- ]);
25496
- }
25497
- return serializedAuthorizationList;
25498
- }
25499
-
25500
- // ../node_modules/viem/_esm/utils/formatters/transactionReceipt.js
25501
- init_fromHex();
25502
- var receiptStatuses = {
25503
- "0x0": "reverted",
25504
- "0x1": "success"
25505
- };
25506
- function formatTransactionReceipt(transactionReceipt) {
25507
- const receipt = {
25508
- ...transactionReceipt,
25509
- blockNumber: transactionReceipt.blockNumber ? BigInt(transactionReceipt.blockNumber) : null,
25510
- contractAddress: transactionReceipt.contractAddress ? transactionReceipt.contractAddress : null,
25511
- cumulativeGasUsed: transactionReceipt.cumulativeGasUsed ? BigInt(transactionReceipt.cumulativeGasUsed) : null,
25512
- effectiveGasPrice: transactionReceipt.effectiveGasPrice ? BigInt(transactionReceipt.effectiveGasPrice) : null,
25513
- gasUsed: transactionReceipt.gasUsed ? BigInt(transactionReceipt.gasUsed) : null,
25514
- logs: transactionReceipt.logs ? transactionReceipt.logs.map((log3) => formatLog(log3)) : null,
25515
- to: transactionReceipt.to ? transactionReceipt.to : null,
25516
- transactionIndex: transactionReceipt.transactionIndex ? hexToNumber(transactionReceipt.transactionIndex) : null,
25517
- status: transactionReceipt.status ? receiptStatuses[transactionReceipt.status] : null,
25518
- type: transactionReceipt.type ? transactionType[transactionReceipt.type] || transactionReceipt.type : null
25519
- };
25520
- if (transactionReceipt.blobGasPrice)
25521
- receipt.blobGasPrice = BigInt(transactionReceipt.blobGasPrice);
25522
- if (transactionReceipt.blobGasUsed)
25523
- receipt.blobGasUsed = BigInt(transactionReceipt.blobGasUsed);
25524
- return receipt;
25525
- }
25526
- var defineTransactionReceipt = /* @__PURE__ */ defineFormatter("transactionReceipt", formatTransactionReceipt);
25527
-
25528
- // ../node_modules/viem/_esm/index.js
25537
+ // node_modules/viem/_esm/index.js
25529
25538
  init_toBytes();
25530
25539
  init_toHex();
25531
25540
  // src/schema.ts
@@ -0,0 +1,8 @@
1
+ // Avoid inporting any other dependencies in this file to avoid serialisation issues downstream in infracto
2
+ import { getSupportedChain } from '../chain';
3
+ import { FHEEnvironments } from '../generated/fhe-environments';
4
+ export function getFheEnvironment(chainId) {
5
+ const supportedChain = getSupportedChain(chainId);
6
+ return FHEEnvironments[supportedChain.name];
7
+ }
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmhlLWVudmlyb25tZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2ZoZXZtL2ZoZS1lbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyR0FBMkc7QUFDM0csT0FBTyxFQUFnQyxpQkFBaUIsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUMzRSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFhaEUsTUFBTSxVQUFVLGlCQUFpQixDQUFDLE9BQWlCO0lBQ2pELE1BQU0sY0FBYyxHQUFHLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxDQUFDO0lBQ2xELE9BQU8sZUFBZSxDQUFDLGNBQWMsQ0FBQyxJQUF1QyxDQUFDLENBQUM7QUFDakYsQ0FBQyJ9