error.d.ts 675 B

12345678910111213141516
  1. declare class BaseError<T extends string> extends Error {
  2. code: T;
  3. cause: any;
  4. constructor({ code, message, cause, }: {
  5. code: T;
  6. message: string;
  7. cause?: any;
  8. });
  9. }
  10. type VerificationErrorCode = 'NOT_IMPLEMENTED_ERROR' | 'TLOG_INCLUSION_PROOF_ERROR' | 'TLOG_INCLUSION_PROMISE_ERROR' | 'TLOG_MISSING_INCLUSION_ERROR' | 'TLOG_BODY_ERROR' | 'CERTIFICATE_ERROR' | 'PUBLIC_KEY_ERROR' | 'SIGNATURE_ERROR' | 'TIMESTAMP_ERROR';
  11. export declare class VerificationError extends BaseError<VerificationErrorCode> {
  12. }
  13. type PolicyErrorCode = 'UNTRUSTED_SIGNER_ERROR';
  14. export declare class PolicyError extends BaseError<PolicyErrorCode> {
  15. }
  16. export {};