@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.
- package/dist/lite/index.cjs +1 -1
- package/dist/lite/index.mjs +1 -1
- package/dist/lite/lightning.d.ts +3 -3
- package/package.json +1 -1
package/dist/lite/index.cjs
CHANGED
@@ -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
|
}
|
package/dist/lite/index.mjs
CHANGED
@@ -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
|
}
|
package/dist/lite/lightning.d.ts
CHANGED
@@ -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
|
11
|
-
[K in keyof T]: T[K] extends string ?
|
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> & (
|
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;
|