Published on
01/13/2021

Databases Oracles Coming to Testnet & Community Memes Contest

We're excited to announce that Database Oracles are coming to Compendia's public testnet soon! And there are prizes to be won in the community meme contest!

Hero

Database Oracles on Testnet

The following brand-new features will be introduced to Compendia testnet soon™:

  • JSON Schema Registration: a transaction that takes a JSON Schema, uploads it to IPFS, and registers it on the Compendia blockchain as a schema that can be used to validate data from database oracles.

Schema Registration in the web wallet

Here's an example crypto_apps schema:

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "title": "Crypto Apps",
  "description": "A schema for blockchain-powered apps and dapps.",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "maxLength": 64
    },
    "description": {
      "description": "A brief summary of the app.",
      "type": "string",
      "maxLength": 1024
    },
    "url": {
      "description": "The base URL of the app (HTTPS only).",
      "type": "string",
      "pattern": "^(https:\\/\\/)([a-z0-9\\-])+((\\.)[a-z\\-]+)+(\\/?)$",
      "format": "uri",
      "examples": [
        "https://bind.exchange",
        "https://curve.fi",
        "https://app.rarible.com/"
      ]
    },
    "logo": {
      "description": "An HTTPS URL that point to a logo image of the app (JPG/PNG/SVG).",
      "type": "string",
      "format": "uri",
      "examples": [
        "https://i.imgur.com/jRIJA2K.png",
        "https://ipfs.io/ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/I/m/Mars_Hubble.jpg"
      ]
    },
    "screenshots": {
      "description": "A list of HTTPS URLs that point to screenshots of the app (JPG or PNG).",
      "type": "array",
      "examples": [
        [
          "https://i.imgur.com/ZP7T26P.jpg",
          "https://ipfs.io/ipfs/QmT5NvUtoM5nWFfrQdVrFtvGfKFmG7AHE8P34isapyhCxX/I/m/Mars_Hubble.jpg"
        ]
      ],
      "items": {
        "type": "string",
        "format": "uri"
      }
    }
  },
  "required": [
    "title",
    "description",
    "url",
    "logo",
    "screenshots",
  ],
  "additionalProperties": true
}
  • Database Registration: this transaction takes an OrbitDB docstore hash. The hash resolves to metadata that contains info about a peer-to-peer NoSQL document-based database, and can be synced in real-time either client or server-side (for example to be combined with other Compendia databases that share the same schema).

  • Schema Search API: schemas can be queried and searched through a new relay API endpoint. You can find either a schema's exact details, or search for all schemas that contain a specific keyword. For example: if there are backwards-compatible upgrades to the crypto_apps schema called crypto_apps_v2 and crypto_apps_v3, then you can simply look up crypto_apps and find the schema version that's relevant to your application.

Schema Search API

  • Database Search API: An API endpoint that lets you search OrbitDB database hashes by their schema name. You can find databases by a specific schema, or search for a keyword. For example, you might want to find all databases for crypto_apps and crypto_apps_v2 if they're backwards compatible, so you search for crypto_apps to resolve all relevant crypto apps databases regardless of schema version. Databases are currently sorted by the curator's votes, as all curators are also registered validators (though they're not required to run a forging node). However, apps can sort data by any metric they want.

  • Database App Starter Kits: We'll also publish a number open-source apps that utilize Database Oracles. The source code can be can be used as a reference for building your own apps. We're starting with three starter apps:

    1. Oracle Sync API: A NodeJS server that syncs all Compendia databases belonging to a specific schema, combines that data into a single sqlite database, and creates a read-only API for querying that data.
    2. Oracle-powered App: A front-end app built with Svelte (a simple Javascript front-end library) that connects to an Oracle Sync API to format and display data in an end-user app.
    3. Database Admin App: a dashboard and API that lets database oracles manage their databases (Create, Read, Update, Delete). Oracles can use this app to manage data, but can also connect the API to another application (such as a "submission & review" app, a "paid submissions" portal, or a DAO).

Memes

Validators the_bobbie_bunch and don_viti recently announced a meme competition. We doubled their prize pool to a total of up to ß30,000 BIND!

Here's one of the memes, tweeted by community member Adz: A compendia meme

The best 3 memes shared before January 22nd win a prize!

The rules are available here.

Follow Dean van Dugteren