storacha / w3name

IPNS client and service for generating, updating, and tracking immutable names with signed updates
Other
45 stars 12 forks source link

Is there a way to resolve a name based on sequence number? #93

Closed skogard closed 1 year ago

skogard commented 1 year ago

Just curious if the protocol itself has this feature built in, or if I want to keep track of all the history I have to keep track of them separately.

Currently, calling:

Name.resolve(name)

gives us the latest version of the name resolution, but I notice that the resolved name includes sequence numbers. This made me curious if there's a way to do something like:

Name.resolve(name, sequenceNumber)

and get the resolution at certain point in time in the past. If this is not possible with the underlying protocol and I have to build my own data structure that's fine too. Just want to make sure that I am not building some bolt-on technology when the protocol natively supports it.

Thanks in advance!

dchoi27 commented 1 year ago

I don't think the protocol supports it, but it is something we probably track and can expose. @mbommerez mind if someone from the team chimes in?

mbommerez commented 1 year ago

@dchoi27 We don't keep old records with their sequence number in the database, so this is not something we can support at the moment.