Skip to content

Build Land Ownership Transfer Endpoints That Record Seller-Buyer Events and Anchor Them on Stellar #230

Description

@mftee

Description:
Track land ownership transfer events through a standalone module. Each transfer links two users (seller and buyer) to a document and is anchored on Stellar.

Tasks:

  • Create src/transfers/entities/transfer.entity.ts with fields: id, document_id (FK → Document), from_user_id (FK → User), to_user_id (FK → User), stellar_tx_hash, transferred_at, notes, created_at
  • Create src/transfers/transfers.module.ts, transfers.service.ts, transfers.controller.ts
  • Implement POST /api/transfers — validate both user IDs exist, call StellarService.anchorHash with a transfer-specific payload, persist the record
  • Implement GET /api/documents/:id/transfers — return the full transfer history for a document
  • Protect both routes with JwtAuthGuard

Acceptance Criteria:

  • A transfer record is created and linked to the document and both users
  • The transfer is anchored on Stellar and the tx hash is persisted
  • Transfer history is returned in chronological order

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions