New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@zapjs/curve

Package Overview
Dependencies
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zapjs/curve

Zap Curve

latest
Source
npmnpm
Version
3.0.1
Version published
Weekly downloads
5
-16.67%
Maintainers
5
Weekly downloads
 
Created
Source

@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

- Node 12.20 <=14.15
- Lerna

Installing

npm i
  • Bootstrap lerna
lerna bootstrap

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

  • Provider
  • Subscriber
  • Registry
  • Dispatch
  • Arbiter
  • ZapToken
  • Zapjs

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

FAQs

Package last updated on 23 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts