cashaccounts
Advanced tools
Comparing version 0.3.4 to 0.4.0
33
index.js
@@ -51,6 +51,2 @@ const EmojiList = require('./emoji_names.json'); | ||
// .catch(err => { | ||
// console.log('error in performTrustedSearch', ' url', url, err.response); | ||
// }); | ||
return data; | ||
@@ -87,6 +83,2 @@ } | ||
// .catch(err => { | ||
// console.log('error in trustedRegistration', err); | ||
// }); | ||
return resp; | ||
@@ -582,2 +574,27 @@ } | ||
/** | ||
* find cash accounts associated with an address | ||
* | ||
* @param {string} address - ie: bitcoincash:qqqqqqq | ||
* @returns {obj} hex and txid | ||
* @memberof CashAccount | ||
*/ | ||
async reverseLookup(address) { | ||
if (this.server === 'https://api.cashaccount.info') { | ||
return { | ||
status: 'The default lookup server does not support this endpoint' | ||
}; | ||
} | ||
const url = `${this.server}/reverselookup/${address}`; | ||
const resp = await axios.get(url).then(x => { | ||
if (x.data === undefined) { | ||
throw new Error('error with reverseLookup'); | ||
} | ||
return x.data; | ||
}); | ||
return resp; | ||
} | ||
/** | ||
* creates the raw transaction to be broadcast later | ||
@@ -584,0 +601,0 @@ * |
{ | ||
"name": "cashaccounts", | ||
"version": "0.3.4", | ||
"version": "0.4.0", | ||
"description": "decentralized identity system for bitcoin cash by Jonathan Silverblood", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28840
852