index.ts raw

   1  /**
   2   * Directory Consensus Protocol Client Library
   3   * 
   4   * Main entry point for the TypeScript client library.
   5   */
   6  
   7  // Export types
   8  export type {
   9    IdentityTag,
  10    RelayIdentity,
  11    TrustAct,
  12    GroupTagAct,
  13    PublicKeyAdvertisement,
  14    ReplicationRequest,
  15    ReplicationResponse,
  16    DirectoryEventContent,
  17    ValidationError as ValidationErrorType,
  18  } from './types.js';
  19  
  20  export {
  21    EventKinds,
  22    TrustLevel,
  23    TrustReason,
  24    KeyPurpose,
  25    ReplicationStatus,
  26    isDirectoryEventKind,
  27    isValidTrustLevel,
  28    isValidKeyPurpose,
  29    isValidReplicationStatus,
  30  } from './types.js';
  31  
  32  // Export validation
  33  export {
  34    ValidationError,
  35    validateHexKey,
  36    validateNPub,
  37    validateWebSocketURL,
  38    validateNonce,
  39    validateTrustLevel,
  40    validateKeyPurpose,
  41    validateReplicationStatus,
  42    validateConfidence,
  43    validateIdentityTagStructure,
  44    validateJSONContent,
  45    validatePastTimestamp,
  46    validateFutureTimestamp,
  47    validateExpiry,
  48    validateDerivationPath,
  49    validateKeyIndex,
  50    validateEventKinds,
  51    validateAuthors,
  52    validateLimit,
  53  } from './validation.js';
  54  
  55  // Export parsers
  56  export {
  57    parseIdentityTag,
  58    parseRelayIdentity,
  59    parseTrustAct,
  60    parseGroupTagAct,
  61    parsePublicKeyAdvertisement,
  62    parseReplicationRequest,
  63    parseReplicationResponse,
  64    parseDirectoryEvent,
  65  } from './parsers.js';
  66  
  67  // Export identity resolver
  68  export {
  69    IdentityResolver,
  70    createIdentityResolver,
  71  } from './identity-resolver.js';
  72  
  73  // Export helpers
  74  export * from './helpers.js';
  75  
  76