Skip to content

Moderate complexity requiring understanding of multiple components. #462

Description

@Levi-Ojukwu

Description:

The SDK needs a method to file an appeal against a defaulted invoice. This involves:

  1. Validating the invoice exists and is in Defaulted status
  2. Checking the appeal window (30 days from default) has not expired
  3. Calling the contract's appeal_default function with the invoice ID and evidence hash
  4. Handling the AlreadyAppealed, AppealWindowClosed, and NotDefaulted error codes

The appeal flow is: payer files appeal → governance reviews → appeal upheld or rejected.

Why it matters: Appeals are a critical fairness mechanism. Without SDK support, frontends cannot implement appeal features.

Acceptance Criteria:

  • Create appealInvoice(client, invoiceId, evidenceHash) method
  • Validate invoice status before calling contract
  • Map all error codes to typed SDK errors
  • Add comprehensive tests covering all error paths

Relevant Files: contracts/invoice_liquidity/src/lib.rs (appeal functions), sdk/src/index.ts


Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions