@inco/js 0.1.24 → 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.
- package/dist/lite/index.cjs +8 -3
- package/dist/lite/index.mjs +8 -3
- package/dist/lite/lightning.d.ts +12 -3
- package/package.json +1 -1
package/dist/lite/index.cjs
CHANGED
@@ -52464,11 +52464,16 @@ class Lightning {
|
|
52464
52464
|
}
|
52465
52465
|
return new Lightning(deployment, Lightning.getCovalidatorUrl(deployment));
|
52466
52466
|
}
|
52467
|
-
static
|
52467
|
+
static custom({
|
52468
|
+
executorAddress,
|
52469
|
+
eciesPublicKey,
|
52470
|
+
chainId,
|
52471
|
+
covalidatorUrl
|
52472
|
+
}) {
|
52468
52473
|
return new Lightning({
|
52469
52474
|
chainId: String(chainId),
|
52470
|
-
executorAddress
|
52471
|
-
eciesPublicKey
|
52475
|
+
executorAddress,
|
52476
|
+
eciesPublicKey
|
52472
52477
|
}, covalidatorUrl);
|
52473
52478
|
}
|
52474
52479
|
static latestDeployment(pepper, chainId) {
|
package/dist/lite/index.mjs
CHANGED
@@ -71288,11 +71288,16 @@ class Lightning {
|
|
71288
71288
|
}
|
71289
71289
|
return new Lightning(deployment, Lightning.getCovalidatorUrl(deployment));
|
71290
71290
|
}
|
71291
|
-
static
|
71291
|
+
static custom({
|
71292
|
+
executorAddress,
|
71293
|
+
eciesPublicKey,
|
71294
|
+
chainId,
|
71295
|
+
covalidatorUrl
|
71296
|
+
}) {
|
71292
71297
|
return new Lightning({
|
71293
71298
|
chainId: String(chainId),
|
71294
|
-
executorAddress
|
71295
|
-
eciesPublicKey
|
71299
|
+
executorAddress,
|
71300
|
+
eciesPublicKey
|
71296
71301
|
}, covalidatorUrl);
|
71297
71302
|
}
|
71298
71303
|
static latestDeployment(pepper, chainId) {
|
package/dist/lite/lightning.d.ts
CHANGED
@@ -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(
|
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
|
-
|
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>;
|