@psf/bch-js
Advanced tools
Comparing version 6.6.2 to 6.7.0
{ | ||
"name": "@psf/bch-js", | ||
"version": "6.6.2", | ||
"version": "6.7.0", | ||
"description": "A JavaScript library for working with Bitcoin Cash, eCash, and SLP Tokens", | ||
@@ -5,0 +5,0 @@ "author": "Chris Troutner <chris.troutner@gmail.com>", |
@@ -180,4 +180,11 @@ /* | ||
// Collect BCH UTXOs above 1000 sats | ||
const bchUtxos = utxos.filter(x => x.isSlp === false && x.value > 1000) | ||
// Collect all BCH UTXOs at 1000 sats or smaller | ||
// The prevents SLP tokens, BCMR, and other 'colored' UTXOs from being | ||
// accidentally included into normal BCH transactions. | ||
const infoUtxos = utxos.filter(x => x.isSlp === false && x.value <= 1000) | ||
// Collect and hydrate any type1 baton UTXOs | ||
const bchUtxos = utxos.filter(x => x.isSlp === false) | ||
let type1BatonUtxos = utxos.filter( | ||
@@ -212,2 +219,3 @@ x => x.isSlp === true && x.type === 'baton' && x.tokenType === 1 | ||
bchUtxos, | ||
infoUtxos, | ||
slpUtxos: { | ||
@@ -214,0 +222,0 @@ type1: { |
@@ -145,3 +145,4 @@ /* | ||
assert.equal(result.bchUtxos.length, 4) | ||
assert.equal(result.bchUtxos.length, 1) | ||
assert.equal(result.infoUtxos.length, 3) | ||
assert.equal(result.slpUtxos.type1.tokens.length, 1) | ||
@@ -148,0 +149,0 @@ assert.equal(result.slpUtxos.type1.mintBatons.length, 1) |
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
1294696
31234