@typeberry/lib 0.0.2 → 0.0.3-18c25a6

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