/** * Copyright (c) 2018-2023, BOTLabs GmbH. * * This source code is licensed under the BSD 4-Clause "Original" license * found in the LICENSE file in the root directory of this source tree. */ import { ApiPromise } from '@polkadot/api'; import type { ApiOptions } from '@polkadot/api/types'; import { ConfigService } from '@kiltprotocol/config'; /** * Prepares crypto modules (required for identity creation and others) and calls ConfigService.set(). * * @param configs Arguments to pass on to ConfigService.set(). * @returns Promise that must be awaited to assure crypto is ready. */ export declare function init>(configs?: K): Promise; /** * Connects to the KILT Blockchain and passes the initialized api instance to `init()`, making it available for functions in the sdk. * * @param blockchainRpcWsUrl WebSocket URL of the RPC endpoint exposed by a node that is part of the Kilt blockchain network you wish to connect to. * @param apiOpts Additional parameters to be passed to ApiPromise.create(). * @param apiOpts.noInitWarn Allows suppressing warnings related to runtime types and augmentation. * By default warnings are shown if the global log level is 'warn' or lower and disabled on 'error' or higher. * @returns An instance of ApiPromise. */ export declare function connect(blockchainRpcWsUrl: string, { noInitWarn, // by default warnings are disabled on log level error and higher ...apiOpts }?: Omit): Promise; /** * Disconnects the cached connection and clears the cache. * * @returns If there was a cached and connected connection, or not. */ export declare function disconnect(): Promise;