-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Description:
Implement a POST /transfer endpoint that anchors an ownership transfer event for a land document on the Stellar blockchain. This creates an auditable, on-chain record of a change in land ownership.
Requirements:
- Add a
TransferRequeststruct:pub struct TransferRequest { pub document_hash: String, pub from_owner: String, pub to_owner: String, pub transfer_date: String, // ISO 8601 date string pub transfer_reference: String, // legal reference number }
- Compute a transfer event hash:
SHA-256(document_hash + from_owner + to_owner + transfer_date) - Anchor this transfer hash to Stellar with memo prefix
TRANSFER:<transfer_hash>(truncated) - Store the full transfer record in a new Redis key
transfer:<document_hash>as a JSON array (append each transfer to the array) - Add a
GET /transfer/:document_hashendpoint to retrieve the transfer history from Redis
Acceptance Criteria:
- Transfer hash is deterministic for the same inputs
- Multiple transfers for the same document are all stored and retrievable
- Unit tests for the transfer hash computation
- Returns
400iftransfer_dateis not a valid ISO 8601 date
Reactions are currently unavailable