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

request: name/resolve - non-stream API #246

Open
tennox opened this issue Oct 8, 2024 · 0 comments
Open

request: name/resolve - non-stream API #246

tennox opened this issue Oct 8, 2024 · 0 comments

Comments

@tennox
Copy link

tennox commented Oct 8, 2024

I found that while I can use the non-streaming variant of the IPNS resolve API, it's neither straight-forward nor agreeable to typescript:

for await (const result of kuboClient.name.resolve(ipns, { stream: false })) {
	return result && CID.parse(result)
}

Is it rather unusual to not want to stream?
Also - while we're at it - when would there be multiple results and how to I check which one is the latest?

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