import { z } from 'zod'; import { ChallengeId } from '../../api/challenges/types'; import { AntiAbuseOracleSelectorService } from '../AntiAbuseOracleSelector'; export declare const GetAttestationSchema: z.ZodObject<{ /** The user's handle. */ handle: z.ZodString; /** The challenge identifier. As in, the challenge "name." */ challengeId: z.ZodNativeEnum; /** * Identifier for the completed challenge instance. * * @see {@link ChallengesApi.generateSpecifier} */ specifier: z.ZodString; /** The amount being claimed, in decimal wAUDIO. */ amount: z.ZodNumber; }, "strip", z.ZodTypeAny, { handle: string; challengeId: ChallengeId; specifier: string; amount: number; }, { handle: string; challengeId: ChallengeId; specifier: string; amount: number; }>; export type AttestationRequest = z.input; export type AttestationResponse = { /** The signature attesting the challenge disbursement request is allowed by AAO, or false. */ result: string | false; /** The error code of the failed attestation, if applicable. */ errorCode?: number; }; export type AntiAbuseOracleHealthCheckResponse = { /** The version number of AAO deployed. */ version: number; /** The discovery node endpoint the AAO is using. */ selectedDiscoveryNode: string; /** A list of other AAO endpoints. (note: Empty at time of writing!) */ otherAntiAbuseOracleEndpoints: string[]; /** The wallet public key address for this AAO. */ walletPubkey: string; /** The wallet public key address for this AAO from a discovery node plugin. */ antiAbuseWalletPubkey?: string; /** Whether the database container is healthy (UP) or unhealthy (DOWN). */ db: 'UP' | 'DOWN'; /** The date of the last successful attestation. */ lastSuccessfulAttestation: string; /** The date of the last failed attestation. */ lastfailedAttestation: string; }; /** * API Client for the Anti Abuse Oracle Service. */ export type AntiAbuseOracleService = { /** * Gets an attestation from Anti Abuse Oracle that the given user is * not marked as abusive by our anti abuse mechanisms for the purpose of * claiming a reward for completing a challenge. */ getChallengeAttestation: (args: AttestationRequest) => Promise; /** * Gets the wallet address of the current selected node. */ getWalletAddress: () => Promise; }; export type AntiAbuseOracleConfig = { antiAbuseOracleSelector: AntiAbuseOracleSelectorService; };