Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
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,
bech32: 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
We found that bitcoin-address-validation demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.