Skip to content

[Enhancement] SEP-1 stellar.toml hosting: publish org, account, and asset metadata at /.well-known/stellar.toml #58

Description

@zeemscript

Summary

Host a SEP-1 stellar.toml at /.well-known/stellar.toml so the DeenBridge platform is discoverable and verifiable across the Stellar ecosystem — wallets, explorers, and directories can resolve the platform's organization metadata, declared accounts (the platform/payout wallet), and the assets it deals in. Today DeenBridge builds and submits real Stellar payments but publishes no ecosystem metadata at all, so there is no canonical, machine-readable statement of "who this service is" or "which USDC issuer it trusts."

Current state

What to build

  1. Static-but-templated TOML endpoint (src/routes/wellKnownRoutes.js, mounted before the /api rate limiter in app.js at app.get("/.well-known/stellar.toml", ...)): serve Content-Type: text/toml; charset=utf-8 with permissive CORS (Access-Control-Allow-Origin: *) as SEP-1 requires for cross-origin fetching.
  2. Config-driven document builder (src/services/stellar/stellarTomlService.js): assemble the TOML from a typed config object so values stay in sync with stellarService.js. Include at minimum:
  3. Env plumbing: add STELLAR_PLATFORM_PUBLIC_KEY, ORG_URL, ORG_LOGO, and SIGNING_KEY (or reuse existing) to src/config/validateEnv.js's optional list, and document them in .env.example/QUICK_START.md. The endpoint must still render (omitting unknown blocks) when optional values are missing, so CI's boot check stays green.
  4. Validity: output must be parseable TOML and pass a SEP-1 linter (e.g. round-trip through a TOML parser in the test). Field names must match the SEP-1 spec exactly (case-sensitive).

Acceptance criteria

  • GET /.well-known/stellar.toml returns 200 with Content-Type: text/toml and Access-Control-Allow-Origin: *, and is reachable without authentication or tripping the /api rate limiter.
  • The served document parses as valid TOML and contains NETWORK_PASSPHRASE matching the active network, an ACCOUNTS entry for the platform wallet, [DOCUMENTATION] org metadata, and at least one [[CURRENCIES]] block whose issuer equals USDC_ISSUER for the active NETWORK.
  • Switching STELLAR_NETWORK between testnet and mainnet changes the passphrase and USDC issuer in the output (no hardcoded duplication — values come from the same source as stellarService.js).
  • Missing optional env vars degrade gracefully (block omitted, no 500); server still boots and /health passes.
  • Jest + supertest test fetches the endpoint, asserts the content type/CORS header, parses the body as TOML, and checks the issuer/passphrase for a stubbed network.

Pointers

Difficulty

Medium — no signing or network calls, but it requires correct SEP-1 field semantics, network-aware templating that shares a single source of truth with the Stellar service, and forward-compatible structure so the SEP-10/SEP-24 issues can slot their keys in without a rewrite.


🏆 GrantFox OSS — Official Campaign | FWC26. Apply for this issue through the GrantFox campaign page. The maintainer assigns one contributor before work starts; unassigned PRs may not be reviewed. PRs target the dev branch. Quality bar: CI must stay green.

💬 Questions or need help? Reach the maintainers and other contributors on the DeenBridge Telegram: https://t.me/+nst9lXNj1wc4ZDE0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions