Skip to content

Public ledger explorer v2: bond search, drill-down & pagination — full-stack EPIC #79

Description

@grantfox-oss

DESCRIPTION

ExplorerController.snapshot() (apps/api/src/explorer/explorer.controller.ts) is the only public explorer endpoint: it returns the latest 20 bonds and latest 10 Soroban/Trustless Work contracts, hardcoded, with no way to search for a specific bond or see its full on-chain history. Since this is VELAR's public transparency surface — "anyone can query it to verify on-chain state" — this is a meaningful gap. This epic builds a real explorer with search and drill-down.

GOAL

Anyone (no auth, matching the current @Public() explorer) can search for a bond by id/party/wallet and see its full transfer + on-chain contract history, and browse the full bond/transfer history with pagination instead of only the latest 20/10.

REQUIREMENTS

Backend

  • GET /explorer/bonds/:bondId — full detail for one bond: party, current owner, face value/status, full transfer history, Soroban contract link, Trustless Work escrow contract link(s).
  • GET /explorer/search?q= — search by bond_id, party name, or Stellar wallet address, returning matching bonds.
  • Paginate the existing snapshot() lists (recent_bonds, soroban_nfts, trustless_work_contracts) using the shared parsePagination/paginatedResponse helpers (apps/api/src/common/pagination.ts) instead of the hardcoded limit(20)/limit(10).

Frontend

  • Update apps/web/app/explorer/ with a real search bar and a per-bond detail view backed by the new endpoints, instead of only showing the latest snapshot.

ACCEPTANCE CRITERIA

  • GET /explorer/bonds/:bondId returns full bond history for a real bond id, 404 for an unknown one.
  • GET /explorer/search?q= matches on bond id, party name, and wallet address.
  • GET /explorer/snapshot?page=2&limit=20 returns the correct next slice with an accurate total.
  • All explorer endpoints remain public (@Public(), no auth required) since this is VELAR's public transparency surface.
  • The frontend explorer page lets a visitor search and drill into a bond's full history.
  • npm run build, npm run lint, npm run test pass in both apps/api and apps/web with NO VELAR credentials.

NOTES

Relevant files: apps/api/src/explorer/explorer.controller.ts, apps/api/src/escrow/stellar.config.ts (URL builders, reuse explorerAccountUrl/explorerAssetUrl/explorerContractUrl), apps/api/src/common/pagination.ts (reuse), apps/web/app/explorer/. This endpoint stays public/unauthenticated by design — do not add an AuthGuard here.

No VELAR credentials required: the explorer is public by design; verifiable locally against local/seed data, no real credentials.

Difficulty: Advanced (full-stack)
Priority: High

PR REQUIREMENTS

  • Ship this as a single pull request — do not split into stacked/sequential PRs.
  • Your PR description must include Closes #<this-issue-number> (this issue's GitHub number) so merging auto-closes it.

CAMPAIGN REQUIREMENTS (FWC26)

To be eligible for the reward on this issue, the contributor must:

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions