// Copyright (c) 2018-2023 Coinbase, Inc.
// Licensed under the Apache License, version 2.0
import { Callback } from '../core/type';
import { JSONRPCRequest, JSONRPCResponse } from './JSONRPC';
export interface Web3Provider {
send(request: JSONRPCRequest): JSONRPCResponse;
send(request: JSONRPCRequest[]): JSONRPCResponse[];
send(request: JSONRPCRequest, callback: Callback): void;
send(request: JSONRPCRequest[], callback: Callback): void;
send(method: string, params?: unknown[] | unknown): Promise;
sendAsync(request: JSONRPCRequest, callback: Callback): void;
sendAsync(request: JSONRPCRequest[], callback: Callback): void;
request(args: RequestArguments): Promise;
host: string;
connected: boolean;
chainId: string;
supportsSubscriptions(): boolean;
disconnect(): boolean;
}
export interface RequestArguments {
/** The RPC method to request. */
method: string;
/** The params of the RPC method, if any. */
params?: unknown;
}