Skip to content

Add compound XDR builder endpoint#168

Open
YfengJ wants to merge 5 commits into
BETAIL-BOYS:mainfrom
YfengJ:codex/compound-xdr-builder-155
Open

Add compound XDR builder endpoint#168
YfengJ wants to merge 5 commits into
BETAIL-BOYS:mainfrom
YfengJ:codex/compound-xdr-builder-155

Conversation

@YfengJ

@YfengJ YfengJ commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • Add a TransactionsModule with POST /api/v1/transactions/build for building unsigned Stellar transaction envelopes.
  • Validate request shape, source/destination public keys, asset metadata, amounts, optional fee, operation count, and timeout.
  • Load the source account sequence through Horizon and use TransactionBuilder to assemble sequential payment and pathPaymentStrictSend operations into one base64 XDR response.

Closes #155

Validation

  • npm ci --legacy-peer-deps --ignore-scripts --no-audit --no-fund
  • npx jest src/transactions/transactions.service.spec.ts src/transactions/transactions.controller.spec.ts --runInBand ✅ 2 suites / 3 tests passed
  • npm test -- --runInBand ❌ existing unrelated failure in src/pools/pools.controller.int.spec.ts where res.body.status is undefined instead of success
  • npm run build ❌ existing unrelated compile failures around logger LogLevel, missing dynamic module imports, Prisma generated members, express-rate-limit, and websocket/prisma model types; no errors were reported from the new transactions files
  • git diff --check

@AlAfiz

AlAfiz commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@YfengJ please work on the CI build it failed

@YfengJ

YfengJ commented Jun 24, 2026

Copy link
Copy Markdown
Author

Thanks for the heads-up. I pushed a CI fix in 16ca24e.

What changed:

  • aligned the Nest websocket packages so npm ci no longer hits the reflect-metadata peer dependency conflict
  • fixed the TypeScript build errors from logger/websocket/invoice imports
  • wrapped the APY history response in the success envelope expected by the integration test

Verified locally with:

  • npm ci --no-audit --no-fund
  • npm run build
  • npm test
  • git diff --check

@YfengJ

YfengJ commented Jun 24, 2026

Copy link
Copy Markdown
Author

Follow-up: upstream main moved after my CI fix, so I merged the latest main into this branch and resolved the app module conflict without dropping the transaction, orders, or gas modules.

Latest head is 2511472. I re-ran the CI-equivalent local checks successfully:

  • npm ci --no-audit --no-fund
  • npm run build
  • npm test
  • git diff --check

@YfengJ

YfengJ commented Jun 24, 2026

Copy link
Copy Markdown
Author

One more note: the latest API CI run for head 2511472 appears to be in action_required rather than failed: https://github.com/BETAIL-BOYS/TradeFlow-API/actions/runs/28102816366

It looks like it may need maintainer approval to run for the forked PR. I do not see a new code failure from this latest run yet.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Compound XDR Builder for Multi-Hop Swaps

2 participants