@typeberry/native 0.0.1-0330ab3 → 0.0.1-52b20cd
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/index.d.ts +115 -4
- package/index.js +349 -220
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare namespace bandersnatch_d_exports {
|
|
2
|
-
export { batch_verify_tickets, derive_public_key, ring_commitment, verify_seal };
|
|
2
|
+
export { InitInput$2 as InitInput, InitOutput$2 as InitOutput, SyncInitInput$2 as SyncInitInput, batch_verify_tickets, __wbg_init$2 as default, derive_public_key, initSync$2 as initSync, ring_commitment, verify_seal };
|
|
3
3
|
}
|
|
4
4
|
/* tslint:disable */
|
|
5
5
|
/* eslint-disable */
|
|
@@ -40,8 +40,39 @@ declare function verify_seal(keys: Uint8Array, signer_key_index: number, seal_da
|
|
|
40
40
|
* @returns {Uint8Array}
|
|
41
41
|
*/
|
|
42
42
|
declare function batch_verify_tickets(keys: Uint8Array, tickets_data: Uint8Array, vrf_input_data_len: number): Uint8Array;
|
|
43
|
+
type InitInput$2 = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
44
|
+
interface InitOutput$2 {
|
|
45
|
+
readonly memory: WebAssembly.Memory;
|
|
46
|
+
readonly ring_commitment: (a: number, b: number, c: number) => void;
|
|
47
|
+
readonly derive_public_key: (a: number, b: number, c: number) => void;
|
|
48
|
+
readonly verify_seal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
49
|
+
readonly batch_verify_tickets: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
50
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
51
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
52
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
53
|
+
}
|
|
54
|
+
type SyncInitInput$2 = BufferSource | WebAssembly.Module;
|
|
55
|
+
/**
|
|
56
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
57
|
+
* a precompiled `WebAssembly.Module`.
|
|
58
|
+
*
|
|
59
|
+
* @param {SyncInitInput} module
|
|
60
|
+
*
|
|
61
|
+
* @returns {InitOutput}
|
|
62
|
+
*/
|
|
63
|
+
declare function initSync$2(module: SyncInitInput$2): InitOutput$2;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
67
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
68
|
+
*
|
|
69
|
+
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
70
|
+
*
|
|
71
|
+
* @returns {Promise<InitOutput>}
|
|
72
|
+
*/
|
|
73
|
+
declare function __wbg_init$2(module_or_path?: InitInput$2 | Promise<InitInput$2>): Promise<InitOutput$2>;
|
|
43
74
|
declare namespace ed25519_wasm_d_exports {
|
|
44
|
-
export { verify_ed25519, verify_ed25519_batch };
|
|
75
|
+
export { InitInput$1 as InitInput, InitOutput$1 as InitOutput, SyncInitInput$1 as SyncInitInput, __wbg_init$1 as default, initSync$1 as initSync, verify_ed25519, verify_ed25519_batch };
|
|
45
76
|
}
|
|
46
77
|
/* tslint:disable */
|
|
47
78
|
/* eslint-disable */
|
|
@@ -62,8 +93,42 @@ declare function verify_ed25519(data: Uint8Array): Uint8Array;
|
|
|
62
93
|
*
|
|
63
94
|
*/
|
|
64
95
|
declare function verify_ed25519_batch(data: Uint8Array): boolean;
|
|
96
|
+
type InitInput$1 = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
97
|
+
interface InitOutput$1 {
|
|
98
|
+
readonly memory: WebAssembly.Memory;
|
|
99
|
+
readonly verify_ed25519: (a: number, b: number) => [number, number];
|
|
100
|
+
readonly verify_ed25519_batch: (a: number, b: number) => number;
|
|
101
|
+
readonly __wbindgen_export_0: WebAssembly.Table;
|
|
102
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
103
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
104
|
+
readonly __wbindgen_start: () => void;
|
|
105
|
+
}
|
|
106
|
+
type SyncInitInput$1 = BufferSource | WebAssembly.Module;
|
|
107
|
+
/**
|
|
108
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
109
|
+
* a precompiled `WebAssembly.Module`.
|
|
110
|
+
*
|
|
111
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
112
|
+
*
|
|
113
|
+
* @returns {InitOutput}
|
|
114
|
+
*/
|
|
115
|
+
declare function initSync$1(module: {
|
|
116
|
+
module: SyncInitInput$1;
|
|
117
|
+
} | SyncInitInput$1): InitOutput$1;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
121
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
122
|
+
*
|
|
123
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
124
|
+
*
|
|
125
|
+
* @returns {Promise<InitOutput>}
|
|
126
|
+
*/
|
|
127
|
+
declare function __wbg_init$1(module_or_path?: {
|
|
128
|
+
module_or_path: InitInput$1 | Promise<InitInput$1>;
|
|
129
|
+
} | InitInput$1 | Promise<InitInput$1>): Promise<InitOutput$1>;
|
|
65
130
|
declare namespace reed_solomon_wasm_d_exports {
|
|
66
|
-
export { ShardsCollection, decode, encode };
|
|
131
|
+
export { InitInput, InitOutput, ShardsCollection, SyncInitInput, decode, __wbg_init as default, encode, initSync };
|
|
67
132
|
}
|
|
68
133
|
/* tslint:disable */
|
|
69
134
|
/* eslint-disable */
|
|
@@ -129,5 +194,51 @@ declare class ShardsCollection {
|
|
|
129
194
|
*/
|
|
130
195
|
shard_len: number;
|
|
131
196
|
}
|
|
197
|
+
type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
198
|
+
interface InitOutput {
|
|
199
|
+
readonly memory: WebAssembly.Memory;
|
|
200
|
+
readonly __wbg_shardscollection_free: (a: number, b: number) => void;
|
|
201
|
+
readonly __wbg_get_shardscollection_length: (a: number) => number;
|
|
202
|
+
readonly __wbg_set_shardscollection_length: (a: number, b: number) => void;
|
|
203
|
+
readonly __wbg_get_shardscollection_shard_len: (a: number) => number;
|
|
204
|
+
readonly __wbg_set_shardscollection_shard_len: (a: number, b: number) => void;
|
|
205
|
+
readonly shardscollection_new: (a: number, b: number, c: number) => number;
|
|
206
|
+
readonly shardscollection_take_indices: (a: number) => number;
|
|
207
|
+
readonly shardscollection_take_data: (a: number) => number;
|
|
208
|
+
readonly encode: (a: number, b: number, c: number) => void;
|
|
209
|
+
readonly decode: (a: number, b: number, c: number, d: number) => void;
|
|
210
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
211
|
+
}
|
|
212
|
+
type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
213
|
+
/**
|
|
214
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
215
|
+
* a precompiled `WebAssembly.Module`.
|
|
216
|
+
*
|
|
217
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
218
|
+
*
|
|
219
|
+
* @returns {InitOutput}
|
|
220
|
+
*/
|
|
221
|
+
declare function initSync(module: {
|
|
222
|
+
module: SyncInitInput;
|
|
223
|
+
} | SyncInitInput): InitOutput;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
227
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
228
|
+
*
|
|
229
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
230
|
+
*
|
|
231
|
+
* @returns {Promise<InitOutput>}
|
|
232
|
+
*/
|
|
233
|
+
declare function __wbg_init(module_or_path?: {
|
|
234
|
+
module_or_path: InitInput | Promise<InitInput>;
|
|
235
|
+
} | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region native/index.d.ts
|
|
238
|
+
declare const wasm: {
|
|
239
|
+
bandersnatch: InitOutput$2;
|
|
240
|
+
ed25519: InitOutput$1;
|
|
241
|
+
reedSolomon: InitOutput;
|
|
242
|
+
};
|
|
132
243
|
//#endregion
|
|
133
|
-
export { bandersnatch_d_exports as bandersnatch, ed25519_wasm_d_exports as ed25519, reed_solomon_wasm_d_exports as reedSolomon };
|
|
244
|
+
export { bandersnatch_d_exports as bandersnatch, ed25519_wasm_d_exports as ed25519, reed_solomon_wasm_d_exports as reedSolomon, wasm };
|