@inco/js 0.11.0-testnet-3 → 1.0.0-devnet-1

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.
Files changed (100) hide show
  1. package/dist/cjs/advancedacl/session-key.d.ts +4 -3
  2. package/dist/cjs/advancedacl/session-key.js +16 -9
  3. package/dist/cjs/advancedacl/types.d.ts +1 -0
  4. package/dist/cjs/attestedcompute/attested-compute.d.ts +4 -4
  5. package/dist/cjs/attestedcompute/types.d.ts +9 -9
  6. package/dist/cjs/attestedcompute/types.js +20 -20
  7. package/dist/cjs/attesteddecrypt/attested-decrypt.d.ts +4 -4
  8. package/dist/cjs/attesteddecrypt/types.d.ts +5 -5
  9. package/dist/cjs/attestedreveal/attested-reveal.d.ts +2 -2
  10. package/dist/cjs/elistattesteddecrypt/elist-attested-decrypt.d.ts +5 -5
  11. package/dist/cjs/elistattesteddecrypt/types.d.ts +5 -5
  12. package/dist/cjs/encryption/encryption.d.ts +19 -16
  13. package/dist/cjs/encryption/encryption.js +6 -6
  14. package/dist/cjs/encryption/index.d.ts +1 -1
  15. package/dist/cjs/encryption/index.js +4 -4
  16. package/dist/cjs/generated/abis/lightning.d.ts +166 -1
  17. package/dist/cjs/generated/abis/lightning.js +141 -2
  18. package/dist/cjs/generated/abis/verifier.d.ts +62 -0
  19. package/dist/cjs/generated/abis/verifier.js +53 -1
  20. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +101 -107
  21. package/dist/cjs/generated/es/inco/covalidator/compute/v1/server_pb.js +93 -93
  22. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +6 -0
  23. package/dist/cjs/generated/es/inco/covalidator/compute/v1/types_pb.js +2 -2
  24. package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.d.ts +48 -41
  25. package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.js +43 -43
  26. package/dist/cjs/generated/lightning.d.ts +98 -0
  27. package/dist/cjs/generated/lightning.js +118 -18
  28. package/dist/cjs/generated/local-node.d.ts +7 -7
  29. package/dist/cjs/generated/local-node.js +7 -7
  30. package/dist/cjs/handle.d.ts +17 -15
  31. package/dist/cjs/handle.js +32 -19
  32. package/dist/cjs/index.d.ts +1 -1
  33. package/dist/cjs/index.js +2 -2
  34. package/dist/cjs/kms/quorumClient.d.ts +6 -6
  35. package/dist/cjs/lite/lightning.d.ts +20 -20
  36. package/dist/cjs/lite/lightning.js +4 -2
  37. package/dist/cjs/lite/xwing.js +1 -1
  38. package/dist/cjs/reencryption/types.d.ts +3 -3
  39. package/dist/esm/advancedacl/session-key.d.ts +4 -3
  40. package/dist/esm/advancedacl/session-key.js +15 -9
  41. package/dist/esm/advancedacl/types.d.ts +1 -0
  42. package/dist/esm/attestedcompute/attested-compute.d.ts +4 -4
  43. package/dist/esm/attestedcompute/types.d.ts +9 -9
  44. package/dist/esm/attestedcompute/types.js +20 -20
  45. package/dist/esm/attesteddecrypt/attested-decrypt.d.ts +4 -4
  46. package/dist/esm/attesteddecrypt/types.d.ts +5 -5
  47. package/dist/esm/attestedreveal/attested-reveal.d.ts +2 -2
  48. package/dist/esm/elistattesteddecrypt/elist-attested-decrypt.d.ts +5 -5
  49. package/dist/esm/elistattesteddecrypt/types.d.ts +5 -5
  50. package/dist/esm/encryption/encryption.d.ts +19 -16
  51. package/dist/esm/encryption/encryption.js +5 -5
  52. package/dist/esm/encryption/index.d.ts +1 -1
  53. package/dist/esm/encryption/index.js +1 -1
  54. package/dist/esm/generated/abis/lightning.d.ts +166 -1
  55. package/dist/esm/generated/abis/lightning.js +141 -2
  56. package/dist/esm/generated/abis/verifier.d.ts +62 -0
  57. package/dist/esm/generated/abis/verifier.js +53 -1
  58. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +101 -107
  59. package/dist/esm/generated/es/inco/covalidator/compute/v1/server_pb.js +92 -92
  60. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +6 -0
  61. package/dist/esm/generated/es/inco/covalidator/compute/v1/types_pb.js +2 -2
  62. package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.d.ts +48 -41
  63. package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.js +43 -43
  64. package/dist/esm/generated/lightning.d.ts +98 -0
  65. package/dist/esm/generated/lightning.js +118 -18
  66. package/dist/esm/generated/local-node.d.ts +7 -7
  67. package/dist/esm/generated/local-node.js +7 -7
  68. package/dist/esm/handle.d.ts +17 -15
  69. package/dist/esm/handle.js +31 -18
  70. package/dist/esm/index.d.ts +1 -1
  71. package/dist/esm/index.js +1 -1
  72. package/dist/esm/kms/quorumClient.d.ts +6 -6
  73. package/dist/esm/lite/lightning.d.ts +20 -20
  74. package/dist/esm/lite/lightning.js +4 -2
  75. package/dist/esm/lite/xwing.js +2 -2
  76. package/dist/esm/reencryption/types.d.ts +3 -3
  77. package/dist/types/advancedacl/session-key.d.ts +4 -3
  78. package/dist/types/advancedacl/types.d.ts +1 -0
  79. package/dist/types/attestedcompute/attested-compute.d.ts +4 -4
  80. package/dist/types/attestedcompute/types.d.ts +9 -9
  81. package/dist/types/attesteddecrypt/attested-decrypt.d.ts +4 -4
  82. package/dist/types/attesteddecrypt/types.d.ts +5 -5
  83. package/dist/types/attestedreveal/attested-reveal.d.ts +2 -2
  84. package/dist/types/elistattesteddecrypt/elist-attested-decrypt.d.ts +5 -5
  85. package/dist/types/elistattesteddecrypt/types.d.ts +5 -5
  86. package/dist/types/encryption/encryption.d.ts +19 -16
  87. package/dist/types/encryption/index.d.ts +1 -1
  88. package/dist/types/generated/abis/lightning.d.ts +166 -1
  89. package/dist/types/generated/abis/verifier.d.ts +62 -0
  90. package/dist/types/generated/es/inco/covalidator/compute/v1/server_pb.d.ts +101 -107
  91. package/dist/types/generated/es/inco/covalidator/compute/v1/types_pb.d.ts +6 -0
  92. package/dist/types/generated/es/inco/kms/lite/v1/types_pb.d.ts +48 -41
  93. package/dist/types/generated/lightning.d.ts +98 -0
  94. package/dist/types/generated/local-node.d.ts +7 -7
  95. package/dist/types/handle.d.ts +17 -15
  96. package/dist/types/index.d.ts +1 -1
  97. package/dist/types/kms/quorumClient.d.ts +6 -6
  98. package/dist/types/lite/lightning.d.ts +20 -20
  99. package/dist/types/reencryption/types.d.ts +3 -3
  100. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { Account, Chain, Transport, WalletClient } from 'viem';
