import { AxiosResponse } from "axios"; import { GiverReceiverInputInfo } from "../libs/util"; import { ErrorResult, ResultWithType } from "./common"; export interface GiverOutputInfo { action: string; giver?: GiverReceiverInputInfo; description?: string; amount?: number; unitCode?: string; } export interface ClaimResult { success: { claimId: string; handleId: string }; error: { code: string; message: string }; } export interface VerifiableCredential { exp?: number; iat: number; iss: string; vc: { "@context": string[]; type: string[]; credentialSubject: VerifiableCredentialSubject; }; } export interface VerifiableCredentialSubject { "@context": string; "@type": string; [key: string]: unknown; } export interface WorldProperties { startTime?: string; endTime?: string; } export interface ProviderInfo { /** * Could be a DID or a handleId that identifies the provider */ identifier: string; /** * Indicates if the provider link has been confirmed */ linkConfirmed: boolean; } // Type for createAndSubmitClaim result export type CreateAndSubmitClaimResult = SuccessResult | ErrorResult; // Update SuccessResult to use ClaimResult export interface SuccessResult extends ResultWithType { type: "success"; response: AxiosResponse; }