cashaccounts
Advanced tools
Comparing version 0.2.0 to 0.2.1
41
index.js
@@ -23,4 +23,2 @@ const EmojiList = require('./emoji_names.json'); | ||
console.log('nodeCredentials', nodeCredentials, typeof nodeCredentials); | ||
if (nodeCredentials) { | ||
@@ -31,4 +29,2 @@ const { host, username, password, port, timeout } = nodeCredentials; | ||
} | ||
console.log('this.bch', this.bchNode); | ||
} | ||
@@ -117,19 +113,26 @@ | ||
const { opreturn, transactionhash, blockhash } = data; | ||
const payment = await this.parsePaymentInfo(opreturn); | ||
const info = await this.parseBitdbObject(data); | ||
return info; | ||
} | ||
const emoji = this.calculateEmoji(transactionhash, blockhash); | ||
const collision = this.calculateCollisionHash(blockhash, transactionhash); | ||
/** | ||
* returns multiple results | ||
* | ||
* @param {*} handle | ||
* @memberof CashAccounts | ||
*/ | ||
async trustedSearch(handle) { | ||
const split = this.splitHandle(handle); | ||
const { username, number } = split; | ||
const object = { | ||
identifier: `${username}#${number}`, | ||
information: { | ||
emoji: emoji, | ||
name: username, | ||
number: number, | ||
collision: { hash: collision, count: 0, length: 0 }, | ||
payment: payment | ||
} | ||
}; | ||
return object; | ||
const results = await this.TrustedBitdbLookup(username, number); | ||
let data = results.c; | ||
let array = []; | ||
for (const each of data) { | ||
let item = await this.parseBitdbObject(each); | ||
item.txid = each.transactionhash; | ||
array.push(item); | ||
} | ||
return array; | ||
} | ||
@@ -136,0 +139,0 @@ |
{ | ||
"name": "cashaccounts", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"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
765
24303