Merge branch 'master' of github.com:vacp2p/multiprotocol

This commit is contained in:
decanus 2020-02-27 22:10:00 +01:00
commit 379252899a
No known key found for this signature in database
GPG Key ID: E95B8C69228FF5B4
1 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,9 @@
# multiprotocol: Domain Specific Protocol Extensions for Multiaddr
# multiprotocol: multiformat inspired self-describing protocol identifiers
@TODO MOVE TABLE TO VAC SPECIFIC REPO
**:warning: THIS IS STILL AN EARLY DRAFT :warning:**
> Multiformat inspired self-describing protocol identifiers
In this specification we describe a simple method for nodes to advertise their capabilities.
The protocol is heavily inspired by [multiformats](https://multiformats.io/) and provides both a human and machine readable representation.
@ -24,7 +22,7 @@ code, size, name, comment
```
| field | description |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| :---------: | :------------------------------------------------------------------------------------------------------------------------------ |
| **code** | This field contains the code identifying the key. |
| **size** | This field identifies the expected keys size, it can be any number or `V`, indicating that the value itself is length prefixed. |
| **name** | The human readable name of the field. |
@ -54,8 +52,10 @@ Machine-readable:
Examples:
```
0x42 0x2 0x2 0x0 0x2
```python
0x2a 0x2 0x1 0x32 # /vac/waku/2
0x2a 0x2 0x1 0x32 0x4 0x1 0x32 # /vac/waku/2/relay/2
0x2a 0x2 0x1 0x32 0x3 0x1 0x32 # /vac/waku/2/store/1
```
@ -63,4 +63,4 @@ With multiaddr:
```
/ip4/127.0.0.1/tcp/9000/vac/waku/0.2/relay/0.2
```
```