Skip to content

Add a Postman / Bruno collection for the Horizon API calls StellarFlow uses #33

Description

@MJ-RWA

Complexity: Medium — 150 pts

Summary

StellarFlow makes several Horizon API calls under the hood — fetching balances, finding swap paths, submitting transactions, streaming payments. New contributors often need to understand and test these calls manually before touching the React code. This issue creates a fully documented Bruno API collection (.bru files) covering every Horizon endpoint StellarFlow uses, so contributors can explore the API and test responses without running the app.

Bruno is an open-source API client (like Postman but Git-friendly — collections are plain text files that can be committed to the repo).

Files to Create/Modify

  • Create: bruno/bruno.json — collection metadata
  • Create: bruno/environments/testnet.bru and bruno/environments/mainnet.bru
  • Create: 9 numbered request files in bruno/requests/:
    • 01_load_account.bru — GET /accounts/{id}
    • 02_fetch_balances.bru — GET /accounts/{id} (balances focus)
    • 03_fetch_payments.bru — GET /accounts/{id}/payments
    • 04_strict_send_paths.bru — GET /paths/strict-send
    • 05_strict_receive_paths.bru — GET /paths/strict-receive
    • 06_submit_transaction.bru — POST /transactions
    • 07_stream_payments.bru — GET /accounts/{id}/payments?cursor=now (SSE)
    • 08_fetch_orderbook.bru — GET /order_book
    • 09_fetch_transaction.bru — GET /transactions/{hash}
  • Create: bruno/README.md

Implementation Notes

Environments

testnet.bru and mainnet.bru each define HORIZON_URL, TEST_ADDRESS, and USDC_ISSUER vars matching their network.

Each request file

Use the meta { name, type, seq }, get { url, body, auth }, optional params:query { ... }, and a docs { ... } block. The docs block must explain: what the endpoint does, which exact file/function in StellarFlow calls it (e.g. src/lib/stellar.ts → getSwapQuote()), the key response fields to look at, and a suggestion for what to try varying.

bruno/README.md

Setup instructions (install Bruno, open the bruno/ folder, pick an environment) plus a table mapping all 9 requests to their endpoint and StellarFlow usage.

Acceptance Criteria

  • bruno/ folder exists at the repo root and opens correctly in Bruno
  • Both testnet and mainnet environment files present with correct base URLs
  • All 9 requests are present, numbered, and run without errors on testnet
  • Every request has a docs block explaining what it does, which StellarFlow file uses it, and what the key response fields are
  • bruno/README.md has a complete table mapping each request to its StellarFlow usage
  • Environment variable {{TEST_ADDRESS}} is used consistently (no hardcoded addresses in request files)
  • Collection committed to the repo root (not ignored by .gitignore)

Screen Recording Requirements

  1. Open Bruno → open the bruno/ folder as a collection
  2. Select the testnet environment
  3. Run request feat: switch to Stellar mainnet #1 (Load Account) → account JSON response shown
  4. Run request Add character counter to memo input fields #4 (Strict Send Paths) with source_amount=10 → path records returned
  5. Change source_amount to 1000 → show how the rate changes (price impact demo)
  6. Navigate through at least 5 requests showing docs and responses

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions