Interface EIP1193Provider
interface EIP1193Provider { request: (args: RequestArguments) => Promise<unknown>; on(event: "connect", listener: (info: ProviderConnectInfo) => void): this; on(event: "disconnect", listener: (error: ProviderRpcError) => void): this; on(event: "close", listener: (error: Error) => void): this; on(event: "chainChanged", listener: (chainId: string) => void): this; on(event: "networkChanged", listener: (networkId: string) => void): this; on( event: "accountsChanged", listener: (accounts: `0x${string}`[]) => void, ): this; on(event: "message", listener: (message: ProviderMessage) => void): this; on( event: "notification", listener: (payload: ProviderMessage) => void, ): this; on(event: string, listener: (...args: unknown[]) => void): this; send(...args: unknown[]): unknown; sendAsync(request: object, callback: Function): void;} Properties
request
Methods
on
- on(event: "connect", listener: (info: ProviderConnectInfo) => void): this
Returns this
- on(event: "disconnect", listener: (error: ProviderRpcError) => void): this
Returns this
- on(event: "close", listener: (error: Error) => void): this
Parameters
- event: "close"
- listener: (error: Error) => void
Returns this
- on(event: "chainChanged", listener: (chainId: string) => void): this
Parameters
- event: "chainChanged"
- listener: (chainId: string) => void
Returns this
- on(event: "networkChanged", listener: (networkId: string) => void): this
Parameters
- event: "networkChanged"
- listener: (networkId: string) => void
Returns this
- on(
event: "accountsChanged",
listener: (accounts: `0x${string}`[]) => void,
): this Parameters
- event: "accountsChanged"
- listener: (accounts: `0x${string}`[]) => void
Returns this
- on(event: "message", listener: (message: ProviderMessage) => void): this
Returns this
- on(event: "notification", listener: (payload: ProviderMessage) => void): this
Returns this
- on(event: string, listener: (...args: unknown[]) => void): this
Parameters
- event: string
- listener: (...args: unknown[]) => void
Returns this
send
- send(...args: unknown[]): unknown
Returns unknown
sendAsync
- sendAsync(request: object, callback: Function): void
Parameters
- request: object
- callback: Function
Returns void
Deprecated