Skip to content

Expose REST Endpoints to Trigger Document Verification and Retrieve On-Chain Confirmation Status #223

@mftee

Description

@mftee

Description:
Expose the document verification workflow via REST endpoints as an independent controller layer. Triggering verification calls the StellarService to anchor the hash and persists the result.

Tasks:

  • Add POST /api/documents/:id/verify — triggers StellarService.anchorHash, creates a VerificationRecord, updates document status to verified
  • Add GET /api/documents/:id/verification — returns the latest verification record for a document
  • Protect both routes with JwtAuthGuard
  • Return 409 if the document is already in verified status

Acceptance Criteria:

  • Calling verify on a document creates a VerificationRecord with a real Stellar tx hash
  • The document status is updated to verified
  • Calling verify on an already-verified document returns 409

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions