XYO Foundation Dev Portal
  • Guides

›Explore App

Getting Started

  • Getting Started

Updates

  • Latest Updates
  • News Archive

Changemaker Challenge

  • UC San Diego and XYO

Using our Mobile SDKs

  • SDK Guide

XYO Foundation

  • Open Source Initiative

XYO Network App

  • How To Use

Explore App

  • How To Use

Bridge

  • Bridge X

Smart Contract Apps

  • Dapploy
  • Dapper
  • SCSC Library

SDKs

  • Android SDK
  • Swift SDK
  • Node Core SDK
  • Swift Core SDK
  • Kotlin Core SDK

Tools

  • XYO Tools

XYO EXPLORE

The XYO Foundation provides this source code available in our efforts to advance the understanding of the XYO Procotol and its possible uses. We continue to maintain this software in the interest of developer education. Usage of this source code is not intended for production. Developer usage of the Explore app is intended for educational purposes on geospatial location blockchain protocol.

Difficulty Level: Intermediate to Advanced

Getting Started with Explore App

XYO Explore Query Responses

The first 100 blocks from a query are free.

XYO Explore queries are available at 1 XYO per additional query (from 101 - 2000 blocks).

Additional details can be viewed under Available Plugins -> Payment

Queries in the Explore App

Everything in the Explore App starts with Queries

queries in explore app

Entering a Query

Enter all queries described in this guide into this field on the dashboard page

where to enter a query

Block Hash Query

The hash query retrieves block contents from the block hash provided.

Enter the query hash:BLOCK_HASH

block contents from a block hash query

You should see block contents upon a successful query

where to enter a query

Information included in the contents

  • Previous Hash
  • Public Key (of previous hash)
  • Rssi (of previous hash)
  • Index (of previous hash)
  • GPS
  • BlockBytes

Lat and Long Query

The near query retrieves blocks near GPS point provided.

Enter the query near:LAT,LNG

near query gif

This is displayed as points on an interactive map

mapped point with blocks from a gps query

Recent Query

The recent query gets n recent blocks.

Enter the query recent:LIMIT (integer value - example typed as 01)

recent query gif

This is a dynamic query that will change since blocks are continuously created

You will see your query value in the lower left corner of the map view.

This is an exmaple after a recent:030 query

map result from recent block query

Note that this query is Getting the 30 most recent bound witnesses

video map view

Where Query

The where query gets the last known blocks from a device public key

Enter the query where:PUBLIC_KEY

where query gif

This is displayed as points on an interactive map

mapped point with blocks from a device query

You can get further detail on the map by zooming in and clicking on specific points

where detail gif

The detail of the point has a block hash, which when clicked executes a block hash query

block hash details on map

Chain Query

Enter the query chain:PUBLIC_KEY

The chain query retrieves the latest bound witness from an origin chain and current reward data for the chain

chain query gif

Here you can also create an alias for the public key of your query which you can use in future queries.

chain query result detail

This view also includes links to post this data to twitter, telegram, facebook, and reddit

You can also see the rewards that this chain has earned (this is if this chain participated in answering queries from a diviner)

The data down the chain graphically represents index values, rssi, the devices that bound witnessed on the block.

You can also click on the block icon on each part of the chain to see the block detail - this is the hash query

block icon click gif

Geohash Query

The geohash query gets known blocks from the geohash provided

Enter the query geohash:GEOHASH

geohash query gif

This is displayed as points on an interactive map

geohash query result map

Similar to other queries that return a result on the interactive map, the bound witness points represented by pins can be clicked to return a hash query.

geohash query map gif

Blocks Query

The blocks query retrieves random n blocks

Enter the query blocks:LIMIT (integer value - example typed as 01)

blocks query gif

You will be able to look at the lisiting of blocks and interact with the blocks on the interactive map

random block result gif

Using the Interactive Map

The map on XYO Explore has pins that you can interact with

You can get hash information and see the bound witness trail along with the number of blocks

Available queries

The other key feature of map view is access to available queries

available queries gif

Available queries offered

  • Chain Segment
  • Intersection
  • Geohash
  • Time
  • Page
  • Last Known Location

Each available query comes with an option to execute a Sample Query. This prefills the query fields for you, all you would have to do is click Run Query after the fields have been filled

sample query gif

