abstractEip1193Provider <API>
Hierarchy
- Web3BaseProvider<API>
- Eip1193Provider
Index
Constructors
constructor
Type parameters
- API: unknown = EthExecutionAPI
Returns Eip1193Provider<API>
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<API>
A new instance of the provider with the request method fully compatible with EIP-1193
abstractconnect
Returns void
abstractdisconnect
Parameters
optionalcode: number
optionaldata: string
Returns void
abstractgetStatus
Returns Web3ProviderStatus
abstracton
Parameters
type: disconnect
listener: Web3Eip1193ProviderEventCallback<ProviderRpcError>
Returns void
abstractonce
Parameters
type: disconnect
listener: Web3Eip1193ProviderEventCallback<ProviderRpcError>
Returns void
optionalabstractremoveAllListeners
Parameters
type: string
Returns void
abstractremoveListener
Parameters
type: disconnect
listener: Web3Eip1193ProviderEventCallback<ProviderRpcError>
Returns void
abstractrequest
Type parameters
- Method: string
- ResultType = unknown
Parameters
args: Web3APIPayload<API, Method>
Returns Promise<JsonRpcResponseWithResult<ResultType>>
abstractreset
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>>
abstractsupportsSubscriptions
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.