Skip to content

feat: Save and import custom network profiles with passphrase verification #153

Description

@dotunv

Overview

Add the ability to save and import custom Horizon server configurations (name, base URL, network passphrase, friendbot URL) so users can target alternate networks (public, testnet, futurenet, or a custom/private chain) without re-entering settings each session.

Motivation

Users switch between public, testnet, futurenet, and private/custom Stellar networks. Today there's no way to save a named network profile, so users must reconfigure the network each time, and there's no validation that a chosen Horizon URL matches the expected network passphrase, which can silently cause confusing failures.

Proposed Design

  1. Add a network_profiles table: id, owner_id, name, horizon_url, network_passphrase, friendbot_url (optional), is_default
  2. Add CRUD endpoints and a UI (Network Status / Settings) to manage named profiles
  3. When setting a Horizon URL, verify it by fetching the network passphrase and comparing to the selected/expected one; warn on mismatch
  4. Allow marking one profile as default used on startup
  5. Add import/export of a profile as JSON for sharing within a team
  6. Store profiles per user (private by default, no cross-user sharing without an explicit share flag)

Acceptance Criteria

  • Users can create, list, update, delete named network profiles
  • Profile includes horizon_url, network_passphrase, optional friendbot_url, and default flag
  • Selecting a profile configures the active network across tools
  • A passphrase mismatch between the fetched Horizon and the selected profile produces a clear warning
  • Users can mark one profile as default
  • Profiles can be exported/imported as JSON
  • Profiles are private to the user unless explicitly shared
  • Tests cover: CRUD, passphrase mismatch detection, default handling, import/export, authorization

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / API workenhancementNew feature or requestfrontendFrontend / UI work

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions