@waves.exchange/assets-data-provider
v0.0.2
Published
### How to use
Downloads
2
Keywords
Readme
AssetsDataProvider
How to use
yarn add @waves.exchange/assets-data-provider
or
npm i --save @waves.exchange/assets-data-provider
import { createAssetsDataProvider } from '@waves.exchange/assets-data-provider';
const assetsDataProvider = createAssetsDataProvider('https://api.domain/v0');
assetsDataProvider.getAssets(['id1', 'id2', 'id3']).subscribe((assets) => {
console.log(assets);
});
// or
assetsDataProvider.getAssets(['id1', 'id2', 'id3']).subscribe(
(assets) => console.log(assets),
(error) => console.error(error),
() => console.log('complete'),
);
// or
assetsDataProvider.getAssets(['id1', 'id2', 'id3']).subscribe({
next: (assets) => console.log(assets),
error: (error) => console.error(error),
complete: () => console.log('complete')
});