reserve 0x2f (ASCII /) as the *path* multicodec

That way, we can always tell if something is a path or something else.

We may also be able to take advantage of this later to combine a few
concepts and get rid of the "multiaddrs look like paths but are totally not"
problem. However, we can think about that later. This PR just reserves the code
so we don't run into problems later.

* Remove the distinction between string/binary multiaddrs. Instead, the "string"
  will *also* be a valid binary multiaddr.
* Define a new multipath spec to combine multiaddrs and other paths.

Related to: https://github.com/multiformats/multiaddr/issues/70
This commit is contained in:
Steven Allen 2019-03-18 09:47:06 -07:00
parent b2aa250197
commit 56b1f8ff55
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ murmur3-128, multihash, 0x22,
murmur3-32, multihash, 0x23,
ip6, multiaddr, 0x29,
ip6zone, multiaddr, 0x2A,
path, namespace, 0x2F, Namespace for string paths. Corresponds to `/` in ASCII.
multicodec, multiformat, 0x30,
multihash, multiformat, 0x31,
multiaddr, multiformat, 0x32,

1 name tag code description
20 murmur3-32 multihash 0x23
21 ip6 multiaddr 0x29
22 ip6zone multiaddr 0x2A
23 path namespace 0x2F Namespace for string paths. Corresponds to `/` in ASCII.
24 multicodec multiformat 0x30
25 multihash multiformat 0x31
26 multiaddr multiformat 0x32