@inco/js 0.8.0-devnet-2 → 0.8.0-devnet-3
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/cjs/advancedacl/session-key.d.ts +12 -2
- package/dist/cjs/advancedacl/session-key.js +49 -6
- package/dist/cjs/generated/abis/lightning.d.ts +1 -1
- package/dist/cjs/generated/abis/lightning.js +2 -2
- package/dist/cjs/generated/abis/verifier.d.ts +0 -12
- package/dist/cjs/generated/abis/verifier.js +1 -9
- package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +13 -0
- package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.js +3 -2
- package/dist/cjs/generated/es/inco/helioswrapper/v1/helioswrapper_pb.d.ts +77 -0
- package/dist/cjs/generated/es/inco/helioswrapper/v1/helioswrapper_pb.js +28 -0
- package/dist/cjs/kms/thresholdPromises.js +2 -2
- package/dist/cjs/lite/lightning.d.ts +33 -6
- package/dist/cjs/lite/lightning.js +58 -9
- package/dist/cjs/local/local-node.d.ts +3 -3
- package/dist/cjs/local/local-node.js +8 -4
- package/dist/cjs/retry.js +4 -2
- package/dist/esm/advancedacl/session-key.d.ts +12 -2
- package/dist/esm/advancedacl/session-key.js +48 -6
- package/dist/esm/generated/abis/lightning.d.ts +1 -1
- package/dist/esm/generated/abis/lightning.js +2 -2
- package/dist/esm/generated/abis/verifier.d.ts +0 -12
- package/dist/esm/generated/abis/verifier.js +1 -9
- package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +13 -0
- package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.js +3 -2
- package/dist/esm/generated/es/inco/helioswrapper/v1/helioswrapper_pb.d.ts +77 -0
- package/dist/esm/generated/es/inco/helioswrapper/v1/helioswrapper_pb.js +25 -0
- package/dist/esm/kms/thresholdPromises.js +2 -2
- package/dist/esm/lite/lightning.d.ts +33 -6
- package/dist/esm/lite/lightning.js +59 -10
- package/dist/esm/local/local-node.d.ts +3 -3
- package/dist/esm/local/local-node.js +8 -4
- package/dist/esm/retry.js +4 -2
- package/dist/types/advancedacl/session-key.d.ts +12 -2
- package/dist/types/generated/abis/lightning.d.ts +1 -1
- package/dist/types/generated/abis/verifier.d.ts +0 -12
- package/dist/types/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +13 -0
- package/dist/types/generated/es/inco/helioswrapper/v1/helioswrapper_pb.d.ts +77 -0
- package/dist/types/lite/lightning.d.ts +33 -6
- package/dist/types/local/local-node.d.ts +3 -3
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import type { CryptogramWithProof, InputCryptogram, StoredCryptogram } from "./t
|
|
|
3
3
|
import type { DecryptionAttestation } from "../../../kms/lite/v1/kms_service_pb";
|
|
4
4
|
import type { ACLProof, SupportedScalarBinaryOp } from "../../../kms/lite/v1/types_pb";
|
|
5
5
|
import type { RATlsServer } from "../../../sealingfetcher/v1/sealingfetcher_pb";
|
|
6
|
+
import type { StartHeliosRequest } from "../../../helioswrapper/v1/helioswrapper_pb";
|
|
6
7
|
import type { Message } from "@bufbuild/protobuf";
|
|
7
8
|
/**
|
|
8
9
|
* Describes the file inco/covalidator/compute/v1/server.proto.
|
|
@@ -567,6 +568,12 @@ export type ConfigureRequest = Message<"inco.covalidator.compute.v1.ConfigureReq
|
|
|
567
568
|
* @generated from field: repeated inco.sealingfetcher.v1.RATlsServer sealing_providers = 1;
|
|
568
569
|
*/
|
|
569
570
|
sealingProviders: RATlsServer[];
|
|
571
|
+
/**
|
|
572
|
+
* Provide Helios-specific configuration to start the Helios from compute service.
|
|
573
|
+
*
|
|
574
|
+
* @generated from field: inco.helioswrapper.v1.StartHeliosRequest helios_config = 2;
|
|
575
|
+
*/
|
|
576
|
+
heliosConfig?: StartHeliosRequest;
|
|
570
577
|
};
|
|
571
578
|
/**
|
|
572
579
|
* Describes the message inco.covalidator.compute.v1.ConfigureRequest.
|
|
@@ -585,6 +592,12 @@ export type ConfigureResponse = Message<"inco.covalidator.compute.v1.ConfigureRe
|
|
|
585
592
|
* @generated from field: bool success = 1;
|
|
586
593
|
*/
|
|
587
594
|
success: boolean;
|
|
595
|
+
/**
|
|
596
|
+
* True if the compute service has successfully started the Helios light client.
|
|
597
|
+
*
|
|
598
|
+
* @generated from field: bool helios_started = 2;
|
|
599
|
+
*/
|
|
600
|
+
heliosStarted: boolean;
|
|
588
601
|
};
|
|
589
602
|
/**
|
|
590
603
|
* Describes the message inco.covalidator.compute.v1.ConfigureResponse.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file inco/helioswrapper/v1/helioswrapper.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_inco_helioswrapper_v1_helioswrapper: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* StartHeliosRequest contains the parameters needed for starting a Helios light client.
|
|
9
|
+
*
|
|
10
|
+
* @generated from message inco.helioswrapper.v1.StartHeliosRequest
|
|
11
|
+
*/
|
|
12
|
+
export type StartHeliosRequest = Message<"inco.helioswrapper.v1.StartHeliosRequest"> & {
|
|
13
|
+
/**
|
|
14
|
+
* The execution rpc to use. This doesn't need to be a trusted RPC endpoint for integrity, but needs to be one for liveness.
|
|
15
|
+
*
|
|
16
|
+
* @generated from field: string execution_rpc = 1;
|
|
17
|
+
*/
|
|
18
|
+
executionRpc: string;
|
|
19
|
+
/**
|
|
20
|
+
* The consensus rpc to use. This doesn't need to be a trusted RPC endpoint for integrity, but needs to be one for liveness. Defaults to Nimbus for sepolia testnet and defaults to "https://www.lightclientdata.org" for mainnet.
|
|
21
|
+
*
|
|
22
|
+
* @generated from field: optional string consensus_rpc = 2;
|
|
23
|
+
*/
|
|
24
|
+
consensusRpc?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The latest hex encoded checkpoint. This should be a trusted checkpoint that is no greater than ~2 weeks old.
|
|
27
|
+
* If you are unsure what checkpoint to use, you can skip this option and set either `load_external_fallback` or `fallback` values (described below) to fetch a checkpoint. Though this is not recommended and less secure.
|
|
28
|
+
*
|
|
29
|
+
* @generated from field: optional string checkpoint = 3;
|
|
30
|
+
*/
|
|
31
|
+
checkpoint?: string;
|
|
32
|
+
/**
|
|
33
|
+
* A checkpoint fallback is used if no checkpoint is provided or the given checkpoint is too old.
|
|
34
|
+
* This is expected to be a trusted checkpoint sync api endpoint.
|
|
35
|
+
*
|
|
36
|
+
* @generated from field: optional string fallback = 4;
|
|
37
|
+
*/
|
|
38
|
+
fallback?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message inco.helioswrapper.v1.StartHeliosRequest.
|
|
42
|
+
* Use `create(StartHeliosRequestSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export declare const StartHeliosRequestSchema: GenMessage<StartHeliosRequest>;
|
|
45
|
+
/**
|
|
46
|
+
* StartHeliosResponse contains a success flag indicating whether the Helios client was started successfully or not.
|
|
47
|
+
*
|
|
48
|
+
* @generated from message inco.helioswrapper.v1.StartHeliosResponse
|
|
49
|
+
*/
|
|
50
|
+
export type StartHeliosResponse = Message<"inco.helioswrapper.v1.StartHeliosResponse"> & {
|
|
51
|
+
/**
|
|
52
|
+
* @generated from field: bool success = 1;
|
|
53
|
+
*/
|
|
54
|
+
success: boolean;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Describes the message inco.helioswrapper.v1.StartHeliosResponse.
|
|
58
|
+
* Use `create(StartHeliosResponseSchema)` to create a new message.
|
|
59
|
+
*/
|
|
60
|
+
export declare const StartHeliosResponseSchema: GenMessage<StartHeliosResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* HeliosWrapperService contains a single method for starting a Helios light client.
|
|
63
|
+
*
|
|
64
|
+
* @generated from service inco.helioswrapper.v1.HeliosWrapperService
|
|
65
|
+
*/
|
|
66
|
+
export declare const HeliosWrapperService: GenService<{
|
|
67
|
+
/**
|
|
68
|
+
* StartHelios starts the Helios light client with the given url parameters.
|
|
69
|
+
*
|
|
70
|
+
* @generated from rpc inco.helioswrapper.v1.HeliosWrapperService.StartHelios
|
|
71
|
+
*/
|
|
72
|
+
startHelios: {
|
|
73
|
+
methodKind: "unary";
|
|
74
|
+
input: typeof StartHeliosRequestSchema;
|
|
75
|
+
output: typeof StartHeliosResponseSchema;
|
|
76
|
+
};
|
|
77
|
+
}>;
|
|
@@ -157,6 +157,33 @@ export declare class Lightning<T extends DeploymentSlice = DeploymentSlice> {
|
|
|
157
157
|
* ```
|
|
158
158
|
*/
|
|
159
159
|
grantSessionKeyAllowanceVoucher(walletClient: WalletClient<Transport, Chain, Account>, granteeAddress: string, expiresAt: Date, sessionVerifierAddress: string): Promise<AllowanceVoucherWithSig>;
|
|
160
|
+
/**
|
|
161
|
+
* Grants a session key allowance voucher using a custom session verifier contract.
|
|
162
|
+
*
|
|
163
|
+
* This method creates a signed allowance voucher that authorizes reencryption operations
|
|
164
|
+
* using a custom session verifier. Unlike `grantSessionKeyAllowanceVoucher`, this method
|
|
165
|
+
* allows specifying custom `sharerArgData` for use with custom verifier contracts that
|
|
166
|
+
* require additional authorization parameters.
|
|
167
|
+
*
|
|
168
|
+
* @param walletClient - The wallet client used for signing the allowance voucher
|
|
169
|
+
* @param sessionVerifierAddress - The address of the custom session verifier contract
|
|
170
|
+
* @param sharerArgData - Custom encoded arguments for the session verifier's `canUseSession` function
|
|
171
|
+
* @returns A promise that resolves to an AllowanceVoucherWithSig containing the signed allowance voucher
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```typescript
|
|
175
|
+
* const sharerArgData = encodeAbiParameters(
|
|
176
|
+
* [{ type: 'address' }, { type: 'uint256' }],
|
|
177
|
+
* [granteeAddress, expiresAt]
|
|
178
|
+
* );
|
|
179
|
+
* const voucher = await lightning.grantCustomSessionKeyAllowanceVoucher(
|
|
180
|
+
* walletClient,
|
|
181
|
+
* "0x5678...", // custom verifier address
|
|
182
|
+
* sharerArgData
|
|
183
|
+
* );
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
grantCustomSessionKeyAllowanceVoucher(walletClient: WalletClient<Transport, Chain, Account>, sessionVerifierAddress: string, sharerArgData: HexString): Promise<AllowanceVoucherWithSig>;
|
|
160
187
|
/**
|
|
161
188
|
* Updates the active session nonce for the given wallet client.
|
|
162
189
|
*
|
|
@@ -230,9 +257,9 @@ export declare class Lightning<T extends DeploymentSlice = DeploymentSlice> {
|
|
|
230
257
|
* );
|
|
231
258
|
* ```
|
|
232
259
|
*/
|
|
233
|
-
attestedDecryptWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, handles: HexString[], backoffConfig?: Partial<BackoffConfig>): Promise<Array<DecryptionAttestation<EciesScheme, SupportedFheType>>>;
|
|
234
|
-
attestedDecryptWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, handles: HexString[], reencryptPubKey: Uint8Array, backoffConfig?: Partial<BackoffConfig>): Promise<Array<EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>>>;
|
|
235
|
-
attestedDecryptWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, handles: HexString[], reencryptPubKey: Uint8Array, reencryptKeypair: Secp256k1Keypair, backoffConfig?: Partial<BackoffConfig>): Promise<Array<DecryptionAttestation<EciesScheme, SupportedFheType>>>;
|
|
260
|
+
attestedDecryptWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, handles: HexString[], requesterArgData?: HexString, backoffConfig?: Partial<BackoffConfig>): Promise<Array<DecryptionAttestation<EciesScheme, SupportedFheType>>>;
|
|
261
|
+
attestedDecryptWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, handles: HexString[], reencryptPubKey: Uint8Array, requesterArgData?: HexString, backoffConfig?: Partial<BackoffConfig>): Promise<Array<EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>>>;
|
|
262
|
+
attestedDecryptWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, handles: HexString[], reencryptPubKey: Uint8Array, reencryptKeypair: Secp256k1Keypair, requesterArgData?: HexString, backoffConfig?: Partial<BackoffConfig>): Promise<Array<DecryptionAttestation<EciesScheme, SupportedFheType>>>;
|
|
236
263
|
/**
|
|
237
264
|
* Get an attested compute for the given wallet client.
|
|
238
265
|
*
|
|
@@ -323,9 +350,9 @@ export declare class Lightning<T extends DeploymentSlice = DeploymentSlice> {
|
|
|
323
350
|
* console.log(decrypted.plaintext.value);
|
|
324
351
|
* ```
|
|
325
352
|
*/
|
|
326
|
-
attestedComputeWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, lhsHandle: HexString, op: AttestedComputeOP, rhsPlaintext: bigint | boolean, backoffConfig?: Partial<BackoffConfig>): Promise<DecryptionAttestation<EciesScheme, SupportedFheType>>;
|
|
327
|
-
attestedComputeWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, lhsHandle: HexString, op: AttestedComputeOP, rhsPlaintext: bigint | boolean, reencryptPubKey: Uint8Array, backoffConfig?: Partial<BackoffConfig>): Promise<EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>>;
|
|
328
|
-
attestedComputeWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, lhsHandle: HexString, op: AttestedComputeOP, rhsPlaintext: bigint | boolean, reencryptPubKey: Uint8Array, reencryptKeypair: Secp256k1Keypair, backoffConfig?: Partial<BackoffConfig>): Promise<DecryptionAttestation<EciesScheme, SupportedFheType>>;
|
|
353
|
+
attestedComputeWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, lhsHandle: HexString, op: AttestedComputeOP, rhsPlaintext: bigint | boolean, requesterArgData?: HexString, backoffConfig?: Partial<BackoffConfig>): Promise<DecryptionAttestation<EciesScheme, SupportedFheType>>;
|
|
354
|
+
attestedComputeWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, lhsHandle: HexString, op: AttestedComputeOP, rhsPlaintext: bigint | boolean, reencryptPubKey: Uint8Array, requesterArgData?: HexString, backoffConfig?: Partial<BackoffConfig>): Promise<EncryptedDecryptionAttestation<EciesScheme, SupportedFheType>>;
|
|
355
|
+
attestedComputeWithVoucher(ephemeralKeypair: Secp256k1Keypair, allowanceVoucherWithSig: AllowanceVoucherWithSig, ethClient: PublicClient<Transport, Chain> | WalletClient<Transport, Chain, Account>, lhsHandle: HexString, op: AttestedComputeOP, rhsPlaintext: bigint | boolean, reencryptPubKey: Uint8Array, reencryptKeypair: Secp256k1Keypair, requesterArgData?: HexString, backoffConfig?: Partial<BackoffConfig>): Promise<DecryptionAttestation<EciesScheme, SupportedFheType>>;
|
|
329
356
|
/**
|
|
330
357
|
* Get an decryption of publicly revealed handles.
|
|
331
358
|
*
|
|
@@ -3,13 +3,13 @@ export declare const LocalNodeEnv: Schema.Struct<{
|
|
|
3
3
|
DEPLOYER_ADDRESS: Schema.brand<Schema.filter<Schema.TemplateLiteral<`0x${string}`>>, "Address">;
|
|
4
4
|
STATE_DUMP: typeof Schema.String;
|
|
5
5
|
EXECUTOR_ADDRESS: Schema.brand<Schema.filter<Schema.TemplateLiteral<`0x${string}`>>, "Address">;
|
|
6
|
-
NETWORK_PUBKEY: Schema.TemplateLiteral<`0x${string}
|
|
6
|
+
NETWORK_PUBKEY: Schema.optional<Schema.TemplateLiteral<`0x${string}`>>;
|
|
7
7
|
SENDER_ADDRESS: Schema.brand<Schema.filter<Schema.TemplateLiteral<`0x${string}`>>, "Address">;
|
|
8
8
|
SENDER_PRIVATE_KEY: Schema.TemplateLiteral<`0x${string}`>;
|
|
9
9
|
EIP712_SIGNER_ADDRESS: Schema.optional<Schema.TemplateLiteral<`0x${string}`>>;
|
|
10
10
|
PEPPER: typeof Schema.String;
|
|
11
|
-
COVALIDATOR_NETWORK_PRIVATE_KEY: Schema.TemplateLiteral<`0x${string}
|
|
12
|
-
COVALIDATOR_EIP712_PRIVATE_SIGNING_KEY: Schema.TemplateLiteral<`0x${string}
|
|
11
|
+
COVALIDATOR_NETWORK_PRIVATE_KEY: Schema.optional<Schema.TemplateLiteral<`0x${string}`>>;
|
|
12
|
+
COVALIDATOR_EIP712_PRIVATE_SIGNING_KEY: Schema.optional<Schema.TemplateLiteral<`0x${string}`>>;
|
|
13
13
|
COVALIDATOR_INCO_EXECUTOR_ADDR: Schema.brand<Schema.filter<Schema.TemplateLiteral<`0x${string}`>>, "Address">;
|
|
14
14
|
COVALIDATOR_HOST_CHAIN_ID: Schema.optional<typeof Schema.String>;
|
|
15
15
|
COVALIDATOR_URL: Schema.optional<typeof Schema.String>;
|