@typeberry/native 0.0.4-22d630b → 0.0.4-a402d86
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 +18 -18
- package/index.js +69 -62
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,13 @@ declare namespace bandersnatch_d_exports {
|
|
|
3
3
|
}
|
|
4
4
|
/* tslint:disable */
|
|
5
5
|
/* eslint-disable */
|
|
6
|
+
/**
|
|
7
|
+
* Seal verification as defined in:
|
|
8
|
+
* https://graypaper.fluffylabs.dev/#/68eaa1f/0eff000eff00?v=0.6.4
|
|
9
|
+
* or
|
|
10
|
+
* https://graypaper.fluffylabs.dev/#/68eaa1f/0e54010e5401?v=0.6.4
|
|
11
|
+
*/
|
|
12
|
+
declare function verify_seal(signer_key: Uint8Array, seal_data: Uint8Array, payload: Uint8Array, aux_data: Uint8Array): Uint8Array;
|
|
6
13
|
/**
|
|
7
14
|
* Generate ring commitment given concatenation of ring keys.
|
|
8
15
|
*/
|
|
@@ -13,13 +20,6 @@ declare function ring_commitment(keys: Uint8Array): Uint8Array;
|
|
|
13
20
|
* returns: `Vec<u8>` containing the exit (1 byte) status followed by the (32 bytes) public key
|
|
14
21
|
*/
|
|
15
22
|
declare function derive_public_key(seed: Uint8Array): Uint8Array;
|
|
16
|
-
/**
|
|
17
|
-
* Seal verification as defined in:
|
|
18
|
-
* https://graypaper.fluffylabs.dev/#/68eaa1f/0eff000eff00?v=0.6.4
|
|
19
|
-
* or
|
|
20
|
-
* https://graypaper.fluffylabs.dev/#/68eaa1f/0e54010e5401?v=0.6.4
|
|
21
|
-
*/
|
|
22
|
-
declare function verify_seal(signer_key: Uint8Array, seal_data: Uint8Array, payload: Uint8Array, aux_data: Uint8Array): Uint8Array;
|
|
23
23
|
/**
|
|
24
24
|
* Verify multiple tickets at once as defined in:
|
|
25
25
|
* https://graypaper.fluffylabs.dev/#/68eaa1f/0f3e000f3e00?v=0.6.4
|
|
@@ -30,10 +30,10 @@ declare function batch_verify_tickets(ring_size: number, commitment: Uint8Array,
|
|
|
30
30
|
type InitInput$2 = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
31
31
|
interface InitOutput$2 {
|
|
32
32
|
readonly memory: WebAssembly.Memory;
|
|
33
|
-
readonly
|
|
33
|
+
readonly batch_verify_tickets: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
34
34
|
readonly derive_public_key: (a: number, b: number) => [number, number];
|
|
35
|
+
readonly ring_commitment: (a: number, b: number) => [number, number];
|
|
35
36
|
readonly verify_seal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
36
|
-
readonly batch_verify_tickets: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
37
37
|
readonly __wbindgen_export_0: WebAssembly.Table;
|
|
38
38
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
39
39
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
@@ -144,7 +144,6 @@ declare function decode(original_count: number, recovery_count: number, shards:
|
|
|
144
144
|
*/
|
|
145
145
|
declare class ShardsCollection {
|
|
146
146
|
free(): void;
|
|
147
|
-
constructor(shard_len: number, data: Uint8Array, indices?: Uint16Array | null);
|
|
148
147
|
/**
|
|
149
148
|
* Extract the `indices` from this shards container.
|
|
150
149
|
*
|
|
@@ -152,6 +151,7 @@ declare class ShardsCollection {
|
|
|
152
151
|
* NOTE that subsequent calls to that method will return `None`.
|
|
153
152
|
*/
|
|
154
153
|
take_indices(): Uint16Array | undefined;
|
|
154
|
+
constructor(shard_len: number, data: Uint8Array, indices?: Uint16Array | null);
|
|
155
155
|
/**
|
|
156
156
|
* Take the underlying `data` to the JS side.
|
|
157
157
|
*
|
|
@@ -171,16 +171,16 @@ declare class ShardsCollection {
|
|
|
171
171
|
type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
172
172
|
interface InitOutput {
|
|
173
173
|
readonly memory: WebAssembly.Memory;
|
|
174
|
-
readonly __wbg_shardscollection_free: (a: number, b: number) => void;
|
|
175
174
|
readonly __wbg_get_shardscollection_length: (a: number) => number;
|
|
176
|
-
readonly __wbg_set_shardscollection_length: (a: number, b: number) => void;
|
|
177
175
|
readonly __wbg_get_shardscollection_shard_len: (a: number) => number;
|
|
176
|
+
readonly __wbg_set_shardscollection_length: (a: number, b: number) => void;
|
|
178
177
|
readonly __wbg_set_shardscollection_shard_len: (a: number, b: number) => void;
|
|
178
|
+
readonly __wbg_shardscollection_free: (a: number, b: number) => void;
|
|
179
|
+
readonly decode: (a: number, b: number, c: number) => [number, number, number];
|
|
180
|
+
readonly encode: (a: number, b: number) => [number, number, number];
|
|
179
181
|
readonly shardscollection_new: (a: number, b: any, c: number) => number;
|
|
180
|
-
readonly shardscollection_take_indices: (a: number) => any;
|
|
181
182
|
readonly shardscollection_take_data: (a: number) => any;
|
|
182
|
-
readonly
|
|
183
|
-
readonly decode: (a: number, b: number, c: number) => [number, number, number];
|
|
183
|
+
readonly shardscollection_take_indices: (a: number) => any;
|
|
184
184
|
readonly __wbindgen_export_0: WebAssembly.Table;
|
|
185
185
|
readonly __externref_table_alloc: () => number;
|
|
186
186
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
@@ -214,9 +214,9 @@ declare function __wbg_init(module_or_path?: {
|
|
|
214
214
|
//#region native/index.d.ts
|
|
215
215
|
declare function initAll(): Promise<void>;
|
|
216
216
|
declare const init: {
|
|
217
|
-
bandersnatch:
|
|
218
|
-
ed25519:
|
|
219
|
-
reedSolomon:
|
|
217
|
+
bandersnatch: any;
|
|
218
|
+
ed25519: any;
|
|
219
|
+
reedSolomon: any;
|
|
220
220
|
};
|
|
221
221
|
//#endregion
|
|
222
222
|
export { bandersnatch_d_exports as bandersnatch, ed25519_wasm_d_exports as ed25519, init, initAll, reed_solomon_wasm_d_exports as reedSolomon };
|