2
2
  import { type HexString } from '../binary.js';
3
3
  import { type SupportedChainId } from '../chain.js';
4
- import { EncryptionScheme, type SupportedFheType } from '../encryption/encryption.js';
4
+ import { EncryptionScheme, type SupportedTeeType } from '../encryption/encryption.js';
5
5
  import { type HandleWithProof } from '../generated/es/inco/kms/lite/v1/types_pb.js';
6
6
  import { validateHandle } from '../handle.js';
7
7
  import { KmsQuorumClient } from '../kms/quorumClient.js';
@@ -38,7 +38,7 @@ export declare function attestedDecrypt({ handles, backoffConfig, walletClient,
38
38
  reencryptKeypair: XwingKeypair;
39
39
  kmsQuorumClient: KmsQuorumClient;
40
40
  executorAddress: HexString;
41
- }): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedFheType>>>;
41
+ }): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedTeeType>>>;
42
42
  /**
43
43
  * Decrypt multiple handles in a single attested request.
44
44
  * Returns an array of attestations aligned with the response ordering.
@@ -56,6 +56,6 @@ export declare function attestedDecrypt({ handles, backoffConfig, walletClient,
56
56
  reencryptKeypair?: never;
57
57
  kmsQuorumClient: KmsQuorumClient;
58
58
  executorAddress: HexString;
59
- }): Promise<Array<EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>>>;
59
+ }): Promise<Array<EncryptedDecryptionAttestation<EncryptionScheme, SupportedTeeType>>>;
60
60
  export declare function buildHandlesWithProofs(handles: HexString[]): Array<HandleWithProof>;
61
- export declare function decryptEncryptedAttestations(attestations: Array<DecryptionAttestation<EncryptionScheme, SupportedFheType> | EncryptedDecryptionAttestation<EncryptionScheme, SupportedFheType>>, reencryptKeypair: XwingKeypair): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedFheType>>>;
61
+ export declare function decryptEncryptedAttestations(attestations: Array<DecryptionAttestation<EncryptionScheme, SupportedTeeType> | EncryptedDecryptionAttestation<EncryptionScheme, SupportedTeeType>>, reencryptKeypair: XwingKeypair): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedTeeType>>>;
@@ -1,5 +1,5 @@
1
1
  import type { HexString } from '../binary.js';
2
- import type { EncryptionScheme, EncryptResultOf, PlaintextOf, SupportedFheType } from '../encryption/encryption.js';
2
+ import type { EncryptionScheme, EncryptResultOf, PlaintextOf, SupportedTeeType } from '../encryption/encryption.js';
3
3
  import type { BackoffConfig } from '../retry.js';
4
4
  /**
5
5
  * Custom error class for attested decrypt operations.
@@ -8,19 +8,19 @@ export declare class AttestedDecryptError extends Error {
8
8
  readonly cause?: unknown | undefined;
9
9
  constructor(message: string, cause?: unknown | undefined);
10
10
  }
11
- export type DecryptionAttestation<S extends EncryptionScheme, T extends SupportedFheType> = {
11
+ export type DecryptionAttestation<S extends EncryptionScheme, T extends SupportedTeeType> = {
12
12
  handle: HexString;
13
13
  plaintext: PlaintextOf<S, T>;
14
14
  covalidatorSignatures: Uint8Array[];
15
15
  };
16
- export type EncryptedDecryptionAttestation<S extends EncryptionScheme, T extends SupportedFheType> = {
16
+ export type EncryptedDecryptionAttestation<S extends EncryptionScheme, T extends SupportedTeeType> = {
17
17
  handle: HexString;
18
18
  encryptedPlaintext: EncryptResultOf<S, T>;
19
19
  encryptedSignatures: Uint8Array[];
20
20
  covalidatorSignatures: Uint8Array[];
21
21
  };
22
- export type AttestedDecryptor<S extends EncryptionScheme> = <T extends SupportedFheType>(args: AttestedDecryptFnArgs<S, T>) => Promise<DecryptionAttestation<S, T>>;
23
- export type AttestedDecryptFnArgs<S extends EncryptionScheme, T extends SupportedFheType> = {
22
+ export type AttestedDecryptor<S extends EncryptionScheme> = <T extends SupportedTeeType>(args: AttestedDecryptFnArgs<S, T>) => Promise<DecryptionAttestation<S, T>>;
23
+ export type AttestedDecryptFnArgs<S extends EncryptionScheme, T extends SupportedTeeType> = {
24
24
  /** The handle to decrypt */
