tkms 0.9.1-rc3 → 0.11.0-rc3
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 +187 -216
- package/kms_lib.js +577 -365
- package/kms_lib_bg.wasm +0 -0
- package/package.json +1 -1
package/kms_lib.d.ts
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* @param {PublicSigKey} pk
|
|
5
|
-
* @returns {Uint8Array}
|
|
6
|
-
*/
|
|
7
3
|
export function public_sig_key_to_u8vec(pk: PublicSigKey): Uint8Array;
|
|
8
|
-
/**
|
|
9
|
-
* @param {Uint8Array} v
|
|
10
|
-
* @returns {PublicSigKey}
|
|
11
|
-
*/
|
|
12
4
|
export function u8vec_to_public_sig_key(v: Uint8Array): PublicSigKey;
|
|
13
|
-
/**
|
|
14
|
-
* @param {PrivateSigKey} sk
|
|
15
|
-
* @returns {Uint8Array}
|
|
16
|
-
*/
|
|
17
5
|
export function private_sig_key_to_u8vec(sk: PrivateSigKey): Uint8Array;
|
|
18
|
-
/**
|
|
19
|
-
* @param {Uint8Array} v
|
|
20
|
-
* @returns {PrivateSigKey}
|
|
21
|
-
*/
|
|
22
6
|
export function u8vec_to_private_sig_key(v: Uint8Array): PrivateSigKey;
|
|
23
7
|
/**
|
|
24
8
|
* Instantiate a new client.
|
|
@@ -29,71 +13,20 @@ export function u8vec_to_private_sig_key(v: Uint8Array): PrivateSigKey;
|
|
|
29
13
|
* * `client_address_hex` - the client (wallet) address in hex,
|
|
30
14
|
* must be prefixed with "0x".
|
|
31
15
|
*
|
|
32
|
-
* * `
|
|
16
|
+
* * `fhe_parameter` - the parameter choice, which can be either `"test"` or `"default"`.
|
|
33
17
|
* The "default" parameter choice is selected if no matching string is found.
|
|
34
|
-
* @param {(string)[]} server_addrs
|
|
35
|
-
* @param {string} client_address_hex
|
|
36
|
-
* @param {string} param_choice
|
|
37
|
-
* @returns {Client}
|
|
38
|
-
*/
|
|
39
|
-
export function new_client(server_addrs: (string)[], client_address_hex: string, param_choice: string): Client;
|
|
40
|
-
/**
|
|
41
|
-
* @param {Client} client
|
|
42
|
-
* @returns {(string)[]}
|
|
43
18
|
*/
|
|
19
|
+
export function new_client(server_addrs: (string)[], client_address_hex: string, fhe_parameter: string): Client;
|
|
44
20
|
export function get_server_addrs(client: Client): (string)[];
|
|
45
|
-
/**
|
|
46
|
-
* @param {Client} client
|
|
47
|
-
* @returns {PrivateSigKey | undefined}
|
|
48
|
-
*/
|
|
49
21
|
export function get_client_secret_key(client: Client): PrivateSigKey | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* @param {Client} client
|
|
52
|
-
* @returns {string}
|
|
53
|
-
*/
|
|
54
22
|
export function get_client_address(client: Client): string;
|
|
55
|
-
/**
|
|
56
|
-
* @returns {PrivateEncKey}
|
|
57
|
-
*/
|
|
58
23
|
export function cryptobox_keygen(): PrivateEncKey;
|
|
59
|
-
/**
|
|
60
|
-
* @param {PrivateEncKey} sk
|
|
61
|
-
* @returns {PublicEncKey}
|
|
62
|
-
*/
|
|
63
24
|
export function cryptobox_get_pk(sk: PrivateEncKey): PublicEncKey;
|
|
64
|
-
/**
|
|
65
|
-
* @param {PublicEncKey} pk
|
|
66
|
-
* @returns {Uint8Array}
|
|
67
|
-
*/
|
|
68
25
|
export function cryptobox_pk_to_u8vec(pk: PublicEncKey): Uint8Array;
|
|
69
|
-
/**
|
|
70
|
-
* @param {PrivateEncKey} sk
|
|
71
|
-
* @returns {Uint8Array}
|
|
72
|
-
*/
|
|
73
26
|
export function cryptobox_sk_to_u8vec(sk: PrivateEncKey): Uint8Array;
|
|
74
|
-
/**
|
|
75
|
-
* @param {Uint8Array} v
|
|
76
|
-
* @returns {PublicEncKey}
|
|
77
|
-
*/
|
|
78
27
|
export function u8vec_to_cryptobox_pk(v: Uint8Array): PublicEncKey;
|
|
79
|
-
/**
|
|
80
|
-
* @param {Uint8Array} v
|
|
81
|
-
* @returns {PrivateEncKey}
|
|
82
|
-
*/
|
|
83
28
|
export function u8vec_to_cryptobox_sk(v: Uint8Array): PrivateEncKey;
|
|
84
|
-
/**
|
|
85
|
-
* @param {Uint8Array} msg
|
|
86
|
-
* @param {PublicEncKey} their_pk
|
|
87
|
-
* @param {PrivateEncKey} my_sk
|
|
88
|
-
* @returns {CryptoBoxCt}
|
|
89
|
-
*/
|
|
90
29
|
export function cryptobox_encrypt(msg: Uint8Array, their_pk: PublicEncKey, my_sk: PrivateEncKey): CryptoBoxCt;
|
|
91
|
-
/**
|
|
92
|
-
* @param {CryptoBoxCt} ct
|
|
93
|
-
* @param {PrivateEncKey} my_sk
|
|
94
|
-
* @param {PublicEncKey} their_pk
|
|
95
|
-
* @returns {Uint8Array}
|
|
96
|
-
*/
|
|
97
30
|
export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_pk: PublicEncKey): Uint8Array;
|
|
98
31
|
/**
|
|
99
32
|
* Process the reencryption response from JavaScript objects.
|
|
@@ -153,16 +86,8 @@ export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_p
|
|
|
153
86
|
*
|
|
154
87
|
* * `verify` - Whether to perform signature verification for the response.
|
|
155
88
|
* It is insecure if `verify = false`!
|
|
156
|
-
* @param {Client} client
|
|
157
|
-
* @param {any} request
|
|
158
|
-
* @param {any} eip712_domain
|
|
159
|
-
* @param {any} agg_resp
|
|
160
|
-
* @param {PublicEncKey} enc_pk
|
|
161
|
-
* @param {PrivateEncKey} enc_sk
|
|
162
|
-
* @param {boolean} verify
|
|
163
|
-
* @returns {Uint8Array}
|
|
164
89
|
*/
|
|
165
|
-
export function process_reencryption_resp_from_js(client: Client, request: any, eip712_domain: any, agg_resp: any, enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean):
|
|
90
|
+
export function process_reencryption_resp_from_js(client: Client, request: any, eip712_domain: any, agg_resp: any, enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean): (TypedPlaintext)[];
|
|
166
91
|
/**
|
|
167
92
|
* Process the reencryption response from Rust objects.
|
|
168
93
|
* Consider using [process_reencryption_resp_from_js]
|
|
@@ -185,16 +110,8 @@ export function process_reencryption_resp_from_js(client: Client, request: any,
|
|
|
185
110
|
*
|
|
186
111
|
* * `verify` - Whether to perform signature verification for the response.
|
|
187
112
|
* It is insecure if `verify = false`!
|
|
188
|
-
* @param {Client} client
|
|
189
|
-
* @param {ParsedReencryptionRequest | undefined} request
|
|
190
|
-
* @param {Eip712DomainMsg | undefined} eip712_domain
|
|
191
|
-
* @param {(ReencryptionResponse)[]} agg_resp
|
|
192
|
-
* @param {PublicEncKey} enc_pk
|
|
193
|
-
* @param {PrivateEncKey} enc_sk
|
|
194
|
-
* @param {boolean} verify
|
|
195
|
-
* @returns {Uint8Array}
|
|
196
113
|
*/
|
|
197
|
-
export function process_reencryption_resp(client: Client, request: ParsedReencryptionRequest | undefined, eip712_domain: Eip712DomainMsg | undefined, agg_resp: (ReencryptionResponse)[], enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean):
|
|
114
|
+
export function process_reencryption_resp(client: Client, request: ParsedReencryptionRequest | undefined, eip712_domain: Eip712DomainMsg | undefined, agg_resp: (ReencryptionResponse)[], enc_pk: PublicEncKey, enc_sk: PrivateEncKey, verify: boolean): (TypedPlaintext)[];
|
|
198
115
|
/**
|
|
199
116
|
* The plaintext types that can be encrypted in a fhevm ciphertext.
|
|
200
117
|
*/
|
|
@@ -212,6 +129,10 @@ export enum FheType {
|
|
|
212
129
|
Euint1024 = 10,
|
|
213
130
|
Euint2048 = 11,
|
|
214
131
|
}
|
|
132
|
+
export class CiphertextHandle {
|
|
133
|
+
private constructor();
|
|
134
|
+
free(): void;
|
|
135
|
+
}
|
|
215
136
|
/**
|
|
216
137
|
* Core Client
|
|
217
138
|
*
|
|
@@ -220,9 +141,11 @@ export enum FheType {
|
|
|
220
141
|
* distributed across the aggregator/proxy and smart contracts.
|
|
221
142
|
*/
|
|
222
143
|
export class Client {
|
|
144
|
+
private constructor();
|
|
223
145
|
free(): void;
|
|
224
146
|
}
|
|
225
147
|
export class CryptoBoxCt {
|
|
148
|
+
private constructor();
|
|
226
149
|
free(): void;
|
|
227
150
|
}
|
|
228
151
|
/**
|
|
@@ -231,185 +154,231 @@ export class CryptoBoxCt {
|
|
|
231
154
|
* solidity types
|
|
232
155
|
*/
|
|
233
156
|
export class Eip712DomainMsg {
|
|
157
|
+
private constructor();
|
|
234
158
|
free(): void;
|
|
235
|
-
chain_id: Uint8Array;
|
|
236
159
|
name: string;
|
|
237
|
-
salt?: Uint8Array;
|
|
238
|
-
verifying_contract: string;
|
|
239
160
|
version: string;
|
|
161
|
+
chain_id: Uint8Array;
|
|
162
|
+
verifying_contract: string;
|
|
163
|
+
salt?: Uint8Array;
|
|
240
164
|
}
|
|
241
165
|
/**
|
|
242
166
|
* Validity of this struct is not checked.
|
|
243
167
|
*/
|
|
244
168
|
export class ParsedReencryptionRequest {
|
|
169
|
+
private constructor();
|
|
245
170
|
free(): void;
|
|
246
171
|
}
|
|
247
172
|
export class PrivateEncKey {
|
|
173
|
+
private constructor();
|
|
248
174
|
free(): void;
|
|
249
175
|
}
|
|
250
176
|
export class PrivateSigKey {
|
|
177
|
+
private constructor();
|
|
251
178
|
free(): void;
|
|
252
179
|
}
|
|
253
180
|
export class PublicEncKey {
|
|
181
|
+
private constructor();
|
|
254
182
|
free(): void;
|
|
255
183
|
}
|
|
256
184
|
export class PublicSigKey {
|
|
185
|
+
private constructor();
|
|
257
186
|
free(): void;
|
|
258
187
|
}
|
|
259
188
|
export class ReencryptionRequest {
|
|
189
|
+
private constructor();
|
|
260
190
|
free(): void;
|
|
261
|
-
domain?: Eip712DomainMsg;
|
|
262
191
|
payload?: ReencryptionRequestPayload;
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
192
|
+
domain?: Eip712DomainMsg;
|
|
193
|
+
/**
|
|
194
|
+
* The ID that identifies this request.
|
|
195
|
+
* Future queries for the result must use this request ID.
|
|
196
|
+
*/
|
|
267
197
|
request_id?: RequestId;
|
|
268
|
-
/**
|
|
269
|
-
* Signature of the serialization of \[ReencryptionRequestPayload\].
|
|
270
|
-
*/
|
|
271
|
-
signature: Uint8Array;
|
|
272
198
|
}
|
|
273
199
|
export class ReencryptionRequestPayload {
|
|
200
|
+
private constructor();
|
|
274
201
|
free(): void;
|
|
275
|
-
/**
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
* ciphertext for the given digest below.
|
|
280
|
-
*/
|
|
281
|
-
ciphertext?: Uint8Array;
|
|
282
|
-
/**
|
|
283
|
-
* The SHA3 digest of the ciphertext above.
|
|
284
|
-
*/
|
|
285
|
-
ciphertext_digest: Uint8Array;
|
|
286
|
-
/**
|
|
287
|
-
* The client's (blockchain wallet) address,
|
|
288
|
-
* encoded using EIP-55.
|
|
289
|
-
*/
|
|
202
|
+
/**
|
|
203
|
+
* The client's (blockchain wallet) address,
|
|
204
|
+
* encoded using EIP-55.
|
|
205
|
+
*/
|
|
290
206
|
client_address: string;
|
|
291
|
-
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
207
|
+
/**
|
|
208
|
+
* Encoding of the user's public encryption key for this request.
|
|
209
|
+
* Encoding using the default encoding of libsodium, i.e. the 32 bytes of a
|
|
210
|
+
* Montgomery point.
|
|
211
|
+
*/
|
|
296
212
|
enc_key: Uint8Array;
|
|
297
|
-
/**
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* The key id to use for decryption. Will be the request_id used during key
|
|
303
|
-
* generation
|
|
304
|
-
*/
|
|
213
|
+
/**
|
|
214
|
+
* The key id to use for decryption. Will be the request_id used during key
|
|
215
|
+
* generation
|
|
216
|
+
*/
|
|
305
217
|
key_id?: RequestId;
|
|
306
|
-
/**
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
218
|
+
/**
|
|
219
|
+
* The list of ciphertexts to reencrypt.
|
|
220
|
+
*/
|
|
221
|
+
typed_ciphertexts: (TypedCiphertext)[];
|
|
310
222
|
}
|
|
311
223
|
export class ReencryptionResponse {
|
|
224
|
+
private constructor();
|
|
312
225
|
free(): void;
|
|
313
|
-
/**
|
|
314
|
-
* Signature of the serialization of \[ReencryptionResponsePayload\].
|
|
315
|
-
*/
|
|
316
|
-
payload?: ReencryptionResponsePayload;
|
|
317
226
|
signature: Uint8Array;
|
|
227
|
+
/**
|
|
228
|
+
* Signature of the serialization of \[ReencryptionResponsePayload\].
|
|
229
|
+
*/
|
|
230
|
+
payload?: ReencryptionResponsePayload;
|
|
318
231
|
}
|
|
319
232
|
export class ReencryptionResponsePayload {
|
|
233
|
+
private constructor();
|
|
320
234
|
free(): void;
|
|
321
|
-
/**
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
235
|
+
/**
|
|
236
|
+
* The server's signature verification key.
|
|
237
|
+
* Encoded using SEC1.
|
|
238
|
+
* Needed to validate the response, but MUST also be linked to a list of
|
|
239
|
+
* trusted keys.
|
|
240
|
+
*/
|
|
241
|
+
verification_key: Uint8Array;
|
|
242
|
+
/**
|
|
243
|
+
* The concatenation of two digests:
|
|
244
|
+
* (eip712_signing_hash(pk, domain) || ciphertext digest).
|
|
245
|
+
* This is needed to ensure the response corresponds to the request.
|
|
246
|
+
*/
|
|
330
247
|
digest: Uint8Array;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
* The ID of the MPC party doing the reencryption. Used for polynomial
|
|
337
|
-
* reconstruction.
|
|
338
|
-
*/
|
|
248
|
+
signcrypted_ciphertexts: (TypedSigncryptedCiphertext)[];
|
|
249
|
+
/**
|
|
250
|
+
* The ID of the MPC party doing the reencryption. Used for polynomial
|
|
251
|
+
* reconstruction.
|
|
252
|
+
*/
|
|
339
253
|
party_id: number;
|
|
340
|
-
/**
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
*/
|
|
355
|
-
version: number;
|
|
254
|
+
/**
|
|
255
|
+
* The degree of the sharing scheme used.
|
|
256
|
+
*/
|
|
257
|
+
degree: number;
|
|
258
|
+
/**
|
|
259
|
+
* This is the external signature created from the Eip712 domain
|
|
260
|
+
* on the structure, where reencryptedShare is bincode::serialize(&signcrypted_ciphertexts)
|
|
261
|
+
* struct UserDecryptionResult {
|
|
262
|
+
* bytes publicKey;
|
|
263
|
+
* uint256\[\] handles;
|
|
264
|
+
* bytes reencryptedShare;
|
|
265
|
+
* }
|
|
266
|
+
*/
|
|
267
|
+
external_signature: Uint8Array;
|
|
356
268
|
}
|
|
357
269
|
/**
|
|
358
270
|
* Simple response to return an ID, to be used to retrieve the computed result
|
|
359
271
|
* later on.
|
|
360
272
|
*/
|
|
361
273
|
export class RequestId {
|
|
274
|
+
private constructor();
|
|
362
275
|
free(): void;
|
|
363
276
|
request_id: string;
|
|
364
277
|
}
|
|
278
|
+
export class TypedCiphertext {
|
|
279
|
+
private constructor();
|
|
280
|
+
free(): void;
|
|
281
|
+
/**
|
|
282
|
+
* The actual ciphertext to decrypt, taken directly from the fhevm.
|
|
283
|
+
*/
|
|
284
|
+
ciphertext: Uint8Array;
|
|
285
|
+
/**
|
|
286
|
+
* The type of plaintext encrypted.
|
|
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
|
+
/**
|
|
295
|
+
* The typed plaintext type, which is the result of decryption.
|
|
296
|
+
*/
|
|
297
|
+
export class TypedPlaintext {
|
|
298
|
+
private constructor();
|
|
299
|
+
free(): void;
|
|
300
|
+
/**
|
|
301
|
+
* The actual plaintext in bytes.
|
|
302
|
+
*/
|
|
303
|
+
bytes: Uint8Array;
|
|
304
|
+
/**
|
|
305
|
+
* The type of plaintext encrypted.
|
|
306
|
+
*/
|
|
307
|
+
fhe_type: number;
|
|
308
|
+
}
|
|
309
|
+
export class TypedSigncryptedCiphertext {
|
|
310
|
+
private constructor();
|
|
311
|
+
free(): void;
|
|
312
|
+
/**
|
|
313
|
+
* The type of plaintext encrypted.
|
|
314
|
+
*/
|
|
315
|
+
fhe_type: number;
|
|
316
|
+
/**
|
|
317
|
+
* The signcrypted payload, using a hybrid encryption approach in
|
|
318
|
+
* sign-then-encrypt.
|
|
319
|
+
*/
|
|
320
|
+
signcrypted_ciphertext: Uint8Array;
|
|
321
|
+
/**
|
|
322
|
+
* The external handles that were originally in the request.
|
|
323
|
+
*/
|
|
324
|
+
external_handle: Uint8Array;
|
|
325
|
+
}
|
|
365
326
|
|
|
366
327
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
367
328
|
|
|
368
329
|
export interface InitOutput {
|
|
369
330
|
readonly memory: WebAssembly.Memory;
|
|
370
331
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
332
|
+
readonly __wbg_ciphertexthandle_free: (a: number, b: number) => void;
|
|
371
333
|
readonly __wbg_parsedreencryptionrequest_free: (a: number, b: number) => void;
|
|
372
|
-
readonly public_sig_key_to_u8vec: (a: number) =>
|
|
373
|
-
readonly u8vec_to_public_sig_key: (a: number, b: number) =>
|
|
374
|
-
readonly private_sig_key_to_u8vec: (a: number) =>
|
|
375
|
-
readonly u8vec_to_private_sig_key: (a: number, b: number) =>
|
|
376
|
-
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) =>
|
|
377
|
-
readonly get_server_addrs: (a: number) =>
|
|
334
|
+
readonly public_sig_key_to_u8vec: (a: number) => [number, number];
|
|
335
|
+
readonly u8vec_to_public_sig_key: (a: number, b: number) => [number, number, number];
|
|
336
|
+
readonly private_sig_key_to_u8vec: (a: number) => [number, number, number, number];
|
|
337
|
+
readonly u8vec_to_private_sig_key: (a: number, b: number) => [number, number, number];
|
|
338
|
+
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
339
|
+
readonly get_server_addrs: (a: number) => [number, number];
|
|
378
340
|
readonly get_client_secret_key: (a: number) => number;
|
|
379
|
-
readonly get_client_address: (a: number) =>
|
|
341
|
+
readonly get_client_address: (a: number) => [number, number];
|
|
380
342
|
readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
|
|
381
343
|
readonly cryptobox_keygen: () => number;
|
|
382
344
|
readonly cryptobox_get_pk: (a: number) => number;
|
|
383
|
-
readonly cryptobox_pk_to_u8vec: (a: number) =>
|
|
384
|
-
readonly cryptobox_sk_to_u8vec: (a: number) =>
|
|
385
|
-
readonly u8vec_to_cryptobox_pk: (a: number, b: number) =>
|
|
386
|
-
readonly u8vec_to_cryptobox_sk: (a: number, b: number) =>
|
|
345
|
+
readonly cryptobox_pk_to_u8vec: (a: number) => [number, number, number, number];
|
|
346
|
+
readonly cryptobox_sk_to_u8vec: (a: number) => [number, number, number, number];
|
|
347
|
+
readonly u8vec_to_cryptobox_pk: (a: number, b: number) => [number, number, number];
|
|
348
|
+
readonly u8vec_to_cryptobox_sk: (a: number, b: number) => [number, number, number];
|
|
387
349
|
readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
|
|
388
|
-
readonly cryptobox_decrypt: (a: number, b: number, c: number) =>
|
|
389
|
-
readonly process_reencryption_resp_from_js: (a: number, b:
|
|
390
|
-
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) =>
|
|
350
|
+
readonly cryptobox_decrypt: (a: number, b: number, c: number) => [number, number];
|
|
351
|
+
readonly process_reencryption_resp_from_js: (a: number, b: any, c: any, d: any, e: number, f: number, g: number) => [number, number, number, number];
|
|
352
|
+
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
353
|
+
readonly __wbg_publicenckey_free: (a: number, b: number) => void;
|
|
354
|
+
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
355
|
+
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
356
|
+
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
391
357
|
readonly __wbg_requestid_free: (a: number, b: number) => void;
|
|
358
|
+
readonly __wbg_typedciphertext_free: (a: number, b: number) => void;
|
|
359
|
+
readonly __wbg_get_typedciphertext_fhe_type: (a: number) => number;
|
|
360
|
+
readonly __wbg_set_typedciphertext_fhe_type: (a: number, b: number) => void;
|
|
361
|
+
readonly __wbg_typedplaintext_free: (a: number, b: number) => void;
|
|
362
|
+
readonly __wbg_get_typedplaintext_fhe_type: (a: number) => number;
|
|
363
|
+
readonly __wbg_set_typedplaintext_fhe_type: (a: number, b: number) => void;
|
|
392
364
|
readonly __wbg_reencryptionrequestpayload_free: (a: number, b: number) => void;
|
|
393
|
-
readonly
|
|
394
|
-
readonly __wbg_set_reencryptionrequestpayload_version: (a: number, b: number) => void;
|
|
395
|
-
readonly __wbg_get_reencryptionrequestpayload_enc_key: (a: number) => Array;
|
|
396
|
-
readonly __wbg_get_reencryptionrequestpayload_fhe_type: (a: number) => number;
|
|
397
|
-
readonly __wbg_set_reencryptionrequestpayload_fhe_type: (a: number, b: number) => void;
|
|
365
|
+
readonly __wbg_get_reencryptionrequestpayload_enc_key: (a: number) => [number, number];
|
|
398
366
|
readonly __wbg_get_reencryptionrequestpayload_key_id: (a: number) => number;
|
|
399
367
|
readonly __wbg_set_reencryptionrequestpayload_key_id: (a: number, b: number) => void;
|
|
368
|
+
readonly __wbg_get_reencryptionrequestpayload_typed_ciphertexts: (a: number) => [number, number];
|
|
369
|
+
readonly __wbg_set_reencryptionrequestpayload_typed_ciphertexts: (a: number, b: number, c: number) => void;
|
|
400
370
|
readonly __wbg_eip712domainmsg_free: (a: number, b: number) => void;
|
|
401
|
-
readonly __wbg_get_eip712domainmsg_name: (a: number) =>
|
|
371
|
+
readonly __wbg_get_eip712domainmsg_name: (a: number) => [number, number];
|
|
402
372
|
readonly __wbg_set_eip712domainmsg_name: (a: number, b: number, c: number) => void;
|
|
403
|
-
readonly __wbg_get_eip712domainmsg_version: (a: number) =>
|
|
373
|
+
readonly __wbg_get_eip712domainmsg_version: (a: number) => [number, number];
|
|
404
374
|
readonly __wbg_set_eip712domainmsg_version: (a: number, b: number, c: number) => void;
|
|
405
|
-
readonly __wbg_get_eip712domainmsg_chain_id: (a: number) =>
|
|
375
|
+
readonly __wbg_get_eip712domainmsg_chain_id: (a: number) => [number, number];
|
|
406
376
|
readonly __wbg_set_eip712domainmsg_chain_id: (a: number, b: number, c: number) => void;
|
|
407
|
-
readonly __wbg_get_eip712domainmsg_verifying_contract: (a: number) =>
|
|
377
|
+
readonly __wbg_get_eip712domainmsg_verifying_contract: (a: number) => [number, number];
|
|
408
378
|
readonly __wbg_set_eip712domainmsg_verifying_contract: (a: number, b: number, c: number) => void;
|
|
409
|
-
readonly __wbg_get_eip712domainmsg_salt: (a: number) =>
|
|
379
|
+
readonly __wbg_get_eip712domainmsg_salt: (a: number) => [number, number];
|
|
410
380
|
readonly __wbg_set_eip712domainmsg_salt: (a: number, b: number, c: number) => void;
|
|
411
381
|
readonly __wbg_reencryptionrequest_free: (a: number, b: number) => void;
|
|
412
|
-
readonly __wbg_get_reencryptionrequest_signature: (a: number) => Array;
|
|
413
382
|
readonly __wbg_get_reencryptionrequest_payload: (a: number) => number;
|
|
414
383
|
readonly __wbg_set_reencryptionrequest_payload: (a: number, b: number) => void;
|
|
415
384
|
readonly __wbg_get_reencryptionrequest_domain: (a: number) => number;
|
|
@@ -417,47 +386,49 @@ export interface InitOutput {
|
|
|
417
386
|
readonly __wbg_get_reencryptionrequest_request_id: (a: number) => number;
|
|
418
387
|
readonly __wbg_set_reencryptionrequest_request_id: (a: number, b: number) => void;
|
|
419
388
|
readonly __wbg_reencryptionresponse_free: (a: number, b: number) => void;
|
|
389
|
+
readonly __wbg_get_reencryptionresponse_signature: (a: number) => [number, number];
|
|
420
390
|
readonly __wbg_get_reencryptionresponse_payload: (a: number) => number;
|
|
421
391
|
readonly __wbg_set_reencryptionresponse_payload: (a: number, b: number) => void;
|
|
422
392
|
readonly __wbg_reencryptionresponsepayload_free: (a: number, b: number) => void;
|
|
423
|
-
readonly
|
|
424
|
-
readonly
|
|
425
|
-
readonly __wbg_get_reencryptionresponsepayload_fhe_type: (a: number) => number;
|
|
426
|
-
readonly __wbg_set_reencryptionresponsepayload_fhe_type: (a: number, b: number) => void;
|
|
393
|
+
readonly __wbg_get_reencryptionresponsepayload_signcrypted_ciphertexts: (a: number) => [number, number];
|
|
394
|
+
readonly __wbg_set_reencryptionresponsepayload_signcrypted_ciphertexts: (a: number, b: number, c: number) => void;
|
|
427
395
|
readonly __wbg_get_reencryptionresponsepayload_party_id: (a: number) => number;
|
|
428
396
|
readonly __wbg_set_reencryptionresponsepayload_party_id: (a: number, b: number) => void;
|
|
429
397
|
readonly __wbg_get_reencryptionresponsepayload_degree: (a: number) => number;
|
|
430
398
|
readonly __wbg_set_reencryptionresponsepayload_degree: (a: number, b: number) => void;
|
|
399
|
+
readonly __wbg_get_reencryptionresponsepayload_external_signature: (a: number) => [number, number];
|
|
400
|
+
readonly __wbg_typedsigncryptedciphertext_free: (a: number, b: number) => void;
|
|
401
|
+
readonly __wbg_get_typedsigncryptedciphertext_fhe_type: (a: number) => number;
|
|
402
|
+
readonly __wbg_set_typedciphertext_ciphertext: (a: number, b: number, c: number) => void;
|
|
403
|
+
readonly __wbg_set_typedplaintext_bytes: (a: number, b: number, c: number) => void;
|
|
431
404
|
readonly __wbg_set_requestid_request_id: (a: number, b: number, c: number) => void;
|
|
405
|
+
readonly __wbg_set_typedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
432
406
|
readonly __wbg_set_reencryptionrequestpayload_client_address: (a: number, b: number, c: number) => void;
|
|
433
407
|
readonly __wbg_set_reencryptionrequestpayload_enc_key: (a: number, b: number, c: number) => void;
|
|
434
|
-
readonly __wbg_set_reencryptionrequestpayload_ciphertext_digest: (a: number, b: number, c: number) => void;
|
|
435
|
-
readonly __wbg_set_reencryptionrequest_signature: (a: number, b: number, c: number) => void;
|
|
436
408
|
readonly __wbg_set_reencryptionresponse_signature: (a: number, b: number, c: number) => void;
|
|
437
409
|
readonly __wbg_set_reencryptionresponsepayload_verification_key: (a: number, b: number, c: number) => void;
|
|
438
410
|
readonly __wbg_set_reencryptionresponsepayload_digest: (a: number, b: number, c: number) => void;
|
|
439
|
-
readonly
|
|
440
|
-
readonly
|
|
441
|
-
readonly
|
|
442
|
-
readonly
|
|
443
|
-
readonly
|
|
444
|
-
readonly
|
|
445
|
-
readonly
|
|
446
|
-
readonly
|
|
447
|
-
readonly
|
|
448
|
-
readonly
|
|
449
|
-
readonly
|
|
450
|
-
readonly
|
|
451
|
-
readonly
|
|
452
|
-
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
411
|
+
readonly __wbg_set_reencryptionresponsepayload_external_signature: (a: number, b: number, c: number) => void;
|
|
412
|
+
readonly __wbg_set_typedsigncryptedciphertext_signcrypted_ciphertext: (a: number, b: number, c: number) => void;
|
|
413
|
+
readonly __wbg_set_typedsigncryptedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
414
|
+
readonly __wbg_get_requestid_request_id: (a: number) => [number, number];
|
|
415
|
+
readonly __wbg_get_reencryptionrequestpayload_client_address: (a: number) => [number, number];
|
|
416
|
+
readonly __wbg_get_typedplaintext_bytes: (a: number) => [number, number];
|
|
417
|
+
readonly __wbg_get_typedciphertext_external_handle: (a: number) => [number, number];
|
|
418
|
+
readonly __wbg_get_typedciphertext_ciphertext: (a: number) => [number, number];
|
|
419
|
+
readonly __wbg_get_reencryptionresponsepayload_verification_key: (a: number) => [number, number];
|
|
420
|
+
readonly __wbg_get_reencryptionresponsepayload_digest: (a: number) => [number, number];
|
|
421
|
+
readonly __wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext: (a: number) => [number, number];
|
|
422
|
+
readonly __wbg_get_typedsigncryptedciphertext_external_handle: (a: number) => [number, number];
|
|
423
|
+
readonly __wbg_set_typedsigncryptedciphertext_fhe_type: (a: number, b: number) => void;
|
|
453
424
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
454
425
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
455
|
-
readonly
|
|
426
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
427
|
+
readonly __externref_table_alloc: () => number;
|
|
428
|
+
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
456
429
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
457
430
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
458
|
-
readonly __externref_table_alloc: () => number;
|
|
459
431
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
460
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
461
432
|
readonly __wbindgen_start: () => void;
|
|
462
433
|
}
|
|
463
434
|
|