Simple web extension to detect when you've copied a bitcoin address (or something like looks like one) from a HTTP page.
- For Bech32, it uses the reference implementation to check if the copied text can be decoded. This is not perfect, for instance,
bc1rw5uspcuh
(from the test vectors) has an invalid program length but is still decodable and is detected by the extension. - For P2PKH and P2SH it is even cruder, it checks if the copied text is the right version (first byte is
1
for P2PKH and3
for P2SH), can be base58 decoded (using paulmillr/micro-base58), and has the right length (25 bytes).
Use web-ext
to build the sources as follows
cd src-ff
web-ext build
and load the extension into Firefox.
Load the src-chrome
directory into chrome.
Files in src/3rdparty/ have their own licenses (see NOTICE.md). Other files are licensed under the Mozilla Public License 2.0.