25
25
  handle: HexString;
26
26
  backoffConfig?: Partial<BackoffConfig>;
@@ -1,7 +1,7 @@
1
1
  import type { Chain, PublicClient, Transport } from 'viem';
2
2
  import type { DecryptionAttestation } from '../attesteddecrypt/types.js';
3
3
  import type { HexString } from '../binary.js';
4
- import type { EncryptionScheme, SupportedFheType } from '../encryption/encryption.js';
4
+ import type { EncryptionScheme, SupportedTeeType } from '../encryption/encryption.js';
5
5
  import type { KmsQuorumClient } from '../kms/quorumClient.js';
6
6
  import type { BackoffConfig } from '../retry.js';
7
7
  /**
@@ -18,4 +18,4 @@ export declare function attestedReveal({ handles, kmsQuorumClient, executorAddre
18
18
  executorAddress: HexString;
19
19
  publicClient: PublicClient<Transport, Chain>;
20
20
  backoffConfig?: Partial<BackoffConfig> | undefined;
21
- }): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedFheType>>>;
21
+ }): Promise<Array<DecryptionAttestation<EncryptionScheme, SupportedTeeType>>>;
@@ -2,7 +2,7 @@ import type { Account, Chain, Transport, WalletClient } from 'viem';
2
2
  import { validateHandle } from '../attesteddecrypt/attested-decrypt.js';
3
3
  import { type HexString } from '../binary.js';
4
4
  import { type SupportedChainId } from '../chain.js';
5
- import { type EncryptionScheme, type SupportedFheType } from '../encryption/encryption.js';
5
+ import { type EncryptionScheme, type SupportedTeeType } from '../encryption/encryption.js';
6
6
  import { KmsQuorumClient } from '../kms/quorumClient.js';
7
7
  import type { XwingKeypair } from '../lite/xwing.js';
8
8
  import type { BackoffConfig } from '../retry.js';
@@ -17,7 +17,7 @@ export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClie
17
17
  reencryptKeypair: XwingKeypair;
18
18
  kmsQuorumClient: KmsQuorumClient;
19
19
  executorAddress: HexString;
20
- }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
20
+ }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedTeeType>>;
21
21
  export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClient, chainId, reencryptPubKey, kmsQuorumClient, executorAddress, }: {
22
22
  handle: HexString;
23
23
  backoffConfig?: Partial<BackoffConfig> | undefined;
@@ -27,7 +27,7 @@ export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClie
27
27
  reencryptKeypair?: never;
28
28
  kmsQuorumClient: KmsQuorumClient;
29
29
  executorAddress: HexString;
30
- }): Promise<EncryptedEListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
30
+ }): Promise<EncryptedEListDecryptionAttestation<EncryptionScheme, SupportedTeeType>>;
31
31
  export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClient, chainId, kmsQuorumClient, executorAddress, }: {
32
32
  handle: HexString;
33
33
  backoffConfig?: Partial<BackoffConfig> | undefined;
@@ -37,7 +37,7 @@ export declare function eListAttestedDecrypt({ handle, backoffConfig, walletClie
37
37
  reencryptKeypair?: never;
38
38
  kmsQuorumClient: KmsQuorumClient;
39
39
  executorAddress: HexString;
40
- }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
40
+ }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedTeeType>>;
41
41
  /**
42
42
  * Reveal a single elist handle without wallet authentication.
43
43
  * Returns plaintext values along with an attestation of the checksum.
@@ -46,4 +46,4 @@ export declare function eListAttestedReveal({ handle, backoffConfig, kmsQuorumCl
46
46
  handle: HexString;
47
47
  backoffConfig?: Partial<BackoffConfig> | undefined;
48
48
  kmsQuorumClient: KmsQuorumClient;
49
- }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedFheType>>;
49
+ }): Promise<EListDecryptionAttestation<EncryptionScheme, SupportedTeeType>>;
@@ -1,5 +1,5 @@
1
1
  import type { HexString } from '../binary.js';
2
- import type { EncryptionScheme, EncryptResultOf, PlaintextOf, SupportedFheType } from '../encryption/encryption.js';
2
+ import type { EncryptionScheme, EncryptResultOf, PlaintextOf, SupportedTeeType } from '../encryption/encryption.js';
3
3
  import { handleTypes } from '../index.js';
4
4
  import type { BackoffConfig } from '../retry.js';
5
5
  /**
@@ -9,22 +9,22 @@ export declare class EListAttestedDecryptError extends Error {
9
9
  readonly cause?: unknown | undefined;
10
10
  constructor(message: string, cause?: unknown | undefined);
11
11
  }
12
- export type EListDecryptionAttestation<S extends EncryptionScheme, T extends SupportedFheType> = {
12
+ export type EListDecryptionAttestation<S extends EncryptionScheme, T extends SupportedTeeType> = {
13
13
  handle: HexString;
14
14
  commitmentProof: PlaintextOf<S, typeof handleTypes.euint256>;
15
15
  values: PlaintextOf<S, T>[];
16
16
  covalidatorSignatures: Uint8Array[];
17
17
  commitments: Uint8Array[];
18
18
  };
19
- export type EncryptedEListDecryptionAttestation<S extends EncryptionScheme, T extends SupportedFheType> = {
19
+ export type EncryptedEListDecryptionAttestation<S extends EncryptionScheme, T extends SupportedTeeType> = {
20
20
  handle: HexString;
21
21
  commitmentProof: PlaintextOf<S, typeof handleTypes.euint256>;
22
22
  values: EncryptResultOf<S, T>[];
23
23
  covalidatorSignatures: Uint8Array[];
24
24
  commitments: Uint8Array[];
25
25
  };
26
- export type EListAttestedDecryptor<S extends EncryptionScheme> = <T extends SupportedFheType>(args: EListAttestedDecryptFnArgs<S, T>) => Promise<EListDecryptionAttestation<S, T>>;
27
- export type EListAttestedDecryptFnArgs<S extends EncryptionScheme, T extends SupportedFheType> = {
26
+ export type EListAttestedDecryptor<S extends EncryptionScheme> = <T extends SupportedTeeType>(args: EListAttestedDecryptFnArgs<S, T>) => Promise<EListDecryptionAttestation<S, T>>;
27
+ export type EListAttestedDecryptFnArgs<S extends EncryptionScheme, T extends SupportedTeeType> = {
28
28
  /** The handle to decrypt */
