Skip to content

Event coverage: registration, service/repair, transfer #10

Description

@trietlu

Description

Verify end-to-end anchoring for the required lifecycle events and align initialAnchorStatus to the D4 policy. Anchor: MINT, SERVICE, TRANSFER, TRANSFER_ACCEPTED, AUTH_VERDICT, CONTRACT_SIGNED, CORRECTION. Do not anchor: NOTE, AUTH_REQUEST, TRANSFER_INITIATED. Ensure stable payload canonicalization so payloadHash recomputes to the on-chain value. Per D2, keep watchCommitment == serialNumberHash and anchor hashes only.

Affected areas

backend/src/controllers/watch.controller.ts, backend/src/services/onchain.service.ts, backend/src/serializers/.

Dependencies / order

Depends on #8.

Acceptance criteria

  • initialAnchorStatus matches the D4 anchor/skip mapping exactly.
  • Creating each of MINT, SERVICE, TRANSFER yields an ANCHORED event on staging with a verifiable tx.
  • Recomputing payloadHash from stored payloadJson matches the on-chain value for each.
  • No PII is placed on-chain (hashes only) — verified.

Definition of done

  • Implemented on a short-lived feature branch, merged into staging (never main).
  • Verified on the staging preview stack.
  • Docs updated if infra/env/API behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyScoped and specified for autonomous agent implementationblockchainOn-chain anchoring / smart-contract work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions