Options
All
  • Public
  • Public/Protected
  • All
Menu

Module contexts/api/CurrencyApiContext

This file defines API context for listening to changes in currency ownership.

Functions

Const createCurrencyApiContext

  • Function for creating Currency 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. Its only responsibility is listening to the changes in game curreny ownership and storing them into the database.

    Parameters

    • db: DatabaseContext

      Global database context for storing information about currency ownership

    • contracts: ContractApiContext

      Contract API subcontext for type-safe interaction with contracts

    Returns CurrencyApiContext

    Currency API subcontext

Generated using TypeDoc