Skip to content

[STELLAR] Add Stellar Testnet configuration helper and client utilities #26

@Obiajulu-gif

Description

@Obiajulu-gif

Overview

Create a reusable Stellar configuration layer for ChainMove so future Stellar features can use one safe, typed source of truth.

Problem

ChainMove is moving toward Stellar, but the project needs a clean configuration helper before adding account linking, asset issuance, Horizon reads, Stellar RPC calls, or Soroban contract interactions.

Expected solution

Create a Stellar config module, for example:

lib/stellar/config.ts
lib/stellar/client.ts

The module should read and validate:

STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
STELLAR_RPC_URL=https://soroban-testnet.stellar.org
STELLAR_ASSET_CODE=CMOVE
STELLAR_ISSUER_PUBLIC_KEY=replace_with_public_key
STELLAR_DISTRIBUTION_PUBLIC_KEY=replace_with_public_key
STELLAR_CONTRACT_ID=replace_after_deployment
ENABLE_MOCK_STELLAR=true

Requirements

  • Support testnet and future mainnet values.
  • Avoid exposing server-only values to the frontend.
  • Do not store or require Stellar private keys.
  • Export safe helpers for Horizon and Stellar RPC URLs.
  • Add clear errors for missing required values when mock mode is disabled.

Files likely involved

  • lib/stellar/config.ts
  • lib/stellar/client.ts
  • .env.example
  • README or Stellar docs

Acceptance criteria

  • Stellar config helper exists and is typed.
  • Missing config is handled clearly.
  • Mock mode can bypass required Stellar network config for local development.
  • No Stellar secret key is introduced.
  • Lint and build pass.

Suggested labels

stellar, backend, configuration, developer-experience

Difficulty

Beginner / Intermediate

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official Campaign

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions