{"id":16293184,"url":"https://github.com/noriste/bitcoin-address-soft-regex-validation","last_synced_at":"2026-01-21T02:07:03.690Z","repository":{"id":40827497,"uuid":"172487739","full_name":"NoriSte/bitcoin-address-soft-regex-validation","owner":"NoriSte","description":"A single-function package to perform soft (no checksum) bitcoin address (Base58 and Bech32) validation","archived":false,"fork":false,"pushed_at":"2023-06-03T11:09:28.000Z","size":929,"stargazers_count":2,"open_issues_count":18,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-07T07:38:15.496Z","etag":null,"topics":["bitcoin-address","javascript","typescript-definitions","validation-library"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/bitcoin-address-soft-regex-validation","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NoriSte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-25T10:47:59.000Z","updated_at":"2023-02-05T16:29:16.000Z","dependencies_parsed_at":"2024-10-27T21:44:34.729Z","dependency_job_id":"01b6acc0-4d24-415b-b285-7359995a8491","html_url":"https://github.com/NoriSte/bitcoin-address-soft-regex-validation","commit_stats":{"total_commits":97,"total_committers":5,"mean_commits":19.4,"dds":"0.35051546391752575","last_synced_commit":"e23b70baad789226f57eb41e5b165edb1aeac16c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoriSte%2Fbitcoin-address-soft-regex-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoriSte%2Fbitcoin-address-soft-regex-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoriSte%2Fbitcoin-address-soft-regex-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NoriSte%2Fbitcoin-address-soft-regex-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NoriSte","download_url":"https://codeload.github.com/NoriSte/bitcoin-address-soft-regex-validation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247731573,"owners_count":20986676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin-address","javascript","typescript-definitions","validation-library"],"created_at":"2024-10-10T20:10:26.636Z","updated_at":"2026-01-21T02:07:03.684Z","avatar_url":"https://github.com/NoriSte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitcoin-address-soft-regex-validation\n\n[![Build Status](https://travis-ci.com/NoriSte/bitcoin-address-soft-regex-validation.svg?branch=master)](https://travis-ci.com/NoriSte/bitcoin-address-soft-regex-validation)\n[![Build Cron](https://img.shields.io/badge/build%20cron-weekly-44cc11.svg)](https://travis-ci.com/NoriSte/bitcoin-address-soft-regex-validation)\n[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)\n[![Coverage Status](https://coveralls.io/repos/github/NoriSte/bitcoin-address-soft-regex-validation/badge.svg?branch=master)](https://coveralls.io/github/NoriSte/bitcoin-address-soft-regex-validation?branch=master)\n[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/NoriSte/bitcoin-address-soft-regex-validation/master)](https://stryker-mutator.github.io)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8dc4369cd25aefe4870e/maintainability)](https://codeclimate.com/github/NoriSte/bitcoin-address-soft-regex-validation/maintainability)\n[![TypeScript](https://badges.frapsoft.com/typescript/love/typescript.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)\n\nPerforms 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.\n\n```bash\nnpm install --save bitcoin-address-soft-regex-validation\n```\n```javascript\nconst {isValidBitcoinAddress} = require(\"bitcoin-address-soft-regex-validation\");\n// a mainnet address\nisValidBitcoinAddress(\"1JDknRvZTi5XdhQB3cgvJ9R8aogUvfbYUB\"); // \"mainnet\"\n// a testnet address\nisValidBitcoinAddress(\"tb1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq\"); // \"testnet\"\n// an invalid address\nisValidBitcoinAddress(\"fake-address\"); // undefined\n```\n\nRemember 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.\n\nIt's bases on some resources like [this one](http://mokagio.github.io/tech-journal/2014/11/21/regex-bitcoin.html), [this one](https://stackoverflow.com/a/48643915) and mixed together on [Regex101](https://regex101.com/r/v0g6bv/1).\n\nIt 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.\n\nLast but not least: it's written in TypeScript.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003ctable\u003e\u003ctr\u003e\u003ctd align=\"center\"\u003e\u003ca href=\"https://twitter.com/NoriSte\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/173663?v=4\" width=\"100px;\" alt=\"Stefano Magni\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStefano Magni\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/NoriSte/bitcoin-address-soft-regex-validation/commits?author=NoriSte\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/NoriSte/bitcoin-address-soft-regex-validation/commits?author=NoriSte\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoriste%2Fbitcoin-address-soft-regex-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoriste%2Fbitcoin-address-soft-regex-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoriste%2Fbitcoin-address-soft-regex-validation/lists"}