import { BadgeOptions } from "../badge/badgeManager"; import { LogLevel } from "../logger/logger"; import { RPCConsumerServer } from "../rpcconsumer/rpcconsumer_server"; import { SendRelayOptions, SendRelaysBatchOptions, SendRestRelayOptions } from "../chainlib/base_chain_parser"; import { ProviderOptimizerStrategy } from "../providerOptimizer/providerOptimizer"; import { ChainIDsToInit } from "../stateTracker/types/types"; declare type RelayReceiver = string; /** * Options for initializing the LavaSDK. * @param privateKey // Required: The private key of the staked Lava client for the specified chainID * @param badge // Required: Public URL of badge server and ID of the project you want to connect. Remove privateKey if badge is enabled. * @param chainIds // Required: The ID of the chain you want to query or an array of chain ids example "ETH1" | ["ETH1", "LAV1"] * @param pairingListConfig // Optional: The Lava pairing list config used for communicating with the Lava network * @param network // Optional: The network from pairingListConfig to be used ["mainnet", "testnet"] * @param geolocation // Optional: The geolocation to be used ["1" or "USC" for US central, "2" or "EU" for Europe, 4: "USE", 8: "USW", 16: "AF", 32: "AS", 64: "AU"] * @param lavaChainId // Optional: The Lava chain ID (default value for Lava Testnet) * @param secure // Optional: communicates through https, this is a temporary flag that will be disabled once the chain will use https by default * @param allowInsecureTransport // Optional: indicates to use a insecure transport when connecting the provider, this is used for testing purposes only and allows self-signed certificates to be used * @param logLevel // Optional for log level settings, "debug" | "info" | "warn" | "error" | "success" | "NoPrints" * @param transport // Optional for transport settings if you would like to change the default transport settings. see utils/browser.ts for the current settings * @param providerOptimizerStrategy // Optional: the strategy to use to pick providers (default: balanced) * @param maxConcurrentProviders // Optional: the maximum number of providers to use concurrently (default: 3)} */ export interface LavaSDKOptions { privateKey?: string; badge?: BadgeOptions; chainIds: ChainIDsToInit; pairingListConfig?: string; network?: string; geolocation?: string; lavaChainId?: string; secure?: boolean; allowInsecureTransport?: boolean; logLevel?: string | LogLevel; transport?: any; providerOptimizerStrategy?: ProviderOptimizerStrategy; maxConcurrentProviders?: number; } export declare class LavaSDK { private privKey; private walletAddress; private network; private pairingListConfig; private geolocation; private lavaChainId; private badgeManager; private account; private secure; private allowInsecureTransport; private chainIDRpcInterface; private transport; private rpcConsumerServerRouter; private relayer?; private providerOptimizerStrategy; private maxConcurrentProviders; /** * Create Lava-SDK instance * * Use Lava-SDK for dAccess with a supported network. You can find a list of supported networks and their chain IDs at (url). * * @async * @param {LavaSDKOptions} options The options to use for initializing the LavaSDK. * * @returns A promise that resolves when the LavaSDK has been successfully initialized, returns LavaSDK object. */ constructor(options: LavaSDKOptions); static create(options: LavaSDKOptions): Promise; init(): Promise; private setupChainAssets; getRpcConsumerServer(options: SendRelayOptions | SendRelaysBatchOptions | SendRestRelayOptions): RPCConsumerServer | Error; sendRelay(options: SendRelayOptions | SendRelaysBatchOptions | SendRestRelayOptions): Promise; protected getRouterKey(chainId: string, apiInterface: string): RelayReceiver; protected isRest(options: SendRelayOptions | SendRelaysBatchOptions | SendRestRelayOptions): options is SendRestRelayOptions; private getRpcConsumerServerRaw; getConsumerMap(): Map; } export { SendRelayOptions, SendRestRelayOptions };