Options
All
  • Public
  • Public/Protected
  • All
Menu

Module contexts/api/ChainApiContext

This file defines API context for obtaining common data from Ethereum blockchain and listening to its events.

Interfaces

Functions

Functions

Const createChainApiContext

  • Function for creating Chain API subcontext. This function should be called exactly once through the whole application, when the connection to the blockchain is successfully established. It is therefore called as part of the createApiContext function.

    Parameters

    • db: DatabaseContext

      Global database context for caching received information

    • eth: Eth

      Valid Ethereum provider, wrapped in web3x-es Eth class

    • ethereum: EthereumProvider

      Valid and unwrapped Ethereum provider, for functionality which is inaccessible through eth

    • game: GameApiContext

      Game API subcontext

    • notify: NotifyContext

      Global notification context

    Returns ChainApiContext

    Chain API subcontext

Generated using TypeDoc