T402 API Reference - v2.9.0
    Preparing search index...

    Function validateDispute

    • Full validation pipeline for an incoming dispute. Combines signature verification with the business rules from specs/extensions/dispute.md §Verification.

      Parameters

      • params: {
            verifier: EIP712DisputeVerifier;
            dispute: SignedDispute;
            receipt: { issuedAt: number; hash: string; amount: string };
            terms: DisputeTermsInfo;
            now?: number;
        }

        Validation inputs.

        • verifier: EIP712DisputeVerifier

          EIP-712 signature verifier.

        • dispute: SignedDispute

          The signed dispute to validate.

        • receipt: { issuedAt: number; hash: string; amount: string }

          Receipt details — issuedAt from the receipt payload, and the receipt's hash for binding check.

          • issuedAt: number

            Receipt issuance unix-seconds.

          • hash: string

            EIP-712 hash of the SignedReceipt.

          • amount: string

            Settled receipt amount, in token smallest unit. Used to check requestedAmount <= receipt.amount.

        • terms: DisputeTermsInfo

          Server-declared dispute terms from the original 402.

        • Optionalnow?: number

          Current time in unix-seconds. Defaults to Date.now()/1000.

      Returns Promise<DisputeValidation>