We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import { fetchRemarks, getRemarksFromBlocks, getLatestFinalizedBlock, Consolidator } from 'rmrk-tools'; import { ApiPromise, WsProvider } from '@polkadot/api'; const wsProvider = new WsProvider('wss://node.rmrk.app'); const fetchAndConsolidate = async () => { try { const api = await ApiPromise.create({ provider: wsProvider }); const to = await getLatestFinalizedBlock(api); const remarkBlocks = await fetchRemarks(api, 6431422, to, ['']); if (remarkBlocks && !isEmpty(remarkBlocks)) { const remarks = getRemarksFromBlocks(remarkBlocks); const consolidator = new Consolidator(); const { nfts, collections } = consolidator.consolidate(remarks); console.log('Consolidated nfts:', nfts); console.log('Consolidated collections:', collections); } } catch (error) { console.log(error) } }
consolidator.consolidate(remarks) => await consolidator.consolidate(remarks) getRemarksFromBlocks expects 3 inputs
The text was updated successfully, but these errors were encountered:
Also isEmpty not declared
Sorry, something went wrong.
I'd be happy to submit PR of course
No branches or pull requests
consolidator.consolidate(remarks) => await consolidator.consolidate(remarks)
getRemarksFromBlocks expects 3 inputs
The text was updated successfully, but these errors were encountered: