feat(openalias): add BTC, ETH, and LTC OpenAlias records

Extends OpenAlias configuration with Bitcoin, Ethereum, and Litecoin donation addresses alongside the existing Monero entry.

Also tightens the openalias() helper to use strict type checks.
This commit is contained in:
2026-03-22 17:41:21 -04:00
parent 11792cba26
commit 5afb9f48f5
+11 -11
View File
@@ -56,10 +56,10 @@ D("arirex.me", REG_101DOMAIN,
TXT("_github-pages-challenge-arirexouium", "0b62c2fb7a8422145d5b5e6637257d", CF_COMMENT("GitHub Pages Verify")), TXT("_github-pages-challenge-arirexouium", "0b62c2fb7a8422145d5b5e6637257d", CF_COMMENT("GitHub Pages Verify")),
// OpenAlias // OpenAlias
openalias("xmr", "89dQNyY3E9gJGYrEeRw4EFAdezWQg7BBbHJdBpLRwrjH52ngNfAYRcEhAHQotCswGxTeSoFi5nQ7Gf86kySmXzuQE9CXjUH", { openalias("xmr", "89dQNyY3E9gJGYrEeRw4EFAdezWQg7BBbHJdBpLRwrjH52ngNfAYRcEhAHQotCswGxTeSoFi5nQ7Gf86kySmXzuQE9CXjUH", { name: "AriRexouium", checksum: true, }),
name: "AriRexouium", openalias("btc", "3DQEYUDquSvh6DX54o2Gw1TXT9ZGWWoRTh", { name: "AriRexouium", checksum: true, }),
checksum: true, openalias("eth", "0x3489c73A2F3DE6236624d43a3767f4dB8181d0c4", { name: "AriRexouium", checksum: true, }),
}), openalias("ltc", "Lg6sV5PfRrBvpQoAzsyCcWMs26aq5VBssS", { name: "AriRexouium", checksum: true, }),
); );
D("achl.fr", REG_101DOMAIN, D("achl.fr", REG_101DOMAIN,
@@ -228,7 +228,7 @@ function simplelogin(verification) {
} }
/* -------------------------------------------------------------------------- *\ /* -------------------------------------------------------------------------- *\
Open Alias Builder OpenAlias Builder
\* -------------------------------------------------------------------------- */ \* -------------------------------------------------------------------------- */
/** /**
* Generate OpenAlias TXT record * Generate OpenAlias TXT record
@@ -250,12 +250,12 @@ function openalias(prefix, address, opts) {
opts = opts || {}; opts = opts || {};
var record = "oa1:" + prefix + " recipient_address=" + address + ";"; var record = "oa1:" + prefix + " recipient_address=" + address + ";";
if (opts.name) { record += " recipient_name=" + opts.name + ";"; } if (typeof opts.name === "string") record += " recipient_name=" + opts.name + ";";
if (opts.description) { record += " tx_description=" + opts.description + ";"; } if (typeof opts.description === "string") record += " tx_description=" + opts.description + ";";
if (opts.amount) { record += " tx_amount=" + opts.amount + ";"; } if (typeof opts.amount === "string") record += " tx_amount=" + opts.amount + ";";
if (opts.paymentId) { record += " tx_payment_id=" + opts.paymentId + ";"; } if (typeof opts.paymentId === "string") record += " tx_payment_id=" + opts.paymentId + ";";
if (opts.signature) { record += " address_signature=" + opts.signature + ";"; } if (typeof opts.signature === "string") record += " address_signature=" + opts.signature + ";";
if (opts.checksum) { record += " checksum=" + crc32(record.trim()).toString(16).toUpperCase() + ";"; } if (opts.checksum === true) record += " checksum=" + crc32(record.trim()).toString(16).toUpperCase() + ";";
// Checksum must be last: CRC-32 of the record trimmed of surrounding spaces. // Checksum must be last: CRC-32 of the record trimmed of surrounding spaces.
return TXT("@", record, CF_COMMENT("OpenAlias > " + prefix.toUpperCase() + (opts.name ? " > " + opts.name : ""))); return TXT("@", record, CF_COMMENT("OpenAlias > " + prefix.toUpperCase() + (opts.name ? " > " + opts.name : "")));