
Bech32 detects as much as 4 errors (within the sense that, for those who make as much as 4 substitution errors, the ensuing string is assured to have an incorrect checksum). However error detection just isn’t the identical as error finding: simply realizing {that a} bech32 is inaccurate doesn’t imply you may inform the place the errors have been made.
Bech32 additionally permits correcting as much as 2 substitution errors. That’s, if not more than 2 substitution errors have been made, you may for any given string compute what the unique, legitimate, string was. The javascript code on the web site you hyperlink to has code to do that, however for security causes, it deliberately doesn’t reveal what errors it discovered, solely the place.
The reason being that correcting is harmful. If the consumer made greater than 2 substitution errors, the error correction algorithm might nicely nonetheless discover two errors to “appropriate”, within the sense that it will assemble a legitimate deal with, however it’ll not be the consumer’s deal with. An inattentive consumer might nicely simply make the corrections steered by the algorithm, and ship funds into the void. As an alternative, the correction algorithm continues to be used below the hood, however solely the situation of its errors is revealed, forcing the consumer to nonetheless go examine whether or not major supply they obtained the deal with by way of, however maybe with further deal with the actual places the algorithm believes are the doubtless positions errors have been made.