Skip to main content

abstractWeb3BaseProvider <API>

Implements

Index

Constructors

constructor

Accessors

public[symbol]

  • get [symbol](): boolean
  • Returns boolean

Methods

publicasEIP1193Provider

  • Modify the return type of the request method to be fully compatible with EIP-1193

    [deprecated] In the future major releases (&gt;= 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.

    @example
    const provider = new Web3HttpProvider('http://localhost:8545');
    const fullyCompatibleProvider = provider.asEIP1193Provider();
    const result = await fullyCompatibleProvider.request({ method: 'eth_getBalance' });
    console.log(result); // '0x0234c8a3397aab58' or something like that

    Returns Eip1193Compatible<API>

    A new instance of the provider with the request method fully compatible with EIP-1193

publicabstractconnect

  • connect(): void
  • Returns void

publicabstractdisconnect

  • disconnect(code?: number, data?: string): void
  • Parameters

    • optionalcode: number
    • optionaldata: string

    Returns void

publicabstractgetStatus

publicabstracton

publicabstractonce

publicoptionalabstractremoveAllListeners

  • removeAllListeners(type: string): void
  • Parameters

    • type: string

    Returns void

publicabstractremoveListener

publicabstractrequest

publicabstractreset

  • reset(): void
  • Returns void

publicsend

  • @deprecated

    Please use .request instead.


    Type parameters

    Parameters

    Returns void

publicsendAsync

publicabstractsupportsSubscriptions

  • supportsSubscriptions(): boolean
  • Returns boolean

publicstaticisWeb3Provider

  • isWeb3Provider(provider: unknown): boolean
  • Parameters

    • provider: unknown

    Returns boolean