Orakl Network
  • Developer's Guide
    • Introduction
    • Verifiable Randomness Function (VRF)
    • Request-Response
    • Data Feed
    • Proof of Reserve
    • Prepayment
    • L2 Services
    • Data Availability Layer API (DAL)
    • Example Projects
      • Binary Option Example
      • Flipcoin Example
      • Mystery Box Example
  • Node Operator's Guide
    • Introduction
    • Orakl Network API
    • Orakl Network CLI
      • Chain
      • Service
      • Listener
      • VRF Keys
      • Reporter
      • Fetcher
      • Delegator
    • Orakl Network VRF
    • Orakl Network Request-Response
    • Orakl Network Data Feed
    • Orakl Network Delegator
    • Orakl Network Proof of Reserve
  • Other Resources
    • Audit
    • White paper
    • Social Media
    • Terms of Use
Powered by GitBook
On this page
  • Description
  • Configuration
  • Launch
  • Architecture
  1. Node Operator's Guide

Orakl Network API

PreviousIntroductionNextOrakl Network CLI

Last updated 1 year ago

Description

The Orakl Network API is an abstraction layer representing a single source of truth for Orakl Network deployment. The code is located under .

The Orakl Network API has to be reachable from every Orakl Network service, and accessible to the . It is implemented as a REST web server that accept requests from other services, and the state of the Orakl Network is stored in PostgreSQL database. The Orakl Network API has to be launched and configured before any other microservice.

Configuration

Before we launch the Orakl Network API, we must specify . The environment variables are automatically loaded from a .env file. Check example values from .env.local file

  • DATABASE_URL

  • APP_PORT

  • ENCRYPT_PASSWORD

  • REDIS_HOST

  • REDIS_PORT

DATABASE_URL represents a to a database that will hold the Orakl Network state.

The format of DATABASE_URL should be postgresql://[userspec@][hostspec][/dbname][?paramspec]. An example string can look as follows postgresql://bisonai@localhost:5432/orakl?schema=public.

APP_PORT represents a port on which the Orakl Network API will be running. This port will be necessary when we connect to Orakl Network API from other services.

ENCRYPT_PASSWORD is an encryption key used for encryption and decryption of private keys inserted to Orakl Network API.

REDIS_HOST and REDIS_PORT represent host and port of to which the Orakl Network API connect to. The default values are localhost and 6379, respectively. Redis is used to effectively save and load impermanent data

Launch

To launch the Orakl Network API from source code in the production, one must first build the service, and then it can be launched.

yarn build
yarn start:prod

Architecture

api directory
Orakl Network CLI
few environment variables
connection string
Redis
Orakl Network API