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;
}

Hierarchy (View Summary)

Properties

Methods

Properties

request: (args: RequestArguments) => Promise<unknown>

Methods

  • Parameters

    Returns this

  • Parameters

    Returns this

  • Parameters

    • event: "close"
    • listener: (error: Error) => void

    Returns this

  • Parameters

    • event: "chainChanged"
    • listener: (chainId: string) => void

    Returns this

  • Parameters

    • event: "networkChanged"
    • listener: (networkId: string) => void

    Returns this

  • Parameters

    • event: "accountsChanged"
    • listener: (accounts: `0x${string}`[]) => void

    Returns this

  • Parameters

    Returns this

  • Parameters

    Returns this

  • Parameters

    • event: string
    • listener: (...args: unknown[]) => void

    Returns this

  • Parameters

    • ...args: unknown[]

    Returns unknown

  • Parameters

    • request: object
    • callback: Function

    Returns void