PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@polkadot/wasm-bridge/cjs

Просмотр файла: bridge.d.ts

import type { BridgeBase, InitFn, WasmBaseInstance } from './types.js';
/**
 * @name Bridge
 * @description
 * Creates a bridge between the JS and WASM environments.
 *
 * For any bridge it is passed an function which is then called internally at the
 * time of initialization. This affectively implements the layer between WASM and
 * the native environment, providing all the plumbing needed for the Wbg classes.
 */
export declare class Bridge<C extends WasmBaseInstance> implements BridgeBase<C> {
    #private;
    constructor(createWasm: InitFn<C>);
    /** @description Returns the init error */
    get error(): string | null;
    /** @description Returns the init type */
    get type(): 'asm' | 'wasm' | 'none';
    /** @description Returns the created wasm interface */
    get wasm(): C | null;
    /** @description Performs the wasm initialization */
    init(createWasm?: InitFn<C>): Promise<C | null>;
    /**
     * @internal
     * @description Gets an object from the heap
     */
    getObject(idx: number): unknown;
    /**
     * @internal
     * @description Removes an object from the heap
     */
    dropObject(idx: number): void;
    /**
     * @internal
     * @description Retrieves and removes an object to the heap
     */
    takeObject(idx: number): unknown;
    /**
     * @internal
     * @description Adds an object to the heap
     */
    addObject(obj: unknown): number;
    /**
     * @internal
     * @description Retrieve an Int32 in the WASM interface
     */
    getInt32(): Int32Array;
    /**
     * @internal
     * @description Retrieve an Uint8Array in the WASM interface
     */
    getUint8(): Uint8Array;
    /**
     * @internal
     * @description Retrieves an Uint8Array in the WASM interface
     */
    getU8a(ptr: number, len: number): Uint8Array;
    /**
     * @internal
     * @description Retrieves a string in the WASM interface
     */
    getString(ptr: number, len: number): string;
    /**
     * @internal
     * @description Allocates an Uint8Array in the WASM interface
     */
    allocU8a(arg: Uint8Array): [number, number];
    /**
     * @internal
     * @description Allocates a string in the WASM interface
     */
    allocString(arg: string): [number, number];
    /**
     * @internal
     * @description Retrieves an Uint8Array from the WASM interface
     */
    resultU8a(): Uint8Array;
    /**
     * @internal
     * @description Retrieve a string from the WASM interface
     */
    resultString(): string;
}

Выполнить команду


Для локальной разработки. Не используйте в интернете!