ZAP Oracles (introduction here)
This repository provides Interface to Zap contracts and tools to use Zap platform with Javascript projects Each package is a public npm module that serve developer's needs to intergrate Zap platform
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes
- Nodejs and npm>=6.1.11
- Lerna
- Typescript
- Installs lerna (used for package bundling) and typescript, as well as all build dependencies.
npm install lerna typescript
npm install
- Packages and installs all dependencies (including @zapjs packages) in the root node_modules folder, and compiles all Typescript files.
npm run build
- Runs mocha unit tests for all packages.
npm run test
- Developing in single package
cd packages/{package_name}
npm run build
npm run test
- Running build and test
npm run run_test
npm install `@zapjs/provider`
import {ZapProvider, ProviderHandler} from '@zapjs/provider';
let myZapProvider = new ZapProvider({owner:address});
With Custom configuration
let myZapProvider = new ZapProvider({owner:address});
Some example for provider usage
await myZapProvider.initiateProvider({
public_key:111,
title: "testTitle",
endpoint: "testEndpoint",
endpoint_params : ["p1","p2"]
})
const thisConstants = []
const thisParts = []
const thisDividers = []
await myZapProvider.initiateProviderCurve({
endpoint :"testEndpoint",
constants : thisConstants,
parts : thisParts,
dividers : thisDividers
})
- Lerna - The tool to manage monorepo project
- Typescript
- Mocha
- Truffle
- Ganache
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
See also the list of contributors
This project is licensed under the MIT License - see the LICENSE.md file for details