@inco/js 0.1.23 → 0.1.25

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.
@@ -2,7 +2,6 @@ import { Account, Chain, Transport, WalletClient } from 'viem';
2
2
  import { HexString } from '../binary';
3
3
  import { EciesScheme } from '../encryption';
4
4
  import { lightningDeployments } from '../generated/lightning';
5
- import { LocalNodeEnv } from '../local';
6
5
  import type { Reencryptor } from '../reencryption';
7
6
  type TupleToUnion<T> = T extends readonly unknown[] ? T[number] : never;
8
7
  type ToBigInt<T extends string> = T extends `${infer N extends bigint}` ? N : never;
@@ -38,14 +37,24 @@ export declare class Lightning<T extends DeploymentSlice> {
38
37
  private readonly encryptor;
39
38
  private readonly ephemeralKeypair;
40
39
  private readonly kmsClient;
41
- constructor(_deployment: T, covalidatorUrl: string);
40
+ private constructor();
42
41
  /**
43
42
  * Get a Lightning deployment by name or executor address on a particular chain.
44
43
  *
45
44
  * @param id this is an object containing either the pair of name and chainId or the executorAddress and chainId
46
45
  */
47
46
  static at(id: DeploymentId): Lightning<Deployment>;
48
- static local({ EXECUTOR_ADDRESS, ECIES_PUBLIC_KEY }: LocalNodeEnv, { chainId, covalidatorUrl }: {
47
+ /**
48
+ * Get a Lightning deployment for a local or custom node
49
+ *
50
+ * @param executorAddress the address of the executor contract on the host chain
51
+ * @param eciesPublicKey the public ECIES key of the Lightning deployment used for encryption
52
+ * @param chainId the chainId of the host chain
53
+ * @param covalidatorUrl the gRPC endpoint of the covalidator
54
+ */
55
+ static custom({ executorAddress, eciesPublicKey, chainId, covalidatorUrl, }: {
56
+ executorAddress: string;
57
+ eciesPublicKey: string;
49
58
  chainId: bigint;
50
59
  covalidatorUrl: string;
51
60
  }): Lightning<DeploymentSlice>;
@@ -19,5 +19,5 @@ export declare function getKmsClient(kmsConnectRpcEndpointOrClient: string | Cli
19
19
  export declare function decryptGrpcResponse<T extends SupportedFheType>(response: ReencryptResponse, ephemeralKeypair: Secp256k1Keypair, handle: Handle): Promise<import("../encryption/encryption").PlaintextOf<1, T>>;
20
20
  export declare function defaultCovalidatorGrpc(chain: SupportedChain): string;
21
21
  export declare function pulumiCovalidatorGrpc(chain: SupportedChain): string;
22
- export declare function denverDevnetCovalidatorGrpc(chain: SupportedChain): string;
23
- export declare function denverTestnetCovalidatorGrpc(chain: SupportedChain): string;
22
+ export declare function lightningDevnetCovalidatorGrpc(chain: SupportedChain): string;
23
+ export declare function lightningTestnetCovalidatorGrpc(chain: SupportedChain): string;