Published on
03/12/2021

Introducing Savant: Oracle Reader API - Compendia Launch Month

Savant is our first open-source solution for powering apps with Compendia oracles.

If you've been keeping up with our influx of new products this month, you know that Concierge lets people create and share databases on Compendia.

But all that beautiful decentralized data is pretty useless if there aren't any ways to quickly import it within an app.

That's where our next product comes in!

Today we're announcing Compendia's first core solution for app developers:

Savant: Compendia Oracle Reader

Ready to dive in? Get BIND today.

What is it

Savant automatically pulls all available data for a category in real-time and create a single database for it. The data is then available from Savant's simple-to-use API.

The API lets you easily query the database and can be plugged in to any front-end or back-end service.

Since Savant is built with Javascript, it's easy to update and change how data is sorted and returned.

A future version of Savant will support plug-ins that can change stuff like your database core (currently SQLite), data sorting methods, and API logic.

BIND integration

If multiple oracles return data for the same primary key (e.g. two oracles for the same app in an "apps" database), Savant puts the data from the oracle with the most votes highest in the list.

This means that BIND stakers decide how data is returned to clients.

Usage

To use Savant, all you'll need to do is clone it into a server, configure the .env file, set the schema you want to create your API for, and start it. Savant does the rest!

Savant will launch in the near future, when the Database feature is deployed to Compendia Testnet.

API Examples

# Return all data (limit 100 entries)
GET /api/v1/all

# Return all data on page 2 (after first 100 entries)
GET /api/v1/all?page=2

# Return all data where "ticker" is ETH
GET /api/v1/search?ticker=ETH

# Return all data where "tags" contains "NFT".
# "searchMode=wide" builds the query with a LIKE operator
# (instead of "=")
GET /api/v1/search?tags=NFT&searchMode=wide

Major Launch Month

We'll be announcing a next core product in a few days, so make sure to follow us on Twitter and enable notifications!

Follow Dean van Dugteren