The map also contains a list view, social sharing, and an advanced button giving you access to cURL requests and JSON

Queries that take you immediately to map view:

  • Near query
  • Recent query
  • Where query
  • Geohash query
  • Blocks query

cURL Requests

Available on explore.xyo.network with map view queries under Show Advanced

Near and Geohash cURL Requests

geohash:GEOHASH, near:LAT,LNG

For the response, look at the JSON response

cURL Request

curl '<https://ac0.xyo.network/>' \\
  \-H 'Accept-Encoding: gzip, deflate, br' \\
  \-H 'Content-Type: application/json' \\
  \-H 'Accept: application/json' \\
  \-H 'Connection: keep-alive' \\
  \-H 'DNT: 1' \\
  \-H 'Origin: <https://ac0.xyo.network>' \\
  \--data-binary '{"query":" query { queryFor(query: \\"{\\\\"select\\\\":{\\\\"name\\\\":\\\\"SELECTOR_GEOHASH\\\\",\\\\"config\\\\":{\\\\"geohash\\\\":\\\\"xn7\\\\",\\\\"limit\\\\":\\\\"100\\\\"}},\\\\"mutate\\\\":{\\\\"name\\\\":\\\\"MUTATOR_HUMAN\\\\",\\\\"config\\\\":{}},\\\\"payment\\\\":{\\\\"apiKey\\\\":\\\\"key\\\\"}}\\") }"}' --compressed

Where and Chain cURL Requests

where:PUBLIC_KEY, chain:PUBLIC_KEY

For the response, look at the JSON response

cURL Request

curl '<https://ac0.xyo.network/>' \\
  \-H 'Accept-Encoding: gzip, deflate, br' \\
  \-H 'Content-Type: application/json' \\
  \-H 'Accept: application/json' \\
  \-H 'Connection: keep-alive' \\
  \-H 'DNT: 1' \\
  \-H 'Origin: <https://ac0.xyo.network>' \\
  \--data-binary '{"query":" query { queryFor(query: \\"{\\\\"select\\\\":{\\\\"name\\\\":\\\\"SELECTOR_INDEX\\\\",\\\\"config\\\\":{\\\\"publicKey\\\\":\\\\"15mr23ZtkaQsQGV1GTpbpJJwnqGWtkZsxfjE3VDxqtMbrCA7RGQnodb6ycCiWeds5pDKAgU4svmwMs4qFaJyXddj9jB\\\\",\\\\"index\\\\":-1,\\\\"amount\\\\":\\\\"100\\\\",\\\\"up\\\\":false}},\\\\"mutate\\\\":{\\\\"name\\\\":\\\\"MUTATOR_HUMAN\\\\",\\\\"config\\\\":{}},\\\\"payment\\\\":{\\\\"apiKey\\\\":\\\\"key\\\\"}}\\") }"}' --compressed

Recent cURL Requests

recent:LIMIT

For the response, look at the JSON response

cURL Request

curl '<https://ac0.xyo.network/>' \\
  \-H 'Accept-Encoding: gzip, deflate, br' \\
  \-H 'Content-Type: application/json' \\
  \-H 'Accept: application/json' \\
  \-H 'Connection: keep-alive' \\
  \-H 'DNT: 1' \\
  \-H 'Origin: <https://ac0.xyo.network>' \\
  \--data-binary '{"query":" query { queryFor(query: \\"{\\\\"select\\\\":{\\\\"name\\\\":\\\\"SELECTOR_TIME\\\\",\\\\"config\\\\":{\\\\"fromTime\\\\":1564604355416,\\\\"limit\\\\":\\\\"40\\\\"}},\\\\"mutate\\\\":{\\\\"name\\\\":\\\\"MUTATOR_HUMAN\\\\",\\\\"config\\\\":{}},\\\\"payment\\\\":{\\\\"apiKey\\\\":\\\\"key\\\\"}}\\") }"}' --compressed

Blocks cURL Requests

blocks:LIMIT

For the response, look at the JSON response

cURL Request