29
29
  handle: HexString;
30
30
  backoffConfig?: Partial<BackoffConfig>;
@@ -11,7 +11,7 @@ import { Bytes32 } from '../binary.js';
11
11
  * // result.handle, result.ciphertext
12
12
  * ```
13
13
  */
14
- export type Encryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedFheType>(plaintext: PlaintextWithContextOf<S, T>) => Promise<EncryptResultOf<S, T>>;
14
+ export type Encryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedTeeType>(plaintext: PlaintextWithContextOf<S, T>) => Promise<EncryptResultOf<S, T>>;
15
15
  /**
16
16
  * A function that decrypts a ciphertext back to its plaintext value.
17
17
  *
@@ -21,26 +21,26 @@ export type Encryptor<S extends EncryptionScheme = EncryptionScheme> = <T extend
21
21
  * const plaintext = await decrypt({ scheme: 2, type: 5, value: '0x...' });
22
22
  * ```
23
23
  */
24
- export type Decryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedFheType>(ciphertext: CiphertextOf<S, T>) => Promise<PlaintextOf<S, T>>;
24
+ export type Decryptor<S extends EncryptionScheme = EncryptionScheme> = <T extends SupportedTeeType>(ciphertext: CiphertextOf<S, T>) => Promise<PlaintextOf<S, T>>;
25
25
  /**
26
26
  * Subset of ENCRYPTION types currently supported for encryption/decryption.
27
27
  *
28
28
  * @remarks TODO: review need of `euint64` and `euint160` — `Lib.sol` only supports `euint256` and `ebool`.
29
29
  */
