cashaccounts
Advanced tools
Comparing version 0.3.3 to 0.3.4
23
index.js
@@ -30,2 +30,3 @@ const EmojiList = require('./emoji_names.json'); | ||
// lookup || account | ||
buildSearchUrl(handle, lookupMethod) { | ||
@@ -149,12 +150,22 @@ const split = this.splitHandle(handle); | ||
const data = await axios.get(url).then(x => { | ||
if (x.data === undefined) { | ||
throw new Error('error with lookup'); | ||
} | ||
return x.data; | ||
}); | ||
// .catch(err => { | ||
// console.log('error in getAddressByCashAccount', err.response); | ||
// }); | ||
return data; | ||
} | ||
/** | ||
* get inclusion proofs on cashaccounts | ||
* | ||
* @param {string} handle - ie: jonathan#100 | ||
* @returns {object} | ||
* @memberof CashAccounts | ||
*/ | ||
async getBatchResults(handle) { | ||
const url = await this.buildSearchUrl(handle, 'lookup'); | ||
const data = await axios.get(url).then(x => { | ||
return x.data; | ||
}); | ||
return data; | ||
@@ -161,0 +172,0 @@ } |
{ | ||
"name": "cashaccounts", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "decentralized identity system for bitcoin cash by Jonathan Silverblood", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
28415
836