General Concepts

General concepts which apply to the integration of Say network engine.

Saynetwork Engine

The Saynetwork Engine powers the service for Blockchain based application. Internally uses and “If this then that” logic model. It means that it executes a given set of instructions if some other given conditions are met.

A valid request for data to Saynetwork is done from the Aeternity blockchain & should specify the following arguments.

  • Data source type
  • Query
  • Optionally, an authenticity proof type.

Data source types

A data source is trusted provider of data. It can be a website or web API such as Reddit, Weather.com, BBC.com or a secure application running on an hardware-enforced Trusted Execution Environment (TEE) or an auditable, locked-down virtual machine instance running in a cloud provider. Say network currently offers following types of native data sources:

  • URL: Enables the access to any JSON responding API

Additionaly, Some meta data source such as:

  • decrypt: It decrypts a string encrypted with Saynetwork public key.

Query

A query is a URL wrapped in string format seperated with commas (,) which needs to be evaluated in order to complete a specific data source type request: "https://poloniex.com/public?command=returnTicker,BTC_BTS,id"

The first part contains the protocol + host poloniex.com (use of https is recommended). Then applying route /public and followed by the url query command=returnTicker. The result (With current request) is:

{
  "BTC_BTS": {
    "id": 14,
    "last": "0.00000132",
    "lowestAsk": "0.00000134",
    "highestBid": "0.00000130",
    "percentChange": "-0.00751880",
    "baseVolume": "0.24773546",
    "quoteVolume": "181160.92218059",
    "isFrozen": "0",
    "postOnly": "0",
    "high24hr": "0.00000147",
    "low24hr": "0.00000129"
  },
  "BTC_DASH": {
    ...

Then to obtain the specific property out of this object. A comma , is required and then name of the property BTC_BTS and so on.

Authenticity Proofs

Saynetwork is designed to act as an untrusted intermediary. Optionally, a request to Saynetwork can specify an authenticity proof. More details on the authenticity proofs can be found in the Security Deep Dive section ⟶

Data Privacy

Certain contexts, such as the query you make on public blockchain might require a level of privacy to protect data from public scrunity. Developers can make encrypted queries by encrypting entire query. To learn more on encrypted queries visit Encrypted queries section⟶