Skip to content

Encoding for IPLD paths #77

Description

@mildred

Following discussions on #61 and #62, I noticed that on #61 we decided to encode links using the multiaddress format, and on #62 we defined what we wanted for the textual representation.

My question is: do we want to really use multiaddress to encode IPLD paths or do we want to use a similar encoding scheme but different (because the domain is different).

I came up with the following idea. Let's say we have a path that looks like:

/ipfs/HASH/foo//bar/baz/@link/boo

We could encode it as:

<id for ipfs><hash length><multihash>
  <id for internal link><length>"foo"
  <id for external // link>
  <id for internal link><length>"bar"
  <id for internal link><length>"baz"
  <id for external @link>
  <id for internal link><length>"boo"

This is compatible with the multiaddress scheme, but do we implement it there or do we do it elsewhere. If so, where?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions