@zapjs/bondage
This package provides an interface to the Zap bondage contract. This package enables subscribers to bond and unbond Zap and Dots from registered oracles.
Last updated a year ago by propulsor .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @zapjs/bondage 
SYNC missed versions from official npm registry.

@zapjs/bondage

This package provides an interface to the Zap bondage contract. This package enables subscribers to bond and unbond Zap and Dots from registered oracles.

Prerequisites

- Nodejs and npm>=6.1.11
- Typescript

Usage

Using Zap Arbiter to listen to subscriptions events
npm install --save `@zapjs/bondage`
import {ZapBondage} from '@zapjs/bondage';

let myZapBondage = new ZapBondage();

Custom configuration

let myZapBondage = new ZapBondage({networkId,networkProvider,coordinator})

Methods

Get methods

const zapBound = await myZapBondage.getZapBound({provider,endpoint});
const dotsBound = await myZapBondage.getBoundDots({subscriber,provider,endpoint});
const gotsIssued = await myZapBondage.getDotsIssued({provider,endpoint});
const currentCostOfDots  = await myZapBondage.currentCostOfDots({provider,ednpoint,dots});
const bondRate = await myZapBondage.calcBondRate({provider,endpoint,zapNum});
const zapRequired = await myZapBondate.calcZapForDots({provider,endpoint,dots});

Listen to events

myZapBondate.listenBound(filters,callback);
myZapBondate.listenUnbound(filters,callback);
myZapBondate.listenEscrowed(filters,callback);
myZapBondate.listenRelease(filters,callback);

Listen to all events

myZapBondate.listen(callback);

See more Usages of each packages

Current Tags

  • 2.2.2                                ...           latest (a year ago)

25 Versions

  • 2.2.2                                ...           a year ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.0.19                                ...           a year ago
  • 2.0.18                                ...           a year ago
  • 2.0.17                                ...           a year ago
  • 2.0.16                                ...           a year ago
  • 2.0.15                                ...           2 years ago
  • 2.0.14                                ...           2 years ago
  • 2.0.13                                ...           2 years ago
  • 2.0.12                                ...           2 years 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.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.4                                ...           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 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (4)
Dev Dependencies (15)

Copyright 2014 - 2017 © taobao.org |