HttpProvider <API>
Hierarchy
- Web3BaseProvider<API>
- HttpProvider
Index
Constructors
constructor
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
connect
Returns void
disconnect
Returns void
getStatus
Returns Web3ProviderStatus
on
Returns void
once
Returns void
reconnect
Returns void
removeAllListeners
Returns void
removeListener
Returns void
request
Type parameters
- Method: string
- ResultType = Web3APIReturnType<API, Method>
Parameters
payload: Web3APIPayload<API, Method>
optionalrequestOptions: RequestInit
Returns Promise<JsonRpcResponseWithResult<ResultType>>
reset
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>>
supportsSubscriptions
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.