diff --git a/examples/hello-world/main.wasm b/examples/hello-world/main.wasm index 8de66d0..40ee756 100755 Binary files a/examples/hello-world/main.wasm and b/examples/hello-world/main.wasm differ diff --git a/system/testdata/socket/testdata b/system/testdata/testdata similarity index 100% rename from system/testdata/socket/testdata rename to system/testdata/testdata diff --git a/ww.go b/ww.go index 8436a98..a20cd9e 100644 --- a/ww.go +++ b/ww.go @@ -123,21 +123,23 @@ func (c Cluster) NewFS(ctx context.Context) (*system.FS, error) { }, nil } -func (c Cluster) Resolve(ctx context.Context, root path.Path) (n files.Node, err error) { - switch ns := root.Segments()[0]; ns { - case "ipld": +func (c Cluster) Resolve(ctx context.Context, p path.Path) (n files.Node, err error) { + switch ns := p.Segments()[0]; ns { + case "ipnsxs": // IPLD introduces one level of indirection: a mutable name. // Here we are fetching the IPFS record to which the name is // currently pointing. - root, err = c.IPFS.Name().Resolve(ctx, root.String()) + p, err = c.IPFS.Name().Resolve(ctx, p.String()) if err != nil { return } - default: // It's probably /ipfs/ + default: + slog.Info("resolved namespace", + "ns", ns) } - n, err = c.IPFS.Unixfs().Get(ctx, root) + n, err = c.IPFS.Unixfs().Get(ctx, p) return }