Open IkerAlus opened 4 months ago
Instead of adding and endpoint per pallet instance, the right approach would be to support the APIs exposed as per https://github.com/paritytech/cumulus/pull/2180#issuecomment-1441818513 and/or the longer term more stable approach.
The possibility of querying the balances of the foreign assets of a given account in Asset Hub should be enabled. Unlike for the existing
GET /accounts/{accountID}/asset-balances
case, in this case the optional inputassets
is an array of XCM locations. We assume the user knows how to provide this asset ID properly (in the same format it is provided in PJS API, Polkadot-API or Asset Transfer API), and no special validation for this input should be implemented. If there is no storage entry for the asset ID provided, we should just return error stating that the asset is not found.Note: This is the feature completing the previous issue: https://github.com/paritytech/substrate-api-sidecar/issues/1287