Create cloud function for rendering canvas as an image, use as token v2 URI
banool opened this issue · 1 comments
One notable aspect of aptos-canvas is each canvas is actually a v2 token. This means each canvas can benefit from the full token ecosystem, meaning it can be traded, sold, etc. One interesting aspect of this is, given each canvas is itself essentially an image, each token can be easily self described without linking out to external image data. A custom marketplace display module could use the canvas data itself rather than the metadata URI to show the token. For marketplaces that don't support this, the URI could be for a server / cloud function that looks up the canvas data on chain and returns it as an image.
So the URI would be like canvas-renderer.dport.me/0x123.png
and the server looks up the Canvas at 0x123 and returns it as a png.
We now have an indexer based solution for this instead, though I did add support for the cloudflare worker at some point back when I represented the canvas using a 1d vector.