Summary

The Grindery RPC API wrapper class

Since

0.2.0

Constructors

Methods

  • Type Parameters

    • T

    Parameters

    • method: string

      Provider request method name

    • Optional params: readonly unknown[]

      Provider request parameters

    • Optional timeout: number

      Optional. The time in milliseconds to wait for the request result. Default is 30000.

    Returns Promise<T>

    The result of the provider request

    Summary

    Sends a provider request to the Grindery RPC API and waits for the result.

  • Type Parameters

    • T

    Parameters

    • method: RpcMethodNames

      Request method name

    • Optional params: object | unknown[]

      Request parameters

    Returns Promise<T>

    The result of the request

    Summary

    Sends a request to the Grindery Walletconnect RPC API.

  • Protected

    Parameters

    • method: string

      Provider request method name

    • Optional params: readonly unknown[]

      Provider request parameters

    Returns Promise<request>

    Promise resolving with the request token to use in the waitGrinderyRpcProviderRequest method

    Summary

    Sends a provider request to the Grindery RPC API.

  • Protected

    Type Parameters

    • T

    Parameters

    • requestToken: string

      A token to identify provider request. Recieved in the results of sendGrinderyRpcProviderRequest method.

    • Optional timeout: number

      Optional. The time in milliseconds to wait for the request result. Default is 30000.

    Returns Promise<T>

    The result of the provider request

    Summary

    Waits for the result of the provider request.