Concepts
Protocol Concepts
Dictionaries

Dictionaries

Each game may have many markets and outcomes related to these markets, e.g. football event can have set of:

  • Both Team To Score: Yes | No
  • Full Time Result: 1 | 2
  • etc

Blockchain doesn't store text information about outcomes. Each Outcome has outcomeId, Use it to get the information from protocol dictionaries. "dictionaries" is set of files with text descriptions of specific outcome. Check our dictionaries repository (opens in a new tab) for a better understanding.

The work with dictionaries starts with outcomes.json file. This is the heart of dictionaries, this file contains the decryption of the outcome ID in the form of other IDs: selectionId, marketId, gamePeriodId, gameTypeId, gameVarietyId, pointsId, teamPlayerId. All text data about specific Outcome can be received using these IDs and the files related to them it the repository.

const {
  selectionId,
  marketId,
  gamePeriodId,
  gameTypeId,
  gameVarietyId,
  pointsId,
  teamPlayerId
} = outcomes[outcomeId]
 
const selection = selections[selectionId]
const market = markets[marketId]
const gamePeriod = gamePeriods[gamePeriodId]
const gameType = gameTypes[gameTypeId]
const gameVariety = gameVarietys[gameVarietyId]
const points = points[pointsId]
const teamPlayer = teamPlayers[teamPlayerId]
💎

We recommend to use @azuro-org/dictionaries (opens in a new tab) package to work with dictionaries. Read the description of the package to see how easy and simple it's to use.