3.0.1 • Published 3 years ago

@zapjs/bondage v3.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
3 years ago

@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

- Node 12.20 <=14.15
- 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

3.0.1

3 years ago

3.0.0

3 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.0.19

5 years ago

2.0.18

5 years ago

2.0.17

5 years ago

2.0.16

5 years ago

2.0.15

5 years ago

2.0.14

6 years ago

2.0.13

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago