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

bsv-coinselect

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bsv-coinselect - npm Package Compare versions

Comparing version 4.1.1 to 4.2.1

1

accumulative.js

@@ -15,2 +15,3 @@ var utils = require('./utils')

var outAccum = utils.sumOrNaN(outputs)
// Perform a test to see if transaction can be finalized

@@ -17,0 +18,0 @@ var fee = Math.round(Math.ceil(feeRate * bytesAccum));

5

index.js
var accumulative = require('./accumulative')
var blackjack = require('./blackjack')
var utils = require('./utils')

@@ -20,8 +19,4 @@

// attempt to use the blackjack strategy first (no change output)
var base = blackjack(utxos, outputs, feeRate, changeScript)
if (base.inputs) return base
// else, try the accumulative strategy
return accumulative(utxos, outputs, feeRate, changeScript)
}
{
"name": "bsv-coinselect",
"version": "4.1.1",
"version": "4.2.1",
"description": "A transaction input selection module for Bitcoin SV (BSV)",

@@ -29,3 +29,2 @@ "keywords": [

"accumulative.js",
"blackjack.js",
"index.js",

@@ -32,0 +31,0 @@ "utils.js"

@@ -139,5 +139,4 @@ # bsv-coinselect

-|-|-
`require('coinselect')` | Blackjack, with Accumulative fallback | By Descending Value
`require('coinselect')` | Accumulative - accumulates inputs until the target value (+fees) is reached, skipping
`require('coinselect/accumulative')` | Accumulative - accumulates inputs until the target value (+fees) is reached, skipping detrimental inputs | -
`require('coinselect/blackjack')` | Blackjack - accumulates inputs until the target value (+fees) is matched, does not accumulate inputs that go over the target value (within a threshold) | -

@@ -144,0 +143,0 @@ **Note:** Each algorithm will add a change output if the `input - output - fee` value difference is over a dust threshold.

@@ -82,3 +82,2 @@ // baseline estimates, used to improve performance

if (remainderAfterExtraOutput > dustThreshold({}, feeRate)) {
if (changeScript || changeScript === null) {

@@ -85,0 +84,0 @@ outputs = outputs.concat({

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