@typeberry/native 0.0.1-6e4ec82 → 0.0.1-7c38bfd
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 +91 -13
- package/index.js +255 -159
- package/package.json +1 -1
- package/6cfc4680c1b51f91.wasm +0 -0
- package/d8c79d763f7586dd.wasm +0 -0
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 { InitInput, InitOutput, SyncInitInput, __wbg_init as default, initSync, 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,8 @@ declare function verify_ed25519(data: Uint8Array): Uint8Array;
|
|
|
62
93
|
*
|
|
63
94
|
*/
|
|
64
95
|
declare function verify_ed25519_batch(data: Uint8Array): boolean;
|
|
65
|
-
type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
66
|
-
interface InitOutput {
|
|
96
|
+
type InitInput$1 = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
97
|
+
interface InitOutput$1 {
|
|
67
98
|
readonly memory: WebAssembly.Memory;
|
|
68
99
|
readonly verify_ed25519: (a: number, b: number) => [number, number];
|
|
69
100
|
readonly verify_ed25519_batch: (a: number, b: number) => number;
|
|
@@ -72,7 +103,7 @@ interface InitOutput {
|
|
|
72
103
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
73
104
|
readonly __wbindgen_start: () => void;
|
|
74
105
|
}
|
|
75
|
-
type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
106
|
+
type SyncInitInput$1 = BufferSource | WebAssembly.Module;
|
|
76
107
|
/**
|
|
77
108
|
* Instantiates the given `module`, which can either be bytes or
|
|
78
109
|
* a precompiled `WebAssembly.Module`.
|
|
@@ -81,9 +112,9 @@ type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
|
81
112
|
*
|
|
82
113
|
* @returns {InitOutput}
|
|
83
114
|
*/
|
|
84
|
-
declare function initSync(module: {
|
|
85
|
-
module: SyncInitInput;
|
|
86
|
-
} | SyncInitInput): InitOutput;
|
|
115
|
+
declare function initSync$1(module: {
|
|
116
|
+
module: SyncInitInput$1;
|
|
117
|
+
} | SyncInitInput$1): InitOutput$1;
|
|
87
118
|
|
|
88
119
|
/**
|
|
89
120
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
@@ -93,11 +124,11 @@ declare function initSync(module: {
|
|
|
93
124
|
*
|
|
94
125
|
* @returns {Promise<InitOutput>}
|
|
95
126
|
*/
|
|
96
|
-
declare function __wbg_init(module_or_path?: {
|
|
97
|
-
module_or_path: InitInput | Promise<InitInput>;
|
|
98
|
-
} | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
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>;
|
|
99
130
|
declare namespace reed_solomon_wasm_d_exports {
|
|
100
|
-
export { ShardsCollection, decode, encode };
|
|
131
|
+
export { InitInput, InitOutput, ShardsCollection, SyncInitInput, decode, __wbg_init as default, encode, initSync };
|
|
101
132
|
}
|
|
102
133
|
/* tslint:disable */
|
|
103
134
|
/* eslint-disable */
|
|
@@ -163,5 +194,52 @@ declare class ShardsCollection {
|
|
|
163
194
|
*/
|
|
164
195
|
shard_len: number;
|
|
165
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 function initAll(): Promise<void>;
|
|
239
|
+
declare const init: {
|
|
240
|
+
bandersnatch: () => Promise<InitOutput$2>;
|
|
241
|
+
ed25519: () => Promise<InitOutput$1>;
|
|
242
|
+
reedSolomon: () => Promise<InitOutput>;
|
|
243
|
+
};
|
|
166
244
|
//#endregion
|
|
167
|
-
export { bandersnatch_d_exports as bandersnatch, ed25519_wasm_d_exports as ed25519, reed_solomon_wasm_d_exports as reedSolomon };
|
|
245
|
+
export { bandersnatch_d_exports as bandersnatch, ed25519_wasm_d_exports as ed25519, init, initAll, reed_solomon_wasm_d_exports as reedSolomon };
|