tkms 0.11.0-rc8 → 0.11.0
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/kms_lib.d.ts +211 -176
- package/kms_lib.js +606 -517
- package/kms_lib_bg.wasm +0 -0
- package/package.json +1 -1
package/kms_lib.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export function ml_kem_pke_pk_len(): number;
|
|
4
|
+
export function ml_kem_pke_sk_len(): number;
|
|
3
5
|
export function public_sig_key_to_u8vec(pk: PublicSigKey): Uint8Array;
|
|
4
6
|
export function u8vec_to_public_sig_key(v: Uint8Array): PublicSigKey;
|
|
5
7
|
export function private_sig_key_to_u8vec(sk: PrivateSigKey): Uint8Array;
|
|
6
8
|
export function u8vec_to_private_sig_key(v: Uint8Array): PrivateSigKey;
|
|
9
|
+
/**
|
|
10
|
+
* Create a new [ServerIdAddr] structure that holds an ID and an address
|
|
11
|
+
* which must be a valid EIP-55 address, notably prefixed with "0x".
|
|
12
|
+
*/
|
|
13
|
+
export function new_server_id_addr(id: number, addr: string): ServerIdAddr;
|
|
7
14
|
/**
|
|
8
15
|
* Instantiate a new client.
|
|
9
16
|
*
|
|
10
|
-
* * `server_addrs` - a list of KMS server EIP-55 addresses,
|
|
11
|
-
*
|
|
17
|
+
* * `server_addrs` - a list of KMS server ID with EIP-55 addresses,
|
|
18
|
+
* the elements in the list can be created using [new_server_id_addr].
|
|
12
19
|
*
|
|
13
20
|
* * `client_address_hex` - the client (wallet) address in hex,
|
|
14
21
|
* must be prefixed with "0x".
|
|
@@ -16,26 +23,35 @@ export function u8vec_to_private_sig_key(v: Uint8Array): PrivateSigKey;
|
|
|
16
23
|
* * `fhe_parameter` - the parameter choice, which can be either `"test"` or `"default"`.
|
|
17
24
|
* The "default" parameter choice is selected if no matching string is found.
|
|
18
25
|
*/
|
|
19
|
-
export function new_client(server_addrs:
|
|
20
|
-
export function get_server_addrs(client: Client):
|
|
26
|
+
export function new_client(server_addrs: ServerIdAddr[], client_address_hex: string, fhe_parameter: string): Client;
|
|
27
|
+
export function get_server_addrs(client: Client): ServerIdAddr[];
|
|
21
28
|
export function get_client_secret_key(client: Client): PrivateSigKey | undefined;
|
|
22
29
|
export function get_client_address(client: Client): string;
|
|
23
|
-
export function
|
|
24
|
-
export function
|
|
25
|
-
export function
|
|
26
|
-
export function
|
|
27
|
-
export function
|
|
28
|
-
export function
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
export function ml_kem_pke_keygen(): PrivateEncKeyMlKem512;
|
|
31
|
+
export function ml_kem_pke_get_pk(sk: PrivateEncKeyMlKem512): PublicEncKeyMlKem512;
|
|
32
|
+
export function ml_kem_pke_pk_to_u8vec(pk: PublicEncKeyMlKem512): Uint8Array;
|
|
33
|
+
export function ml_kem_pke_sk_to_u8vec(sk: PrivateEncKeyMlKem512): Uint8Array;
|
|
34
|
+
export function u8vec_to_ml_kem_pke_pk(v: Uint8Array): PublicEncKeyMlKem512;
|
|
35
|
+
export function u8vec_to_ml_kem_pke_sk(v: Uint8Array): PrivateEncKeyMlKem512;
|
|
36
|
+
/**
|
|
37
|
+
* This function is *not* used by relayer-sdk because the encryption
|
|
38
|
+
* happens on the KMS side. It's just here for completeness and tests.
|
|
39
|
+
*/
|
|
40
|
+
export function ml_kem_pke_encrypt(msg: Uint8Array, their_pk: PublicEncKeyMlKem512): Uint8Array;
|
|
41
|
+
/**
|
|
42
|
+
* This function is *not* used by relayer-sdk because the decryption
|
|
43
|
+
* is handled by [process_user_decryption_resp].
|
|
44
|
+
* It's just here for completeness and tests.
|
|
45
|
+
*/
|
|
46
|
+
export function ml_kem_pke_decrypt(ct: Uint8Array, my_sk: PrivateEncKeyMlKem512): Uint8Array;
|
|
31
47
|
/**
|
|
32
|
-
* Process the
|
|
48
|
+
* Process the user_decryption response from JavaScript objects.
|
|
33
49
|
* The returned result is a byte array representing a plaintext of any length,
|
|
34
50
|
* postprocessing is returned to turn it into an integer.
|
|
35
51
|
*
|
|
36
|
-
* * `client` - client that wants to perform
|
|
52
|
+
* * `client` - client that wants to perform user_decryption.
|
|
37
53
|
*
|
|
38
|
-
* * `request` - the initial
|
|
54
|
+
* * `request` - the initial user_decryption request JS object.
|
|
39
55
|
* It can be set to null if `verify` is false.
|
|
40
56
|
* Otherwise the caller needs to give the following JS object.
|
|
41
57
|
* Note that `client_address` and `eip712_verifying_contract` follow EIP-55.
|
|
@@ -76,7 +92,8 @@ export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_p
|
|
|
76
92
|
* [
|
|
77
93
|
* {
|
|
78
94
|
* signature: '69e7e040cab157aa819015b321c012dccb1545ffefd325b359b492653f0347517e28e66c572cdc299e259024329859ff9fcb0096e1ce072af0b6e1ca1fe25ec6',
|
|
79
|
-
* payload: '0100000029...'
|
|
95
|
+
* payload: '0100000029...',
|
|
96
|
+
* extra_data: '01234...',
|
|
80
97
|
* }
|
|
81
98
|
* ]
|
|
82
99
|
* ```
|
|
@@ -88,22 +105,22 @@ export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_p
|
|
|
88
105
|
* * `verify` - Whether to perform signature verification for the response.
|
|
89
106
|
* It is insecure if `verify = false`!
|
|
90
107
|
*/
|
|
91
|
-
export function
|
|
108
|
+
export function process_user_decryption_resp_from_js(client: Client, request: any, eip712_domain: any, agg_resp: any, enc_pk: PublicEncKeyMlKem512, enc_sk: PrivateEncKeyMlKem512, verify: boolean): TypedPlaintext[];
|
|
92
109
|
/**
|
|
93
|
-
* Process the
|
|
94
|
-
* Consider using [
|
|
110
|
+
* Process the user_decryption response from Rust objects.
|
|
111
|
+
* Consider using [process_user_decryption_resp_from_js]
|
|
95
112
|
* when using the JS API.
|
|
96
113
|
* The result is a byte array representing a plaintext of any length.
|
|
97
114
|
*
|
|
98
|
-
* * `client` - client that wants to perform
|
|
115
|
+
* * `client` - client that wants to perform user_decryption.
|
|
99
116
|
*
|
|
100
|
-
* * `request` - the initial
|
|
117
|
+
* * `request` - the initial user_decryption request.
|
|
101
118
|
* Must be given if `verify` is true.
|
|
102
119
|
*
|
|
103
120
|
* * `eip712_domain` - the EIP-712 domain.
|
|
104
121
|
* Must be given if `verify` is true.
|
|
105
122
|
*
|
|
106
|
-
* * `agg_resp` - the vector of
|
|
123
|
+
* * `agg_resp` - the vector of user_decryption responses.
|
|
107
124
|
*
|
|
108
125
|
* * `enc_pk` - The ephemeral public key.
|
|
109
126
|
*
|
|
@@ -112,7 +129,7 @@ export function process_reencryption_resp_from_js(client: Client, request: any,
|
|
|
112
129
|
* * `verify` - Whether to perform signature verification for the response.
|
|
113
130
|
* It is insecure if `verify = false`!
|
|
114
131
|
*/
|
|
115
|
-
export function
|
|
132
|
+
export function process_user_decryption_resp(client: Client, request: ParsedUserDecryptionRequest | null | undefined, eip712_domain: Eip712DomainMsg | null | undefined, agg_resp: UserDecryptionResponse[], enc_pk: PublicEncKeyMlKem512, enc_sk: PrivateEncKeyMlKem512, verify: boolean): TypedPlaintext[];
|
|
116
133
|
export class CiphertextHandle {
|
|
117
134
|
private constructor();
|
|
118
135
|
free(): void;
|
|
@@ -128,14 +145,10 @@ export class Client {
|
|
|
128
145
|
private constructor();
|
|
129
146
|
free(): void;
|
|
130
147
|
}
|
|
131
|
-
export class CryptoBoxCt {
|
|
132
|
-
private constructor();
|
|
133
|
-
free(): void;
|
|
134
|
-
}
|
|
135
148
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
149
|
+
* Eip712 domain information.
|
|
150
|
+
* Any constraints specified in the [standard](<https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator>) _must_ be fulfilled.
|
|
151
|
+
* Furthermore, be aware that all parameters will eventually be parsed into Solidity types.
|
|
139
152
|
*/
|
|
140
153
|
export class Eip712DomainMsg {
|
|
141
154
|
private constructor();
|
|
@@ -150,11 +163,11 @@ export class Eip712DomainMsg {
|
|
|
150
163
|
/**
|
|
151
164
|
* Validity of this struct is not checked.
|
|
152
165
|
*/
|
|
153
|
-
export class
|
|
166
|
+
export class ParsedUserDecryptionRequest {
|
|
154
167
|
private constructor();
|
|
155
168
|
free(): void;
|
|
156
169
|
}
|
|
157
|
-
export class
|
|
170
|
+
export class PrivateEncKeyMlKem512 {
|
|
158
171
|
private constructor();
|
|
159
172
|
free(): void;
|
|
160
173
|
}
|
|
@@ -162,7 +175,7 @@ export class PrivateSigKey {
|
|
|
162
175
|
private constructor();
|
|
163
176
|
free(): void;
|
|
164
177
|
}
|
|
165
|
-
export class
|
|
178
|
+
export class PublicEncKeyMlKem512 {
|
|
166
179
|
private constructor();
|
|
167
180
|
free(): void;
|
|
168
181
|
}
|
|
@@ -170,7 +183,79 @@ export class PublicSigKey {
|
|
|
170
183
|
private constructor();
|
|
171
184
|
free(): void;
|
|
172
185
|
}
|
|
173
|
-
|
|
186
|
+
/**
|
|
187
|
+
* / A unique 32 Byte / 256 Bit ID, to be used to identify a request and
|
|
188
|
+
* / for retrieving the computed result later on.
|
|
189
|
+
* / Must be encoded in lower-case hex. The string must NOT contain a `0x` prefix.
|
|
190
|
+
*/
|
|
191
|
+
export class RequestId {
|
|
192
|
+
private constructor();
|
|
193
|
+
free(): void;
|
|
194
|
+
request_id: string;
|
|
195
|
+
}
|
|
196
|
+
export class ServerIdAddr {
|
|
197
|
+
private constructor();
|
|
198
|
+
free(): void;
|
|
199
|
+
}
|
|
200
|
+
export class TypedCiphertext {
|
|
201
|
+
private constructor();
|
|
202
|
+
free(): void;
|
|
203
|
+
/**
|
|
204
|
+
* The actual ciphertext to decrypt, taken directly from fhevm.
|
|
205
|
+
*/
|
|
206
|
+
ciphertext: Uint8Array;
|
|
207
|
+
/**
|
|
208
|
+
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
209
|
+
* <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
|
|
210
|
+
*/
|
|
211
|
+
fhe_type: number;
|
|
212
|
+
/**
|
|
213
|
+
* The external handle of the ciphertext (the handle used in the copro).
|
|
214
|
+
*/
|
|
215
|
+
external_handle: Uint8Array;
|
|
216
|
+
/**
|
|
217
|
+
* The ciphertext format, see CiphertextFormat documentation for details.
|
|
218
|
+
* CiphertextFormat::default() is used if unspecified.
|
|
219
|
+
*/
|
|
220
|
+
ciphertext_format: number;
|
|
221
|
+
}
|
|
222
|
+
export class TypedPlaintext {
|
|
223
|
+
private constructor();
|
|
224
|
+
free(): void;
|
|
225
|
+
/**
|
|
226
|
+
* The actual plaintext in bytes.
|
|
227
|
+
*/
|
|
228
|
+
bytes: Uint8Array;
|
|
229
|
+
/**
|
|
230
|
+
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
231
|
+
* <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
|
|
232
|
+
*/
|
|
233
|
+
fhe_type: number;
|
|
234
|
+
}
|
|
235
|
+
export class TypedSigncryptedCiphertext {
|
|
236
|
+
private constructor();
|
|
237
|
+
free(): void;
|
|
238
|
+
/**
|
|
239
|
+
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
240
|
+
* <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
|
|
241
|
+
*/
|
|
242
|
+
fhe_type: number;
|
|
243
|
+
/**
|
|
244
|
+
* The signcrypted payload, using a hybrid encryption approach in
|
|
245
|
+
* sign-then-encrypt.
|
|
246
|
+
*/
|
|
247
|
+
signcrypted_ciphertext: Uint8Array;
|
|
248
|
+
/**
|
|
249
|
+
* The external handles that were originally in the request.
|
|
250
|
+
*/
|
|
251
|
+
external_handle: Uint8Array;
|
|
252
|
+
/**
|
|
253
|
+
* The packing factor determines whether the decrypted plaintext
|
|
254
|
+
* has a different way of packing compared to what is specified in the plaintext modulus.
|
|
255
|
+
*/
|
|
256
|
+
packing_factor: number;
|
|
257
|
+
}
|
|
258
|
+
export class UserDecryptionRequest {
|
|
174
259
|
private constructor();
|
|
175
260
|
free(): void;
|
|
176
261
|
/**
|
|
@@ -184,7 +269,7 @@ export class ReencryptionRequest {
|
|
|
184
269
|
*/
|
|
185
270
|
set request_id(value: RequestId | null | undefined);
|
|
186
271
|
/**
|
|
187
|
-
* The list of ciphertexts to
|
|
272
|
+
* The list of ciphertexts to decrypt for the user.
|
|
188
273
|
*/
|
|
189
274
|
typed_ciphertexts: TypedCiphertext[];
|
|
190
275
|
/**
|
|
@@ -198,43 +283,56 @@ export class ReencryptionRequest {
|
|
|
198
283
|
*/
|
|
199
284
|
set key_id(value: RequestId | null | undefined);
|
|
200
285
|
/**
|
|
201
|
-
* The client's (blockchain wallet) address,
|
|
202
|
-
* encoded using EIP-55.
|
|
286
|
+
* The client's (blockchain wallet) address, encoded using EIP-55. I.e. including `0x`.
|
|
203
287
|
*/
|
|
204
288
|
client_address: string;
|
|
205
289
|
/**
|
|
206
290
|
* Encoding of the user's public encryption key for this request.
|
|
207
|
-
*
|
|
208
|
-
* Montgomery point.
|
|
291
|
+
* This must be a bincode (v.1) encoded ML-KEM 512 key.
|
|
209
292
|
*/
|
|
210
293
|
enc_key: Uint8Array;
|
|
294
|
+
/**
|
|
295
|
+
* The user's EIP712 domain. This MUST be present. Furthermore, the `verifying_contract` MUST be set and be distinct from `client_address`.
|
|
296
|
+
*/
|
|
211
297
|
get domain(): Eip712DomainMsg | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* The user's EIP712 domain. This MUST be present. Furthermore, the `verifying_contract` MUST be set and be distinct from `client_address`.
|
|
300
|
+
*/
|
|
212
301
|
set domain(value: Eip712DomainMsg | null | undefined);
|
|
302
|
+
/**
|
|
303
|
+
* Extra data from the gateway.
|
|
304
|
+
*/
|
|
305
|
+
extra_data: Uint8Array;
|
|
213
306
|
}
|
|
214
|
-
export class
|
|
307
|
+
export class UserDecryptionResponse {
|
|
215
308
|
private constructor();
|
|
216
309
|
free(): void;
|
|
217
310
|
signature: Uint8Array;
|
|
218
311
|
/**
|
|
219
312
|
* This is the external signature created from the Eip712 domain
|
|
220
|
-
* on the structure, where
|
|
313
|
+
* on the structure, where userDecryptedShare is bc2wrap::serialize(&payload)
|
|
221
314
|
* struct UserDecryptResponseVerification {
|
|
222
315
|
* bytes publicKey;
|
|
223
316
|
* uint256\[\] ctHandles;
|
|
224
|
-
* bytes
|
|
317
|
+
* bytes userDecryptedShare; // serialization of payload
|
|
318
|
+
* bytes extraData;
|
|
225
319
|
* }
|
|
226
320
|
*/
|
|
227
321
|
external_signature: Uint8Array;
|
|
228
322
|
/**
|
|
229
|
-
* The actual \[
|
|
323
|
+
* The actual \[UserDecryptionResponsePayload\].
|
|
230
324
|
*/
|
|
231
|
-
get payload():
|
|
325
|
+
get payload(): UserDecryptionResponsePayload | undefined;
|
|
232
326
|
/**
|
|
233
|
-
* The actual \[
|
|
327
|
+
* The actual \[UserDecryptionResponsePayload\].
|
|
234
328
|
*/
|
|
235
|
-
set payload(value:
|
|
329
|
+
set payload(value: UserDecryptionResponsePayload | null | undefined);
|
|
330
|
+
/**
|
|
331
|
+
* Extra data used in the EIP712 signature - external_signature.
|
|
332
|
+
*/
|
|
333
|
+
extra_data: Uint8Array;
|
|
236
334
|
}
|
|
237
|
-
export class
|
|
335
|
+
export class UserDecryptionResponsePayload {
|
|
238
336
|
private constructor();
|
|
239
337
|
free(): void;
|
|
240
338
|
/**
|
|
@@ -256,7 +354,7 @@ export class ReencryptionResponsePayload {
|
|
|
256
354
|
*/
|
|
257
355
|
signcrypted_ciphertexts: TypedSigncryptedCiphertext[];
|
|
258
356
|
/**
|
|
259
|
-
* The ID of the MPC party doing the
|
|
357
|
+
* The ID of the MPC party doing the user decryption. Used for polynomial
|
|
260
358
|
* reconstruction.
|
|
261
359
|
*/
|
|
262
360
|
party_id: number;
|
|
@@ -265,76 +363,6 @@ export class ReencryptionResponsePayload {
|
|
|
265
363
|
*/
|
|
266
364
|
degree: number;
|
|
267
365
|
}
|
|
268
|
-
/**
|
|
269
|
-
* Simple response to return a 32 Byte / 256 Bit ID, to be used to retrieve the
|
|
270
|
-
* computed result later on. This string does NOT contain a `0x` prefix.
|
|
271
|
-
*/
|
|
272
|
-
export class RequestId {
|
|
273
|
-
private constructor();
|
|
274
|
-
free(): void;
|
|
275
|
-
request_id: string;
|
|
276
|
-
}
|
|
277
|
-
export class TypedCiphertext {
|
|
278
|
-
private constructor();
|
|
279
|
-
free(): void;
|
|
280
|
-
/**
|
|
281
|
-
* The actual ciphertext to decrypt, taken directly from fhevm.
|
|
282
|
-
*/
|
|
283
|
-
ciphertext: Uint8Array;
|
|
284
|
-
/**
|
|
285
|
-
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
286
|
-
* <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
|
|
287
|
-
*/
|
|
288
|
-
fhe_type: number;
|
|
289
|
-
/**
|
|
290
|
-
* The external handle of the ciphertext (the handle used in the copro).
|
|
291
|
-
*/
|
|
292
|
-
external_handle: Uint8Array;
|
|
293
|
-
/**
|
|
294
|
-
* The ciphertext format, see CiphertextFormat documentation for details.
|
|
295
|
-
* CiphertextFormat::default() is used if unspecified.
|
|
296
|
-
*/
|
|
297
|
-
ciphertext_format: number;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* The typed plaintext type, which is the result of decryption.
|
|
301
|
-
*/
|
|
302
|
-
export class TypedPlaintext {
|
|
303
|
-
private constructor();
|
|
304
|
-
free(): void;
|
|
305
|
-
/**
|
|
306
|
-
* The actual plaintext in bytes.
|
|
307
|
-
*/
|
|
308
|
-
bytes: Uint8Array;
|
|
309
|
-
/**
|
|
310
|
-
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
311
|
-
* <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
|
|
312
|
-
*/
|
|
313
|
-
fhe_type: number;
|
|
314
|
-
}
|
|
315
|
-
export class TypedSigncryptedCiphertext {
|
|
316
|
-
private constructor();
|
|
317
|
-
free(): void;
|
|
318
|
-
/**
|
|
319
|
-
* The type of plaintext encrypted. The type should match FheType from tfhe-rs:
|
|
320
|
-
* <https://github.com/zama-ai/tfhe-rs/blob/main/tfhe/src/high_level_api/mod.rs>
|
|
321
|
-
*/
|
|
322
|
-
fhe_type: number;
|
|
323
|
-
/**
|
|
324
|
-
* The signcrypted payload, using a hybrid encryption approach in
|
|
325
|
-
* sign-then-encrypt.
|
|
326
|
-
*/
|
|
327
|
-
signcrypted_ciphertext: Uint8Array;
|
|
328
|
-
/**
|
|
329
|
-
* The external handles that were originally in the request.
|
|
330
|
-
*/
|
|
331
|
-
external_handle: Uint8Array;
|
|
332
|
-
/**
|
|
333
|
-
* The packing factor determines whether the decrypted plaintext
|
|
334
|
-
* has a different way of packing compared to what is specified in the plaintext modulus.
|
|
335
|
-
*/
|
|
336
|
-
packing_factor: number;
|
|
337
|
-
}
|
|
338
366
|
|
|
339
367
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
340
368
|
|
|
@@ -342,39 +370,42 @@ export interface InitOutput {
|
|
|
342
370
|
readonly memory: WebAssembly.Memory;
|
|
343
371
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
344
372
|
readonly __wbg_ciphertexthandle_free: (a: number, b: number) => void;
|
|
345
|
-
readonly
|
|
373
|
+
readonly __wbg_parseduserdecryptionrequest_free: (a: number, b: number) => void;
|
|
374
|
+
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
375
|
+
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
376
|
+
readonly __wbg_privateenckeymlkem512_free: (a: number, b: number) => void;
|
|
377
|
+
readonly __wbg_publicenckeymlkem512_free: (a: number, b: number) => void;
|
|
378
|
+
readonly ml_kem_pke_pk_len: () => number;
|
|
379
|
+
readonly ml_kem_pke_sk_len: () => number;
|
|
346
380
|
readonly public_sig_key_to_u8vec: (a: number) => [number, number];
|
|
347
381
|
readonly u8vec_to_public_sig_key: (a: number, b: number) => [number, number, number];
|
|
348
382
|
readonly private_sig_key_to_u8vec: (a: number) => [number, number, number, number];
|
|
349
383
|
readonly u8vec_to_private_sig_key: (a: number, b: number) => [number, number, number];
|
|
384
|
+
readonly __wbg_serveridaddr_free: (a: number, b: number) => void;
|
|
385
|
+
readonly new_server_id_addr: (a: number, b: number, c: number) => [number, number, number];
|
|
350
386
|
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
351
387
|
readonly get_server_addrs: (a: number) => [number, number];
|
|
352
388
|
readonly get_client_secret_key: (a: number) => number;
|
|
353
389
|
readonly get_client_address: (a: number) => [number, number];
|
|
354
|
-
readonly
|
|
355
|
-
readonly
|
|
356
|
-
readonly
|
|
357
|
-
readonly
|
|
358
|
-
readonly
|
|
359
|
-
readonly
|
|
360
|
-
readonly
|
|
361
|
-
readonly
|
|
362
|
-
readonly
|
|
363
|
-
readonly
|
|
364
|
-
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
365
|
-
readonly __wbg_publicenckey_free: (a: number, b: number) => void;
|
|
366
|
-
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
367
|
-
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
368
|
-
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
390
|
+
readonly ml_kem_pke_keygen: () => number;
|
|
391
|
+
readonly ml_kem_pke_get_pk: (a: number) => number;
|
|
392
|
+
readonly ml_kem_pke_pk_to_u8vec: (a: number) => [number, number, number, number];
|
|
393
|
+
readonly ml_kem_pke_sk_to_u8vec: (a: number) => [number, number, number, number];
|
|
394
|
+
readonly u8vec_to_ml_kem_pke_pk: (a: number, b: number) => [number, number, number];
|
|
395
|
+
readonly u8vec_to_ml_kem_pke_sk: (a: number, b: number) => [number, number, number];
|
|
396
|
+
readonly ml_kem_pke_encrypt: (a: number, b: number, c: number) => [number, number];
|
|
397
|
+
readonly ml_kem_pke_decrypt: (a: number, b: number, c: number) => [number, number];
|
|
398
|
+
readonly process_user_decryption_resp_from_js: (a: number, b: any, c: any, d: any, e: number, f: number, g: number) => [number, number, number, number];
|
|
399
|
+
readonly process_user_decryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
369
400
|
readonly __wbg_requestid_free: (a: number, b: number) => void;
|
|
401
|
+
readonly __wbg_get_requestid_request_id: (a: number) => [number, number];
|
|
370
402
|
readonly __wbg_typedciphertext_free: (a: number, b: number) => void;
|
|
403
|
+
readonly __wbg_get_typedciphertext_ciphertext: (a: number) => [number, number];
|
|
371
404
|
readonly __wbg_get_typedciphertext_fhe_type: (a: number) => number;
|
|
372
405
|
readonly __wbg_set_typedciphertext_fhe_type: (a: number, b: number) => void;
|
|
406
|
+
readonly __wbg_get_typedciphertext_external_handle: (a: number) => [number, number];
|
|
373
407
|
readonly __wbg_get_typedciphertext_ciphertext_format: (a: number) => number;
|
|
374
408
|
readonly __wbg_set_typedciphertext_ciphertext_format: (a: number, b: number) => void;
|
|
375
|
-
readonly __wbg_typedplaintext_free: (a: number, b: number) => void;
|
|
376
|
-
readonly __wbg_get_typedplaintext_fhe_type: (a: number) => number;
|
|
377
|
-
readonly __wbg_set_typedplaintext_fhe_type: (a: number, b: number) => void;
|
|
378
409
|
readonly __wbg_eip712domainmsg_free: (a: number, b: number) => void;
|
|
379
410
|
readonly __wbg_get_eip712domainmsg_name: (a: number) => [number, number];
|
|
380
411
|
readonly __wbg_set_eip712domainmsg_name: (a: number, b: number, c: number) => void;
|
|
@@ -386,54 +417,58 @@ export interface InitOutput {
|
|
|
386
417
|
readonly __wbg_set_eip712domainmsg_verifying_contract: (a: number, b: number, c: number) => void;
|
|
387
418
|
readonly __wbg_get_eip712domainmsg_salt: (a: number) => [number, number];
|
|
388
419
|
readonly __wbg_set_eip712domainmsg_salt: (a: number, b: number, c: number) => void;
|
|
389
|
-
readonly
|
|
390
|
-
readonly
|
|
391
|
-
readonly
|
|
392
|
-
readonly
|
|
393
|
-
readonly
|
|
394
|
-
readonly
|
|
395
|
-
readonly
|
|
396
|
-
readonly
|
|
397
|
-
readonly
|
|
398
|
-
readonly
|
|
399
|
-
readonly
|
|
400
|
-
readonly
|
|
401
|
-
readonly
|
|
402
|
-
readonly
|
|
403
|
-
readonly
|
|
404
|
-
readonly
|
|
405
|
-
readonly
|
|
406
|
-
readonly
|
|
407
|
-
readonly
|
|
408
|
-
readonly
|
|
409
|
-
readonly
|
|
420
|
+
readonly __wbg_userdecryptionrequest_free: (a: number, b: number) => void;
|
|
421
|
+
readonly __wbg_get_userdecryptionrequest_request_id: (a: number) => number;
|
|
422
|
+
readonly __wbg_set_userdecryptionrequest_request_id: (a: number, b: number) => void;
|
|
423
|
+
readonly __wbg_get_userdecryptionrequest_typed_ciphertexts: (a: number) => [number, number];
|
|
424
|
+
readonly __wbg_set_userdecryptionrequest_typed_ciphertexts: (a: number, b: number, c: number) => void;
|
|
425
|
+
readonly __wbg_get_userdecryptionrequest_key_id: (a: number) => number;
|
|
426
|
+
readonly __wbg_set_userdecryptionrequest_key_id: (a: number, b: number) => void;
|
|
427
|
+
readonly __wbg_get_userdecryptionrequest_client_address: (a: number) => [number, number];
|
|
428
|
+
readonly __wbg_get_userdecryptionrequest_domain: (a: number) => number;
|
|
429
|
+
readonly __wbg_set_userdecryptionrequest_domain: (a: number, b: number) => void;
|
|
430
|
+
readonly __wbg_get_userdecryptionrequest_extra_data: (a: number) => [number, number];
|
|
431
|
+
readonly __wbg_userdecryptionresponse_free: (a: number, b: number) => void;
|
|
432
|
+
readonly __wbg_get_userdecryptionresponse_payload: (a: number) => number;
|
|
433
|
+
readonly __wbg_set_userdecryptionresponse_payload: (a: number, b: number) => void;
|
|
434
|
+
readonly __wbg_userdecryptionresponsepayload_free: (a: number, b: number) => void;
|
|
435
|
+
readonly __wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts: (a: number) => [number, number];
|
|
436
|
+
readonly __wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts: (a: number, b: number, c: number) => void;
|
|
437
|
+
readonly __wbg_get_userdecryptionresponsepayload_party_id: (a: number) => number;
|
|
438
|
+
readonly __wbg_set_userdecryptionresponsepayload_party_id: (a: number, b: number) => void;
|
|
439
|
+
readonly __wbg_get_userdecryptionresponsepayload_degree: (a: number) => number;
|
|
440
|
+
readonly __wbg_set_userdecryptionresponsepayload_degree: (a: number, b: number) => void;
|
|
441
|
+
readonly __wbg_typedplaintext_free: (a: number, b: number) => void;
|
|
442
|
+
readonly __wbg_get_typedplaintext_fhe_type: (a: number) => number;
|
|
443
|
+
readonly __wbg_set_typedplaintext_fhe_type: (a: number, b: number) => void;
|
|
410
444
|
readonly __wbg_typedsigncryptedciphertext_free: (a: number, b: number) => void;
|
|
411
|
-
readonly
|
|
412
|
-
readonly
|
|
413
|
-
readonly __wbg_get_typedsigncryptedciphertext_fhe_type: (a: number) => number;
|
|
414
|
-
readonly __wbg_get_typedsigncryptedciphertext_packing_factor: (a: number) => number;
|
|
445
|
+
readonly __wbg_set_typedsigncryptedciphertext_fhe_type: (a: number, b: number) => void;
|
|
446
|
+
readonly __wbg_set_typedsigncryptedciphertext_packing_factor: (a: number, b: number) => void;
|
|
415
447
|
readonly __wbg_set_typedciphertext_ciphertext: (a: number, b: number, c: number) => void;
|
|
416
|
-
readonly __wbg_set_typedplaintext_bytes: (a: number, b: number, c: number) => void;
|
|
417
448
|
readonly __wbg_set_requestid_request_id: (a: number, b: number, c: number) => void;
|
|
418
449
|
readonly __wbg_set_typedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
419
|
-
readonly
|
|
420
|
-
readonly
|
|
421
|
-
readonly
|
|
422
|
-
readonly
|
|
423
|
-
readonly
|
|
424
|
-
readonly
|
|
450
|
+
readonly __wbg_set_userdecryptionrequest_client_address: (a: number, b: number, c: number) => void;
|
|
451
|
+
readonly __wbg_set_userdecryptionrequest_enc_key: (a: number, b: number, c: number) => void;
|
|
452
|
+
readonly __wbg_set_userdecryptionrequest_extra_data: (a: number, b: number, c: number) => void;
|
|
453
|
+
readonly __wbg_set_userdecryptionresponse_signature: (a: number, b: number, c: number) => void;
|
|
454
|
+
readonly __wbg_set_userdecryptionresponse_external_signature: (a: number, b: number, c: number) => void;
|
|
455
|
+
readonly __wbg_set_userdecryptionresponse_extra_data: (a: number, b: number, c: number) => void;
|
|
456
|
+
readonly __wbg_set_userdecryptionresponsepayload_verification_key: (a: number, b: number, c: number) => void;
|
|
457
|
+
readonly __wbg_set_userdecryptionresponsepayload_digest: (a: number, b: number, c: number) => void;
|
|
458
|
+
readonly __wbg_set_typedplaintext_bytes: (a: number, b: number, c: number) => void;
|
|
425
459
|
readonly __wbg_set_typedsigncryptedciphertext_signcrypted_ciphertext: (a: number, b: number, c: number) => void;
|
|
426
460
|
readonly __wbg_set_typedsigncryptedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
461
|
+
readonly __wbg_get_userdecryptionrequest_enc_key: (a: number) => [number, number];
|
|
462
|
+
readonly __wbg_get_userdecryptionresponse_signature: (a: number) => [number, number];
|
|
463
|
+
readonly __wbg_get_userdecryptionresponse_external_signature: (a: number) => [number, number];
|
|
464
|
+
readonly __wbg_get_userdecryptionresponse_extra_data: (a: number) => [number, number];
|
|
465
|
+
readonly __wbg_get_userdecryptionresponsepayload_verification_key: (a: number) => [number, number];
|
|
466
|
+
readonly __wbg_get_userdecryptionresponsepayload_digest: (a: number) => [number, number];
|
|
427
467
|
readonly __wbg_get_typedplaintext_bytes: (a: number) => [number, number];
|
|
428
|
-
readonly __wbg_get_reencryptionrequest_enc_key: (a: number) => [number, number];
|
|
429
|
-
readonly __wbg_get_typedciphertext_ciphertext: (a: number) => [number, number];
|
|
430
|
-
readonly __wbg_get_typedciphertext_external_handle: (a: number) => [number, number];
|
|
431
|
-
readonly __wbg_get_reencryptionresponsepayload_verification_key: (a: number) => [number, number];
|
|
432
|
-
readonly __wbg_get_reencryptionresponsepayload_digest: (a: number) => [number, number];
|
|
433
468
|
readonly __wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext: (a: number) => [number, number];
|
|
434
469
|
readonly __wbg_get_typedsigncryptedciphertext_external_handle: (a: number) => [number, number];
|
|
435
|
-
readonly
|
|
436
|
-
readonly
|
|
470
|
+
readonly __wbg_get_typedsigncryptedciphertext_fhe_type: (a: number) => number;
|
|
471
|
+
readonly __wbg_get_typedsigncryptedciphertext_packing_factor: (a: number) => number;
|
|
437
472
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
438
473
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
439
474
|
readonly __wbindgen_exn_store: (a: number) => void;
|