feat: Add crypto address verifications
All checks were successful
Build Docker / BuildImage (push) Successful in 35s

This commit is contained in:
Nathan Woodburn 2024-07-18 14:30:12 +10:00
parent 9fc218feb1
commit eec66b13ca
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
6 changed files with 41 additions and 4 deletions

View File

@ -0,0 +1,6 @@
I hereby confirm that I am the owner of the Bitcoin address bc1q60qy4s6gd7se8z6nc4wu49g4u5y8k2epd3djzc.
Nathan.Woodburn/
--------------------
H3oLoxLyax3gW6KkGfJiarseaktWWydyfS2TZ1zGoDlkIoMG/nIlNWNC5xc/uHCdPs+CIJgxNRq0GQI91qkalpg=
--------------------
You can verify this signature by pasting it into a signature verification tool such as https://www.verifybitcoinmessage.com/.

View File

@ -0,0 +1,6 @@
I hereby confirm that I am the owner of the EVM address 0x6cB4B39bEc23a921C9a20D061Bf17d4640B0d39e.
Nathan.Woodburn/
--------------------
0x254919e1f2035a4f04614da9e1fbc1f45dab31b03b0baf1bb3325a9f9e437f1f787b99ebc6716b822fc190284c2c678054c91835492ff0df239ec60f6166587f1c
--------------------
You can verify this signature by pasting it into a signature verification tool such as https://etherscan.io/verifiedSignatures

View File

@ -0,0 +1,13 @@
I hereby confirm that I am the owner of the SOL address AJsPEEe6S7XSiVcdZKbeV8GRp1QuhFUsG8mLrqL4XgiU.
Nathan.Woodburn/
--------------------
[71,63,207,190,90,17,145,39,4,98,110,176,86,140,143,107,237,96,24,43,2,116,21,70,47,98,192,24,193,210,89,220,30,128,219,105,9,35,146,188,216,143,164,32,255,44,146,249,153,33,54,214,203,159,80,26,107,165,217,240,153,61,39,0]
--------------------
0x473fcfbe5a11912704626eb0568c8f6bed60182b027415462f62c018c1d259dc1e80db69092392bcd88fa420ff2c92f9992136d6cb9f501a6ba5d9f0993d2700
--------------------
2Rd2EkAUwC8u4DtCZ5BXTkJEvWxozrxmcEzn7VbJFFbL81YLQngH9V1bTu3vivaQz7ZGqs5YtpPWxomsYeE7Ws6F
--------------------
Rz/PvloRkScEYm6wVoyPa+1gGCsCdBVGL2LAGMHSWdwegNtpCSOSvNiPpCD/LJL5mSE21sufUBprpdnwmT0nAA==
--------------------
You can verify this signature by pasting it into a signature verification tool such as https://amacar.github.io/solana-tools/#verify-message
Please note I have included various formats for the signature to make it easier to verify.

View File

@ -1 +1 @@
bc1qhs94zzcw64qnwq4hvk056rwxwvgrkd7tq7d4xw
bc1q60qy4s6gd7se8z6nc4wu49g4u5y8k2epd3djzc

View File

@ -523,6 +523,11 @@ def donate():
address = ''
domain = ''
cryptoHTML = ''
proof = ''
if os.path.isfile(f'.well-known/wallets/.{crypto}.proof'):
proof = f'<a href="/.well-known/wallets/.{crypto}.proof" target="_blank"><img src="/assets/img/proof.png" alt="Proof of ownership" style="width: 100%; max-width: 30px; margin-left: 10px;"></a>'
if os.path.isfile(f'.well-known/wallets/{crypto}'):
with open(f'.well-known/wallets/{crypto}') as file:
address = file.read()
@ -530,12 +535,17 @@ def donate():
cryptoHTML += f'<br>Donate with {coinNames[crypto] if crypto in coinNames else crypto}:'
else:
cryptoHTML += f'<br>Donate with {token["name"]} {"("+token["symbol"]+") " if token["symbol"] != token["name"] else ""}on {crypto}:'
cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-address" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{address}</code>'
cryptoHTML += f'<br><code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-address" class="address" style="color: rgb(242,90,5);display: inline-block;" data-bs-original-title="Click to copy">{address}</code>'
if proof:
cryptoHTML += proof
elif token:
if 'address' in token:
address = token['address']
cryptoHTML += f'<br>Donate with {token["name"]} {"("+token["symbol"]+")" if token["symbol"] != token["name"] else ""}{" on "+crypto if crypto != "NULL" else ""}:'
cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-address" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{address}</code>'
cryptoHTML += f'<br><code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-address" class="address" style="color: rgb(242,90,5);display: inline-block;" data-bs-original-title="Click to copy">{address}</code>'
if proof:
cryptoHTML += proof
else:
cryptoHTML += f'<br>Invalid coin: {crypto}<br>'
else:
@ -554,12 +564,14 @@ def donate():
cryptoHTML += '<br>Or send to this domain on compatible wallets:<br>'
cryptoHTML += f'<code data-bs-toggle="tooltip" data-bss-tooltip="" id="crypto-domain" class="address" style="color: rgb(242,90,5);display: block;" data-bs-original-title="Click to copy">{domain}</code>'
if address:
cryptoHTML += '<img src="/qrcode/' + address + '" alt="QR Code" style="width: 100%; max-width: 200px; margin: 20px auto;">'
cryptoHTML += '<br><img src="/qrcode/' + address + '" alt="QR Code" style="width: 100%; max-width: 200px; margin: 20px auto;">'
copyScript = '<script>document.getElementById("crypto-address").addEventListener("click", function() {navigator.clipboard.writeText(this.innerText);this.setAttribute("data-bs-original-title", "Copied!");});document.getElementById("crypto-domain").addEventListener("click", function() {navigator.clipboard.writeText(this.innerText);this.setAttribute("data-bs-original-title", "Copied!");});</script>'
cryptoHTML += copyScript
return render_template('donate.html', handshake_scripts=handshake_scripts, crypto=cryptoHTML, coins=coins,default_coins=default_coins)
@app.route('/qrcode/<path:data>')

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB