@fhevm/sdk 0.14.0-13 → 0.14.0-14

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.
@@ -1,367 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- export class CompactCiphertextList {
5
- private constructor();
6
- free(): void;
7
- [Symbol.dispose](): void;
8
- static builder(public_key: TfheCompactPublicKey): CompactCiphertextListBuilder;
9
- eq(other: CompactCiphertextList): boolean;
10
- }
11
-
12
- export class CompactCiphertextListBuilder {
13
- private constructor();
14
- free(): void;
15
- [Symbol.dispose](): void;
16
- build(): CompactCiphertextList;
17
- build_packed(): CompactCiphertextList;
18
- build_packed_seeded(seed: Uint8Array): CompactCiphertextList;
19
- build_with_proof_packed(crs: CompactPkeCrs, metadata: Uint8Array, compute_load: ZkComputeLoad): ProvenCompactCiphertextList;
20
- build_with_proof_packed_seeded(crs: CompactPkeCrs, metadata: Uint8Array, compute_load: ZkComputeLoad, seed: Uint8Array): ProvenCompactCiphertextList;
21
- push_boolean(value: boolean): void;
22
- push_i10(value: number): void;
23
- push_i1024(value: any): void;
24
- push_i12(value: number): void;
25
- push_i128(value: any): void;
26
- push_i14(value: number): void;
27
- push_i16(value: number): void;
28
- push_i160(value: any): void;
29
- push_i2(value: number): void;
30
- push_i2048(value: any): void;
31
- push_i256(value: any): void;
32
- push_i32(value: number): void;
33
- push_i4(value: number): void;
34
- push_i512(value: any): void;
35
- push_i6(value: number): void;
36
- push_i64(value: bigint): void;
37
- push_i8(value: number): void;
38
- push_u10(value: number): void;
39
- push_u1024(value: any): void;
40
- push_u12(value: number): void;
41
- push_u128(value: any): void;
42
- push_u14(value: number): void;
43
- push_u16(value: number): void;
44
- push_u160(value: any): void;
45
- push_u2(value: number): void;
46
- push_u2048(value: any): void;
47
- push_u256(value: any): void;
48
- push_u32(value: number): void;
49
- push_u4(value: number): void;
50
- push_u512(value: any): void;
51
- push_u6(value: number): void;
52
- push_u64(value: bigint): void;
53
- push_u8(value: number): void;
54
- }
55
-
56
- export class CompactCiphertextListExpander {
57
- private constructor();
58
- free(): void;
59
- [Symbol.dispose](): void;
60
- }
61
-
62
- export class CompactPkeCrs {
63
- private constructor();
64
- free(): void;
65
- [Symbol.dispose](): void;
66
- static from_config(config: TfheConfig, max_num_bits: number): CompactPkeCrs;
67
- static safe_deserialize(buffer: Uint8Array, serialized_size_limit: bigint): CompactPkeCrs;
68
- static safe_deserialize_from_public_params(buffer: Uint8Array, serialized_size_limit: bigint): CompactPkeCrs;
69
- safe_serialize(serialized_size_limit: bigint): Uint8Array;
70
- }
71
-
72
- export enum FheTypes {
73
- Bool = 0,
74
- Uint4 = 1,
75
- Uint8 = 2,
76
- Uint16 = 3,
77
- Uint32 = 4,
78
- Uint64 = 5,
79
- Uint128 = 6,
80
- Uint160 = 7,
81
- Uint256 = 8,
82
- Uint512 = 9,
83
- Uint1024 = 10,
84
- Uint2048 = 11,
85
- Uint2 = 12,
86
- Uint6 = 13,
87
- Uint10 = 14,
88
- Uint12 = 15,
89
- Uint14 = 16,
90
- Int2 = 17,
91
- Int4 = 18,
92
- Int6 = 19,
93
- Int8 = 20,
94
- Int10 = 21,
95
- Int12 = 22,
96
- Int14 = 23,
97
- Int16 = 24,
98
- Int32 = 25,
99
- Int64 = 26,
100
- Int128 = 27,
101
- Int160 = 28,
102
- Int256 = 29,
103
- AsciiString = 30,
104
- Int512 = 31,
105
- Int1024 = 32,
106
- Int2048 = 33,
107
- Uint24 = 34,
108
- Uint40 = 35,
109
- Uint48 = 36,
110
- Uint56 = 37,
111
- Uint72 = 38,
112
- Uint80 = 39,
113
- Uint88 = 40,
114
- Uint96 = 41,
115
- Uint104 = 42,
116
- Uint112 = 43,
117
- Uint120 = 44,
118
- Uint136 = 45,
119
- Uint144 = 46,
120
- Uint152 = 47,
121
- Uint168 = 48,
122
- Uint176 = 49,
123
- Uint184 = 50,
124
- Uint192 = 51,
125
- Uint200 = 52,
126
- Uint208 = 53,
127
- Uint216 = 54,
128
- Uint224 = 55,
129
- Uint232 = 56,
130
- Uint240 = 57,
131
- Uint248 = 58,
132
- Int24 = 59,
133
- Int40 = 60,
134
- Int48 = 61,
135
- Int56 = 62,
136
- Int72 = 63,
137
- Int80 = 64,
138
- Int88 = 65,
139
- Int96 = 66,
140
- Int104 = 67,
141
- Int112 = 68,
142
- Int120 = 69,
143
- Int136 = 70,
144
- Int144 = 71,
145
- Int152 = 72,
146
- Int168 = 73,
147
- Int176 = 74,
148
- Int184 = 75,
149
- Int192 = 76,
150
- Int200 = 77,
151
- Int208 = 78,
152
- Int216 = 79,
153
- Int224 = 80,
154
- Int232 = 81,
155
- Int240 = 82,
156
- Int248 = 83,
157
- }
158
-
159
- export class ProvenCompactCiphertextList {
160
- private constructor();
161
- free(): void;
162
- [Symbol.dispose](): void;
163
- static builder(public_key: TfheCompactPublicKey): CompactCiphertextListBuilder;
164
- eq(other: ProvenCompactCiphertextList): boolean;
165
- get_kind_of(index: number): FheTypes | undefined;
166
- is_empty(): boolean;
167
- len(): number;
168
- static safe_deserialize(buffer: Uint8Array, serialized_size_limit: bigint): ProvenCompactCiphertextList;
169
- safe_serialize(serialized_size_limit: bigint): Uint8Array;
170
- }
171
-
172
- export class TfheClientKey {
173
- private constructor();
174
- free(): void;
175
- [Symbol.dispose](): void;
176
- static generate(config: TfheConfig): TfheClientKey;
177
- static generate_with_seed(config: TfheConfig, seed: any): TfheClientKey;
178
- static safe_deserialize(buffer: Uint8Array, serialized_size_limit: bigint): TfheClientKey;
179
- safe_serialize(serialized_size_limit: bigint): Uint8Array;
180
- }
181
-
182
- export class TfheCompactPublicKey {
183
- private constructor();
184
- free(): void;
185
- [Symbol.dispose](): void;
186
- static new(client_key: TfheClientKey): TfheCompactPublicKey;
187
- static safe_deserialize(buffer: Uint8Array, serialized_size_limit: bigint): TfheCompactPublicKey;
188
- safe_serialize(serialized_size_limit: bigint): Uint8Array;
189
- }
190
-
191
- export class TfheConfig {
192
- private constructor();
193
- free(): void;
194
- [Symbol.dispose](): void;
195
- static default(): TfheConfig;
196
- }
197
-
198
- export enum ZkComputeLoad {
199
- Proof = 0,
200
- Verify = 1,
201
- }
202
-
203
- export function initThreadPool(num_threads: number): Promise<any>;
204
-
205
- export function init_panic_hook(): void;
206
-
207
- export class wbg_rayon_PoolBuilder {
208
- private constructor();
209
- free(): void;
210
- [Symbol.dispose](): void;
211
- build(): void;
212
- numThreads(): number;
213
- receiver(): number;
214
- }
215
-
216
- export function wbg_rayon_start_worker(receiver: number): void;
217
-
218
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
219
-
220
- export interface InitOutput {
221
- readonly __wbg_compactciphertextlist_free: (a: number, b: number) => void;
222
- readonly __wbg_compactciphertextlistbuilder_free: (a: number, b: number) => void;
223
- readonly __wbg_compactciphertextlistexpander_free: (a: number, b: number) => void;
224
- readonly __wbg_compactpkecrs_free: (a: number, b: number) => void;
225
- readonly __wbg_provencompactciphertextlist_free: (a: number, b: number) => void;
226
- readonly __wbg_tfheclientkey_free: (a: number, b: number) => void;
227
- readonly __wbg_tfhecompactpublickey_free: (a: number, b: number) => void;
228
- readonly __wbg_tfheconfig_free: (a: number, b: number) => void;
229
- readonly compactciphertextlist_builder: (a: number) => [number, number, number];
230
- readonly compactciphertextlist_eq: (a: number, b: number) => number;
231
- readonly compactciphertextlistbuilder_build: (a: number) => [number, number, number];
232
- readonly compactciphertextlistbuilder_build_packed: (a: number) => [number, number, number];
233
- readonly compactciphertextlistbuilder_build_packed_seeded: (a: number, b: number, c: number) => [number, number, number];
234
- readonly compactciphertextlistbuilder_build_with_proof_packed: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
235
- readonly compactciphertextlistbuilder_build_with_proof_packed_seeded: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number];
236
- readonly compactciphertextlistbuilder_push_boolean: (a: number, b: number) => [number, number];
237
- readonly compactciphertextlistbuilder_push_i10: (a: number, b: number) => [number, number];
238
- readonly compactciphertextlistbuilder_push_i1024: (a: number, b: any) => [number, number];
239
- readonly compactciphertextlistbuilder_push_i12: (a: number, b: number) => [number, number];
240
- readonly compactciphertextlistbuilder_push_i128: (a: number, b: any) => [number, number];
241
- readonly compactciphertextlistbuilder_push_i14: (a: number, b: number) => [number, number];
242
- readonly compactciphertextlistbuilder_push_i16: (a: number, b: number) => [number, number];
243
- readonly compactciphertextlistbuilder_push_i160: (a: number, b: any) => [number, number];
244
- readonly compactciphertextlistbuilder_push_i2: (a: number, b: number) => [number, number];
245
- readonly compactciphertextlistbuilder_push_i2048: (a: number, b: any) => [number, number];
246
- readonly compactciphertextlistbuilder_push_i256: (a: number, b: any) => [number, number];
247
- readonly compactciphertextlistbuilder_push_i32: (a: number, b: number) => [number, number];
248
- readonly compactciphertextlistbuilder_push_i4: (a: number, b: number) => [number, number];
249
- readonly compactciphertextlistbuilder_push_i512: (a: number, b: any) => [number, number];
250
- readonly compactciphertextlistbuilder_push_i6: (a: number, b: number) => [number, number];
251
- readonly compactciphertextlistbuilder_push_i64: (a: number, b: bigint) => [number, number];
252
- readonly compactciphertextlistbuilder_push_i8: (a: number, b: number) => [number, number];
253
- readonly compactciphertextlistbuilder_push_u10: (a: number, b: number) => [number, number];
254
- readonly compactciphertextlistbuilder_push_u1024: (a: number, b: any) => [number, number];
255
- readonly compactciphertextlistbuilder_push_u12: (a: number, b: number) => [number, number];
256
- readonly compactciphertextlistbuilder_push_u128: (a: number, b: any) => [number, number];
257
- readonly compactciphertextlistbuilder_push_u14: (a: number, b: number) => [number, number];
258
- readonly compactciphertextlistbuilder_push_u16: (a: number, b: number) => [number, number];
259
- readonly compactciphertextlistbuilder_push_u160: (a: number, b: any) => [number, number];
260
- readonly compactciphertextlistbuilder_push_u2: (a: number, b: number) => [number, number];
261
- readonly compactciphertextlistbuilder_push_u2048: (a: number, b: any) => [number, number];
262
- readonly compactciphertextlistbuilder_push_u256: (a: number, b: any) => [number, number];
263
- readonly compactciphertextlistbuilder_push_u32: (a: number, b: number) => [number, number];
264
- readonly compactciphertextlistbuilder_push_u4: (a: number, b: number) => [number, number];
265
- readonly compactciphertextlistbuilder_push_u512: (a: number, b: any) => [number, number];
266
- readonly compactciphertextlistbuilder_push_u6: (a: number, b: number) => [number, number];
267
- readonly compactciphertextlistbuilder_push_u64: (a: number, b: bigint) => [number, number];
268
- readonly compactciphertextlistbuilder_push_u8: (a: number, b: number) => [number, number];
269
- readonly compactpkecrs_from_config: (a: number, b: number) => [number, number, number];
270
- readonly compactpkecrs_safe_deserialize: (a: number, b: number, c: bigint) => [number, number, number];
271
- readonly compactpkecrs_safe_deserialize_from_public_params: (a: number, b: number, c: bigint) => [number, number, number];
272
- readonly compactpkecrs_safe_serialize: (a: number, b: bigint) => [number, number, number, number];
273
- readonly init_panic_hook: () => void;
274
- readonly provencompactciphertextlist_builder: (a: number) => [number, number, number];
275
- readonly provencompactciphertextlist_eq: (a: number, b: number) => number;
276
- readonly provencompactciphertextlist_get_kind_of: (a: number, b: number) => number;
277
- readonly provencompactciphertextlist_is_empty: (a: number) => number;
278
- readonly provencompactciphertextlist_len: (a: number) => number;
279
- readonly provencompactciphertextlist_safe_deserialize: (a: number, b: number, c: bigint) => [number, number, number];
280
- readonly provencompactciphertextlist_safe_serialize: (a: number, b: bigint) => [number, number, number, number];
281
- readonly tfheclientkey_generate: (a: number) => [number, number, number];
282
- readonly tfheclientkey_generate_with_seed: (a: number, b: any) => [number, number, number];
283
- readonly tfheclientkey_safe_deserialize: (a: number, b: number, c: bigint) => [number, number, number];
284
- readonly tfheclientkey_safe_serialize: (a: number, b: bigint) => [number, number, number, number];
285
- readonly tfhecompactpublickey_new: (a: number) => [number, number, number];
286
- readonly tfhecompactpublickey_safe_deserialize: (a: number, b: number, c: bigint) => [number, number, number];
287
- readonly tfhecompactpublickey_safe_serialize: (a: number, b: bigint) => [number, number, number, number];
288
- readonly tfheconfig_default: () => number;
289
- readonly __wbg_wbg_rayon_poolbuilder_free: (a: number, b: number) => void;
290
- readonly initThreadPool: (a: number) => any;
291
- readonly wbg_rayon_poolbuilder_build: (a: number) => void;
292
- readonly wbg_rayon_poolbuilder_numThreads: (a: number) => number;
293
- readonly wbg_rayon_poolbuilder_receiver: (a: number) => number;
294
- readonly wbg_rayon_start_worker: (a: number) => void;
295
- readonly __wbindgen_exn_store: (a: number) => void;
296
- readonly __externref_table_alloc: () => number;
297
- readonly __wbindgen_externrefs: WebAssembly.Table;
298
- readonly memory: WebAssembly.Memory;
299
- readonly __wbindgen_malloc: (a: number, b: number) => number;
300
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
301
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
302
- readonly __externref_table_dealloc: (a: number) => void;
303
- readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void;
304
- readonly __wbindgen_start: (a: number) => void;
305
- }
306
-
307
- export type SyncInitInput = BufferSource | WebAssembly.Module;
308
-
309
- /**
310
- * Instantiates the given `module`, which can either be bytes or
311
- * a precompiled `WebAssembly.Module`.
312
- *
313
- * @param {{ module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number }} module - Passing `SyncInitInput` directly is deprecated.
314
- * @param {WebAssembly.Memory} memory - Deprecated.
315
- *
316
- * @returns {InitOutput}
317
- */
318
- export function initSync(module: { module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number } | SyncInitInput, memory?: WebAssembly.Memory): InitOutput;
319
-
320
- /**
321
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
322
- * for everything else, calls `WebAssembly.instantiate` directly.
323
- *
324
- * @param {{ module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number }} module_or_path - Passing `InitInput` directly is deprecated.
325
- * @param {WebAssembly.Memory} memory - Deprecated.
326
- *
327
- * @returns {Promise<InitOutput>}
328
- */
329
- export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput>, memory?: WebAssembly.Memory, thread_stack_size?: number } | InitInput | Promise<InitInput>, memory?: WebAssembly.Memory): Promise<InitOutput>;
330
-
331
- ////////////////////////////////////////////////////////////////////////////////
332
-
333
- export function initAsync(...args: Parameters<typeof __wbg_init>): ReturnType<typeof __wbg_init>;
334
-
335
- export function getWasmInfo(): {
336
- name: string;
337
- version: string;
338
- downloadFiles: readonly {
339
- filename: string;
340
- sha256: string;
341
- }[];
342
- memory?: {
343
- byteLength: number;
344
- pages: number;
345
- };
346
- };
347
- export function getTfheWorkers(): object[];
348
- export function terminateWorkers(): Promise<unknown>;
349
- export type WasmAssetLoadMode =
350
- | 'embedded-base64'
351
- | 'verified-blob'
352
- | 'precheck-direct-url'
353
- | 'trusted-direct-url'
354
- | 'auto';
355
- export function setWorkerUrlConfig(parameters?: {
356
- readonly workerUrl?: URL | undefined;
357
- readonly wasmAssetLoadMode?: WasmAssetLoadMode | undefined;
358
- // Required: the SDK injects the resolved runtime kind (browser vs Node); the
359
- // worker bootstrap no longer detects it itself.
360
- readonly isBrowserLike: boolean;
361
- readonly logger?:
362
- | {
363
- debug: (message: string) => void;
364
- error: (message: string, cause: unknown) => void;
365
- }
366
- | undefined;
367
- }): void;