Closed Paulsky closed 4 years ago
Hey @Paulsky
Sounds great.
Thoughts on being able to choose if the new cash address should be accepted or not. Even though it's the new thing, it's not widely adopted yet, and as such, not everyone may want to have it be validated.
Perhaps a forth argument addressFormat
for validate
, which can be an array of legacy
, slp
and/or cash
?
Hello @GusGold ,
Alright, thanks! I will create a PR with a dedicated BCH validator and add a fourth argument for the validate function. I think you made a valid point, so I will make it an optional parameter. By default, it would only use the legacy option, so this will not be a breaking change.
How does that sound to you?
Perfect!
Looking forward to the PR
Currently, the validator only supports legacy BitcoinCash addresses. The new 'SLP' or 'Cash' (bitcoincash:xxx) addresses are not supported.
I could create a PR for a standalone BCH validator, and use this project https://github.com/bitcoincashjs/bchaddrjs as a dependency? Similar as the IOTA approach?
What are your thoughts about this?