/* tslint:disable */ /* eslint-disable */ /** * Creates a method handler with the given client options. * @param {string} clientOptions * @returns {ClientMethodHandler} */ export function createClient(clientOptions: string): ClientMethodHandler; /** * Necessary for compatibility with the node.js bindings. * @param {ClientMethodHandler} _client_method_handler * @returns {Promise} */ export function destroyClient(_client_method_handler: ClientMethodHandler): Promise; /** * Handles a method, returns the response as a JSON-encoded string. * * Returns an error if the response itself is an error or panic. * @param {string} method * @param {ClientMethodHandler} methodHandler * @returns {Promise} */ export function callClientMethodAsync(method: string, methodHandler: ClientMethodHandler): Promise; /** * MQTT is not supported for WebAssembly bindings. * * Throws an error if called, only included for compatibility * with the Node.js bindings TypeScript definitions. * @param {string[]} _topics * @param {Function} _callback */ export function listenMqtt(_topics: string[], _callback: Function): void; /** * Creates a method handler with the given secret_manager options. * @param {string} options * @returns {SecretManagerMethodHandler} */ export function createSecretManager(options: string): SecretManagerMethodHandler; /** * Handles a method, returns the response as a JSON-encoded string. * * Returns an error if the response itself is an error or panic. * @param {string} method * @param {SecretManagerMethodHandler} methodHandler * @returns {Promise} */ export function callSecretManagerMethodAsync(method: string, methodHandler: SecretManagerMethodHandler): Promise; /** * Stronghold snapshot migration is not supported for WebAssembly bindings. * * Throws an error if called, only included for compatibility * with the Node.js bindings TypeScript definitions. * @param {string} _current_path * @param {string} _current_password * @param {string} _salt * @param {number} _rounds * @param {string | undefined} [_new_path] * @param {string | undefined} [_new_password] */ export function migrateStrongholdSnapshotV2ToV3(_current_path: string, _current_password: string, _salt: string, _rounds: number, _new_path?: string, _new_password?: string): void; /** * Handles a method, returns the response as a JSON-encoded string. * * Returns an error if the response itself is an error or panic. * @param {string} method * @returns {any} */ export function callUtilsMethodRust(method: string): any; /** * Creates a method handler with the given options. * @param {string} options * @returns {WalletMethodHandler} */ export function createWallet(options: string): WalletMethodHandler; /** * @param {WalletMethodHandler} method_handler * @returns {Promise} */ export function destroyWallet(method_handler: WalletMethodHandler): Promise; /** * @param {WalletMethodHandler} method_handler * @returns {Promise} */ export function getClientFromWallet(method_handler: WalletMethodHandler): Promise; /** * @param {WalletMethodHandler} method_handler * @returns {Promise} */ export function getSecretManagerFromWallet(method_handler: WalletMethodHandler): Promise; /** * Handles a method, returns the response as a JSON-encoded string. * * Returns an error if the response itself is an error or panic. * @param {string} method * @param {WalletMethodHandler} method_handler * @returns {Promise} */ export function callWalletMethodAsync(method: string, method_handler: WalletMethodHandler): Promise; /** * It takes a list of event types, registers a callback function, and then listens for events of those * types * * Arguments: * * * `vec`: An array of strings that represent the event types you want to listen to. * * `callback`: A JavaScript function that will be called when a wallet event occurs. * * `method_handler`: This is the same method handler that we used in the previous section. * @param {Array} vec * @param {Function} callback * @param {WalletMethodHandler} method_handler * @returns {Promise} */ export function listenWalletAsync(vec: Array, callback: Function, method_handler: WalletMethodHandler): Promise; /** * Rocksdb chrysalis migration is not supported for WebAssembly bindings. * * Throws an error if called, only included for compatibility * with the Node.js bindings TypeScript definitions. * @param {string} _storage_path * @param {string | undefined} [_password] */ export function migrateDbChrysalisToStardust(_storage_path: string, _password?: string): void; /** * Initializes the console error panic hook for better panic messages. * Gets automatically called when using wasm */ export function start(): void; /** * The Wasm bindings do not support internal logging configuration yet. * * Calling this will enable all rust logs to be show * @param {string} _config * @returns {Promise} */ export function initLogger(_config: string): Promise; /** * The Client method handler. */ export class ClientMethodHandler { free(): void; } /** * The SecretManager method handler. */ export class SecretManagerMethodHandler { free(): void; } /** * The Wallet method handler. */ export class WalletMethodHandler { free(): void; }