Subscription-Oracle Template
Help data provider creating subscription Oracle's Endpoint
Introduction
Subscription oracle template serves as bootstrap tool for data provider to setup and run their service in minutes.
Purpose : to provide a subscription service based on Zap oracle platform to manage subscriptions and distribute information through authenticated websocket connections.
Work flow
This workflow has been provided in the template , following information explains how things works within source code
ORACLE
Oracle is registered and created an endpoint with curve set for a subscription service (not to be queried)
Node/Yarn installed
Modify Config.ts with your custom information such as Mnemonic and optional custom URL for parity node ( default to infura)
Method
getData
needs to be implemented to get data from database or other source and emit data to authenticated connections,
Dont have Oracle and Endpoint registered ? You can easily do so in couple provided tools:
Integrate into your application :
USER
This template also includes bootstrap for user to use their Ethereum address to authenticate and connect to receive data from this type of subscription Oracle's endpoint.
User approve -> bond -> subscribe to Oracle's endpoint
Use our tools to easily approve, bond, subscribe to Oracles Endpoint
UI /Terminal
Integrate into your application :
Setup
yarn
Create
priv_config.ts
based onconfig.ts
template with oracle's informationIn
src/server.ts
modify methodgetData
to get custom data of your own. This data will be broadcasted to users
Run Server:
yarn server
User Connecting to server:
In
src/user.ts
modify signature, address and endpointyarn user
Last updated