I know there is a similar question but its 7 years old and the answer doesn't work. Now, many things have changed, including the addresses themselves. So, is there a js library I can trust that can validate addresses on 2021
1 Answer
Use bitcoinJS's https://github.com/bitcoinjs/bitcoinjs-lib/blob/27a840aac4a12338f1e40c54f3759bbd7a559944/src/address.js#L101 toOutputScript function in a try-catch block
-
Looks fine but I can't load the script address.js
Uncaught ReferenceError: exports is not defined
. Have you used it before? Commented May 26, 2021 at 17:14 -