feat: Add initial WALLET DNS record support
All checks were successful
Build Docker / Build Image (push) Successful in 2m46s

This commit is contained in:
2025-08-25 11:55:15 +10:00
parent 545a0b9475
commit f090b7b71a
3 changed files with 40 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ def hsdVersion(format=True):
return info['version']
def check_account(cookie: str):
def check_account(cookie: str | None):
if cookie is None:
return False
@@ -403,13 +403,20 @@ def check_hip2(domain: str):
return 'Invalid domain'
address = domainLookup.hip2(domain)
if address.startswith("Hip2: "):
if not address.startswith("Hip2: "):
if not check_address(address, False, True):
return 'Hip2: Lookup succeeded but address is invalid'
return address
# Try using WALLET TXT record
address = domainLookup.wallet_txt(domain)
if not address.startswith("hs1"):
return "No HIP2 or WALLET record found for this domain"
if not check_address(address, False, True):
return 'Hip2: Lookup succeeded but address is invalid'
return 'WALLET DNS record found but address is invalid'
return address
def send(account, address, amount):
account_name = check_account(account)