gateway/public-gateway.mjs:
* GET /api/holdings/<scripthash> and POST /api/holdings {scripthashes:[…]}
— server-side wallet-holdings lookup for the portal. Bns-indexer is
beacon-only so it can't answer listunspent for arbitrary addresses; the
gateway does the electrum roundtrip and cross-joins with the cached BCNR
index. Client posts scripthashes (no libauth needed on the server) and
gets back the names owned.
* elConnect now falls through to whole-buffer JSON.parse when a Fulcrum
response lacks a trailing newline — chipnet.bch.ninja does this and
otherwise every elCall to it times out. Same tolerance pattern as
bns-indexer.test.mjs's tiny electrum client.
* verifyElectrum picks a full electrum with a 3s server.version probe so a
hung server fails over to the next in seconds instead of stalling 20.
* Skips silentmode.st/electrum and coinspectrum.duckdns.org:50011 for
/api/holdings — both are bns-indexer routes that don't do listunspent.
web/register-entry.js: export addressToScripthash so the portal can derive
the scripthash for each of its wallet's watched addresses before POSTing.
Browser bundle rebuilt.
site-sirius-x pages:
* favicon + logo hrefs made relative (./assets/… on index/portal,
../assets/… on docs/theseus). Absolute /sirius-x/… broke on the sirius.x
BCNR route where the site is served from root instead of under /sirius-x/.
* Roadmap nav link added back to portal, docs, theseus — the landing has an
anchor to a section on itself, so subpages now link to it explicitly.
* portal.html: loadNames rewritten to POST scripthashes to /api/holdings
instead of doing client-side electrum. Works on browsers whose networks
block chipnet electrum ports; same-origin HTTPS on 443.
* portal.html: bundle import ?v= bumped so Chrome's in-memory ES module
map picks up the new bundle instead of a stale cached copy.
47 lines
1.9 KiB
JavaScript
47 lines
1.9 KiB
JavaScript
// Browser entry point for the registration flow. Everything the register page
|
|
// needs, and nothing that touches the filesystem or a private key we hold.
|
|
//
|
|
// Bundled by build-web.mjs to site/js/bns-register.js as a plain ES module:
|
|
// <script type="module"> import * as BNS from './js/bns-register.js' </script>
|
|
|
|
export { BuiltInWallet, CHIPNET_PREFIX } from "../lib/wallet-web.js";
|
|
export {
|
|
connect,
|
|
checkAvailability,
|
|
quoteRegistration,
|
|
registerWithBuiltInWallet,
|
|
registerWithExternalWallet,
|
|
setRecordsWithBuiltInWallet,
|
|
setRecordsWithExternalWallet,
|
|
findCertificateUtxo,
|
|
getBalance,
|
|
} from "../lib/registrar.js";
|
|
export { REGISTRAR, priceSummary } from "../registrar-config.js";
|
|
export {
|
|
buildRegistrationTx,
|
|
buildUpdateTx,
|
|
buildPrepTx,
|
|
hasGenesisInput,
|
|
toWcTransactionObject,
|
|
normalizeName,
|
|
displayName,
|
|
payloadBudget,
|
|
NoGenesisInputError,
|
|
InsufficientFundsError,
|
|
} from "../lib/register-tx.js";
|
|
export { signTransaction, txidOf, txidOfHex } from "../lib/sign-tx.js";
|
|
export { toTokenAddress, addressToLockingBytecode, addressToScripthash, getUtxos, getUtxosForAddresses, broadcast } from "../lib/chain.js";
|
|
export { resolveName, buildIndex } from "../lib/resolver-web.js";
|
|
export {
|
|
describeGenesisRequirement,
|
|
pubkeyToAddress,
|
|
pubkeyToLockingBytecode,
|
|
} from "../lib/connect/wallet-session.js";
|
|
export { binToHex, hexToBin } from "@bitauth/libauth";
|
|
export { stringify } from "@bitauth/libauth";
|
|
|
|
// NOT re-exported here on purpose: the WizardConnect and WalletConnect adapters.
|
|
// They are separate bundles (site/js/wizardconnect.js, site/js/walletconnect2.js)
|
|
// that the page dynamic-imports only when the buyer picks that option.
|
|
// - WizardConnect: LGPL-3.0-or-later, must stay separate + unminified (§4d1).
|
|
// - WalletConnect: ~590 kB nobody using the built-in wallet should download.
|