Provides an API allowing query of public Proof of Location data
Switch branches/tags
Nothing to show
Clone or download
Latest commit 51993bd Nov 20, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Change to userAddress Mar 2, 2018
.gitignore Initial Commit Feb 18, 2018
README.md Update README.md Nov 20, 2018
package-lock.json Add verification Feb 18, 2018
package.json Update package.json Feb 18, 2018
server.js Initial Commit Feb 18, 2018

README.md

Notice: This is a legacy repository and is no longer being supported.

If you have any questions or concerns, please contact XYO Network at developer@xyo.network. Please feel free to visit our ongoing projects at github.com/XYOracleNetwork. Thank you!

Geo Server

logo

The code for the Geo Server, allowing query of public Proof of Location data.

Prerequisites

  • npm
  • Node.js
  • MongoDB

Installing MongoDB

See https://docs.mongodb.com/manual/installation/.

Installation

  1. Download the repository
  2. Install npm modules: npm install
  3. Start up the server: node server.js
  4. View in browser at http://localhost:3000

API Endpoints

GET /api/nodes

Fetch a list of Geo Nodes stored on the server.

GET /api/checkins

Fetch a list of checkins for the given user address

Parameters:

  • address - the address of the user to query

GET /api/confirm

Confirm that a user was present at a node at a given time. Returns false if the user was not present, or the address of the user if the user was present.

Parameters:

  • userAddress - the address of the user to query
  • nodeAddress - the address of the node to query
  • beginTime - the beginning time for the range
  • endTime - the end time for the range

POST /api/checkin

Creates a new checkin on the server, validating the signature of the Geo Node.

Parameters:

  • signature - The signature of the message, as generated by a Geo Node using Web3. The message is of the form userAddress|timestamp.