Closed leo42 closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
openapi | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 13, 2023 10:31pm |
@leo42 I think that the whole point of CIP25v2 is that policy and asset name should be stored as bytes, not utf8 encoded strings. This change should not affect the length. We are prepending 0x just to find the correct data in dbsync since this is how it represents bytes.
In other words, even if you would prepend 0x it won’t work. The point is you need policy and asset name in CBOR as bytes not text/string.
If you don’t want to follow this just stick with CIP25v1.
Just a side note, the fallback you you found is implemented due to old bug we had in the code and prevented breaking change. I don’t think it’s a good idea to change or expand it.
I left the old fallback and just added a second one before it, so it should not break anything :)
I cannot use V1 since the name of my tokens is nonsensical and cannot be properly interpreted by most indexers. Example 1a9fed5591aed8fcc3217af6f96769b092bdccbe11700e023e4599bea0cfa0a7 -> " ŸíU‘®ØüÃ!zöùgi°’½Ì¾ p >E™¾ Ï §"
Javascript limitations make what you are asking pretty hard(not impossible,maybe it's easier if you have a reference implementation?), I am just trying to encode the raw name of the token in the metadata(as I understand the intention was for the V2 standard)
Like I mentioned koios and cexplorer already recognize this "interpretation" of CIP25v2 and are able to process and serve the metadata so It would not be going against the ecosystem standards.
On Thu, Sep 14, 2023 at 2:20 PM Maroš @.***> wrote:
@leo42 https://github.com/leo42 I think that the whole point of CIP25v2 is that policy and asset name should be stored as bytes, not utf8 encoded strings. This change should not affect the length.
If you don’t wan to follow this just stick with CIP25v1.
Just a side note, the fallback you you found is implemented due to old bug we had in the code and prevented breaking change. I don’t think it’s a good idea to change it.
— Reply to this email directly, view it on GitHub https://github.com/blockfrost/openapi/pull/321#issuecomment-1719342960, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBLGXLKTJQW4OQ6G6J3XWTX2LZAPANCNFSM6AAAAAA4XFIANI . You are receiving this because you were mentioned.Message ID: @.***>
I just managed to mint using Byte encoded names.
This works and the metadata finally appears in Blockfost/Nami but it is not accepted by Koios where not I get broken links from them....
cexplorer also breaks when using this standart
Could you post a link your asset with new metadata? If they are correct you should probably open issue with these other services since you are now following the standard and they don’t.
Koios Query returns no metadata.
and cexplorer undestands only the medatadata of the hex strings (last 2 are the ones using bytes) https://preprod.cexplorer.io/policy/64b87bcae32aed7e122db37e202b014d55bbe739e0cdef4b317695b4
I have added fallback for finding metadata of V2 without prepending the "0x", for my project it is impossible to add it as a string as I utilize the Tx-ID as the token name and so I am at the limit for the size.
I have also seen other projects follow this standard (as hex encoded strings) and it works with several explorers and koios.
Please consider merging this change.