Options
All
  • Public
  • Public/Protected
  • All
Menu

Module contexts/api/ItemsApiContext

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

Interfaces

Functions

Functions

Const createItemsApiContext

  • Function for creating Items 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 item ownership and storing them into the database.

    Parameters

    • db: DatabaseContext

      Global database context for storing information about item ownership

    • contracts: ContractApiContext

      Contract API subcontext for type-safe interaction with contracts

    Returns ItemsApiContext

    Items API subcontext

Generated using TypeDoc