
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
bitcoin-address-validation
Advanced tools
Validate Bitcoin addresses - Bech32, P2PKH and P2SH! Available for ES6 and Node.js.
validate('bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4');
{
bech32: true,
testnet: false,
address: 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4',
type: 'p2wpkh'
}
Add bitcoin-address-validation
to your Javascript project dependencies using Yarn:
yarn add bitcoin-address-validation
Or NPM:
npm install bitcoin-address-validation --save
Import using ES6:
import validate from 'bitcoin-address-validation';
Or AMD:
var validate = require('bitcoin-address-validation');
Validation is done using the validate(address)
function.
validate('17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem')
{
address: '17VZNX1SN5NtKa8UQFxwQbFeFc3iqRYhem',
type: 'p2pkh',
testnet: false
}
validate('bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4');
{
bech32: true,
testnet: false,
address: 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4',
type: 'p2wpkh'
}
validate(address)
will return false
for any invalid address, regardless of the address type:
validate('bc1qw508d6qejxtdg4y5r3zrrvary0c5xw7kv8f3t4')
false
Rui Gomes
https://ruigomes.me
The MIT License (MIT). Please see LICENSE file for more information.
FAQs
Validate any Bitcoin address - P2WSH, P2WPKH, P2SH, P2PKH - Mainnet & Testnet
The npm package bitcoin-address-validation receives a total of 37,983 weekly downloads. As such, bitcoin-address-validation popularity was classified as popular.
We found that bitcoin-address-validation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.