js-kubo-rpc-client icon indicating copy to clipboard operation
js-kubo-rpc-client copied to clipboard

request: name/resolve - non-stream API

Open tennox opened this issue 1 year ago • 0 comments

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?

tennox avatar Oct 08 '24 16:10 tennox