Skip to content

feat(express): add typed routes for TRX delegation APIs#8344

Open
bhavidhingra wants to merge 1 commit intomasterfrom
CHALO-346.trx-express-delegation-routes
Open

feat(express): add typed routes for TRX delegation APIs#8344
bhavidhingra wants to merge 1 commit intomasterfrom
CHALO-346.trx-express-delegation-routes

Conversation

@bhavidhingra
Copy link
Contributor

Summary

  • Add dedicated typed Express routes for TRX resource delegation APIs
  • GET /api/v2/{coin}/wallet/{id}/accountresources — query BANDWIDTH/ENERGY resources for wallet addresses
  • GET /api/v2/{coin}/wallet/{id}/activedelegations — query active outgoing/incoming resource delegations

Details

  • New io-ts typed route definitions with request/response validation
  • accountresources accepts addresses as query params (single or repeated ?addresses=addr1&addresses=addr2)
  • activedelegations supports optional filters: type (owner/receiver), resourceType (ENERGY/BANDWIDTH), limit
  • Delegate/undelegate resource transactions already work via existing sendMany route

Test plan

  • Build passes (npx lerna run build --scope @bitgo/express)
  • Test GET /accountresources via Express on staging
  • Test GET /activedelegations via Express on staging
  • Test delegate/undelegate via POST /sendmany on staging

TICKET: CHALO-346

@bhavidhingra bhavidhingra force-pushed the CHALO-346.trx-express-delegation-routes branch 2 times, most recently from 388cf0a to 1dce693 Compare March 25, 2026 15:47
Add dedicated Express routes for accountresources and
activedelegations endpoints with io-ts validation.

TICKET: CHALO-346
@bhavidhingra bhavidhingra force-pushed the CHALO-346.trx-express-delegation-routes branch from 1dce693 to 335e26d Compare March 25, 2026 16:08
@bhavidhingra bhavidhingra marked this pull request as ready for review March 25, 2026 16:23
@bhavidhingra bhavidhingra requested review from a team as code owners March 25, 2026 16:23
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.

1 participant