multicodec: add IPLD codec for libp2p public keys

This is specifically for the protobuf-encoded libp2p key format:

```proto
enum KeyType {
	RSA = 0;
	Ed25519 = 1;
	Secp256k1 = 2;
	ECDSA = 3;
}

message PublicKey {
	required KeyType Type = 1;
	required bytes Data = 2;
}
```
This commit is contained in:
Steven Allen 2019-05-13 14:41:28 -07:00
parent 04bdc2d5e9
commit 7b1f04ed63

View File

@ -37,6 +37,7 @@ rlp, serialization, 0x60, recursive length
bencode, serialization, 0x63, bencode
dag-pb, ipld, 0x70, MerkleDAG protobuf
dag-cbor, ipld, 0x71, MerkleDAG cbor
libp2p-key, ipld, 0x72, Libp2p Public Key
git-raw, ipld, 0x78, Raw Git object
torrent-info, ipld, 0x7b, Torrent file info field (bencoded)
torrent-file, ipld, 0x7c, Torrent file (bencoded)

1 name tag code description
37 bencode serialization 0x63 bencode
38 dag-pb ipld 0x70 MerkleDAG protobuf
39 dag-cbor ipld 0x71 MerkleDAG cbor
40 libp2p-key ipld 0x72 Libp2p Public Key
41 git-raw ipld 0x78 Raw Git object
42 torrent-info ipld 0x7b Torrent file info field (bencoded)
43 torrent-file ipld 0x7c Torrent file (bencoded)