Open icidasset opened 2 years ago
(1) requires the least amount of code, but has the downside of being restricted to a specific TLD.
To add to that: (1) means the filesystem contains information about where it's supposed to be hosted. So e.g. if we had some way to rename fission accounts or ways to transfer a fission filesystem between usernames, then the filesystem would break more than if the links were agnostic about that.
@icidasset did this get shipped as part of shared private files? 🤞
It didn’t sadly, only external symlinks.
We have external symlinks already, pointing to a public or private part of another filesystem.
This would look something like this:
There's several routes we can take here:
ipns
address is ours (check our username + tld in webnative setup)ipns
with an "internal property", likewnfs
for example.ipns
to a constant, identifying an internal link, eg.ipns: "internal"
(1) requires the least amount of code, but has the downside of being restricted to a specific TLD. The external lookup will still work however, and I don't think this is a big issue with the current architecture.
What needs to happen
resolveSoftLink
methods in the filesystem need to do the internal lookup when needed. Here: https://github.com/fission-suite/webnative/blob/fa245a0a550b62c1322485a70851b0fe16841c83/src/fs/v1/PublicTree.ts#L204 And here: https://github.com/fission-suite/webnative/blob/fa245a0a550b62c1322485a70851b0fe16841c83/src/fs/v1/PrivateTree.ts#L255