tkms 0.10.0-rc1 → 0.11.0-rc5
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 +215 -240
- package/kms_lib.js +678 -489
- package/kms_lib_bg.wasm +0 -0
- package/package.json +1 -1
- package/LICENSE +0 -28
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.
|
|
@@ -106,12 +39,13 @@ export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_p
|
|
|
106
39
|
* It can be set to null if `verify` is false.
|
|
107
40
|
* Otherwise the caller needs to give the following JS object.
|
|
108
41
|
* Note that `client_address` and `eip712_verifying_contract` follow EIP-55.
|
|
42
|
+
* The signature field is not needed.
|
|
109
43
|
* ```
|
|
110
44
|
* {
|
|
111
|
-
* signature:
|
|
45
|
+
* signature: undefined,
|
|
112
46
|
* client_address: '0x17853A630aAe15AED549B2B874de08B73C0F59c5',
|
|
113
47
|
* enc_key: '2000000000000000df2fcacb774f03187f3802a27259f45c06d33cefa68d9c53426b15ad531aa822',
|
|
114
|
-
*
|
|
48
|
+
* ciphertext_handles: [ '0748b542afe2353c86cb707e3d21044b0be1fd18efc7cbaa6a415af055bfb358' ]
|
|
115
49
|
* eip712_verifying_contract: '0x66f9664f97F2b50F62D13eA064982f936dE76657'
|
|
116
50
|
* }
|
|
117
51
|
* ```
|
|
@@ -153,16 +87,8 @@ export function cryptobox_decrypt(ct: CryptoBoxCt, my_sk: PrivateEncKey, their_p
|
|
|
153
87
|
*
|
|
154
88
|
* * `verify` - Whether to perform signature verification for the response.
|
|
155
89
|
* 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
90
|
*/
|
|
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):
|
|
91
|
+
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
92
|
/**
|
|
167
93
|
* Process the reencryption response from Rust objects.
|
|
168
94
|
* Consider using [process_reencryption_resp_from_js]
|
|
@@ -185,18 +111,10 @@ export function process_reencryption_resp_from_js(client: Client, request: any,
|
|
|
185
111
|
*
|
|
186
112
|
* * `verify` - Whether to perform signature verification for the response.
|
|
187
113
|
* 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
114
|
*/
|
|
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):
|
|
115
|
+
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
116
|
/**
|
|
199
|
-
* The plaintext types that can be encrypted in a
|
|
117
|
+
* The plaintext types that can be encrypted in a HTTPZ ciphertext.
|
|
200
118
|
*/
|
|
201
119
|
export enum FheType {
|
|
202
120
|
Ebool = 0,
|
|
@@ -212,6 +130,10 @@ export enum FheType {
|
|
|
212
130
|
Euint1024 = 10,
|
|
213
131
|
Euint2048 = 11,
|
|
214
132
|
}
|
|
133
|
+
export class CiphertextHandle {
|
|
134
|
+
private constructor();
|
|
135
|
+
free(): void;
|
|
136
|
+
}
|
|
215
137
|
/**
|
|
216
138
|
* Core Client
|
|
217
139
|
*
|
|
@@ -220,9 +142,11 @@ export enum FheType {
|
|
|
220
142
|
* distributed across the aggregator/proxy and smart contracts.
|
|
221
143
|
*/
|
|
222
144
|
export class Client {
|
|
145
|
+
private constructor();
|
|
223
146
|
free(): void;
|
|
224
147
|
}
|
|
225
148
|
export class CryptoBoxCt {
|
|
149
|
+
private constructor();
|
|
226
150
|
free(): void;
|
|
227
151
|
}
|
|
228
152
|
/**
|
|
@@ -231,233 +155,284 @@ export class CryptoBoxCt {
|
|
|
231
155
|
* solidity types
|
|
232
156
|
*/
|
|
233
157
|
export class Eip712DomainMsg {
|
|
158
|
+
private constructor();
|
|
234
159
|
free(): void;
|
|
235
|
-
chain_id: Uint8Array;
|
|
236
160
|
name: string;
|
|
237
|
-
salt?: Uint8Array;
|
|
238
|
-
verifying_contract: string;
|
|
239
161
|
version: string;
|
|
162
|
+
chain_id: Uint8Array;
|
|
163
|
+
verifying_contract: string;
|
|
164
|
+
salt?: Uint8Array;
|
|
240
165
|
}
|
|
241
166
|
/**
|
|
242
167
|
* Validity of this struct is not checked.
|
|
243
168
|
*/
|
|
244
169
|
export class ParsedReencryptionRequest {
|
|
170
|
+
private constructor();
|
|
245
171
|
free(): void;
|
|
246
172
|
}
|
|
247
173
|
export class PrivateEncKey {
|
|
174
|
+
private constructor();
|
|
248
175
|
free(): void;
|
|
249
176
|
}
|
|
250
177
|
export class PrivateSigKey {
|
|
178
|
+
private constructor();
|
|
251
179
|
free(): void;
|
|
252
180
|
}
|
|
253
181
|
export class PublicEncKey {
|
|
182
|
+
private constructor();
|
|
254
183
|
free(): void;
|
|
255
184
|
}
|
|
256
185
|
export class PublicSigKey {
|
|
186
|
+
private constructor();
|
|
257
187
|
free(): void;
|
|
258
188
|
}
|
|
259
189
|
export class ReencryptionRequest {
|
|
190
|
+
private constructor();
|
|
260
191
|
free(): void;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
* Future queries for the result must use this request ID.
|
|
266
|
-
*/
|
|
192
|
+
/**
|
|
193
|
+
* The 32 Byte / 256 Bit ID of the user decryption request, without `0x` prefix.
|
|
194
|
+
* Future queries for the result must use this request ID.
|
|
195
|
+
*/
|
|
267
196
|
request_id?: RequestId;
|
|
268
|
-
/**
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
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
|
-
*/
|
|
197
|
+
/**
|
|
198
|
+
* The list of ciphertexts to reencrypt.
|
|
199
|
+
*/
|
|
200
|
+
typed_ciphertexts: (TypedCiphertext)[];
|
|
201
|
+
/**
|
|
202
|
+
* The 32 Byte / 256 Bit key id to use for decryption. This is the request_id used for key
|
|
203
|
+
* generation
|
|
204
|
+
*/
|
|
205
|
+
key_id?: RequestId;
|
|
206
|
+
/**
|
|
207
|
+
* The client's (blockchain wallet) address,
|
|
208
|
+
* encoded using EIP-55.
|
|
209
|
+
*/
|
|
290
210
|
client_address: string;
|
|
291
|
-
/**
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Encoding of the user's public encryption key for this request.
|
|
213
|
+
* Encoding using the default encoding of libsodium, i.e. the 32 bytes of a
|
|
214
|
+
* Montgomery point.
|
|
215
|
+
*/
|
|
296
216
|
enc_key: Uint8Array;
|
|
297
|
-
|
|
298
|
-
* The type of plaintext encrypted.
|
|
299
|
-
*/
|
|
300
|
-
fhe_type: number;
|
|
301
|
-
/**
|
|
302
|
-
* The key id to use for decryption. Will be the request_id used during key
|
|
303
|
-
* generation
|
|
304
|
-
*/
|
|
305
|
-
key_id?: RequestId;
|
|
306
|
-
/**
|
|
307
|
-
* Version of the request format.
|
|
308
|
-
*/
|
|
309
|
-
version: number;
|
|
217
|
+
domain?: Eip712DomainMsg;
|
|
310
218
|
}
|
|
311
219
|
export class ReencryptionResponse {
|
|
220
|
+
private constructor();
|
|
312
221
|
free(): void;
|
|
313
|
-
/**
|
|
314
|
-
* Signature of the serialization of \[ReencryptionResponsePayload\].
|
|
315
|
-
*/
|
|
316
|
-
payload?: ReencryptionResponsePayload;
|
|
317
222
|
signature: Uint8Array;
|
|
223
|
+
/**
|
|
224
|
+
* This is the external signature created from the Eip712 domain
|
|
225
|
+
* on the structure, where reencryptedShare is bincode::serialize(&payload)
|
|
226
|
+
* struct UserDecryptResponseVerification {
|
|
227
|
+
* bytes publicKey;
|
|
228
|
+
* uint256\[\] ctHandles;
|
|
229
|
+
* bytes reencryptedShare;
|
|
230
|
+
* }
|
|
231
|
+
*/
|
|
232
|
+
external_signature: Uint8Array;
|
|
233
|
+
/**
|
|
234
|
+
* The actual \[ReencryptionResponsePayload\].
|
|
235
|
+
*/
|
|
236
|
+
payload?: ReencryptionResponsePayload;
|
|
318
237
|
}
|
|
319
238
|
export class ReencryptionResponsePayload {
|
|
239
|
+
private constructor();
|
|
320
240
|
free(): void;
|
|
321
|
-
/**
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
241
|
+
/**
|
|
242
|
+
* The server's signature verification key, Encoded using SEC1.
|
|
243
|
+
* Needed to validate the response, but MUST also be linked to a list of
|
|
244
|
+
* trusted keys.
|
|
245
|
+
*/
|
|
246
|
+
verification_key: Uint8Array;
|
|
247
|
+
/**
|
|
248
|
+
* This is needed to ensure the response corresponds to the request.
|
|
249
|
+
* It is the digest of UserDecryptionLinker hashed using EIP712
|
|
250
|
+
* under the given domain in the request.
|
|
251
|
+
*/
|
|
330
252
|
digest: Uint8Array;
|
|
331
|
-
/**
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
253
|
+
/**
|
|
254
|
+
* The resulting signcrypted ciphertexts, each ciphertext
|
|
255
|
+
* must be decrypted and then reconstructed with the other shares
|
|
256
|
+
* to produce the final plaintext.
|
|
257
|
+
*/
|
|
258
|
+
signcrypted_ciphertexts: (TypedSigncryptedCiphertext)[];
|
|
259
|
+
/**
|
|
260
|
+
* The ID of the MPC party doing the reencryption. Used for polynomial
|
|
261
|
+
* reconstruction.
|
|
262
|
+
*/
|
|
339
263
|
party_id: number;
|
|
340
|
-
/**
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
signcrypted_ciphertext: Uint8Array;
|
|
345
|
-
/**
|
|
346
|
-
* The server's signature verification key.
|
|
347
|
-
* Encoded using SEC1.
|
|
348
|
-
* Needed to validate the response, but MUST also be linked to a list of
|
|
349
|
-
* trusted keys.
|
|
350
|
-
*/
|
|
351
|
-
verification_key: Uint8Array;
|
|
352
|
-
/**
|
|
353
|
-
* Version of the response format.
|
|
354
|
-
*/
|
|
355
|
-
version: number;
|
|
264
|
+
/**
|
|
265
|
+
* The degree of the sharing scheme used.
|
|
266
|
+
*/
|
|
267
|
+
degree: number;
|
|
356
268
|
}
|
|
357
269
|
/**
|
|
358
|
-
* Simple response to return
|
|
359
|
-
* later on.
|
|
270
|
+
* Simple response to return a 32 Byte / 256 Bit ID, to be used to retrieve the computed result
|
|
271
|
+
* later on. This string does NOT contain a `0x` prefix.
|
|
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 HTTPZ.
|
|
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
|
+
* 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.
|
|
311
|
+
*/
|
|
312
|
+
fhe_type: number;
|
|
313
|
+
}
|
|
314
|
+
export class TypedSigncryptedCiphertext {
|
|
315
|
+
private constructor();
|
|
316
|
+
free(): void;
|
|
317
|
+
/**
|
|
318
|
+
* The type of plaintext encrypted.
|
|
319
|
+
*/
|
|
320
|
+
fhe_type: number;
|
|
321
|
+
/**
|
|
322
|
+
* The signcrypted payload, using a hybrid encryption approach in
|
|
323
|
+
* sign-then-encrypt.
|
|
324
|
+
*/
|
|
325
|
+
signcrypted_ciphertext: Uint8Array;
|
|
326
|
+
/**
|
|
327
|
+
* The external handles that were originally in the request.
|
|
328
|
+
*/
|
|
329
|
+
external_handle: Uint8Array;
|
|
330
|
+
}
|
|
365
331
|
|
|
366
332
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
367
333
|
|
|
368
334
|
export interface InitOutput {
|
|
369
335
|
readonly memory: WebAssembly.Memory;
|
|
370
336
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
337
|
+
readonly __wbg_ciphertexthandle_free: (a: number, b: number) => void;
|
|
371
338
|
readonly __wbg_parsedreencryptionrequest_free: (a: number, b: number) => void;
|
|
339
|
+
readonly __wbg_publicenckey_free: (a: number, b: number) => void;
|
|
340
|
+
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
341
|
+
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
342
|
+
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
343
|
+
readonly public_sig_key_to_u8vec: (a: number) => [number, number];
|
|
344
|
+
readonly u8vec_to_public_sig_key: (a: number, b: number) => [number, number, number];
|
|
345
|
+
readonly private_sig_key_to_u8vec: (a: number) => [number, number, number, number];
|
|
346
|
+
readonly u8vec_to_private_sig_key: (a: number, b: number) => [number, number, number];
|
|
347
|
+
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
348
|
+
readonly get_server_addrs: (a: number) => [number, number];
|
|
349
|
+
readonly get_client_secret_key: (a: number) => number;
|
|
350
|
+
readonly get_client_address: (a: number) => [number, number];
|
|
351
|
+
readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
|
|
352
|
+
readonly cryptobox_keygen: () => number;
|
|
353
|
+
readonly cryptobox_get_pk: (a: number) => number;
|
|
354
|
+
readonly cryptobox_pk_to_u8vec: (a: number) => [number, number, number, number];
|
|
355
|
+
readonly cryptobox_sk_to_u8vec: (a: number) => [number, number, number, number];
|
|
356
|
+
readonly u8vec_to_cryptobox_pk: (a: number, b: number) => [number, number, number];
|
|
357
|
+
readonly u8vec_to_cryptobox_sk: (a: number, b: number) => [number, number, number];
|
|
358
|
+
readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
|
|
359
|
+
readonly cryptobox_decrypt: (a: number, b: number, c: number) => [number, number];
|
|
360
|
+
readonly process_reencryption_resp_from_js: (a: number, b: any, c: any, d: any, e: number, f: number, g: number) => [number, number, number, number];
|
|
361
|
+
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
|
|
372
362
|
readonly __wbg_requestid_free: (a: number, b: number) => void;
|
|
373
|
-
readonly
|
|
374
|
-
readonly
|
|
375
|
-
readonly
|
|
376
|
-
readonly
|
|
377
|
-
readonly
|
|
378
|
-
readonly
|
|
379
|
-
readonly
|
|
380
|
-
readonly
|
|
363
|
+
readonly __wbg_typedciphertext_free: (a: number, b: number) => void;
|
|
364
|
+
readonly __wbg_get_typedciphertext_fhe_type: (a: number) => number;
|
|
365
|
+
readonly __wbg_set_typedciphertext_fhe_type: (a: number, b: number) => void;
|
|
366
|
+
readonly __wbg_get_typedciphertext_ciphertext_format: (a: number) => number;
|
|
367
|
+
readonly __wbg_set_typedciphertext_ciphertext_format: (a: number, b: number) => void;
|
|
368
|
+
readonly __wbg_typedplaintext_free: (a: number, b: number) => void;
|
|
369
|
+
readonly __wbg_get_typedplaintext_fhe_type: (a: number) => number;
|
|
370
|
+
readonly __wbg_set_typedplaintext_fhe_type: (a: number, b: number) => void;
|
|
381
371
|
readonly __wbg_eip712domainmsg_free: (a: number, b: number) => void;
|
|
382
|
-
readonly __wbg_get_eip712domainmsg_name: (a: number) =>
|
|
372
|
+
readonly __wbg_get_eip712domainmsg_name: (a: number) => [number, number];
|
|
383
373
|
readonly __wbg_set_eip712domainmsg_name: (a: number, b: number, c: number) => void;
|
|
384
|
-
readonly __wbg_get_eip712domainmsg_version: (a: number) =>
|
|
374
|
+
readonly __wbg_get_eip712domainmsg_version: (a: number) => [number, number];
|
|
385
375
|
readonly __wbg_set_eip712domainmsg_version: (a: number, b: number, c: number) => void;
|
|
386
|
-
readonly __wbg_get_eip712domainmsg_chain_id: (a: number) =>
|
|
376
|
+
readonly __wbg_get_eip712domainmsg_chain_id: (a: number) => [number, number];
|
|
387
377
|
readonly __wbg_set_eip712domainmsg_chain_id: (a: number, b: number, c: number) => void;
|
|
388
|
-
readonly __wbg_get_eip712domainmsg_verifying_contract: (a: number) =>
|
|
378
|
+
readonly __wbg_get_eip712domainmsg_verifying_contract: (a: number) => [number, number];
|
|
389
379
|
readonly __wbg_set_eip712domainmsg_verifying_contract: (a: number, b: number, c: number) => void;
|
|
390
|
-
readonly __wbg_get_eip712domainmsg_salt: (a: number) =>
|
|
380
|
+
readonly __wbg_get_eip712domainmsg_salt: (a: number) => [number, number];
|
|
391
381
|
readonly __wbg_set_eip712domainmsg_salt: (a: number, b: number, c: number) => void;
|
|
392
382
|
readonly __wbg_reencryptionrequest_free: (a: number, b: number) => void;
|
|
393
|
-
readonly __wbg_get_reencryptionrequest_signature: (a: number) => Array;
|
|
394
|
-
readonly __wbg_get_reencryptionrequest_payload: (a: number) => number;
|
|
395
|
-
readonly __wbg_set_reencryptionrequest_payload: (a: number, b: number) => void;
|
|
396
|
-
readonly __wbg_get_reencryptionrequest_domain: (a: number) => number;
|
|
397
|
-
readonly __wbg_set_reencryptionrequest_domain: (a: number, b: number) => void;
|
|
398
383
|
readonly __wbg_get_reencryptionrequest_request_id: (a: number) => number;
|
|
399
384
|
readonly __wbg_set_reencryptionrequest_request_id: (a: number, b: number) => void;
|
|
385
|
+
readonly __wbg_get_reencryptionrequest_typed_ciphertexts: (a: number) => [number, number];
|
|
386
|
+
readonly __wbg_set_reencryptionrequest_typed_ciphertexts: (a: number, b: number, c: number) => void;
|
|
387
|
+
readonly __wbg_get_reencryptionrequest_key_id: (a: number) => number;
|
|
388
|
+
readonly __wbg_set_reencryptionrequest_key_id: (a: number, b: number) => void;
|
|
389
|
+
readonly __wbg_get_reencryptionrequest_domain: (a: number) => number;
|
|
390
|
+
readonly __wbg_set_reencryptionrequest_domain: (a: number, b: number) => void;
|
|
400
391
|
readonly __wbg_reencryptionresponse_free: (a: number, b: number) => void;
|
|
392
|
+
readonly __wbg_get_reencryptionresponse_signature: (a: number) => [number, number];
|
|
393
|
+
readonly __wbg_get_reencryptionresponse_external_signature: (a: number) => [number, number];
|
|
401
394
|
readonly __wbg_get_reencryptionresponse_payload: (a: number) => number;
|
|
402
395
|
readonly __wbg_set_reencryptionresponse_payload: (a: number, b: number) => void;
|
|
403
396
|
readonly __wbg_reencryptionresponsepayload_free: (a: number, b: number) => void;
|
|
404
|
-
readonly
|
|
405
|
-
readonly
|
|
406
|
-
readonly __wbg_get_reencryptionresponsepayload_fhe_type: (a: number) => number;
|
|
407
|
-
readonly __wbg_set_reencryptionresponsepayload_fhe_type: (a: number, b: number) => void;
|
|
397
|
+
readonly __wbg_get_reencryptionresponsepayload_signcrypted_ciphertexts: (a: number) => [number, number];
|
|
398
|
+
readonly __wbg_set_reencryptionresponsepayload_signcrypted_ciphertexts: (a: number, b: number, c: number) => void;
|
|
408
399
|
readonly __wbg_get_reencryptionresponsepayload_party_id: (a: number) => number;
|
|
409
400
|
readonly __wbg_set_reencryptionresponsepayload_party_id: (a: number, b: number) => void;
|
|
410
401
|
readonly __wbg_get_reencryptionresponsepayload_degree: (a: number) => number;
|
|
411
402
|
readonly __wbg_set_reencryptionresponsepayload_degree: (a: number, b: number) => void;
|
|
403
|
+
readonly __wbg_typedsigncryptedciphertext_free: (a: number, b: number) => void;
|
|
404
|
+
readonly __wbg_get_typedsigncryptedciphertext_fhe_type: (a: number) => number;
|
|
405
|
+
readonly __wbg_set_typedciphertext_ciphertext: (a: number, b: number, c: number) => void;
|
|
406
|
+
readonly __wbg_set_typedplaintext_bytes: (a: number, b: number, c: number) => void;
|
|
412
407
|
readonly __wbg_set_requestid_request_id: (a: number, b: number, c: number) => void;
|
|
413
|
-
readonly
|
|
414
|
-
readonly
|
|
415
|
-
readonly
|
|
416
|
-
readonly __wbg_set_reencryptionrequest_signature: (a: number, b: number, c: number) => void;
|
|
408
|
+
readonly __wbg_set_typedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
409
|
+
readonly __wbg_set_reencryptionrequest_client_address: (a: number, b: number, c: number) => void;
|
|
410
|
+
readonly __wbg_set_reencryptionrequest_enc_key: (a: number, b: number, c: number) => void;
|
|
417
411
|
readonly __wbg_set_reencryptionresponse_signature: (a: number, b: number, c: number) => void;
|
|
412
|
+
readonly __wbg_set_reencryptionresponse_external_signature: (a: number, b: number, c: number) => void;
|
|
418
413
|
readonly __wbg_set_reencryptionresponsepayload_verification_key: (a: number, b: number, c: number) => void;
|
|
419
414
|
readonly __wbg_set_reencryptionresponsepayload_digest: (a: number, b: number, c: number) => void;
|
|
420
|
-
readonly
|
|
421
|
-
readonly
|
|
422
|
-
readonly
|
|
423
|
-
readonly
|
|
424
|
-
readonly
|
|
425
|
-
readonly
|
|
426
|
-
readonly
|
|
427
|
-
readonly
|
|
428
|
-
readonly
|
|
429
|
-
readonly
|
|
430
|
-
readonly
|
|
431
|
-
readonly
|
|
432
|
-
readonly
|
|
433
|
-
readonly u8vec_to_private_sig_key: (a: number, b: number) => Array;
|
|
434
|
-
readonly new_client: (a: number, b: number, c: number, d: number, e: number, f: number) => Array;
|
|
435
|
-
readonly get_server_addrs: (a: number) => Array;
|
|
436
|
-
readonly get_client_secret_key: (a: number) => number;
|
|
437
|
-
readonly get_client_address: (a: number) => Array;
|
|
438
|
-
readonly __wbg_cryptoboxct_free: (a: number, b: number) => void;
|
|
439
|
-
readonly cryptobox_keygen: () => number;
|
|
440
|
-
readonly cryptobox_get_pk: (a: number) => number;
|
|
441
|
-
readonly cryptobox_pk_to_u8vec: (a: number) => Array;
|
|
442
|
-
readonly cryptobox_sk_to_u8vec: (a: number) => Array;
|
|
443
|
-
readonly u8vec_to_cryptobox_pk: (a: number, b: number) => Array;
|
|
444
|
-
readonly u8vec_to_cryptobox_sk: (a: number, b: number) => Array;
|
|
445
|
-
readonly cryptobox_encrypt: (a: number, b: number, c: number, d: number) => number;
|
|
446
|
-
readonly cryptobox_decrypt: (a: number, b: number, c: number) => Array;
|
|
447
|
-
readonly process_reencryption_resp_from_js: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => Array;
|
|
448
|
-
readonly process_reencryption_resp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => Array;
|
|
449
|
-
readonly __wbg_publicenckey_free: (a: number, b: number) => void;
|
|
450
|
-
readonly __wbg_privateenckey_free: (a: number, b: number) => void;
|
|
451
|
-
readonly __wbg_publicsigkey_free: (a: number, b: number) => void;
|
|
452
|
-
readonly __wbg_privatesigkey_free: (a: number, b: number) => void;
|
|
415
|
+
readonly __wbg_set_typedsigncryptedciphertext_signcrypted_ciphertext: (a: number, b: number, c: number) => void;
|
|
416
|
+
readonly __wbg_set_typedsigncryptedciphertext_external_handle: (a: number, b: number, c: number) => void;
|
|
417
|
+
readonly __wbg_get_requestid_request_id: (a: number) => [number, number];
|
|
418
|
+
readonly __wbg_get_reencryptionrequest_client_address: (a: number) => [number, number];
|
|
419
|
+
readonly __wbg_get_typedplaintext_bytes: (a: number) => [number, number];
|
|
420
|
+
readonly __wbg_get_reencryptionrequest_enc_key: (a: number) => [number, number];
|
|
421
|
+
readonly __wbg_get_typedciphertext_ciphertext: (a: number) => [number, number];
|
|
422
|
+
readonly __wbg_get_typedciphertext_external_handle: (a: number) => [number, number];
|
|
423
|
+
readonly __wbg_get_reencryptionresponsepayload_verification_key: (a: number) => [number, number];
|
|
424
|
+
readonly __wbg_get_reencryptionresponsepayload_digest: (a: number) => [number, number];
|
|
425
|
+
readonly __wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext: (a: number) => [number, number];
|
|
426
|
+
readonly __wbg_get_typedsigncryptedciphertext_external_handle: (a: number) => [number, number];
|
|
427
|
+
readonly __wbg_set_typedsigncryptedciphertext_fhe_type: (a: number, b: number) => void;
|
|
453
428
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
454
429
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
455
|
-
readonly
|
|
430
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
431
|
+
readonly __externref_table_alloc: () => number;
|
|
432
|
+
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
456
433
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
457
434
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
458
|
-
readonly __externref_table_alloc: () => number;
|
|
459
435
|
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
460
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
461
436
|
readonly __wbindgen_start: () => void;
|
|
462
437
|
}
|
|
463
438
|
|