Palindrome Crypto Pay - Blockchain Escrow Payment Solution

Escrow Queries

getEscrowDetail

async getEscrowDetail(escrowId: string): Promise<EscrowDetail | null>

Queries the subgraph to retrieve comprehensive details about a specific escrow, including dispute messages and transaction history.

Parameters

  • escrowId: string – The escrow ID to fetch

Returns

Promise<EscrowDetail | null> – Detailed escrow object or null if not found

import { createPalindromeSDK } from '@/lib/createSDK';

const { sdk } = await connectAndInitSDK();

const detail = await sdk.getEscrowDetail("42");

if (detail) {
  console.log(`Escrow #${detail.id}`);
  console.log(`  Buyer: ${detail.buyer}`);
  console.log(`  Seller: ${detail.seller}`);
  console.log(`  Amount: ${detail.amount}`);
  console.log(`  State: ${detail.state}`);
  console.log(`  Created: ${detail.createdAt}`);

  if (detail.disputeMessages?.length) {
    console.log(`  Dispute messages: ${detail.disputeMessages.length}`);
  }
} else {
  console.log("Escrow not found");
}

Use Cases

  • Display full escrow details page
  • Review dispute history and evidence
  • Audit transaction timeline
Previous
getEscrowsBySeller