mirror of https://github.com/status-im/EIPs.git
Update eip-1577.md (#1611)
This commit is contained in:
parent
37ef8edc8d
commit
2fc626317d
|
@ -24,13 +24,21 @@ The field `contenthash` is introduced, which permits a wide range of protocols t
|
|||
|
||||
The fields `content` and `multihash` are deprecated.
|
||||
|
||||
The encoding of the value depends on the content type specified by the protoCode; for instance, types in the range 0x00-0xf0 are encoded using [multihash](https://github.com/multiformats/multihash), meaning their format is specified as follows:
|
||||
The value returned by `contenthash` MUST be represented as a machine-readable [multicodec](https://github.com/multiformats/multicodec). The format is specified as follows:
|
||||
|
||||
```
|
||||
<protoCode uvarint><value []byte>
|
||||
```
|
||||
|
||||
protoCodes and their meanings are specified in the [ensdomains/multicodec](https://github.com/ensdomains/multicodec) repository.
|
||||
|
||||
The encoding of the value depends on the content type specified by the protoCode; for instance, types in the range 0x00-0xf0 are encoded using [multihash](https://github.com/multiformats/multihash), meaning their value is formatted as follows:
|
||||
|
||||
```
|
||||
<varint hash function code><varint digest size in bytes><hash function output>
|
||||
```
|
||||
|
||||
When resolving a multiaddr, applications MUST use the protocol code to determine what type of address is encoded, and resolve the address appropriately for that protocol, if supported.
|
||||
When resolving a `contenthash`, applications MUST use the protocol code to determine what type of address is encoded, and resolve the address appropriately for that protocol, if supported.
|
||||
|
||||
### Example
|
||||
|
||||
|
|
Loading…
Reference in New Issue