-
Notifications
You must be signed in to change notification settings - Fork 21
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
Extend AssetDetails data type #40
Extend AssetDetails data type #40
Conversation
LGTM! |
Thank you @sorki! I will add more changes since we need extra fields from CIP25. It's not obvious how to implement it to preserve backward compatibility, so for now, I added a |
Your solution is actually neat as writing a custom instance would add a lot of boilerplate and the additional parsing step is not visible to user / API anyway. |
Ready? 😸 |
@sorki probably it is. We decided to change the way we encode metadata -- basically move most parts into the first cip68 argument. Now we see the following in the responses:
So not all parts of metadata are decoded - some are still CBOR-encoded. While it might be not ideal for those who cannot/don't want to work with CBOR it's not a problem for us, but I cannot get the pattern here. I would say only short strings are decoded - but not, the last field |
Cool, this seems to be flexible enough to include additional fields.
+1, I think that decoding the rest is out of scope and IIRC it can only be done for some fields that decode to ascii/text but the fields can contain arbitrary data so we would need to try/guess which might lead to wrong results. It is done in similar fashion in our API, decode the known ones and keep the rest as CBORs so you are right about the handling. |
I'll merge this, add a changelog and release it in the next round soonish. |
Thank you! |
Released in |
No description provided.