paritytech / substrate-api-sidecar

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.

Home Page:https://paritytech.github.io/substrate-api-sidecar/dist/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `GET /accounts/{accountID}/foreign-asset-balances` endpoint

IkerAlus opened this issue · comments

commented

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 input assets 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: #1287

commented

Instead of adding and endpoint per pallet instance, the right approach would be to support the APIs exposed as per paritytech/cumulus#2180 (comment) and/or the longer term more stable approach.