src/IpfsService.js
/**
     * Search user's credentials on IPFS 
     *
     * @param   {Object}   credentials               user's credentials
     * @param   {String}   credentials.identityHash  target node's label
     * @param   {Boolean}  fetchData    retrieve node's data value or its location
     * @return  {Object}                the desired node with its childrens if it exists                                              
     */
Search user's credentials on IPFS
@param   {Object}   credentials               user's credentials
@param   {String}   credentials.identityHash  target node's label
@param   {Boolean}  fetchData    retrieve node's data value or its location
@return  {Object}                the desired node with its childrens if it exists
Search user ' s credentials on IPFS @param { Object } credentials user ' s credentials @param { String } credentials . identityHash target node ' s label @param { Boolean } fetchData retrieve node ' s data value or its location @return { Object } the desired node with its childrens if it exists
async attestCredentials(credentials) {
        const buffer = Buffer.from(JSON.stringify(credentials))
        const offlineMultiHash = await MultiHash.getMultiHash(buffer)
        try {
            await this.getData(offlineMultiHash)
            return true
        }catch(err){
            return false
        }
    }
async attestCredentials ( credentials ) { const buffer = Buffer . from ( JSON . stringify ( credentials ) ) const offlineMultiHash = await MultiHash . getMultiHash ( buffer ) try { await this . getData ( offlineMultiHash ) return true } catch ( err ) { return false } }
Search user's credentials on IPFS
 @param   {Object}   credentials               user's credentials
 @param   {String}   credentials.identityHash  target node's label
 @param   {Boolean}  fetchData    retrieve node's data value or its location
 @return  {Object}                the desired node with its childrens if it exists
Search user ' s credentials on IPFS @param { Object } credentials user ' s credentials @param { String } credentials . identityHash target node ' s label @param { Boolean } fetchData retrieve node ' s data value or its location @return { Object } the desired node with its childrens if it exists