Skip to content

Support BTC testnet4 in lightweight provider#363

Merged
anderdc merged 1 commit into
testfrom
chore/btc-testnet4
May 21, 2026
Merged

Support BTC testnet4 in lightweight provider#363
anderdc merged 1 commit into
testfrom
chore/btc-testnet4

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

The testnet system now runs on Bitcoin testnet4 for BTC swaps. The lightweight provider only knew testnet (testnet3) and pointed Esplora at Blockstream — which serves no testnet4 API.

Changes

  • btc_api_bases: BTC_NETWORK=testnet4 selects https://mempool.space/testnet4/api (the only public testnet4 Esplora; Blockstream returns an SPA shell, not API data).
  • embit signing recognizes testnet4 as a test network (NETWORKS['test'] — testnet3/testnet4 share address + WIF params).
  • Node-mode auto-detect maps the testnet4 RPC port :48332 to testnet4.
  • .env.example documents testnet4 as a valid BTC_NETWORK value.

Legacy BTC_NETWORK=testnet is untouched — still resolves to the testnet3 Blockstream/mempool bases, so existing .env files keep working.

Verification

  • https://mempool.space/testnet4/api/blocks/tip/height → live (tip 135865).
  • https://blockstream.info/testnet4/api/... → SPA HTML, no API (confirmed dropped from defaults).
  • ruff check / ruff format clean.

Docs PRs follow in allways-ui (agents page) and allways-docs-ui.

@anderdc anderdc merged commit dfd1ae5 into test May 21, 2026
3 checks passed
@anderdc anderdc deleted the chore/btc-testnet4 branch May 21, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants