Skip to content
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

Lens API should index base64 encoded URLs for the contentURI #109

Open
PatrickAlphaC opened this issue Dec 2, 2022 · 0 comments
Open

Lens API should index base64 encoded URLs for the contentURI #109

PatrickAlphaC opened this issue Dec 2, 2022 · 0 comments

Comments

@PatrickAlphaC
Copy link

PatrickAlphaC commented Dec 2, 2022

If I want to have my NFT 100% on-chain, a way I can do that is by base64 encoding my JSON metadata. I have an example of doing this completely in solidity so that even the image (an SVG) is stored on chain.

We can do the same thing for the Lens Protocol contentURI, where we base64 encode all the json and the content. You can see an example of a base64 encoded article here, if you place it into your browser, it will render the JSON object.

data:application/json;base64,eyJ2ZXJzaW9uIjoiMi4wLjAiLCJtZXRhZGF0YV9pZCI6ImRkMTE2ZWIwLTc1ODgtNDU5ZS04OTA3LTViZWRkMGVhODhmNiIsImRlc2NyaXB0aW9uIjoiQ3JlYXRlZCBmcm9tIExlbnNCbG9nIiwiY29udGVudCI6Il9TcGVjaWFsIHRoYW5rcyB0byBbQWRyaWFuIEhldG1hbl0oaHR0cHM6Ly90d2l0dGVyLmNvbS9hZHJpYW5oZXRtYW4pLCBbQWxlamFuZHJvIE11bm96LU1jRG9uYWxkXShodHRwczovL3R3aXR0ZXIuY29tL3Vuc2FmZV9jYWxsKSwgW0l2YW4gQmVuYXZpZGVzXShodHRwczovL3R3aXR0ZXIuY29tL0l2YW5iZW5hdmlkZXNfKSwgYW5kIFtMZW9uIFNwYWNld2Fsa2VyXShodHRwczovL3R3aXR0ZXIuY29tL2xlb25zcGFjZXdhbGtlcikuX1xuXG5baHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1zZ0hIYld2V2o5QV0oaHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1zZ0hIYld2V2o5QSlcblxuXG4jIFRvcCA3I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HJpYnV0ZXMiOltdLCJsb2NhbGUiOiJlbi1VUyIsImFwcElkIjoibGVuc2Jsb2ciLCJpbWFnZU1pbWVUeXBlIjoiaW1hZ2UvcG5nIn0=

The browser itself decodes the URI into the JSON object.

Many NFTs use this strategy, and you can use this strategy for Lens Protocol as well, however, api.lens.dev doesn't index these transactions. I have created some test posts, one of which can be seen here where my contentURI is that of a base64 encoded URI. However, this will not show up in any api.lens.dev queries.

You can call getPub with profileId of 0x869c and pubId of 0x12 and see the base64 encoded URI on-chain no problem...

However, calling api.lens.dev with a graphql query returns null:

query Metadata($request: PublicationQueryRequest!) {
  publication(request: $request) {
    ... on Post {
      metadata {
        image
        mainContentFocus
      }
    }
  }
}

Variables:

{
  "request": {
    "publicationId": "0x869c-0x12"
  }
}

You'll see publicationId 0x869c-0x11 and 0x869c-0x13 work fine though.

The Feature Ask

Please index base64 encoded contentURI in api.lens.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant