@inco/js 0.10.0-devnet-3 → 0.11.0-demonet-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.
- package/dist/cjs/advancedacl/session-key.d.ts +1 -0
- package/dist/cjs/advancedacl/session-key.js +16 -9
- package/dist/cjs/advancedacl/types.d.ts +1 -0
- package/dist/cjs/encryption/encryption.d.ts +3 -4
- package/dist/cjs/encryption/encryption.js +2 -3
- package/dist/cjs/generated/abis/lightning.d.ts +21 -9
- package/dist/cjs/generated/abis/lightning.js +7 -7
- package/dist/cjs/generated/abis/verifier.d.ts +12 -0
- package/dist/cjs/generated/abis/verifier.js +4 -1
- package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.d.ts +7 -0
- package/dist/cjs/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
- package/dist/cjs/generated/lightning.d.ts +42 -0
- package/dist/cjs/generated/lightning.js +45 -1
- package/dist/cjs/generated/local-node.d.ts +7 -7
- package/dist/cjs/generated/local-node.js +7 -7
- package/dist/cjs/handle.d.ts +6 -15
- package/dist/cjs/handle.js +23 -50
- package/dist/cjs/kms/quorumClient.js +2 -2
- package/dist/cjs/lite/xwing.d.ts +1 -1
- package/dist/cjs/lite/xwing.js +4 -8
- package/dist/esm/advancedacl/session-key.d.ts +1 -0
- package/dist/esm/advancedacl/session-key.js +15 -9
- package/dist/esm/advancedacl/types.d.ts +1 -0
- package/dist/esm/encryption/encryption.d.ts +3 -4
- package/dist/esm/encryption/encryption.js +2 -3
- package/dist/esm/generated/abis/lightning.d.ts +21 -9
- package/dist/esm/generated/abis/lightning.js +7 -7
- package/dist/esm/generated/abis/verifier.d.ts +12 -0
- package/dist/esm/generated/abis/verifier.js +4 -1
- package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.d.ts +7 -0
- package/dist/esm/generated/es/inco/kms/lite/v1/types_pb.js +2 -2
- package/dist/esm/generated/lightning.d.ts +42 -0
- package/dist/esm/generated/lightning.js +45 -1
- package/dist/esm/generated/local-node.d.ts +7 -7
- package/dist/esm/generated/local-node.js +7 -7
- package/dist/esm/handle.d.ts +6 -15
- package/dist/esm/handle.js +22 -48
- package/dist/esm/kms/quorumClient.js +2 -2
- package/dist/esm/lite/xwing.d.ts +1 -1
- package/dist/esm/lite/xwing.js +5 -9
- package/dist/types/advancedacl/session-key.d.ts +1 -0
- package/dist/types/advancedacl/types.d.ts +1 -0
- package/dist/types/encryption/encryption.d.ts +3 -4
- package/dist/types/generated/abis/lightning.d.ts +21 -9
- package/dist/types/generated/abis/verifier.d.ts +12 -0
- package/dist/types/generated/es/inco/kms/lite/v1/types_pb.d.ts +7 -0
- package/dist/types/generated/lightning.d.ts +42 -0
- package/dist/types/generated/local-node.d.ts +7 -7
- package/dist/types/handle.d.ts +6 -15
- package/dist/types/lite/xwing.d.ts +1 -1
- package/package.json +1 -1
package/dist/types/handle.d.ts
CHANGED
|
@@ -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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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)
|