diff --git a/src/psf-slp-indexer.js b/src/psf-slp-indexer.js index 0130a22..fbc3e7e 100644 --- a/src/psf-slp-indexer.js +++ b/src/psf-slp-indexer.js @@ -449,6 +449,18 @@ class PsfSlpIndexer { * @apiGroup PSF SLP * @apiDescription Get token icon and other media associated with a token. * + * Get the icon for a token, given it's token ID. + * This function expects a string input of a token ID property. + * This function returns an object with a tokenIcon property that contains + * the URL to the icon. + * + * The output object always have these properties: + * - tokenIcon: A url to the token icon, if it exists. + * - tokenStats: Data about the token from psf-slp-indexer. + * - optimizedTokenIcon: An alternative, potentially more optimal, url to the token icon, if it exists. + * - iconRepoCompatible: true if the token icon is available via token.bch.sx + * - ps002Compatible: true if the token icon is compatible with PS007 specification. + * * @apiExample Example usage: * (async () => { * try { @@ -520,7 +532,7 @@ class PsfSlpIndexer { throw new Error('Input tokenId must be a string.') } catch (error) { - console.log('error: ', error) + // console.log('error: ', error) if (error.response && error.response.data) throw error.response.data else throw error } diff --git a/test/integration/chains/bchn/psf-slp-indexer.integration.js b/test/integration/chains/bchn/psf-slp-indexer.integration.js index d36ed37..6880450 100644 --- a/test/integration/chains/bchn/psf-slp-indexer.integration.js +++ b/test/integration/chains/bchn/psf-slp-indexer.integration.js @@ -163,7 +163,7 @@ describe('#psf-slp-indexer', () => { // bchjs.PsfSlpIndexer.restURL = 'http://localhost:3000/v5/' const result = await bchjs.PsfSlpIndexer.getTokenData2(tokenId) - console.log('result: ', result) + // console.log('result: ', result) assert.property(result, 'tokenStats') assert.property(result, 'mutableData')