Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(isBtcAddress): ✨ Support all address formats and testnets #2406

Merged

Conversation

madoke
Copy link
Contributor

@madoke madoke commented May 26, 2024

The isBtcAddress validator fails validation on the new taproot bitcoin address format (62 characters), as well as testnet addresses.

This PR adds support for the testnet prefixes listed in (this article) as well as the new taproot addresses (Bech32m) which are very similar to Bech32.

In addition, the characters 1 b i o were removed from the regex because they're not part of the Bech32 alphabet.

Let me know what you think !

@profnandaa
Copy link
Member

Thanks for your contrib! 🎉

@profnandaa profnandaa merged commit 85a1f14 into validatorjs:master Jun 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants