@arcblock/swap-retriever
v1.7.1
Published
Utility to retrieve a swap when we can
Downloads
108
Readme
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 |