With the long awaited release of 1.0.0, many things changed for the better. Sadly, querying assets has gotten severely worse.
Specifically, querying asset metadata has become significantly more expensive due to multiple API calls being required to fetch the most recent metadata.
Version 0.2.1 offered fields analogous to the fields provided by GET /assets/{assetid}, which includes the metadata and onchain_metadata fields.
This has been replaced an instance of AssetsInner, which only contains asset and quantity.
Instead of querying the asset by its id, I need to use the following steps to get the metadata:
Get the asset's history
Paginate until the most recent mint as this may not always be included in the first page
Query the metadata from the tx
Parse the metadata, ensuring to stay up to date with current and past standards
Either I'm overlooking something obvious or this really is now the only way to get asset's metadata properly.
Anyway, I fail to see why the fields currently provided by the endpoint are not included in the AssetsInner model, as this seems to be fairly free to implement.
Again, if I'm overlooking something, I'd be glad to know.
Cheers!
With the long awaited release of 1.0.0, many things changed for the better. Sadly, querying assets has gotten severely worse.
Specifically, querying asset metadata has become significantly more expensive due to multiple API calls being required to fetch the most recent metadata.
Version 0.2.1 offered fields analogous to the fields provided by
GET /assets/{assetid}
, which includes themetadata
andonchain_metadata
fields. This has been replaced an instance ofAssetsInner
, which only containsasset
andquantity
.Instead of querying the asset by its id, I need to use the following steps to get the metadata:
Either I'm overlooking something obvious or this really is now the only way to get asset's metadata properly. Anyway, I fail to see why the fields currently provided by the endpoint are not included in the
AssetsInner
model, as this seems to be fairly free to implement.Again, if I'm overlooking something, I'd be glad to know. Cheers!