/** * CRE capability errors and wire format shared across CRE components. * Aligns with github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors. */ import { type ErrorCode } from './error-codes'; export type Origin = number; /** The error originated from a system issue. */ export declare const OriginSystem = 0; /** The error originated from user input or action. */ export declare const OriginUser = 1; export declare function originToString(origin: Origin): string; /** Converts a string to an Origin value. */ export declare function fromOriginString(s: string): Origin; export type Visibility = number; /** The full details of the error can be shared across all nodes in the network. */ export declare const VisibilityPublic = 0; /** The error contains sensitive information visible only to the local node. */ export declare const VisibilityPrivate = 1; export declare function visibilityToString(visibility: Visibility): string; /** Converts a string to a Visibility value. */ export declare function fromVisibilityString(s: string): Visibility; export declare class CapabilityExecutionError extends Error { readonly detail: string; readonly visibility: Visibility; readonly origin: Origin; readonly code: ErrorCode; readonly name = "CapabilityExecutionError"; constructor(detail: string, visibility: Visibility, origin: Origin, code: ErrorCode); toString(): string; } export declare function isCapabilityExecutionError(err: unknown): err is CapabilityExecutionError;