Skip to content

dag API and resolving paths #4728

Closed
Closed
@vmx

Description

@vmx

Version information:

go-ipfs version: 0.4.14-dev-25eeb1e25
Repo version: 6
System version: amd64/linux
Golang version: go1.9.2

Type: Enhancement, Bug

Description:

I'm currently working on implementing the dag API for https://github.com/ipfs/js-ipfs-api/. There I stumbled upon issues when running the https://github.com/ipfs/interface-ipfs-core/ dag tests. Resolving doesn't work as I expect it, though I might have a wrong understanding. Here's an example:

$ curl -F 'data={"data": "aGVsbG8gd29ybGQh"}' 'http://localhost:5001/api/v0/dag/put?hash=sha2-256&format=dag-pb&input-e
{"Cid":{"/":"QmTy3X89nStNtmyth2iEtEC6VFchCpZUGtsJWYNTux6hVz"}}
$ curl 'http://127.0.0.1:5001/api/v0/dag/get?arg=QmTy3X89nStNtmyth2iEtEC6VFchCpZUGtsJWYNTux6hVz'
{"data":"aGVsbG8gd29ybGQh","links":[]}
$ curl 'http://127.0.0.1:5001/api/v0/dag/resolve?arg=QmTy3X89nStNtmyth2iEtEC6VFchCpZUGtsJWYNTux6hVz/Data'
{"Message":"no link by that name","Code":0,"Type":"error"}

I would expect the last curl command to return:

"aGVsbG8gd29ybGQh"

Am I wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions