3 Commits

Author SHA1 Message Date
49e378803d fix: Use existing hsd from accounts module to get name from hash
All checks were successful
Build Docker / Build Image (push) Successful in 2m7s
2025-08-26 12:52:14 +10:00
1c53547047 feat: Add env flag to disable WALLET DNS record lookup
All checks were successful
Build Docker / Build Image (push) Successful in 47s
2025-08-25 18:10:03 +10:00
080c4402d8 Merge pull request 'Add WALLET DNS record for sending using domain alias' (#3) from feat/WALLETDNS into main
All checks were successful
Build Docker / Build Image (push) Successful in 53s
Reviewed-on: #3
2025-08-25 13:59:15 +10:00
4 changed files with 10 additions and 26 deletions

1
.gitignore vendored
View File

@@ -16,3 +16,4 @@ customPlugins/
cache/
build/
dist/
hsd/

View File

@@ -408,6 +408,10 @@ def check_hip2(domain: str):
if not check_address(address, False, True):
return 'Hip2: Lookup succeeded but address is invalid'
return address
# Check if DISABLE_WALLETDNS is set
if os.getenv("DISABLE_WALLETDNS","").lower() in ["1","true","yes"]:
return "No HIP2 record found for this domain"
# Try using WALLET TXT record
address = domainLookup.wallet_txt(domain)
if not address.startswith("hs1"):

View File

@@ -2,4 +2,6 @@ HSD_API=123480615465636893475aCwyaae6s45
HSD_IP=localhost
THEME=black
SHOW_EXPIRED=false
EXPLORER_TX=https://shakeshift.com/transaction/
EXPLORER_TX=https://shakeshift.com/transaction/
DISABLE_WALLETDNS=false
INTERNAL_HSD=false

View File

@@ -6,30 +6,7 @@ from domainLookup import punycode_to_emoji
import os
from handywrapper import api
import threading
HSD_API = os.getenv("HSD_API","")
HSD_IP = os.getenv("HSD_IP","localhost")
HSD_NETWORK = os.getenv("HSD_NETWORK")
HSD_WALLET_PORT = 12039
HSD_NODE_PORT = 12037
if not HSD_NETWORK:
HSD_NETWORK = "main"
else:
HSD_NETWORK = HSD_NETWORK.lower()
if HSD_NETWORK == "simnet":
HSD_WALLET_PORT = 15039
HSD_NODE_PORT = 15037
elif HSD_NETWORK == "testnet":
HSD_WALLET_PORT = 13039
HSD_NODE_PORT = 13037
elif HSD_NETWORK == "regtest":
HSD_WALLET_PORT = 14039
HSD_NODE_PORT = 14037
hsd = api.hsd(HSD_API, HSD_IP, HSD_NODE_PORT)
import account
# Get Explorer URL
TX_EXPLORER_URL = os.getenv("EXPLORER_TX")
@@ -559,7 +536,7 @@ def renderDomainAsync(namehash: str) -> None:
if namehash in cache:
return
# Fetch the name outside the lock (network call)
name = hsd.rpc_getNameByHash(namehash)
name = account.hsd.rpc_getNameByHash(namehash)
if name["error"] is None:
name = name["result"]
rendered = renderDomain(name)