|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +export function start(): void; |
| 4 | +/** |
| 5 | + * The `ReadableStreamType` enum. |
| 6 | + * |
| 7 | + * *This API requires the following crate features to be activated: `ReadableStreamType`* |
| 8 | + */ |
| 9 | +type ReadableStreamType = "bytes"; |
| 10 | +export class EchoNode { |
| 11 | + private constructor(); |
| 12 | + free(): void; |
| 13 | + static spawn(): Promise<EchoNode>; |
| 14 | + events(): ReadableStream; |
| 15 | + node_id(): string; |
| 16 | + connect(node_id: string, payload: string): ReadableStream; |
| 17 | + remote_info(): any[]; |
| 18 | +} |
| 19 | +export class IntoUnderlyingByteSource { |
| 20 | + private constructor(); |
| 21 | + free(): void; |
| 22 | + start(controller: ReadableByteStreamController): void; |
| 23 | + pull(controller: ReadableByteStreamController): Promise<any>; |
| 24 | + cancel(): void; |
| 25 | + readonly type: ReadableStreamType; |
| 26 | + readonly autoAllocateChunkSize: number; |
| 27 | +} |
| 28 | +export class IntoUnderlyingSink { |
| 29 | + private constructor(); |
| 30 | + free(): void; |
| 31 | + write(chunk: any): Promise<any>; |
| 32 | + close(): Promise<any>; |
| 33 | + abort(reason: any): Promise<any>; |
| 34 | +} |
| 35 | +export class IntoUnderlyingSource { |
| 36 | + private constructor(); |
| 37 | + free(): void; |
| 38 | + pull(controller: ReadableStreamDefaultController): Promise<any>; |
| 39 | + cancel(): void; |
| 40 | +} |
| 41 | + |
| 42 | +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; |
| 43 | + |
| 44 | +export interface InitOutput { |
| 45 | + readonly memory: WebAssembly.Memory; |
| 46 | + readonly start: () => void; |
| 47 | + readonly __wbg_echonode_free: (a: number, b: number) => void; |
| 48 | + readonly echonode_spawn: () => number; |
| 49 | + readonly echonode_events: (a: number) => number; |
| 50 | + readonly echonode_node_id: (a: number, b: number) => void; |
| 51 | + readonly echonode_connect: (a: number, b: number, c: number, d: number, e: number, f: number) => void; |
| 52 | + readonly echonode_remote_info: (a: number, b: number) => void; |
| 53 | + readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void; |
| 54 | + readonly intounderlyingbytesource_type: (a: number) => number; |
| 55 | + readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number; |
| 56 | + readonly intounderlyingbytesource_start: (a: number, b: number) => void; |
| 57 | + readonly intounderlyingbytesource_pull: (a: number, b: number) => number; |
| 58 | + readonly intounderlyingbytesource_cancel: (a: number) => void; |
| 59 | + readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void; |
| 60 | + readonly intounderlyingsource_pull: (a: number, b: number) => number; |
| 61 | + readonly intounderlyingsource_cancel: (a: number) => void; |
| 62 | + readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void; |
| 63 | + readonly intounderlyingsink_write: (a: number, b: number) => number; |
| 64 | + readonly intounderlyingsink_close: (a: number) => number; |
| 65 | + readonly intounderlyingsink_abort: (a: number, b: number) => number; |
| 66 | + readonly ring_core_0_17_8_bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void; |
| 67 | + readonly __wbindgen_export_0: (a: number) => void; |
| 68 | + readonly __wbindgen_export_1: (a: number, b: number, c: number) => void; |
| 69 | + readonly __wbindgen_export_2: (a: number, b: number) => number; |
| 70 | + readonly __wbindgen_export_3: (a: number, b: number, c: number, d: number) => number; |
| 71 | + readonly __wbindgen_export_4: WebAssembly.Table; |
| 72 | + readonly __wbindgen_add_to_stack_pointer: (a: number) => number; |
| 73 | + readonly __wbindgen_export_5: (a: number, b: number, c: number) => void; |
| 74 | + readonly __wbindgen_export_6: (a: number, b: number) => void; |
| 75 | + readonly __wbindgen_export_7: (a: number, b: number, c: number) => void; |
| 76 | + readonly __wbindgen_export_8: (a: number, b: number, c: number, d: number) => void; |
| 77 | + readonly __wbindgen_start: () => void; |
| 78 | +} |
| 79 | + |
| 80 | +export type SyncInitInput = BufferSource | WebAssembly.Module; |
| 81 | +/** |
| 82 | +* Instantiates the given `module`, which can either be bytes or |
| 83 | +* a precompiled `WebAssembly.Module`. |
| 84 | +* |
| 85 | +* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. |
| 86 | +* |
| 87 | +* @returns {InitOutput} |
| 88 | +*/ |
| 89 | +export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; |
| 90 | + |
| 91 | +/** |
| 92 | +* If `module_or_path` is {RequestInfo} or {URL}, makes a request and |
| 93 | +* for everything else, calls `WebAssembly.instantiate` directly. |
| 94 | +* |
| 95 | +* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated. |
| 96 | +* |
| 97 | +* @returns {Promise<InitOutput>} |
| 98 | +*/ |
| 99 | +export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>; |
0 commit comments