@arcblock/swap-retriever

1.7.1 • Public • Published

swap-retriever

styled with prettier docs Gitter

Utility to parse forge config

Table of Contents

Install

npm install @arcblock/swap-retriever
// or
yarn add @arcblock/swap-retriever

Usage

const { createRetriever } = require('@arcblock/swap-retriever');

const retriever = createRetriever({
  traceId,
  offerAddress: address,
  demandAddress: '',
  offerChainHost,
  offerChainId,
  demandChainHost,
  demandChainId,
  retrieveWallet,
  checkInterval: 2000,
  autoStart: true,
  maxRetry: 60,
});

retriever.on('error', args => {
  console.error('swap.retrieve.error', args);
});

retriever.on('retrieved.user', ({ traceId, hash }) => {
  console.log('user retrieved', { traceId, hash });
});

retriever.on('retrieved.both', ({ traceId, hash }) => {
  console.log('both retrieved', { traceId, hash });
});

Documentation

For full documentation, checkout https://forge-js.netlify.com

Contributors

Name Website
wangshijun https://ocap.arcblock.io

Package Sidebar

Install

npm i @arcblock/swap-retriever

Weekly Downloads

0

Version

1.7.1

License

Apache-2.0

Unpacked Size

14.9 kB

Total Files

5

Last publish

Collaborators

  • wangshijun
  • polunzh
  • mave99a
  • gxw