LOPWDocumentation

Docs / Guides

File a claim

A claim is one transaction with one outcome. The SDK builds it from the record it kept at payment time.

  1. Fetch through the SDK. After payment it evaluates every predicate and lists any breaches on warranty.breaches. If warranty.problems is non-empty the response is untrusted and cannot be claimed.
  2. Call agent.claim(warranty) before warranty.claimableUntil. It uses the first breach unless you pass a predicate ID; for P1 it attaches the duplicate receipt automatically.
  3. Read the result: { outcome: { paid: amount } | { rejected: "not_proven" | "not_verifiable" }, transaction }.
TypeScript
const { warranty } = await agent.fetch(url);
if (warranty && !warranty.problems.length && warranty.breaches.length) {
  const result = await agent.claim(warranty, warranty.breaches[0]);
  if ("paid" in result.outcome) console.log("paid", result.outcome.paid, "tx", result.transaction);
  else console.log("rejected:", result.outcome.rejected);
}
// Later: const open = await agent.store.list();   // records whose claim windows are still open
FactDetail
Who may submitAnyone holding the evidence. The payout always goes to receipt.buyer.
Claim windowStarts at served_at; lasts the terms’ claim_window (at most 24 hours; at most one hour when P6 is offered).
Payoutmin(offer.max_claim, stake remaining), also capped by the launch limit max_payout when one is set, and subject to the slash rate limit.
Recorded outcomesPaid(amount) emits ClaimPaid. Rejected(NotProven | NotVerifiable) emits ClaimRejected and does not block a later valid claim for the same payment.
Errors (nothing recorded)UnknownService, BadSignature, OfferMismatch, WindowClosed, AlreadyClaimed, PredicateNotOffered, NoStake, ValidatorNotSet, KeyRetired, UnsupportedVersion, SlashRateLimited. Full table in the claims reference.
Rate limited?SlashRateLimited means this service already paid out 50% of its epoch-start stake in the current epoch. Retry in the next epoch if the window is still open.
FeesThe submitter pays the normal transaction fee, including the oracle read for P6. A rejected claim costs the fee and nothing else.

Keep evidence: the FileReceiptStore keeps every record until its claim window closes and survives restarts. You can also call binding.submitClaim(signer, predicateId, offer, receipt, secondReceipt?) directly with evidence obtained elsewhere.