Guys anyone has ever worked on a decentralized api?
I basically would like to expose an api endpoint on ipfs, anyone has ever done something similar or has ideas of ways to achieve that?
Jul 29, 2022, 11:03 PM
Node and php are not possible options as ipfs doesn't support them
(would this be theoretically possible?)
If I can use ipfs for that at least there is the guarantee that I can't change the code of the API to get metadata (ik about pinning, that's ok)
Currently on erc721 for tokenURI standard is to either return the Base64 of the json or an api endpoint from where to get it
Usually the param of the query is just the tokenID, in my case a bunch of parameters to fill a template svg
first time I hear this ahahah
I'd be envious of people who don't have to deal with it tbh
the erc721 eip doesn't mention wether the link in the metadata should return a Content-Type: application/json
I wonder if I can pull it off someway with html/js and jquery...
I wonder if I can pull it off someway with html/js and jquery...
like constructing all then deleting all in the DOM leaving only the json text which will be treated as text
Yeah, I need to return a json to give it to opensea
Hoping they'd accept a text that they'd have to treat as a json, but afaik I have no ways to set the content type of a response in a html file
It'll always be text
Actually better if I test this before with a toy example...
Just tried it, apparently they don't have something like "accept the request of the server only if it explicitly answers with a json"
In theory it might work, in practice it's much more complicated as I'd need to destroy all DOM leaving only the json as text...
Jul 30, 2022, 12:12 AM