Gathering detailed insights and metrics for @bitgo-beta/unspents
Gathering detailed insights and metrics for @bitgo-beta/unspents
Gathering detailed insights and metrics for @bitgo-beta/unspents
Gathering detailed insights and metrics for @bitgo-beta/unspents
npm install @bitgo-beta/unspents
Typescript
Module System
Node Version
NPM Version
TypeScript (94.53%)
JavaScript (5.11%)
WebAssembly (0.28%)
Dockerfile (0.05%)
Shell (0.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
373 Stars
16,931 Commits
296 Forks
77 Watchers
3,792 Branches
574 Contributors
Updated on Jul 17, 2025
Latest Version
0.8.3
Package Id
@bitgo-beta/unspents@0.8.3
Unpacked Size
65.73 kB
Size
16.48 kB
File Count
22
NPM Version
lerna/5.5.0/node@v14.18.0+x64 (darwin)
Node Version
14.18.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
4
The package provides a Dimensions
class with methods to calculate bitcoin transaction sizes
npm install --save @bitgo/unspents
The transaction vSize is critical to calculating the proper transaction fee.
The class unspents.Dimensions
provides a class that helps work with the components required
to calculate an accurate estimate of a transaction vSize.
1import { Codes, Dimensions } from '@bitgo/unspents'; 2// using raw attributes 3new Dimensions({ 4 nP2shInputs: 1, 5 nP2shP2wshInputs: 1, 6 nP2wshInputs: 1, 7 outputs: { count: 1, size: 32 }, 8}); 9 10// calculate from unspents that have `chain` property (see Chain Codes) 11Dimensions.fromUnspents(unspent[0]); 12Dimensions.fromUnspents(unspents); 13 14// Signed inputs work too 15Dimensions.fromInput(inputs[0]); 16Dimensions.fromInputs(inputs); 17 18// Transaction outputs 19Dimensions.fromOutputs(outputs[0]); 20Dimensions.fromOutputs(outputs); 21Dimensions.fromOutputOnChain(Codes.p2sh.internal); 22Dimensions.fromOutputScriptLength(31); 23 24// Combining dimensions and estimating their vSize 25Dimensions.fromUnspents({ unspents }) 26 .plus(Dimensions.fromOutputOnChain(Codes.p2shP2wsh.internal).times(nOutputs)) 27 .getVSize();
Publishing new versions should be done by running the publish script in scripts/publish.sh
.
It can be invoked with the name of the branch to release, and will default to the currently checked out branch if not given.
It will perform validation of all prepublish conditions, run a dry-run publish, then, if successful, a real publish. After that is complete,
the newly installed package will be downloaded and require()
'd to ensure the package was published correctly.
@bitgo/unspents
uses Drone for continuous integration, which is configured by the .drone.yml
file in the project root. However, this file should not be modified by hand. All changes to the CI process should be done by modifying the .drone.jsonnet
file, then running npm run generate_drone
to rebuild the .drone.yml
file.
Codes
The exported Codes
module is now deprecated.
Please use utxo-lib/src/bitgo/wallet/chains
instead.
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
binaries present in source code
Details
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
31 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More