Overview
POST /transfer in the Rust verifier is a stub (returns 200 with empty body or a placeholder). Ownership transfer is a key workflow for land documents — when a parcel changes hands, the new ownership must be recorded permanently on the Stellar blockchain.
Background
File: contract/src/lib.rs — transfer_handler() (currently a stub)
Transfer approach on Stellar:
Write a new ManageData entry recording the transfer event:
- Key:
"transfer_" + &hash[..54] (max 64 bytes)
- Value:
{ fromPublicKey, toPublicKey, transferredAt } serialized to bytes
This creates an immutable, ordered record of all transfers. Each call adds a new entry (with a monotonic counter suffix if multiple transfers occur).
Request body:
{
"hash": "sha256hash...",
"fromPublicKey": "GXXX...",
"toPublicKey": "GYYY...",
"reason": "sale"
}
Response: { txHash, ledger, transferredAt }
Acceptance Criteria
Overview
POST /transferin the Rust verifier is a stub (returns200with empty body or a placeholder). Ownership transfer is a key workflow for land documents — when a parcel changes hands, the new ownership must be recorded permanently on the Stellar blockchain.Background
File:
contract/src/lib.rs—transfer_handler()(currently a stub)Transfer approach on Stellar:
Write a new
ManageDataentry recording the transfer event:"transfer_" + &hash[..54](max 64 bytes){ fromPublicKey, toPublicKey, transferredAt }serialized to bytesThis creates an immutable, ordered record of all transfers. Each call adds a new entry (with a monotonic counter suffix if multiple transfers occur).
Request body:
{ "hash": "sha256hash...", "fromPublicKey": "GXXX...", "toPublicKey": "GYYY...", "reason": "sale" }Response:
{ txHash, ledger, transferredAt }Acceptance Criteria
POST /transferwrites a transferManageDataentry on Stellar"transfer_" + hash[:54]{ txHash, ledger, transferredAt }on successGET /verify/:hash/historyreturns all transfer records for this document in chronological order404if the hash has no prior anchor record (cannot transfer what was never anchored)