curl '<https://ac0.xyo.network/>' \\
  \-H 'Accept-Encoding: gzip, deflate, br' \\
  \-H 'Content-Type: application/json' \\
  \-H 'Accept: application/json' \\
  \-H 'Connection: keep-alive' \\
  \-H 'DNT: 1' \\
  \-H 'Origin: <https://ac0.xyo.network>' \\
  \--data-binary '{"query":" query { queryFor(query: \\"{\\\\"select\\\\":{\\\\"name\\\\":\\\\"SELECTOR_PAGE\\\\",\\\\"config\\\\":{\\\\"limit\\\\":\\\\"40\\\\"}},\\\\"mutate\\\\":{\\\\"name\\\\":\\\\"MUTATOR_HUMAN\\\\",\\\\"config\\\\":{}},\\\\"payment\\\\":{\\\\"apiKey\\\\":\\\\"key\\\\"}}\\") }"}' --compressed

JSON Requests and Responses

Available on explore.xyo.network with map view queries under Show Advanced

Near and Geohash Query JSON Requests

near:LAT,LNG, geohash:GEOHASH

JSON Query

{
  "select": {
    "name": "SELECTOR_GEOHASH",
    "config": {
      "geohash": "xn7",
      "limit": "100"
    }
  },
  "mutate": {
    "name": "MUTATOR_HUMAN",
    "config": {}
  },
  "payment": {
    "apiKey": "key"
  }
}

Where and Chain Query JSON Requests

where:PUBLIC_KEY, chain:PUBLIC_KEY

JSON Query

{
  "select": {
    "name": "SELECTOR_INDEX",
    "config": {
      "publicKey": "15mr23ZtkaQsQGV1GTpbpJJwnqGWtkZsxfjE3VDxqtMbrCA7RGQnodb6ycCiWeds5pDKAgU4svmwMs4qFaJyXddj9jB",
      "index": -1,
      "amount": "100",
      "up": false
    }
  },
  "mutate": {
    "name": "MUTATOR_HUMAN",
    "config": {}
  },
  "payment": {
    "apiKey": "key"
  }
}

Recent Query JSON Request

recent:LIMIT

JSON Query

{
  "select": {
    "name": "SELECTOR_TIME",
    "config": {
      "fromTime": 1564604355416,
      "limit": "40"
    }
  },
  "mutate": {
    "name": "MUTATOR_HUMAN",
    "config": {}
  },
  "payment": {
    "apiKey": "key"
  }
}

Blocks Query JSON Request

blocks:LIMIT

JSON Query

{
  "select": {
    "name": "SELECTOR_PAGE",
    "config": {
      "limit": "40"
    }
  },
  "mutate": {
    "name": "MUTATOR_HUMAN",
    "config": {}
  },
  "payment": {
    "apiKey": "key"
  }
}

JSON Response Schema

( 1 of multiple example) This query output can also be fetched by a cURL request

This is a general schema, for more specfic responses please refer to the UI from show advanced in map view

