# community.gifthood.exchange

> Published by [gifthood.community](https://lexicon.garden/identity/did:plc:7prvtl4j6wsfmkrfrnwknuxj)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7prvtl4j6wsfmkrfrnwknuxj/community.gifthood.exchange)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7prvtl4j6wsfmkrfrnwknuxj/community.gifthood.exchange/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7prvtl4j6wsfmkrfrnwknuxj/community.gifthood.exchange/examples)

## Definitions

### `community.gifthood.exchange`

**Type**: `record`

The listing owner's attestation of an exchange: who was chosen to give/receive the listed gift, and when it was completed. The counterparty attests via community.gifthood.exchangeResponse; a mutually confirmed pair is follow-through evidence. Public, like the interest record.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `giver` | `string` (did) | Yes | DID of the member giving the item. Exactly one of giver/receiver is the record author (the listing owner): on an offer listing the author is the giver; on a request listing the author is the receiver. |
| `subject` | `ref` → `com.atproto.repo.strongRef` | Yes | Strong reference (URI + CID) to the listing this exchange is for. Must be a listing authored by this record's author. |
| `interest` | `ref` → `com.atproto.repo.strongRef` | No | Optional strong reference to the counterparty's interest record, when they raised a hand. Absent when the counterparty was chosen from a listing-scoped conversation. |
| `receiver` | `string` (did) | Yes | DID of the member receiving the item. |
| `createdAt` | `string` (datetime) | Yes |  |
| `returnedAt` | `string` (datetime) | No | Set (via record update) by the owner when a lent item comes home. Only meaningful when the subject listing has mode 'lend'; indexers ignore it on gift exchanges and ignore a returnedAt without completedAt (an item cannot come back before it was handed over). Owner-attested only — the mutual response pair already attests the handover; disputes go through reporting. |
| `completedAt` | `string` (datetime) | No | Set (via record update) when the owner marks the gift complete — the item handed over or the service rendered. Absence means the exchange is still pending. |

## Raw Schema

```json
{
  "id": "community.gifthood.exchange",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "subject",
          "giver",
          "receiver",
          "createdAt"
        ],
        "properties": {
          "giver": {
            "type": "string",
            "format": "did",
            "description": "DID of the member giving the item. Exactly one of giver/receiver is the record author (the listing owner): on an offer listing the author is the giver; on a request listing the author is the receiver."
          },
          "subject": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "Strong reference (URI + CID) to the listing this exchange is for. Must be a listing authored by this record's author."
          },
          "interest": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "Optional strong reference to the counterparty's interest record, when they raised a hand. Absent when the counterparty was chosen from a listing-scoped conversation."
          },
          "receiver": {
            "type": "string",
            "format": "did",
            "description": "DID of the member receiving the item."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "returnedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Set (via record update) by the owner when a lent item comes home. Only meaningful when the subject listing has mode 'lend'; indexers ignore it on gift exchanges and ignore a returnedAt without completedAt (an item cannot come back before it was handed over). Owner-attested only — the mutual response pair already attests the handover; disputes go through reporting."
          },
          "completedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Set (via record update) when the owner marks the gift complete — the item handed over or the service rendered. Absence means the exchange is still pending."
          }
        }
      },
      "description": "The listing owner's attestation of an exchange: who was chosen to give/receive the listed gift, and when it was completed. The counterparty attests via community.gifthood.exchangeResponse; a mutually confirmed pair is follow-through evidence. Public, like the interest record."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
