Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Dispute Management and Resolution System #17

Open
6 tasks
AndreaDiazCorreia opened this issue Dec 12, 2024 · 0 comments
Open
6 tasks

Implement Dispute Management and Resolution System #17

AndreaDiazCorreia opened this issue Dec 12, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AndreaDiazCorreia
Copy link
Collaborator

Description

Implement comprehensive dispute handling functionality following the Mostro protocol, including dispute creation, token management, and dispute resolution flows.

Implementation Requirements

  1. Core dispute methods:
interface DisputeManager {
  async initiateDispute(order: Order): Promise<MostroMessage>;
  async handleDisputeResponse(disputeId: string): Promise<void>;
  async getDisputeStatus(disputeId: string): Promise<DisputeStatus>;
  async handleDisputeResolution(disputeId: string): Promise<void>;
}

interface DisputeMessage {
  order: {
    version: number;
    id: string;
    action: Action.Dispute;
    content: {
      dispute: string;
      token?: number;
    };
  };
}
  1. Token management:
interface DisputeToken {
  buyerToken: number;
  sellerToken: number;
  disputeId: string;
}

Testing Requirements

describe('DisputeManagement', () => {
  it('should initiate disputes correctly');
  it('should generate unique tokens');
  it('should handle dispute responses');
  it('should track dispute status');
  it('should handle resolution messages');
  it('should manage state transitions');
});

Acceptance Criteria

  • Dispute initiation implemented
  • Token generation working
  • Status tracking functional
  • Resolution handling complete
  • Event handling implemented
  • Documentation complete

References

@grunch grunch added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants