// similar to VerifiableCredentialSubject... maybe rename this
export interface GenericVerifiableCredential {
  "@context"?: string;
  "@type": string;
  [key: string]: unknown;
}

export interface GenericCredWrapper<T extends GenericVerifiableCredential> {
  claim: T;
  claimType?: string;
  handleId: string;
  id: string;
  issuedAt: string;
  issuer: string;
  publicUrls?: Record<string, string>;
}

export interface ResultWithType {
  type: string;
}

export interface ErrorResponse {
  error?: {
    message?: string;
  };
}

export interface InternalError {
  error: string;
  userMessage?: string;
}

export interface ErrorResult extends ResultWithType {
  type: "error";
  error: InternalError;
}
