From cc66a0d839fe14a89f13256c0763cffdf2bdc29c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Sep 2023 05:19:09 -0400 Subject: [PATCH] feat: add const groups of the different set of types --- src/constants.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/constants.ts b/src/constants.ts index 5a169fe..aba6861 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -22,6 +22,17 @@ export const cidTypeEncryptedStatic = 0xae; /// can point to resolver CID, Stream CID, Directory Metadata or Media Metadata object export const cidTypeEncryptedDynamic = 0xad; +export const CID_TYPES = [ + cidTypeRaw, + cidTypeMetadataMedia, + cidTypeMetadataWebApp, + cidTypeResolver, + cidTypeUserIdentity, + cidTypeBridge, + cidTypeEncryptedStatic, + cidTypeEncryptedDynamic, +]; + export const registryS5CIDByte = 0x5a; export const registryS5EncryptedByte = 0x5e; @@ -48,10 +59,24 @@ export const metadataTypeDirectory = 0x04; export const metadataTypeProofs = 0x05; export const metadataTypeUserIdentity = 0x07; +export const METADATA_TYPES = [ + metadataTypeMedia, + metadataTypeWebApp, + metadataTypeDirectory, + metadataTypeProofs, + metadataTypeUserIdentity, +]; + export const parentLinkTypeUserIdentity = 1; export const parentLinkTypeBoard = 5; export const parentLinkTypeBridgeUser = 10; +export const PARENT_LINK_TYPES = [ + parentLinkTypeUserIdentity, + parentLinkTypeBoard, + parentLinkTypeBridgeUser, +]; + export const registryMaxDataSize = 64; // ! user identity