Skip to content

[Feature] #69 — Multi-network support (Mainnet / Testnet / Futurenet) - #71

Merged
SharifIbrahimDev merged 2 commits into
sharif-stellar-tools:masterfrom
bukkybyte:feature/multi-network-support
Jun 24, 2026
Merged

SharifIbrahimDev merged 2 commits into
sharif-stellar-tools:masterfrom
bukkybyte:feature/multi-network-support

Conversation

@bukkybyte

@bukkybyte bukkybyte commented Jun 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements issue #69 — allows ChainScope to connect to any Stellar
network seamlessly, both via CLI flag and live TUI hotkey switching.

Changes

New

  • src/config/networks.ts — central network registry with Horizon URLs,
    Soroban RPC endpoints, and passphrases for all three networks
  • src/hooks/useNetwork.ts — React hook exposing setNetwork() and
    cycleNetwork() for Dashboard integration
  • tests/config/networks.test.ts — 12 tests covering URL uniqueness,
    passphrase uniqueness, and resolveNetwork() case-insensitivity
  • tests/hooks/useNetwork.test.ts — 11 tests covering cycle logic,
    selection, and UI label formatting

Modified

  • src/index.js — --network <mainnet|testnet|futurenet> flag +
    --watch mode with [n] hotkey to cycle networks live
  • tests/mocks/horizonMock.ts — mock helpers now accept a network
    param to target any of the three Horizon base URLs
  • tests/integration/horizonMock.test.ts — added testnet/futurenet
    mock tests + network isolation assertion
  • package.json — widened engine constraint from >=20 <21 to >=20

Acceptance Criteria

  • ✅ Data correctly sourced from selected network
  • ✅ UI displays current network prominently (coloured banner on every fetch)
  • ✅ --network CLI flag works for all three networks
  • ✅ [n] hotkey cycles networks dynamically in --watch mode

Tests

42 passing, 0 failing

Closes #69

@SharifIbrahimDev
SharifIbrahimDev merged commit d86633b into sharif-stellar-tools:master Jun 24, 2026
1 check failed
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.

[Feature] Add support for multi-network configurations (Mainnet/Testnet/Futurenet)

2 participants