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

SDK proxy is returning internal error #86

Open
livid opened this issue Sep 29, 2024 · 9 comments
Open

SDK proxy is returning internal error #86

livid opened this issue Sep 29, 2024 · 9 comments

Comments

@livid
Copy link

livid commented Sep 29, 2024

I am working on an integration to use .sol in our macOS native app. Our programming environment is Swift, so I have to use the proxy for now.

The following endpoint is returning an internal error:

https://sns-sdk-proxy.bonfida.workers.dev/record/planetable.sol/TXT

My goal is to retrieve the ipns=... string from the content. Is there any other way to do this?

Screenshot 2024-09-28 at 8 34 21 PM
@livid
Copy link
Author

livid commented Sep 29, 2024

I also tried cargo install sns-cli but it's unable to build because of this error:

Screenshot 2024-09-28 at 9 15 29 PM

@dr497
Copy link
Contributor

dr497 commented Sep 30, 2024

Thanks for opening the issue.

Based on the screenshot you posted, you have written ipns=... in the data of the account, not the TXT record. There is no endpoint for fetching the data but we can add it if that serves your use case.

Thanks for mentioning the compilation error, we will look into this. At first glance it seems related to time-rs/time#693

@dr497
Copy link
Contributor

dr497 commented Sep 30, 2024

I have prepared a PR for your use case #87

Let me know if this would solve your issue

@livid
Copy link
Author

livid commented Sep 30, 2024

I have prepared a PR for your use case #87

Let me know if this would solve your issue

That would be awesome! Thanks a lot.

We built Planet, one of ENS's most popular website builder apps. We are exploring the possibility of bringing our app to Solana.

@dr497
Copy link
Contributor

dr497 commented Sep 30, 2024

Thanks for confirming @livid, the endpoint has been deployed.

@livid
Copy link
Author

livid commented Sep 30, 2024

Thank you!

With the new endpoint, I can get a base64 encoded string. After decoding, it contains the IPNS string I need, but it also contains something else:

Screenshot 2024-09-30 at 5 28 29 AM

Is there a proper way to decode that data instead of simply base64 decoding?

@livid
Copy link
Author

livid commented Sep 30, 2024

I'm so excited to report I got it working in our system!

Now our DoH server can resolve .sol, and it can be further used in our IPFS gateway to enable accessing the website on .sol:

https://ipfs.v2ex.pro/ipns/planetable.sol/

I noticed .sol also has native records for IPNS/IPFS, and we will support and test those cases too. Thank you so much for the fast help!

Screenshot 2024-09-30 at 5 49 52 AM

@dr497
Copy link
Contributor

dr497 commented Oct 1, 2024

Thank you!

With the new endpoint, I can get a base64 encoded string. After decoding, it contains the IPNS string I need, but it also contains something else:

Screenshot 2024-09-30 at 5 28 29 AM Is there a proper way to decode that data instead of simply base64 decoding?

Thanks for pointing this out, there was an issue in my previous commit, I forgot to strip the first 96 bytes that contain the domain header. ddc1d15 should fix the issue and has been deployed.

Let me know if I can help you for anything else.

@livid
Copy link
Author

livid commented Oct 3, 2024

@dr497 Thank you very much! All good now.

I also got the SNS native IPNS record working on both our DoH server and gateway.

We're building a new SNS+IPFS/IPNS gateway. Here's a demo site with the IPNS record:

https://www.sns.id/domain?domain=ohlife

It works in a regular browser by appending .build to .sol like this:

https://ohlife.sol.build/

Screenshot 2024-10-03 at 5 20 47 AM

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

2 participants