Post
Topic
Board Project Development
Re: A simple and fun Build Your Own BTC Transaction application.
by
pooya87
on 24/11/2021, 03:58:59 UTC
Noted. Perhaps I should go for a more modern, minimalist look next time.

In regards to burn addresses, are burn addresses the same as normal addresses in terms of format and creation? All I know of burn addresses is that they are used to "burn" bitcoins because noone has the private keys associated to that burn address.
This is not about special/burn addresses. It is all about your wrong check here:
https://github.com/jiamijiang/build-it-yourself-bitcoin/blob/c15413b74b8d03629fc05a8ffc9fedad184e2d71/views/home.ejs#L49
This is not how you validate bitcoin transactions. You could do some initial first letter check but the actual check for validity must be done through decoding.
Basically you base58 or bech32 decode the string and if it was decoded successfully and the data had the appropriate length you say that it is a valid address.