/** * Errors Module for BrightChain * * This module exports all error classes and type guards for the BrightChain library. * * @module errors * * @example * ```typescript * import { * BrightChainError, * ChecksumError, * ChecksumErrorType, * EnhancedValidationError, * isBrightChainError, * isChecksumError, * isEnhancedValidationError * } from 'brightchain-lib'; * * try { * // ... operation * } catch { * if (isChecksumError(error)) { * console.error(`Checksum error (${error.checksumErrorType}): ${error.message}`); * } else if (isEnhancedValidationError(error)) { * console.error(`Validation failed for '${error.field}': ${error.message}`); * } else if (isBrightChainError(error)) { * console.error(`BrightChain error (${error.type}): ${error.message}`); * } * } * ``` */ /** * Base error class for all BrightChain errors. * @see {@link BrightChainError} * @see {@link isBrightChainError} */ export * from './brightChainError'; /** * Typed error base class (legacy pattern). * @see {@link TypedError} */ export * from './typedError'; /** * Typed error with reason (legacy pattern). * @see {@link TypedWithReasonError} */ export * from './typedWithReasonError'; /** * Translatable brightchain error for i18n errors. * @see {@link TranslatableBrightChainError} */ export * from './translatableBrightChainError'; /** * Enhanced validation error with field context. * @see {@link EnhancedValidationError} * @see {@link isEnhancedValidationError} */ export * from './enhancedValidationError'; /** * Legacy validation error class. * @see {@link ValidationError} */ export * from './validationError'; /** * Checksum-related errors. * @see {@link ChecksumError} * @see {@link ChecksumErrorType} * @see {@link isChecksumError} */ export * from './checksumError'; /** * Checksum mismatch error. */ export * from './checksumMismatch'; /** * Centralized type guards for all error types. * @see {@link isBrightChainError} * @see {@link isChecksumError} * @see {@link isEnhancedValidationError} * @see {@link isValidationError} * @see {@link isEciesError} * @see {@link isCblError} * @see {@link isFecError} * @see {@link isTypedError} * @see {@link isAnyBrightChainError} */ export * from './typeGuards'; /** * Block-related errors. */ export * from './block'; export * from './blockServiceError'; export * from './invalidBlockSize'; export * from './invalidBlockSizeLength'; /** * Buffer-related errors. */ export * from './bufferError'; /** * CBL-related errors. */ export * from './cblError'; export * from './extendedCblError'; /** * TCBL archive-related errors. */ export * from './tcblError'; /** * ECIES encryption errors. */ export * from './eciesError'; /** * Symmetric encryption errors. */ export * from './symmetricError'; /** * Multi-encrypted block errors. */ export * from './multiEncryptedError'; /** * Isolated key errors. */ export * from './isolatedKeyError'; /** * FEC-related errors. */ export * from './fecError'; /** * Document-related errors. */ export * from './document'; /** * Member-related errors. */ export * from './memberError'; /** * Tuple-related errors. */ export * from './handleTupleError'; export * from './invalidTupleCount'; export * from './memoryTupleError'; export * from './tupleError'; /** * Pool deletion errors. */ export * from './poolDeletionError'; /** * Pool deletion tombstone errors. * @see {@link PoolDeletionTombstoneError} */ export * from './poolDeletionTombstoneError'; /** * Store-related errors. */ export * from './storeError'; /** * Secure storage errors. */ export * from './secureStorage'; /** * BrightTrust-related errors. */ export * from './brightTrustError'; /** * Identity validation errors for content ingestion pipeline. */ export * from './identityValidationError'; /** * Sealing-related errors. */ export * from './sealingError'; /** * Whitening-related errors. */ export * from './whitenedError'; /** * Stream-related errors. */ export * from './streamError'; /** * System keyring errors. */ export * from './systemKeyringError'; /** * Serialization and hydration errors. */ export * from './failedToHydrate'; export * from './failedToSerialize'; /** * Disposed resource errors. */ export * from './disposed'; /** * Authentication and credential errors. */ export * from './invalidCredentials'; export * from './invalidIDFormat'; export * from './invalidSessionID'; export * from './userNotFound'; /** * Factory pattern violation errors. * @see {@link FactoryPatternViolationError} * @see {@link isFactoryPatternViolationError} */ export * from './factoryPatternViolationError'; /** * Metadata mismatch errors. */ export * from './metadataMismatch'; /** * Missing validated data errors. */ export * from './missingValidatedData'; /** * Not implemented errors. */ export * from './notImplemented'; /** * Block fetch errors (remote block retrieval). * @see {@link BlockFetchError} * @see {@link PoolMismatchError} * @see {@link FetchTimeoutError} */ export * from './blockFetchError'; /** * Message passing system errors. */ export * from './messaging'; /** * Ledger operation errors. * @see {@link LedgerError} * @see {@link LedgerErrorType} */ export * from './ledgerError'; /** * Ledger serialization errors. * @see {@link LedgerSerializationError} * @see {@link LedgerSerializationErrorType} */ export * from './ledgerSerializationError'; /** * Encryption error classes for BrightChat E2E encryption operations. * @see {@link MissingPublicKeyError} * @see {@link KeyUnwrapError} * @see {@link MessageDecryptionError} * @see {@link AttachmentTooLargeError} * @see {@link TooManyAttachmentsError} * @see {@link KeyEpochNotFoundError} */ export * from './encryptionErrors'; /** * Write ACL authorization and management errors. * @see {@link WriteAuthorizationError} * @see {@link AclAdminRequiredError} * @see {@link CapabilityTokenExpiredError} * @see {@link CapabilityTokenInvalidError} * @see {@link LastAdministratorError} * @see {@link AclVersionConflictError} * @see {@link AclSignatureVerificationError} * @see {@link WriterNotInPoolError} */ export * from './writeAclErrors'; /** * Friends service errors (friend requests, friendships). * @see {@link FriendsServiceError} */ export * from './friendsServiceError'; /** * Asset-account / joule resource-credit errors. Introduced by the * `asset-account-store-generalization` spec. * * @see {@link InvalidAmountError} * @see {@link MixedAssetError} * @see {@link InsufficientAvailableBalanceError} * @see {@link ReservationNotFoundError} * @see {@link ReservationExpiredError} * @see {@link LedgerAlreadyAttachedError} * @see {@link AssetUnknownError} */ export * from './asset'; //# sourceMappingURL=index.d.ts.map