@zapjs/curve
Zap Curve
Last updated a year ago by propulsor .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @zapjs/curve 
SYNC missed versions from official npm registry.

@zapjs/curve

This package contains objects that can parse the custom Zap bonding curve encoding used by Zap oracles. This package also enables calculations of Dot prices on a given bonding curve.

Getting Started

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

Prerequisites

What things you need to install the software and how to install them

- Nodejs and npm>=6.1.11
- Lerna
- Typescript

Installing

npm install -g lerna typescript
npm i
  • Bootstrap lerna with --hoist option
lerna bootstrap --hoist

Running build and tests

  • Running build for all packages
lerna run build
  • Running mocha unit tests for all packages
lerna run test

Running build and tests for a package

  • Develop in single package
cd packages/{package_name}
npm run build
npm run test
  • Running build and test
npm run run_test

Packages

Usage

Create a Zap Provider
npm install `@zapjs/provider`
import {ZapProvider, ProviderHandler} from '@zapjs/provider';

class myHandler implements ProviderHander{
    handleIncoming(res:any){
    }

    handleSubscription(res:any) {
    }

    handleUnsubscription (res:string){
    }
}
let myZapProvider = new ZapProvider({owner:address,handler:new myHandler()})


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

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

Current Tags

  • 2.2.1                                ...           latest (a year ago)

19 Versions

  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.0.16                                ...           a year ago
  • 2.0.14                                ...           a year ago
  • 2.0.13                                ...           a year ago
  • 2.0.12                                ...           a year ago
  • 2.0.11                                ...           2 years ago
  • 2.0.10                                ...           2 years ago
  • 2.0.9                                ...           2 years ago
  • 2.0.8                                ...           2 years ago
  • 2.0.7                                ...           2 years ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (16)

Copyright 2014 - 2016 © taobao.org |