@inco/js 0.10.0-devnet-3 → 0.11.0-demonet-2

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 (51) hide show
  1. package/dist/cjs/advancedacl/session-key.d.ts +1 -0
  2. package/dist/cjs/advancedacl/session-key.js +16 -9
  3. package/dist/cjs/advancedacl/types.d.ts +1 -0
  4. package/dist/cjs/encryption/encryption.d.ts +3 -4
  5. package/dist/cjs/encryption/encryption.js +2 -3
  6. package/dist/cjs/generated/abis/lightning.d.ts +21 -9
  7. package/dist/cjs/generated/abis/lightning.js +7 -7
  8. package/dist/cjs/generated/abis/verifier.d.ts +12 -0
  9. package/dist/cjs/generated/abis/verifier.js +4 -1
  10. package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.d.ts +7 -0
  11. package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
  12. package/dist/cjs/generated/lightning.d.ts +42 -0
  13. package/dist/cjs/generated/lightning.js +45 -1
  14. package/dist/cjs/generated/local-node.d.ts +7 -7
  15. package/dist/cjs/generated/local-node.js +7 -7
  16. package/dist/cjs/handle.d.ts +6 -15
  17. package/dist/cjs/handle.js +23 -50
  18. package/dist/cjs/kms/quorumClient.js +2 -2
  19. package/dist/cjs/lite/xwing.d.ts +1 -1
  20. package/dist/cjs/lite/xwing.js +4 -8
  21. package/dist/esm/advancedacl/session-key.d.ts +1 -0
  22. package/dist/esm/advancedacl/session-key.js +15 -9
  23. package/dist/esm/advancedacl/types.d.ts +1 -0
  24. package/dist/esm/encryption/encryption.d.ts +3 -4
  25. package/dist/esm/encryption/encryption.js +2 -3
  26. package/dist/esm/generated/abis/lightning.d.ts +21 -9
  27. package/dist/esm/generated/abis/lightning.js +7 -7
  28. package/dist/esm/generated/abis/verifier.d.ts +12 -0
  29. package/dist/esm/generated/abis/verifier.js +4 -1
  30. package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.d.ts +7 -0
  31. package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
  32. package/dist/esm/generated/lightning.d.ts +42 -0
  33. package/dist/esm/generated/lightning.js +45 -1
  34. package/dist/esm/generated/local-node.d.ts +7 -7
  35. package/dist/esm/generated/local-node.js +7 -7
  36. package/dist/esm/handle.d.ts +6 -15
  37. package/dist/esm/handle.js +22 -48
  38. package/dist/esm/kms/quorumClient.js +2 -2
  39. package/dist/esm/lite/xwing.d.ts +1 -1
  40. package/dist/esm/lite/xwing.js +5 -9
  41. package/dist/types/advancedacl/session-key.d.ts +1 -0
  42. package/dist/types/advancedacl/types.d.ts +1 -0
  43. package/dist/types/encryption/encryption.d.ts +3 -4
  44. package/dist/types/generated/abis/lightning.d.ts +21 -9
  45. package/dist/types/generated/abis/verifier.d.ts +12 -0
  46. package/dist/types/generated/es/inco/kms/lite/v1/types_pb.d.ts +7 -0
  47. package/dist/types/generated/lightning.d.ts +42 -0
  48. package/dist/types/generated/local-node.d.ts +7 -7
  49. package/dist/types/handle.d.ts +6 -15
  50. package/dist/types/lite/xwing.d.ts +1 -1
  51. package/package.json +1 -1
@@ -8,7 +8,6 @@ export declare const HANDLE_VERSION = 0;
8
8
  * keccak256 preimage with a unique constant string makes cross-derivation-path
9
9
  * collision resistance structural rather than incidental.
10
10
  */
11
- export declare const SEP_INPUT_PREHANDLE = "inco/handle/input-prehandle";
12
11
  export declare const SEP_INPUT_HANDLE = "inco/handle/input-handle";
13
12
  export declare const SEP_INPUT_CONTEXT = "inco/handle/input-context";
14
13
  export declare const SEP_OP_RESULT = "inco/handle/op-result";
@@ -49,7 +48,7 @@ export type FheType = HandleTypes[keyof HandleTypes];
49
48
  * @returns `true` if `value` is a known ENCRYPTION type integer (0–11).
50
49
  */
51
50
  export declare function isFheType(value: number): value is FheType;
52
- /** Schema for the context required to compute a deterministic ENCRYPTION handle from a prehandle. */
51
+ /** Schema for the context required to compute a deterministic ENCRYPTION handle. */
53
52
  export declare const InputContext: Schema.Struct<{
54
53
  hostChainId: typeof Schema.BigInt;
55
54
  aclAddress: Schema.TemplateLiteral<`0x${string}`>;
@@ -95,28 +94,20 @@ export declare function getHandleType(handle: HexString): FheType;
95
94
  */
96
95
  export declare function getEListElementType(handle: HexString): FheType;
97
96
  /**
98
- * Computes the prehandle hash for an input based on the ciphertext
97
+ * Computes the final handle for an input based on the ciphertext and the input context, matches the handle generation
98
+ * in Go and Solidity.
99
99
  *
100
- * @param ciphertextPayload Note this is the different from the input which has the external handle prepended
100
+ * @param ciphertext Note this is different from the input which has the external handle prepended
101
101
  * @param indexHandle
102
102
  * @param handleType
103
103
  * @param handleVersion
104
+ * @param context
104
105
  */
105
- export declare function computePrehandle({ ciphertext, indexHandle, handleType, handleVersion, }: {
106
+ export declare function computeHandle({ ciphertext, indexHandle, handleType, handleVersion, context, }: {
106
107
  ciphertext: Uint8Array;
107
108
  indexHandle: number;
108
109
  handleType: FheType;
109
110
  handleVersion: number;
110
- }): Buffer;
111
- /**
112
- * Computes the final handle for an input based on the prehandle and the input context, matches the handle generation
113
- * in Go and Solidity
114
- *
115
- * @param prehandle
116
- * @param context
117
- */
118
- export declare function computeHandle({ prehandle, context, }: {
119
- prehandle: Uint8Array;
120
111
  context: InputContext;
121
112
  }): Buffer;
122
113
  /**
@@ -125,7 +125,7 @@ export declare function decrypt(privKeyA: XwingKeypair, encryptedData: Uint8Arra
125
125
  * The encryptor:
126
126
  * 1. Encodes the plaintext with its context (HADU encoding)
127
127
  * 2. Encrypts using X-Wing HPKE
128
- * 3. Computes prehandle and handle for tracking
128
+ * 3. Computes handle for tracking
129
129
  * 4. Returns the encrypted ciphertext with metadata
130
130
  *
131
131
  * @param args - X-Wing encryptor arguments (recipient's public key)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inco/js",
3
- "version": "0.10.0-devnet-3",
3
+ "version": "0.11.0-demonet-2",
4
4
  "repository": "https://github.com/Inco-fhevm/inco-monorepo",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,