Using the key type as the record property name (ie. string = key type)
The magic bytes are the code found in https://github.com/multiformats/multicodec/blob/master/table.csv encoded as a variable integer (more info about that at https://github.com/multiformats/unsigned-varint).
code
The key type is also found in that table. It's the name of the codec minus the -pub suffix.
-pub
Ed25519 public key Key type: "ed25519" Magic bytes: [ 0xed, 0x01 ]
Using the key type as the record property name (ie. string = key type)
The magic bytes are the
code
found in https://github.com/multiformats/multicodec/blob/master/table.csv encoded as a variable integer (more info about that at https://github.com/multiformats/unsigned-varint).The key type is also found in that table. It's the name of the codec minus the
-pub
suffix.Example
Ed25519 public key Key type: "ed25519" Magic bytes: [ 0xed, 0x01 ]