feat: Add rc endpoints for transaction suite #1798
Open
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.
Add RC (Relay Chain) Transaction Endpoints
This PR adds relay chain transaction endpoints to complement the existing parachain transaction endpoints, enabling transaction operations directly on the relay chain when connected to Asset Hub.
New Endpoints
Four new RC transaction endpoints under the
/rc/transaction
prefix:GET /rc/transaction/material
- Get transaction construction material from relay chainGET /rc/transaction/material/:metadataVersion
- Get versioned metadata from relay chainPOST /rc/transaction/fee-estimate
- Estimate transaction fees on relay chainPOST /rc/transaction
- Submit transactions to relay chainPOST /rc/transaction/dry-run
- Dry run transactions on relay chainArchitecture Changes
Refactored transaction services to accept API parameter: All transaction services (
TransactionMaterialService
,TransactionFeeEstimateService
,TransactionSubmitService
,TransactionDryRunService
) now accept anApiPromise
parameter instead of relying on
this.api
from the base class. This allows:ApiPromiseRegistry.getApiByType('relay')
All existing tests updated accordingly to pass the API parameter.