Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag to disable token_registry_metadata.logo field in asset_info #202

Closed
rdlrt opened this issue Jun 5, 2023 · 2 comments
Closed

Flag to disable token_registry_metadata.logo field in asset_info #202

rdlrt opened this issue Jun 5, 2023 · 2 comments

Comments

@rdlrt
Copy link
Contributor

rdlrt commented Jun 5, 2023

Also we would like to ask you to make some flag to disable token_registry_metadata.logo field in asset_info GET&POST endpoints (https://api.koios.rest/#post-/asset_info), as it can be disabled only through full filtering of token_registry_metadata jsonb object.

In our lightwallet, updating asset data does not always require a logo, but it does require decimals for example. So requests are sometimes 1-2-5 megabytes.

Quick access link (we just made a separate RPC *crazy*):

https://github.com/ray-network/raygraph-output/blob/d21d2a6a9a269485251f990e74254c95ebc812c4/koios-lite/rpc-extra/assets_info_bulk_no_logo.sql#L55

Originally posted by @ray-robot in #186 (comment)

@rdlrt
Copy link
Contributor Author

rdlrt commented Jun 5, 2023

@ray-robot - hope you dont mind converting that comment to seperate issue here.

Unlike the utxo endpoints in previous issue where we were adding _extended to avoid joins (performance impact), the requirement here is more around verticle filtering for contents within endpoint with details from same table.

Hence, I'd want to be sure to understand that (since consumption is programatic and not manual), wouldnt something like below fit the purpose?

curl -X POST "https://api.koios.rest/api/v0/asset_info?select=policy_id,asset_name_ascii,total_supply,mint_cnt,token_registry_metadata->decimals,token_registry_metadata->ticker"  -H "accept: application/json" -H "content-type: application/json"  -d '{"_asset_list":[["750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","424f4f4b"]]}'

# [{"policy_id":"750900e4999ebe0d58f19b634768ba25e525aaf12403bfe8fe130501","asset_name_ascii":"BOOK","total_supply":"10000000000","mint_cnt":1,"decimals":0,"ticker":"BOOK"}]

In general, this (exclusion) would then kinda extend to other fields across different endpoints wherein you might want to exclude transaction metadata details or datum byte which will be similarly large footprints unless filtered. Let us know your views around the same.

@xray-robot
Copy link
Contributor

xray-robot commented Jun 5, 2023

Ouch, I seem to have missed that such a selection was possible. Yes, it's a perfect fit of course. This Issue can be closed.

@rdlrt rdlrt closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants