@inco/js 0.1.27 → 0.1.28

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.
@@ -52482,7 +52482,7 @@ class Lightning {
52482
52482
  }, covalidatorUrl);
52483
52483
  }
52484
52484
  static latestDeployment(pepper, chainId) {
52485
- const latestByPepper = lightningDeployments.find((d) => d.pepper === pepper && BigInt(d.chainId) === chainId);
52485
+ const latestByPepper = lightningDeployments.find((d) => d.pepper === pepper && BigInt(d.chainId) === BigInt(chainId));
52486
52486
  if (!latestByPepper) {
52487
52487
  throw new Error(`No deployment found for pepper ${pepper}`);
52488
52488
  }
@@ -71306,7 +71306,7 @@ class Lightning {
71306
71306
  }, covalidatorUrl);
71307
71307
  }
71308
71308
  static latestDeployment(pepper, chainId) {
71309
- const latestByPepper = lightningDeployments.find((d) => d.pepper === pepper && BigInt(d.chainId) === chainId);
71309
+ const latestByPepper = lightningDeployments.find((d) => d.pepper === pepper && BigInt(d.chainId) === BigInt(chainId));
71310
71310
  if (!latestByPepper) {
71311
71311
  throw new Error(`No deployment found for pepper ${pepper}`);
71312
71312
  }
@@ -7,10 +7,10 @@ type TupleToUnion<T> = T extends readonly unknown[] ? T[number] : never;
7
7
  type ToBigInt<T extends number | string | bigint> = `${T}` extends `${infer N extends bigint}` ? N : never;
8
8
  type ToNumber<T extends number | string | bigint> = `${T}` extends `${infer N extends number}` ? N : never;
9
9
  type Numberish<T extends number | string | bigint> = T | ToBigInt<T> | ToNumber<T>;
10
- type ValuesToBigInt<T> = {
11
- [K in keyof T]: T[K] extends string ? ToBigInt<T[K]> : never;
10
+ type ValuesToNumberish<T> = {
11
+ [K in keyof T]: T[K] extends string ? Numberish<T[K]> : never;
12
12
  };
13
- type DistributedToBigInt<T, K> = T extends infer U ? K extends keyof U ? Omit<U, K> & (ValuesToBigInt<Pick<U, K>> | Pick<U, K>) : never : never;
13
+ type DistributedToBigInt<T, K> = T extends infer U ? K extends keyof U ? Omit<U, K> & (ValuesToNumberish<Pick<U, K>> | Pick<U, K>) : never : never;
14
14
  type Deployment = TupleToUnion<typeof lightningDeployments>;
15
15
  type DeploymentWithBigIntChainId = DistributedToBigInt<Deployment, 'chainId'>;
16
16
  type DistributedPick<T, K> = T extends any ? Pick<T, Extract<keyof T, K>> : never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inco/js",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "scripts": {
6
6
  "test": "bun run lint && bun run test:tsc && bun run test:unit",