[
  {
    "signedHash": "1N9rfLHd36Djthbch281QccQ7xz7cf85ssK27ZvZrdcbooG",
    "bytes": "YAIB7GAVALAwGUQADEFe5hguCgDlvZeuFv9HtNNJuiGZEO6l/ktf2TCqVBmilhuP5x9G5I2zM+nvuaTAKo29Zptm4lAwE/H+De524SG6AB8FAAAAAAAgAgAAIQMTkzAIJAAQIY9d/vEHjPkZSnTiC3T2+/f15F6LRjMYfl2Kwa4kz97OABMC0QADBQAAC0JwBgAlABAhj13+8QeM+RlKdOILdPb79/XkXotGMxh+XYrBriTP3s4gFaAgGUQADEFVrdOGuPYbz+xRcxmSbBTiEVpQYDZyt/TeE+HKH/BP5u43UQR2galkkxz9eF9Lf5q0MSGj3lk9D9eYOHqrLmlHIBIXABwJQEHrrmy6Zu4AHQlAYXY5NV1wUwAUCQAAAWq4naYlAB4CAQATAtgwCCQAECG4dfPC9W9UFkRywolMeAYuVaSkLueA9GGRuukwSrAcQQADBQAABVsgF0kgGkYACUMgfgnvcYvRy3/s2S1oqufIubh9yTEqj5qqDAzb5qDuC40gPs/1ID6+7iUutd86tna6ppjNWJFYEEFw5Q8282wU5y4gF0kwGkYACUMgm9OOInwdEtsku4aFDUVYWtMrcIL4ddznwHjqBc2n/kQgbfXW807SgNfJLhqs++zZE9phZFaYPSI2/bHAYCt+w6Q=",
    "humanReadable": \[
      {
        "31": "AB8FAAAAAA==",
        "32": "ACACAA==",
        "33": "ACEDE5M=",
        "keySet": [
          {
            "name": "secp566k1PublicKey",
            "value": "15mrsyLdX4Y1SkCUX9jHrijVizBUgTSqM5syPkGztTd7reHCgwdPdbr298rXSHN1kkcUe6LEn9GXaouxnMM5Uz7yKCu"
          }
        ],
        "previousHash": "1N9jfSkUc63YNJYTcUUMV6TGaTxFx7S95EXuurzqR5XoCtd",
        "rssi": -47,
        "index": 2882,
        "bridgeHashSet": [
          "1N9jfSkUc63YNJYTcUUMV6TGaTxFx7S95EXuurzqR5XoCtd"
        ]
      },
      {
        "keySet": [
          {
            "name": "secp566k1PublicKey",
            "value": "15mrhHEzeWKotrH6Ae2SGqu8vXmCaxNBzePQzGDB6wU71kTQNFqohDmpRkKNeqc3PRbaWHrakcwK3Jr48qqzvEWxkuk"
          }
        ],
        "gps": {
          "lat": 35.84126051999725,
          "lng": 139.69448345422515
        },
        "date": 1557875500581,
        "rssiAt1m": 1,
        "rssi": -40,
        "previousHash": "1N9nRreqJw7AQ77PRoVnCctH6usnxTdmuqRMT8t4FDGVn5v",
        "index": 1371
      },
      {
        "signatureSet": [
          {
            "name": "secp566k1Signature",
            "value": "AAlDIH4J73GL0ct/7NktaKrnyLm4fckxKo+aqgwM2+ag7guNID7P9SA+vu4lLrXfOrZ2uqaYzViRWBBBcOUPNvNsFOcu"
          }
        ]
      },
      {
        "signatureSet": [
          {
            "name": "secp566k1Signature",
            "value": "AAlDIJvTjiJ8HRLbJLuGhQ1FWFrTK3CC+HXc58B46gXNp/5EIG311vNO0oDXyS4arPvs2RPaYWRWmD0iNv2xwGArfsOk"
          }
        ]
      }
    ]
  },
]

Plugins

Plugins from our node app present additional views that allow the user to see reports, make payments for queries, and view current rewards (rewards in Beta)

plugins page view

Available plugins

  • Summary
    • Shows the collection summary of a node
  • Payment
    • Allows you to buy credits with XYO
  • Daily Reports
    • View network status and rankings
  • Rewards
    • View node network rewards

Watchlist

The watchlist is a view of all devices linked to an account that is logged into XYO Explore

watchlist page view

Public keys per device are available and when clicked in this view execute a chain query

Clicking on Add Alias will allow the user to update a device with an alias instead of public key for the purpose of queries and watchlist view

Other UI Elements to look for

additional ui page view

Under the Query field are six additional clickable elements that link directly to plugin views, map views, recent block query, and watchlist

  • Total Bound Witness and Witnessess/Min

    • Takes the user to the summary plugin view
  • World Map

    • Takes the user to a heat map of node activity in the network

world map view

  • Recent Blocks

    • Takes the user to the recent blocks map view
  • Plugins

    • Takes the user to the available plugins page
  • Watchlist

    • Takes the user to the node/device watchlist page
Last updated on 4/16/2020
← How To UseBridge X →
  • Queries in the Explore App
    • Entering a Query
    • Block Hash Query
    • Lat and Long Query
    • Recent Query
    • Where Query
    • Chain Query
    • Geohash Query
    • Blocks Query
  • Using the Interactive Map
    • Available queries
  • cURL Requests
    • Near and Geohash cURL Requests
    • Where and Chain cURL Requests
    • Recent cURL Requests
    • Blocks cURL Requests
  • JSON Requests and Responses
    • Near and Geohash Query JSON Requests
    • Where and Chain Query JSON Requests
    • Recent Query JSON Request
    • Blocks Query JSON Request
    • JSON Response Schema
  • Plugins
    • Available plugins
  • Watchlist
  • Other UI Elements to look for

XYO | Developers

Copyright © 2020 XYO
DocsExplore AppProtocolSource Code
Community
GitHubTwitter