feat(sdk-core): bulk TRX resource delegation SDK + Express layer#8572
Draft
bhavidhingra wants to merge 1 commit intomasterfrom
Draft
feat(sdk-core): bulk TRX resource delegation SDK + Express layer#8572bhavidhingra wants to merge 1 commit intomasterfrom
bhavidhingra wants to merge 1 commit intomasterfrom
Conversation
496a288 to
5bc64a4
Compare
Contributor
Author
|
@claude review |
5bc64a4 to
42b5824
Compare
15b4e19 to
5019af4
Compare
Contributor
|
Flush, please request re-review when ready for review. |
6a7cd84 to
982359a
Compare
Adds buildAccountDelegations, sendAccountDelegation, sendAccountDelegations to the Wallet class and IWallet interface, mirroring the consolidation API. Adds Express typed route schema and handler for POST /api/v2/:coin/wallet/:id/delegateResources with TSS/custodial/hot wallet branching and partial-success (202) response handling. CHALO-287 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
982359a to
b22a03a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resource Delegation
buildResourceDelegations,sendResourceDelegation,sendResourceDelegationstoWalletandIWalletbuildResourceDelegations: POSTs to/:coin/wallet/:id/delegateResources/build, post-processes prebuildssendResourceDelegation: dispatches per wallet type — TSS →sendManyTxRequests, custodial →initiateTransaction, hot →prebuildAndSignTransaction+submitTransactionsendResourceDelegations: validates passphrase, builds all, sends sequentially, collects{ success, failure }PostDelegateResources) andhandleV2DelegateResourceshandler with partial-success 202/400 response logicResource Undelegation
buildResourceUndelegations,sendResourceUndelegation,sendResourceUndelegationstoWalletandIWallet— mirrors delegation API exactlybuildResourceUndelegations: POSTs to/:coin/wallet/:id/undelegateResources/buildPostUndelegateResources) andhandleV2UndelegateResourceshandlerbuildResourceManagements,sendResourceManagement,sendResourceManagements) to eliminate code duplicationstakingParams relay
stakingParams?: unknowntoPrebuildTransactionResultso staking metadata flows from the build response through tosubmitTransaction, enabling the indexer to identify resource management transfers correctlyTest plan
buildResourceDelegations/buildResourceUndelegationscall the right endpoints and post-process prebuildssendResourceDelegation/sendResourceUndelegationroute correctly per wallet type/api/v2/ttrx/wallet/:id/delegateResourcesreturns 200/202/400 as appropriate/api/v2/ttrx/wallet/:id/undelegateResourcesreturns 200/202/400 as appropriateLinear: CHALO-287