Palindrome Crypto Pay - Blockchain Escrow Payment Solution

Disputes

hasSubmittedEvidence

async hasSubmittedEvidence(escrowId: bigint, role: Role): Promise<boolean>

Checks if a specific participant (buyer, seller, or arbiter) has submitted evidence for a disputed escrow. Each participant can submit evidence only once, so use this to guard your UI before calling submitDisputeMessage().

Parameters

  • escrowId: bigint – The escrow ID to check
  • role: Role – The role to check: Role.Buyer, Role.Seller, or Role.Arbiter

Returns

Promise<boolean>true if the specified role has submitted evidence, false otherwise

import { connectAndInitSDK } from '@/lib/createSDK';
import { Role } from '@palindromepay/sdk';

const { sdk } = await connectAndInitSDK();

const hasSubmitted = await sdk.hasSubmittedEvidence(42n, Role.Buyer);

if (hasSubmitted) {
  console.log('Buyer has already submitted evidence');
} else {
  console.log('Buyer has not submitted evidence yet');
}

Check all participants

const [buyerSubmitted, sellerSubmitted, arbiterSubmitted] = await Promise.all([
  sdk.hasSubmittedEvidence(42n, Role.Buyer),
  sdk.hasSubmittedEvidence(42n, Role.Seller),
  sdk.hasSubmittedEvidence(42n, Role.Arbiter),
]);

console.log('Buyer submitted:', buyerSubmitted);
console.log('Seller submitted:', sellerSubmitted);
console.log('Arbiter submitted:', arbiterSubmitted);

See alsogetDisputeSubmissionStatus() · submitDisputeMessage()

Previous
refundAfterDisputeTimeout