Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
bitcoin-address-soft-regex-validation
Advanced tools
A single-function package to performa soft (no checksum) bitcoin address (Base58 and Bech32) validation
Performs a soft (syntactically-only) validation of Bitcoin address (both Base58 and Bech32, both Mainnet and Testnet). It takes for granted that you have a stronger (maybe server side) Checksum validation.
npm install --save bitcoin-address-soft-regex-validation
const {isValidBitcoinAddress} = require("bitcoin-address-soft-regex-validation");
// a mainnet address
isValidBitcoinAddress("1JDknRvZTi5XdhQB3cgvJ9R8aogUvfbYUB"); // "mainnet"
// a testnet address
isValidBitcoinAddress("tb1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"); // "testnet"
// an invalid address
isValidBitcoinAddress("fake-address"); // undefined
Remember that it's not so important if some false positives pass the validation (as said above, it takes for granted that a serious validation is made elsewhere), the only important thing is that no one valid address is blocked.
It's bases on some resources like this one, this one and mixed together on Regex101.
It has no dependencies and it's a single-function package, check the index.js
file to copy the code and avoid adding one more dependency if you want.
Last but not least: it's written in TypeScript.
Thanks goes to these wonderful people (emoji key):
Stefano Magni 💻 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
A single-function package to performa soft (no checksum) bitcoin address (Base58 and Bech32) validation
The npm package bitcoin-address-soft-regex-validation receives a total of 13 weekly downloads. As such, bitcoin-address-soft-regex-validation popularity was classified as not popular.
We found that bitcoin-address-soft-regex-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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.