@inco/js 0.1.26 → 0.1.27
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/lightning.d.ts +4 -2
- package/package.json +1 -1
package/dist/lite/lightning.d.ts
CHANGED
@@ -4,7 +4,9 @@ import { EciesScheme } from '../encryption';
|
|
4
4
|
import { lightningDeployments } from '../generated/lightning';
|
5
5
|
import type { Reencryptor } from '../reencryption';
|
6
6
|
type TupleToUnion<T> = T extends readonly unknown[] ? T[number] : never;
|
7
|
-
type ToBigInt<T extends string> = T extends `${infer N extends bigint}` ? N : never;
|
7
|
+
type ToBigInt<T extends number | string | bigint> = `${T}` extends `${infer N extends bigint}` ? N : never;
|
8
|
+
type ToNumber<T extends number | string | bigint> = `${T}` extends `${infer N extends number}` ? N : never;
|
9
|
+
type Numberish<T extends number | string | bigint> = T | ToBigInt<T> | ToNumber<T>;
|
8
10
|
type ValuesToBigInt<T> = {
|
9
11
|
[K in keyof T]: T[K] extends string ? ToBigInt<T[K]> : never;
|
10
12
|
};
|
@@ -16,7 +18,7 @@ export type DeploymentByName = DistributedPick<DeploymentWithBigIntChainId, 'nam
|
|
16
18
|
export type DeploymentByExecutor = DistributedPick<DeploymentWithBigIntChainId, 'executorAddress' | 'chainId'>;
|
17
19
|
export type DeploymentId = DeploymentByName | DeploymentByExecutor;
|
18
20
|
export type Pepper = Deployment['pepper'];
|
19
|
-
export type ChainId =
|
21
|
+
export type ChainId = Numberish<Deployment['chainId']>;
|
20
22
|
export type SupportedNativeType = boolean | bigint | number;
|
21
23
|
export type EncryptionContext = {
|
22
24
|
accountAddress: string;
|