fix: return FT metadata in a backwards compatible way #130
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the FT response be backwards-compatible to the current Stacks API FT response, so we can set up a simple redirect/rewrite from there to this new API immediately.
Example old Stacks API FT response:
{ "token_uri": "https://heystack.xyz/token-metadata.json", "name": "Heystack", "description": "Heystack is a SIP-010-compliant fungible token on the Stacks Blockchain, used on the Heystack app", "image_uri": "https://heystack.xyz/assets/Stacks128w.png", "image_canonical_uri": "https://heystack.xyz/assets/Stacks128w.png", "tx_id": "0xef2ac1126e16f46843228b1dk4830e19eb7599129e4jf392cab9e65ae83a45c0", "sender_address": "ST399W7Z9WS0GMSNQGJGME5JAENKN56D65VGMGKGA", "symbol": "HEY", "decimals": 5 }New FT response: https://token-metadata-csgxi67fv-blockstack.vercel.app/#tag/Tokens/operation/getFtMetadata