Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DefaultClient

The standard implementation of a DfuseClient.

The DefaultClient role is to perform the API key management functionalities of the client. It retrieves an API token using the API key and ensures it stays valid throughout the lifecycle of the client, refreshing the token when necessary.

It also responsible of keep and up-to-date list of streams and managing the re-connection to those stream when the websocket disconnects.

It is supported to override the client to provide some other methods on it (other EOS endpoints).

Hierarchy

  • DefaultClient

Implements

Index

Constructors

constructor

Properties

Protected apiKey

apiKey: string

Protected apiTokenManager

apiTokenManager: ApiTokenManager

Protected debug

debug: IDebugger = debugFactory("dfuse:client")

endpoints

Protected httpClient

httpClient: HttpClient

Protected requestIdGenerator

requestIdGenerator: RequestIdGenerator

Protected streamClient

streamClient: StreamClient

Methods

apiRequest

authIssue

fetchBlockIdByTime

fetchTransaction

getTokenInfo

Protected registerStream

release

  • release(): void

searchTransactions

stateAbi

stateAbiBinToJson

  • stateAbiBinToJson<T>(account: string, table: string, hexRows: string[], options?: object): Promise<StateAbiToJsonResponse<T>>

stateKeyAccounts

statePermissionLinks

stateTable

  • stateTable<T>(account: string, scope: string, table: string, options?: object): Promise<StateResponse<T>>
  • Type parameters

    • T

    Parameters

    • account: string
    • scope: string
    • table: string
    • Default value options: object = {}

    Returns Promise<StateResponse<T>>

stateTableScopes

stateTablesForAccounts

  • stateTablesForAccounts<T>(accounts: string[], scope: string, table: string, options?: object): Promise<MultiStateResponse<T>>

stateTablesForScopes

  • stateTablesForScopes<T>(account: string, scopes: string[], table: string, options?: object): Promise<MultiStateResponse<T>>

streamActionTraces

streamHeadInfo

streamTableRows

streamTransaction

Generated using TypeDoc