@typeberry/lib 0.0.2-9f100b1 → 0.0.2
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 +39 -28
- package/index.js +971 -291
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -4470,63 +4470,74 @@ declare namespace bandersnatch_d_exports {
|
|
|
4470
4470
|
}
|
|
4471
4471
|
/* tslint:disable */
|
|
4472
4472
|
/* eslint-disable */
|
|
4473
|
+
/**
|
|
4474
|
+
* @param {Uint8Array} keys
|
|
4475
|
+
* @returns {Uint8Array}
|
|
4476
|
+
*/
|
|
4473
4477
|
declare function ring_commitment(keys: Uint8Array): Uint8Array;
|
|
4474
4478
|
/**
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
+
* Derive Private and Public Key from Seed
|
|
4480
|
+
*
|
|
4481
|
+
* returns: `Vec<u8>` containing the exit (1 byte) status followed by the (32 bytes) public key
|
|
4482
|
+
* @param {Uint8Array} seed
|
|
4483
|
+
* @returns {Uint8Array}
|
|
4484
|
+
*/
|
|
4479
4485
|
declare function derive_public_key(seed: Uint8Array): Uint8Array;
|
|
4480
4486
|
/**
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4487
|
+
* Seal verification as defined in:
|
|
4488
|
+
* https://graypaper.fluffylabs.dev/#/68eaa1f/0eff000eff00?v=0.6.4
|
|
4489
|
+
* or
|
|
4490
|
+
* https://graypaper.fluffylabs.dev/#/68eaa1f/0e54010e5401?v=0.6.4
|
|
4491
|
+
* @param {Uint8Array} keys
|
|
4492
|
+
* @param {number} signer_key_index
|
|
4493
|
+
* @param {Uint8Array} seal_data
|
|
4494
|
+
* @param {Uint8Array} payload
|
|
4495
|
+
* @param {Uint8Array} aux_data
|
|
4496
|
+
* @returns {Uint8Array}
|
|
4497
|
+
*/
|
|
4486
4498
|
declare function verify_seal(keys: Uint8Array, signer_key_index: number, seal_data: Uint8Array, payload: Uint8Array, aux_data: Uint8Array): Uint8Array;
|
|
4487
4499
|
/**
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4500
|
+
* Verify multiple tickets at once as defined in:
|
|
4501
|
+
* https://graypaper.fluffylabs.dev/#/68eaa1f/0f3e000f3e00?v=0.6.4
|
|
4502
|
+
*
|
|
4503
|
+
* NOTE: the aux_data of VRF function is empty!
|
|
4504
|
+
* @param {Uint8Array} keys
|
|
4505
|
+
* @param {Uint8Array} tickets_data
|
|
4506
|
+
* @param {number} vrf_input_data_len
|
|
4507
|
+
* @returns {Uint8Array}
|
|
4508
|
+
*/
|
|
4493
4509
|
declare function batch_verify_tickets(keys: Uint8Array, tickets_data: Uint8Array, vrf_input_data_len: number): Uint8Array;
|
|
4494
4510
|
type InitInput$2 = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
4495
4511
|
interface InitOutput$2 {
|
|
4496
4512
|
readonly memory: WebAssembly.Memory;
|
|
4497
|
-
readonly ring_commitment: (a: number, b: number) =>
|
|
4498
|
-
readonly derive_public_key: (a: number, b: number) =>
|
|
4499
|
-
readonly verify_seal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) =>
|
|
4500
|
-
readonly batch_verify_tickets: (a: number, b: number, c: number, d: number, e: number) =>
|
|
4501
|
-
readonly
|
|
4513
|
+
readonly ring_commitment: (a: number, b: number, c: number) => void;
|
|
4514
|
+
readonly derive_public_key: (a: number, b: number, c: number) => void;
|
|
4515
|
+
readonly verify_seal: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
4516
|
+
readonly batch_verify_tickets: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
4517
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
4502
4518
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
4503
4519
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
4504
|
-
readonly __wbindgen_start: () => void;
|
|
4505
4520
|
}
|
|
4506
4521
|
type SyncInitInput$2 = BufferSource | WebAssembly.Module;
|
|
4507
4522
|
/**
|
|
4508
4523
|
* Instantiates the given `module`, which can either be bytes or
|
|
4509
4524
|
* a precompiled `WebAssembly.Module`.
|
|
4510
4525
|
*
|
|
4511
|
-
* @param {
|
|
4526
|
+
* @param {SyncInitInput} module
|
|
4512
4527
|
*
|
|
4513
4528
|
* @returns {InitOutput}
|
|
4514
4529
|
*/
|
|
4515
|
-
declare function initSync$2(module:
|
|
4516
|
-
module: SyncInitInput$2;
|
|
4517
|
-
} | SyncInitInput$2): InitOutput$2;
|
|
4530
|
+
declare function initSync$2(module: SyncInitInput$2): InitOutput$2;
|
|
4518
4531
|
|
|
4519
4532
|
/**
|
|
4520
4533
|
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
4521
4534
|
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
4522
4535
|
*
|
|
4523
|
-
* @param {
|
|
4536
|
+
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
4524
4537
|
*
|
|
4525
4538
|
* @returns {Promise<InitOutput>}
|
|
4526
4539
|
*/
|
|
4527
|
-
declare function __wbg_init$2(module_or_path?:
|
|
4528
|
-
module_or_path: InitInput$2 | Promise<InitInput$2>;
|
|
4529
|
-
} | InitInput$2 | Promise<InitInput$2>): Promise<InitOutput$2>;
|
|
4540
|
+
declare function __wbg_init$2(module_or_path?: InitInput$2 | Promise<InitInput$2>): Promise<InitOutput$2>;
|
|
4530
4541
|
//#endregion
|
|
4531
4542
|
//#region native/index.d.ts
|
|
4532
4543
|
declare function initAll(): Promise<void>;
|