30
- export declare const supportedFheTypes: {
30
+ export declare const supportedTeeTypes: {
31
31
  readonly euint64: 5;
32
32
  readonly euint160: 7;
33
33
  readonly euint256: 8;
34
34
  readonly ebool: 0;
35
35
  };
36
36
  /** Schema that validates a string is one of the supported ENCRYPTION type names. */
37
- export declare const SupportedFheTypeName: Schema.SchemaClass<"ebool" | "euint64" | "euint160" | "euint256", "ebool" | "euint64" | "euint160" | "euint256", never>;
37
+ export declare const SupportedTeeTypeName: Schema.SchemaClass<"ebool" | "euint64" | "euint160" | "euint256", "ebool" | "euint64" | "euint160" | "euint256", never>;
38
38
  /** A supported ENCRYPTION type name (e.g. `"euint256"`, `"ebool"`). */
39
- export type SupportedFheTypeName = typeof SupportedFheTypeName.Type;
39
+ export type SupportedTeeTypeName = typeof SupportedTeeTypeName.Type;
40
40
  /** Schema that validates a number is one of the supported ENCRYPTION type integer identifiers. */
41
- export declare const SupportedFheType: Schema.SchemaClass<0 | 5 | 7 | 8, 0 | 5 | 7 | 8, never>;
41
+ export declare const SupportedTeeType: Schema.SchemaClass<0 | 5 | 7 | 8, 0 | 5 | 7 | 8, never>;
42
42
  /** Integer identifier of a supported ENCRYPTION type (a subset of all ENCRYPTION types). */
43
- export type SupportedFheType = typeof SupportedFheType.Type;
43
+ export type SupportedTeeType = typeof SupportedTeeType.Type;
44
44
  /** Map of encryption scheme names to their integer identifiers. Currently only X-Wing (2) is supported. */
45
45
  export declare const encryptionSchemes: {
46
46
  readonly xwing: 2;
@@ -60,7 +60,7 @@ export type XwingScheme = EncryptionSchemes['xwing'];
60
60
  export declare const EncryptionScheme: Schema.Literal<[2]>;
61
61
  /** An encryption scheme identifier (currently only X-Wing = `2`). */
62
62
  export type EncryptionScheme = typeof EncryptionScheme.Type;
63
- type DistType<P, S extends EncryptionScheme, T extends SupportedFheType> = P extends any ? P & {
63
+ type DistType<P, S extends EncryptionScheme, T extends SupportedTeeType> = P extends any ? P & {
64
64
  scheme: S;
65
65
  type: T;
66
66
  } : never;
@@ -72,7 +72,7 @@ export declare const Ciphertext: Schema.Struct<{
72
72
  }>;
73
73
  /** An ENCRYPTION ciphertext containing the encryption scheme, ENCRYPTION type, and encrypted hex value. */
74
74
  export type Ciphertext = typeof Ciphertext.Type;
75
- export type CiphertextOf<S extends EncryptionScheme, T extends SupportedFheType> = DistType<Ciphertext, S, T>;
75
+ export type CiphertextOf<S extends EncryptionScheme, T extends SupportedTeeType> = DistType<Ciphertext, S, T>;
76
76
  /** Schema for a ciphertext paired with the {@link InputContext} it was encrypted under. */
77
77
  export declare const CiphertextWithContext: Schema.Struct<{
78
78
  ciphertext: Schema.Struct<{
@@ -86,11 +86,12 @@ export declare const CiphertextWithContext: Schema.Struct<{
86
86
  userAddress: Schema.TemplateLiteral<`0x${string}`>;
87
87
  contractAddress: Schema.TemplateLiteral<`0x${string}`>;
88
88
  version: typeof Schema.Number;
89
+ inputType: typeof Schema.Number;
89
90
  }>;
90
91
  }>;
91
92
  /** A ciphertext paired with the {@link InputContext} it was encrypted under. */
92
93
  export type CiphertextWithContext = typeof CiphertextWithContext.Type;
93
- export type CiphertextWithContextOf<S extends EncryptionScheme, T extends SupportedFheType> = CiphertextWithContext & {
94
+ export type CiphertextWithContextOf<S extends EncryptionScheme, T extends SupportedTeeType> = CiphertextWithContext & {
94
95
  ciphertext: CiphertextOf<S, T>;
95
96
  };
96
97
  /** Schema for the result of an encryption operation: ciphertext, input context, and final handle. */
@@ -106,12 +107,13 @@ export declare const EncryptResult: Schema.Struct<{
106
107
  userAddress: Schema.TemplateLiteral<`0x${string}`>;
107
108
  contractAddress: Schema.TemplateLiteral<`0x${string}`>;
108
109
  version: typeof Schema.Number;
110
+ inputType: typeof Schema.Number;
109
111
  }>;
110
112
  handle: Schema.brand<Schema.filter<Schema.transformOrFail<Schema.Union<[typeof Schema.String, Schema.refine<object & Uint8Array<ArrayBufferLike>, Schema.Schema<object, object, never>>]>, Schema.TemplateLiteral<`0x${string}`>, never>>, "Bytes32">;
111
113
  }>;
112
114
  /** The result of an encryption operation, containing the ciphertext, context, and deterministic handle. */
113
115
  export type EncryptResult = typeof EncryptResult.Type;
114
- export type EncryptResultOf<S extends EncryptionScheme, T extends SupportedFheType> = EncryptResult & {
116
+ export type EncryptResultOf<S extends EncryptionScheme, T extends SupportedTeeType> = EncryptResult & {
115
117
  ciphertext: CiphertextOf<S, T>;
116
118
  };
117
119
  /**
@@ -130,7 +132,7 @@ export declare const Plaintext: Schema.Union<[Schema.Struct<{
130
132
  }>]>;
131
133
  /** An ENCRYPTION plaintext value — `bigint` for integer types, `boolean` for `ebool`. */
132
134
  export type Plaintext = typeof Plaintext.Type;
133
- export type PlaintextOf<S extends EncryptionScheme, T extends SupportedFheType> = DistType<Plaintext, S, T>;
135
+ export type PlaintextOf<S extends EncryptionScheme, T extends SupportedTeeType> = DistType<Plaintext, S, T>;
134
136
  /** Schema for a plaintext paired with the {@link InputContext} it will be encrypted under. */
135
137
  export declare const PlaintextWithContext: Schema.Struct<{
136
138
  plaintext: Schema.Union<[Schema.Struct<{
@@ -148,11 +150,12 @@ export declare const PlaintextWithContext: Schema.Struct<{
148
150
  userAddress: Schema.TemplateLiteral<`0x${string}`>;
149
151
  contractAddress: Schema.TemplateLiteral<`0x${string}`>;
150
152
  version: typeof Schema.Number;
153
+ inputType: typeof Schema.Number;
151
154
  }>;
152
155
  }>;
153
156
  /** A plaintext paired with the {@link InputContext} it will be encrypted under. */
154
157
  export type PlaintextWithContext = typeof PlaintextWithContext.Type;
155
- export type PlaintextWithContextOf<S extends EncryptionScheme, T extends SupportedFheType> = PlaintextWithContext & {
158
+ export type PlaintextWithContextOf<S extends EncryptionScheme, T extends SupportedTeeType> = PlaintextWithContext & {
156
159
  plaintext: PlaintextOf<S, T>;
157
160
  };
158
161
  /**
@@ -167,7 +170,7 @@ export type PlaintextWithContextOf<S extends EncryptionScheme, T extends Support
167
170
  * @returns A typed `Plaintext` matching the given scheme and ENCRYPTION type.
168
171
  * @throws If `type` is not a supported ENCRYPTION type.
169
172
  */
170
- export declare function bigintToPlaintext<S extends EncryptionScheme, T extends SupportedFheType>(scheme: S, type: T, bigPt: bigint): PlaintextOf<S, T>;
173
+ export declare function bigintToPlaintext<S extends EncryptionScheme, T extends SupportedTeeType>(scheme: S, type: T, bigPt: bigint): PlaintextOf<S, T>;
171
174
  /**
172
175
  * Decodes an ABI-encoded ciphertext input into its components.
173
176
  *
@@ -220,7 +223,7 @@ export declare function plaintextToBytes(plaintext: Plaintext): Buffer;
220
223
  * @param type - The ENCRYPTION type to interpret the bytes as.
221
224
  * @returns A typed `Plaintext` value.
222
225
  */
223
- export declare function bytes32ToPlaintext(plaintext: Bytes32, scheme: EncryptionScheme, type: SupportedFheType): Plaintext;
226
+ export declare function bytes32ToPlaintext(plaintext: Bytes32, scheme: EncryptionScheme, type: SupportedTeeType): Plaintext;
224
227
  /**
225
228
  * Parses a `Uint8Array` into a typed {@link Plaintext}.
226
229
  * @param plaintext - The byte array to interpret.
@@ -228,5 +231,5 @@ export declare function bytes32ToPlaintext(plaintext: Bytes32, scheme: Encryptio
228
231
  * @param type - The ENCRYPTION type to interpret the bytes as.
229
232
  * @returns A typed `Plaintext` value.
230
233
  */
231
- export declare function bytesToPlaintext(plaintext: Uint8Array, scheme: EncryptionScheme, type: SupportedFheType): Plaintext;
234
+ export declare function bytesToPlaintext(plaintext: Uint8Array, scheme: EncryptionScheme, type: SupportedTeeType): Plaintext;
232
235
  export {};
@@ -1 +1 @@
1
- export { Ciphertext, EncryptionScheme, Plaintext, SupportedFheType, SupportedFheTypeName, bigintToPlaintext, bytes32ToPlaintext, bytesToPlaintext, encryptionSchemes, getEncryptionSchemeName, plaintextToBigint, plaintextToBytes, plaintextToBytes32, supportedFheTypes, type EncryptionSchemes, } from './encryption.js';
1
+ export { Ciphertext, EncryptionScheme, Plaintext, SupportedTeeType, SupportedTeeTypeName, bigintToPlaintext, bytes32ToPlaintext, bytesToPlaintext, encryptionSchemes, getEncryptionSchemeName, plaintextToBigint, plaintextToBytes, plaintextToBytes32, supportedTeeTypes, type EncryptionSchemes, } from './encryption.js';
@@ -25,6 +25,10 @@ export declare const advancedAccessControlAbi: readonly [{
25
25
  readonly internalType: "struct AllowanceVoucher";
26
26
  readonly type: "tuple";
27
27
  readonly components: readonly [{
28
+ readonly name: "warning";
29
+ readonly internalType: "string";
30
+ readonly type: "string";
31
+ }, {
28
32
  readonly name: "sessionNonce";
29
33
  readonly internalType: "bytes32";
30
34
  readonly type: "bytes32";
@@ -120,6 +124,10 @@ export declare const advancedAccessControlAbi: readonly [{
120
124
  readonly internalType: "struct AllowanceVoucher";
121
125
  readonly type: "tuple";
122
126
  readonly components: readonly [{
127
+ readonly name: "warning";
128
+ readonly internalType: "string";
129
+ readonly type: "string";
130
+ }, {
123
131
  readonly name: "sessionNonce";
124
132
  readonly internalType: "bytes32";
125
133
  readonly type: "bytes32";
@@ -153,6 +161,42 @@ export declare const advancedAccessControlAbi: readonly [{
153
161
  readonly type: "bool";
154
162
  }];
155
163
  readonly stateMutability: "nonpayable";
164
+ }, {
165
+ readonly type: "function";
166
+ readonly inputs: readonly [];
167
+ readonly name: "owner";
168
+ readonly outputs: readonly [{
169
+ readonly name: "";
170
+ readonly internalType: "address";
171
+ readonly type: "address";
172
+ }];
173
+ readonly stateMutability: "view";
174
+ }, {
175
+ readonly type: "function";
176
+ readonly inputs: readonly [];
177
+ readonly name: "paused";
178
+ readonly outputs: readonly [{
179
+ readonly name: "";
180
+ readonly internalType: "bool";
181
+ readonly type: "bool";
182
+ }];
183
+ readonly stateMutability: "view";
184
+ }, {
185
+ readonly type: "function";
186
+ readonly inputs: readonly [];
187
+ readonly name: "renounceOwnership";
188
+ readonly outputs: readonly [];
189
+ readonly stateMutability: "nonpayable";
190
+ }, {
191
+ readonly type: "function";
192
+ readonly inputs: readonly [{
193
+ readonly name: "newOwner";
194
+ readonly internalType: "address";
195
+ readonly type: "address";
196
+ }];
197
+ readonly name: "transferOwnership";
198
+ readonly outputs: readonly [];
199
+ readonly stateMutability: "nonpayable";
156
200
  }, {
157
201
  readonly type: "function";
158
202
  readonly inputs: readonly [{
@@ -178,6 +222,49 @@ export declare const advancedAccessControlAbi: readonly [{
178
222
  readonly indexed: false;
179
223
  }];
180
224
  readonly name: "Initialized";
225
+ }, {
226
+ readonly type: "event";
227
+ readonly anonymous: false;
228
+ readonly inputs: readonly [{
229
+ readonly name: "previousOwner";
230
+ readonly internalType: "address";
231
+ readonly type: "address";
232
+ readonly indexed: true;
233
+ }, {
234
+ readonly name: "newOwner";
235
+ readonly internalType: "address";
236
+ readonly type: "address";
237
+ readonly indexed: true;
238
+ }];
239
+ readonly name: "OwnershipTransferred";
240
+ }, {
241
+ readonly type: "event";
242
+ readonly anonymous: false;
243
+ readonly inputs: readonly [{
244
+ readonly name: "account";
245
+ readonly internalType: "address";
246
+ readonly type: "address";
247
+ readonly indexed: false;
248
+ }];
249
+ readonly name: "Paused";
250
+ }, {
251
+ readonly type: "event";
252
+ readonly anonymous: false;
253
+ readonly inputs: readonly [{
254
+ readonly name: "account";
255
+ readonly internalType: "address";
256
+ readonly type: "address";
257
+ readonly indexed: false;
258
+ }];
259
+ readonly name: "Unpaused";
260
+ }, {
261
+ readonly type: "error";
262
+ readonly inputs: readonly [];
263
+ readonly name: "EnforcedPause";
264
+ }, {
265
+ readonly type: "error";
266
+ readonly inputs: readonly [];
267
+ readonly name: "ExpectedPause";
181
268
  }, {
182
269
  readonly type: "error";
183
270
  readonly inputs: readonly [];
@@ -214,10 +301,30 @@ export declare const advancedAccessControlAbi: readonly [{
214
301
  readonly type: "bytes";
215
302
  }];
216
303
  readonly name: "InvalidVoucherSignature";
304
+ }, {
305
+ readonly type: "error";
306
+ readonly inputs: readonly [];
307
+ readonly name: "InvalidVoucherWarning";
217
308
  }, {
218
309
  readonly type: "error";
219
310
  readonly inputs: readonly [];
220
311
  readonly name: "NotInitializing";
312
+ }, {
313
+ readonly type: "error";
314
+ readonly inputs: readonly [{
315
+ readonly name: "owner";
316
+ readonly internalType: "address";
317
+ readonly type: "address";
318
+ }];
319
+ readonly name: "OwnableInvalidOwner";
320
+ }, {
321
+ readonly type: "error";
322
+ readonly inputs: readonly [{
323
+ readonly name: "account";
324
+ readonly internalType: "address";
325
+ readonly type: "address";
326
+ }];
327
+ readonly name: "OwnableUnauthorizedAccount";
221
328
  }, {
222
329
  readonly type: "error";
223
330
  readonly inputs: readonly [{
@@ -376,6 +483,10 @@ export declare const incoLightningAbi: readonly [{
376
483
  readonly internalType: "struct AllowanceVoucher";
377
484
  readonly type: "tuple";
378
485
  readonly components: readonly [{
486
+ readonly name: "warning";
487
+ readonly internalType: "string";
488
+ readonly type: "string";
489
+ }, {
379
490
  readonly name: "sessionNonce";
380
491
  readonly internalType: "bytes32";
381
492
  readonly type: "bytes32";
@@ -1385,6 +1496,22 @@ export declare const incoLightningAbi: readonly [{
1385
1496
  readonly type: "uint8";
1386
1497
  }];
1387
1498
  readonly stateMutability: "view";
1499
+ }, {
1500
+ readonly type: "function";
1501
+ readonly inputs: readonly [];
1502
+ readonly name: "pause";
1503
+ readonly outputs: readonly [];
1504
+ readonly stateMutability: "nonpayable";
1505
+ }, {
1506
+ readonly type: "function";
1507
+ readonly inputs: readonly [];
1508
+ readonly name: "paused";
1509
+ readonly outputs: readonly [{
1510
+ readonly name: "";
1511
+ readonly internalType: "bool";
1512
+ readonly type: "bool";
1513
+ }];
1514
+ readonly stateMutability: "view";
1388
1515
  }, {
1389
1516
  readonly type: "function";
1390
1517
  readonly inputs: readonly [{
@@ -1459,6 +1586,12 @@ export declare const incoLightningAbi: readonly [{
1459
1586
  readonly name: "transferOwnership";
1460
1587
  readonly outputs: readonly [];
1461
1588
  readonly stateMutability: "nonpayable";
1589
+ }, {
1590
+ readonly type: "function";
1591
+ readonly inputs: readonly [];
1592
+ readonly name: "unpause";
1593
+ readonly outputs: readonly [];
1594
+ readonly stateMutability: "nonpayable";
1462
1595
  }, {
1463
1596
  readonly type: "function";
1464
1597
  readonly inputs: readonly [{
@@ -2464,6 +2597,16 @@ export declare const incoLightningAbi: readonly [{
2464
2597
  readonly indexed: true;
2465
2598
  }];
2466
2599
  readonly name: "OwnershipTransferred";
2600
+ }, {
2601
+ readonly type: "event";
2602
+ readonly anonymous: false;
2603
+ readonly inputs: readonly [{
2604
+ readonly name: "account";
2605
+ readonly internalType: "address";
2606
+ readonly type: "address";
2607
+ readonly indexed: false;
2608
+ }];
2609
+ readonly name: "Paused";
2467
2610
  }, {
2468
2611
  readonly type: "event";
2469
2612
  readonly anonymous: false;
@@ -2504,6 +2647,16 @@ export declare const incoLightningAbi: readonly [{
2504
2647
  readonly indexed: false;
2505
2648
  }];
2506
2649
  readonly name: "TrivialEncrypt";
2650
+ }, {
2651
+ readonly type: "event";
2652
+ readonly anonymous: false;
2653
+ readonly inputs: readonly [{
2654
+ readonly name: "account";
2655
+ readonly internalType: "address";
2656
+ readonly type: "address";
2657
+ readonly indexed: false;
2658
+ }];
2659
+ readonly name: "Unpaused";
2507
2660
  }, {
2508
2661
  readonly type: "event";
2509
2662
  readonly anonymous: false;
@@ -2554,10 +2707,18 @@ export declare const incoLightningAbi: readonly [{
2554
2707
  readonly type: "error";
2555
2708
  readonly inputs: readonly [];
2556
2709
  readonly name: "ERC1967NonPayable";
2710
+ }, {
2711
+ readonly type: "error";
2712
+ readonly inputs: readonly [];
2713
+ readonly name: "EnforcedPause";
2557
2714
  }, {
2558
2715
  readonly type: "error";
2559
2716
  readonly inputs: readonly [];
2560
2717
  readonly name: "EthInboundTransferUnsupported";
2718
+ }, {
2719
+ readonly type: "error";
2720
+ readonly inputs: readonly [];
2721
+ readonly name: "ExpectedPause";
2561
2722
  }, {
2562
2723
  readonly type: "error";
2563
2724
  readonly inputs: readonly [{
@@ -2835,7 +2996,7 @@ export declare const sessionVerifierAbi: readonly [{
2835
2996
  readonly internalType: "bytes";
2836
2997
  readonly type: "bytes";
2837
2998
  }, {
2838
- readonly name: "requesterArgData";
2999
+ readonly name: "";
2839
3000
  readonly internalType: "bytes";
2840
3001
  readonly type: "bytes";
2841
3002
  }];
@@ -3101,6 +3262,10 @@ export declare const voucherEip712CheckerAbi: readonly [{
3101
3262
  readonly internalType: "struct AllowanceVoucher";
3102
3263
  readonly type: "tuple";
3103
3264
  readonly components: readonly [{
3265
+ readonly name: "warning";
3266
+ readonly internalType: "string";
3267
+ readonly type: "string";
3268
+ }, {
3104
3269
  readonly name: "sessionNonce";
3105
3270
  readonly internalType: "bytes32";
3106
3271
  readonly type: "bytes32";
@@ -82,6 +82,10 @@ export declare const incoVerifierAbi: readonly [{
82
82
  readonly internalType: "struct AllowanceVoucher";
83
83
  readonly type: "tuple";
84
84
  readonly components: readonly [{
85
+ readonly name: "warning";
86
+ readonly internalType: "string";
87
+ readonly type: "string";
88
+ }, {
85
89
  readonly name: "sessionNonce";
86
90
  readonly internalType: "bytes32";
87
91
  readonly type: "bytes32";
@@ -345,6 +349,10 @@ export declare const incoVerifierAbi: readonly [{
345
349
  readonly internalType: "struct AllowanceVoucher";
346
350
  readonly type: "tuple";
347
351
  readonly components: readonly [{
352
+ readonly name: "warning";
353
+ readonly internalType: "string";
354
+ readonly type: "string";
355
+ }, {
348
356
  readonly name: "sessionNonce";
349
357
  readonly internalType: "bytes32";
350
358
  readonly type: "bytes32";
@@ -691,6 +699,22 @@ export declare const incoVerifierAbi: readonly [{
691
699
  }];
692
700
  }];
693
701
  readonly stateMutability: "pure";
702
+ }, {
703
+ readonly type: "function";
704
+ readonly inputs: readonly [];
705
+ readonly name: "pause";
706
+ readonly outputs: readonly [];
707
+ readonly stateMutability: "nonpayable";
708
+ }, {
709
+ readonly type: "function";
710
+ readonly inputs: readonly [];
711
+ readonly name: "paused";
712
+ readonly outputs: readonly [{
713
+ readonly name: "";
714
+ readonly internalType: "bool";
715
+ readonly type: "bool";
716
+ }];
717
+ readonly stateMutability: "view";
694
718
  }, {
695
719
  readonly type: "function";
696
720
  readonly inputs: readonly [];
@@ -780,6 +804,12 @@ export declare const incoVerifierAbi: readonly [{
780
804
  readonly name: "transferOwnership";
781
805
  readonly outputs: readonly [];
782
806
  readonly stateMutability: "nonpayable";
807
+ }, {
808
+ readonly type: "function";
809
+ readonly inputs: readonly [];
810
+ readonly name: "unpause";
811
+ readonly outputs: readonly [];
812
+ readonly stateMutability: "nonpayable";
783
813
  }, {
784
814
  readonly type: "function";
785
815
  readonly inputs: readonly [{
@@ -1022,6 +1052,16 @@ export declare const incoVerifierAbi: readonly [{
1022
1052
  readonly indexed: true;
1023
1053
  }];
1024
1054
  readonly name: "OwnershipTransferred";
1055
+ }, {
1056
+ readonly type: "event";
1057
+ readonly anonymous: false;
1058
+ readonly inputs: readonly [{
1059
+ readonly name: "account";
1060
+ readonly internalType: "address";
1061
+ readonly type: "address";
1062
+ readonly indexed: false;
1063
+ }];
1064
+ readonly name: "Paused";
1025
1065
  }, {
1026
1066
  readonly type: "event";
1027
1067
  readonly anonymous: false;
@@ -1062,6 +1102,16 @@ export declare const incoVerifierAbi: readonly [{
1062
1102
  readonly indexed: false;
1063
1103
  }];
1064
1104
  readonly name: "ThresholdChanged";
1105
+ }, {
1106
+ readonly type: "event";
1107
+ readonly anonymous: false;
1108
+ readonly inputs: readonly [{
1109
+ readonly name: "account";
1110
+ readonly internalType: "address";
1111
+ readonly type: "address";
1112
+ readonly indexed: false;
1113
+ }];
1114
+ readonly name: "Unpaused";
1065
1115
  }, {
1066
1116
  readonly type: "event";
1067
1117
  readonly anonymous: false;
@@ -1140,6 +1190,14 @@ export declare const incoVerifierAbi: readonly [{
1140
1190
  readonly type: "error";
1141
1191
  readonly inputs: readonly [];
1142
1192
  readonly name: "EmptyTcbInfo";
1193
+ }, {
1194
+ readonly type: "error";
1195
+ readonly inputs: readonly [];
1196
+ readonly name: "EnforcedPause";
1197
+ }, {
1198
+ readonly type: "error";
1199
+ readonly inputs: readonly [];
1200
+ readonly name: "ExpectedPause";
1143
1201
  }, {
1144
1202
  readonly type: "error";
1145
1203
  readonly inputs: readonly [];
@@ -1224,6 +1282,10 @@ export declare const incoVerifierAbi: readonly [{
1224
1282
  readonly type: "bytes";
1225
1283
  }];
1226
1284
  readonly name: "InvalidVoucherSignature";
1285
+ }, {
1286
+ readonly type: "error";
1287
+ readonly inputs: readonly [];
1288
+ readonly name: "InvalidVoucherWarning";
1227
1289
  }, {
1228
1290
  readonly type: "error";
1229
1291
  readonly inputs: readonly [];