diff --git a/types/cid.go b/types/cid.go index c407113..0afee99 100644 --- a/types/cid.go +++ b/types/cid.go @@ -12,3 +12,14 @@ const ( CIDTypeEncryptedStatic CIDType = 0xae CIDTypeEncryptedDynamic CIDType = 0xad ) + +var CIDTypeMap = map[CIDType]string{ + CIDTypeRaw: "Raw", + CIDTypeMetadataMedia: "MetadataMedia", + CIDTypeMetadataWebapp: "MetadataWebapp", + CIDTypeResolver: "Resolver", + CIDTypeUserIdentity: "UserIdentity", + CIDTypeBridge: "Bridge", + CIDTypeEncryptedStatic: "EncryptedStatic", + CIDTypeEncryptedDynamic: "EncryptedDynamic", +} diff --git a/types/hash.go b/types/hash.go index defa230..90af33c 100644 --- a/types/hash.go +++ b/types/hash.go @@ -6,3 +6,8 @@ const ( HashTypeBlake3 HashType = 0x1f HashTypeEd25519 HashType = 0xed ) + +var HashTypeMap = map[HashType]string{ + HashTypeBlake3: "Blake3", + HashTypeEd25519: "Ed25519", +} diff --git a/types/registry.go b/types/registry.go index 4a37343..5be366e 100644 --- a/types/registry.go +++ b/types/registry.go @@ -6,3 +6,8 @@ const ( RegistryTypeCID RegistryType = 0x5a RegistryTypeEncryptedCID RegistryType = 0x5e ) + +var RegistryTypeMap = map[RegistryType]string{ + RegistryTypeCID: "CID", + RegistryTypeEncryptedCID: "EncryptedCID", +}