HttpProvider <API>
Hierarchy
- Web3BaseProvider<API>
- HttpProvider
Index
Constructors
publicconstructor
Type parameters
- API: unknown = EthExecutionAPI
Parameters
clientUrl: string
optionalhttpProviderOptions: HttpProviderOptions
Returns default<API>
Accessors
[symbol]
Returns boolean
Methods
asEIP1193Provider
Returns Eip1193Compatible<API>
A new instance of the provider with the request method fully compatible with EIP-1193
publicconnect
Returns void
publicdisconnect
Returns void
publicgetStatus
Returns Web3ProviderStatus
publicon
Returns void
publiconce
Returns void
publicreconnect
Returns void
publicremoveAllListeners
Returns void
publicremoveListener
Returns void
publicrequest
Type parameters
- Method: string
- ResultType = Web3APIReturnType<API, Method>
Parameters
payload: Web3APIPayload<API, Method>
optionalrequestOptions: RequestInit
Returns Promise<JsonRpcResponseWithResult<ResultType>>
publicreset
Returns void
send
Type parameters
- ResultType = JsonRpcResult
- P = unknown
Parameters
payload: JsonRpcPayload<P>
Request Payload
callback: (err: null | Error, response?: JsonRpcResponse<ResultType, JsonRpcResult>) => void
Callback
Returns void
sendAsync
Type parameters
- R = JsonRpcResult
- P = unknown
Parameters
payload: JsonRpcPayload<P>
Request Payload
Returns Promise<JsonRpcResponse<R, JsonRpcResult>>
publicsupportsSubscriptions
Returns boolean
staticisWeb3Provider
Parameters
provider: unknown
Returns boolean
Modify the return type of the request method to be fully compatible with EIP-1193
[deprecated] In the future major releases (>= v5) all providers are supposed to be fully compatible with EIP-1193. So this method will not be needed and would not be available in the future.