New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tokel/bitgo-komodo-cc-lib

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokel/bitgo-komodo-cc-lib - npm Package Compare versions

Comparing version 0.1.29 to 0.1.30

cc/txParser.js

46

cc/ccutils.js

@@ -16,2 +16,3 @@ /**

const types = require('../src/types');
const { decodeTransactionData, parseTransactionData } = require('./txParser')
var typeforce = require('typeforce');

@@ -486,31 +487,2 @@ var typeforceNT = require('typeforce/nothrow');

/**
* Decode Transaction Data into more readable format
* @param {*} tx transaction to decode
* @param {*} network chosen network
* @returns
*/
function decodeTransactionData (tx, network) {
console.log(tx);
const decoded = Transaction.fromHex(tx, network);
console.log(decoded)
return {
txid: decoded.getHash().reverse().toString('hex'),
ins: decoded.ins.map(one => {
const txid = one.hash.reverse().toString('hex')
return {
...one,
txid,
}
}),
outs: decoded.outs.map(out => {
return {
...out,
address: addresslib.fromOutputScript(out.script, network),
asm: bscript.toASM(out.script),
}
})
}
}
/**
* Get many transactions decoded

@@ -545,5 +517,4 @@ * @param {*} peers PeerGroup obj

});
decodedTxs = decodedTxs.map(tx => {
return {
return decodedTxs.map(tx => {
const parsedTx = {
...tx,

@@ -557,4 +528,11 @@ ins: tx.ins.map(txin => {

}
})
return decodedTxs;
const { recipients, senders, fees, value } = parseTransactionData(parsedTx);
return {
recipients,
senders,
fees,
value,
...parsedTx
}
});
} catch (e) {

@@ -561,0 +539,0 @@ console.log(e)

{
"name": "@tokel/bitgo-komodo-cc-lib",
"version": "0.1.29",
"version": "0.1.30",
"description": "Client-side Bitcoin JavaScript library with Komodo cryptocondions support",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc