Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

lerna

ZAP

ZAP Oracles (introduction here)

ZAP-Monorepo

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

Development

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes

Prerequisites

- Nodejs and npm>=12.20 <=14
- Lerna

Installing

  • Installs lerna (used for package bundling) and typescript, as well as all build dependencies.
npm i
npm run setup
  • Log into npm registry : npm login

Running build and tests

  • 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

Running build and tests for a singular package

  • Developing in single package
npx lerna run build --scope={package name}
  • Example: npx lerna run build --scope=@zapjs/registry

  • Running build and test

npx lerna run run_test

Packages

Usage

Creating a Zap Provider oracle
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
})



See more Usages of each packages :

Built With

Contributing

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

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

Packages

No packages published