abstractWeb3ExternalProvider <API>
Hierarchy
- Eip1193Provider
- Web3ExternalProvider
Index
Constructors
publicconstructor
Type parameters
- API: unknown = EthExecutionAPI
Parameters
Returns Web3ExternalProvider<API>
Properties
publicprovider
publicreadonlytransport
Accessors
[symbol]
Returns boolean
Methods
asEIP1193Provider
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.
Returns Eip1193Compatible<EthExecutionAPI>
A new instance of the provider with the request method fully compatible with EIP-1193
publicconnect
Returns void
publicdisconnect
Parameters
optional_code: number
optional_data: string
Returns void
publicabstractgetRPCURL
publicgetStatus
Returns Web3ProviderStatus
publicon
Parameters
type: disconnect
listener: Web3Eip1193ProviderEventCallback<ProviderRpcError>
Returns void
publiconce
Parameters
type: disconnect
listener: Web3Eip1193ProviderEventCallback<ProviderRpcError>
Returns void
publicoptionalremoveAllListeners
Parameters
_type: string
Returns void
publicremoveListener
Parameters
type: disconnect
listener: Web3Eip1193ProviderEventCallback<ProviderRpcError>
Returns void
publicrequest
Type parameters
- Method: string
- ResultType = Web3APIReturnType<API, Method>
Parameters
payload: Web3APIPayload<EthExecutionAPI, 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
This is an abstract class, which extends Web3BaseProvider class. This class is used to implement a provider that adheres to the EIP-1193 standard for Ethereum providers.