From 5afb9f48f5208672a7f0e66cf3d93b1706876089 Mon Sep 17 00:00:00 2001 From: Jarrett Aiken Date: Sun, 22 Mar 2026 17:41:21 -0400 Subject: [PATCH] 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. --- dnsconfig.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dnsconfig.js b/dnsconfig.js index c978654..c0f2396 100644 --- a/dnsconfig.js +++ b/dnsconfig.js @@ -56,10 +56,10 @@ D("arirex.me", REG_101DOMAIN, TXT("_github-pages-challenge-arirexouium", "0b62c2fb7a8422145d5b5e6637257d", CF_COMMENT("GitHub Pages Verify")), // OpenAlias - openalias("xmr", "89dQNyY3E9gJGYrEeRw4EFAdezWQg7BBbHJdBpLRwrjH52ngNfAYRcEhAHQotCswGxTeSoFi5nQ7Gf86kySmXzuQE9CXjUH", { - name: "AriRexouium", - checksum: true, - }), + openalias("xmr", "89dQNyY3E9gJGYrEeRw4EFAdezWQg7BBbHJdBpLRwrjH52ngNfAYRcEhAHQotCswGxTeSoFi5nQ7Gf86kySmXzuQE9CXjUH", { name: "AriRexouium", checksum: true, }), + openalias("btc", "3DQEYUDquSvh6DX54o2Gw1TXT9ZGWWoRTh", { name: "AriRexouium", checksum: true, }), + openalias("eth", "0x3489c73A2F3DE6236624d43a3767f4dB8181d0c4", { name: "AriRexouium", checksum: true, }), + openalias("ltc", "Lg6sV5PfRrBvpQoAzsyCcWMs26aq5VBssS", { name: "AriRexouium", checksum: true, }), ); D("achl.fr", REG_101DOMAIN, @@ -228,7 +228,7 @@ function simplelogin(verification) { } /* -------------------------------------------------------------------------- *\ - Open Alias Builder + OpenAlias Builder \* -------------------------------------------------------------------------- */ /** * Generate OpenAlias TXT record @@ -250,12 +250,12 @@ function openalias(prefix, address, opts) { opts = opts || {}; var record = "oa1:" + prefix + " recipient_address=" + address + ";"; - if (opts.name) { record += " recipient_name=" + opts.name + ";"; } - if (opts.description) { record += " tx_description=" + opts.description + ";"; } - if (opts.amount) { record += " tx_amount=" + opts.amount + ";"; } - if (opts.paymentId) { record += " tx_payment_id=" + opts.paymentId + ";"; } - if (opts.signature) { record += " address_signature=" + opts.signature + ";"; } - if (opts.checksum) { record += " checksum=" + crc32(record.trim()).toString(16).toUpperCase() + ";"; } + if (typeof opts.name === "string") record += " recipient_name=" + opts.name + ";"; + if (typeof opts.description === "string") record += " tx_description=" + opts.description + ";"; + if (typeof opts.amount === "string") record += " tx_amount=" + opts.amount + ";"; + if (typeof opts.paymentId === "string") record += " tx_payment_id=" + opts.paymentId + ";"; + if (typeof opts.signature === "string") record += " address_signature=" + opts.signature + ";"; + 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. return TXT("@", record, CF_COMMENT("OpenAlias > " + prefix.toUpperCase() + (opts.name ? " > " + opts.name : "")));