# Vastgoed Property Profile

Version: **0.1.0-draft**

Status: independent, optional NIP-99 extension proposal. This is not an official Nostr standard, an accepted NIP, a legal compliance specification, or a claim of production interoperability. The proposed registry and illustrative wire generator are in `app/data/property-spec.ts`. This document specifies intended behavior; it does not assert that the current UI, generator, schema, or any consumer implements every rule below.

## 1. Conventions and Scope

The words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY are normative requirements for implementations claiming this draft profile, not new requirements imposed on all NIP-99 clients. SHOULD permits a deliberate, documented exception. Examples and research observations are informative.

The profile adds machine-readable property facts and optional translations to classified listings. Adopting it is optional. A client MUST continue to accept ordinary NIP-99 listings without these extension tags and MUST NOT label them invalid Nostr events merely because profile fields are absent.

This draft covers individual residential, commercial, industrial, and plot offers for sale or rent. It is not an exhaustive taxonomy of real estate, publisher input forms, property rights, financial instruments, or jurisdictional obligations. Values describe the offered scope, which can differ from an entire building or cadastral parcel.

## 2. Nostr and NIP-99 Compatibility

Published listings MUST retain `kind: 30402`. The standard `content` field MUST remain a useful Markdown description, including what is offered and by whom. It MUST NOT be replaced with JSON, a translation map, or an extension-only payload. A generic NIP-99 reader must still have a meaningful default listing.

Standard metadata remains standard metadata: `d`, `title`, `summary`, `published_at`, `t`, `location`, `price`, `status`, `image`, and `g` MUST NOT be renamed into the extension namespace or given incompatible meanings. In particular:

- `d` is the publisher's stable identifier within the addressable event kind.
- `title` and `summary` contain the default-language text; `content` contains its Markdown body.
- `published_at` is the original publication time as a string of Unix seconds, not the timestamp of every edit.
- `t` carries hashtags, such as `real-estate`; it is not a substitute for the structured category.
- `location` is a human-readable public location description.
- `price` remains the NIP-99 amount, currency, and optional recurring frequency.
- `image` remains a standard image tag, with optional dimensions as described in NIP-58.
- NIP-99 recommends standard `status` values `active` or `sold`. Detailed `availability` does not redefine these values. `sold` and `let` are terminal successful dispositions; reservations and offers MUST NOT be represented as completed sales. Other withdrawal workflows need an explicit publisher decision rather than an invented standard status value.

NIP-99 uses `30403` for draft or inactive listings with the same structure. Clients MAY use it for that purpose. A `30403` event is not private storage: publishing it can expose its entire contents. NIP-01 addressable identity includes `(kind, pubkey, d)`. Changing `30402` to `30403`, even with the same author and `d`, creates a different address, not a replacement of the active listing. Clients MUST NOT assume that publishing the inactive kind removes or deactivates the previous active event. Lifecycle handling, links, relay retention, and any deletion requests require a separate explicit workflow; deletion cannot guarantee erasure of public copies.

## 3. Exact Wire Format

All tag elements are JSON strings, including numbers and booleans. New profile publishers MUST emit these exact shapes:

```json
["vastgoed-schema", "0.1.0-draft"]
["vastgoed", "category", "residential"]
["vastgoed", "bedrooms", "3"]
["vastgoed", "garden", "true"]
["vastgoed", "heating", "heat-pump"]
["vastgoed", "heating", "underfloor"]
["vastgoed-language", "en"]
["vastgoed-i18n", "nl-BE", "Huis in Genk", "Een voorbeeldadvertentie", "## Huis in Genk\n\nDit is een voorbeeld, geen echt aanbod."]
```

`["vastgoed-schema", version]` has exactly two elements and declares the profile version. `["vastgoed", key, stringValue]` has exactly three. Keys and enumerated values are case-sensitive. A scalar has one value; a repeatable field uses multiple three-element tags with the same key, never a comma-separated string or JSON array inside a tag.

`["vastgoed-language", language]` has exactly two elements and declares the language of standard `title`, `summary`, and `content`. `language` MUST be a valid BCP 47 language tag, such as `en`, `nl-BE`, or `fr-BE`. Language matching is case-insensitive; publishers SHOULD use conventional BCP 47 casing.

`["vastgoed-i18n", language, title, summary, markdown]` has exactly five elements. It contains a complete alternate presentation in one language, not translated property keys or an alternative property object. The title and Markdown MUST be nonempty; an intentionally absent summary is an empty string, not an omitted slot. Publishers MUST NOT create an alternate entry for the default language. Language and version are not `vastgoed` field keys.

### 3.1 Reading, Duplicates, and Conflicts

Readers MUST preserve the raw signed event separately from any normalized model. They MUST check tag shape and value validity before interpreting a known field. Malformed or unknown tags MUST NOT crash parsing and MUST NOT be coerced into plausible facts. Readers SHOULD expose diagnostics without making an otherwise readable listing disappear.

- Identical duplicate scalar tags MAY collapse into one value in the normalized view only.
- Distinct values for a scalar are a conflict. No first-wins or last-wins value may silently be presented as authoritative. The normalized value MUST remain unresolved pending publisher review.
- Repeatable keys form an ordered collection of distinct values for display. Identical repetitions MAY be collapsed in that view; different repetitions are not a scalar conflict.
- Identical version or default-language declarations MAY collapse in the view. Conflicting versions MUST disable version-specific interpretation until resolved; conflicting default languages MUST disable automatic language selection.
- Translation language identifiers compare case-insensitively. Identical duplicate entries MAY collapse in the view. Different entries for the same language are a conflict and MUST NOT be selected automatically.
- Conflicting standard singleton metadata, especially `d`, `price`, or `title`, MUST be reported rather than silently reconciled by extension values. An ambiguous identity MUST block profile republishing until explicitly resolved.
- Unknown versions, keys, enum values, or tag shapes MUST survive reading and unrelated edits. They MUST NOT be treated as false, zero, or empty known values. A reader MAY show recognized facts provisionally but MUST NOT claim full validation under an unsupported version.

Editors MUST start from the original tag list, not regenerate the whole event from a reduced form model. They MUST retain unknown tags, unknown field values, unrelated standard metadata, and unedited repeat entries without truncation. An edit may replace the explicitly edited known tags after resolving their conflicts. Destructive removal or migration of unsupported data requires explicit publisher approval. If lossless editing cannot be guaranteed, the client MUST offer read-only handling rather than a misleading successful save.

The signed event object is immutable. Normalization, sorting, deduplication, sanitization, translation selection, and display formatting MUST NOT mutate it. NIP-01 hashing and signature verification MUST operate on the original event values. An edit produces a new event with a new timestamp, ID, and signature; an old signature MUST NOT be reused. Preserve the addressable identity for ordinary edits and apply NIP-01 replacement ordering rather than arrival order.

## 4. Scalar Encoding and Units

New publishers MUST use the following canonical encodings. Tolerant readers MAY offer an explicit normalization suggestion for noncanonical input, but MUST NOT change the signed source or hide ambiguity.

| Type | Wire encoding and constraints |
| --- | --- |
| Text | Nonempty Unicode string; no localized sentinel such as `N/A` for unknown facts. Preserve user text and escape it when rendering. |
| Select | Exactly one of the case-sensitive values listed in the registry. |
| Boolean | Exactly `true` or `false`, never `1`, `0`, `yes`, or a JSON boolean tag element. |
| Integer | `0` or an optional minus followed by a nonzero digit and remaining digits; no plus sign, separators, leading zeros, or negative zero. |
| Decimal | Plain base-10 string, e.g. `0`, `6`, `6.25`, `-33.8688`; no exponent, comma, plus sign, leading zeros, trailing fractional zeros, trailing decimal point, NaN, infinity, or negative zero. |
| Date | A real Gregorian calendar date `YYYY-MM-DD`, with four-digit year, zero-padded month and day; no time or timezone. `2024-02-29` is valid; `2025-02-29` is not. |
| URL | Absolute HTTPS URL subject to Section 10; URI syntax alone is insufficient for safe retrieval. |

Unless specified otherwise, numeric fields MUST be nonnegative. `floor` permits negative integers for basements, with ground floor `0`; the proposed normalized schema currently sets its lower bound to `-100`. `latitude` permits `-90` through `90`; `longitude` permits `-180` through `180`. These signed values MUST NOT be rejected by a generic nonnegative numeric rule. Counts and durations are integers, not decimal strings. Positive measurements are preferred where zero would not describe a meaningful physical quantity.

Unknown facts MUST normally be omitted. An explicit `unknown` is allowed only where the registry defines it as a select option. Absence of `garden`, `lift`, or `truck_access` does not mean `false`; an unpublished energy score is not zero. Zero MUST represent a known zero value, not missing information.

Areas use square metres (`m2`); lengths use metres (`m`); energy scores use `kWh/m2/year`; floor load uses `kg/m2`; crane capacity uses `kg`; apparent electrical capacity uses `kVA`; contracted real power uses `kW`; minimum lease uses months. These units are implicit in the key and MUST NOT be appended to its value. Publishers MUST convert source units accurately and MUST NOT interchange kVA with kW or metric tonnes with kilograms without conversion and source review.

Distinct area concepts MUST remain distinct. `living_area`, `usable_area`, `lettable_area`, `gross_area`, and `plot_area` are not synonyms. Belgian living area MUST NOT silently become Dutch NEN 2580 usable area. `measurement_standard` SHOULD identify the source or method. A component area MUST NOT be added twice, and `rate_area` MUST identify the actual priced scope, not whichever area happens to be available.

## 5. Field Registry

All fields below are scalar unless marked repeatable. Conditions govern profile publishing inputs; they do not justify deleting unusual or future fields from received events. Open text vocabularies, including `subtype`, are not closed enums. A field without a category restriction is available across categories where meaningful.

| Group | Keys and types | Conditions / vocabulary |
| --- | --- | --- |
| Identity | `category` select | Required: `residential`, `commercial`, `industrial`, `plot`. |
| Identity | `transaction` select | Required: `sale`, `rent`. |
| Identity | `subtype`, `reference`, `acceptance` text; `available_from` date | Subtype recommended; reference MUST be safe for public disclosure. |
| Identity | `availability` select | `available`, `under-offer`, `reserved`, `sold`, `let`, `withdrawn`. |
| Location | `country` text | Required, assigned uppercase ISO 3166-1 alpha-2 code. A two-letter regex alone does not establish assignment. |
| Location | `region`, `municipality`, `postal_code`, `street`, `house_number`, `unit` text | Public location only; numbers and postal codes remain text. |
| Location | `location_precision` select; `latitude`, `longitude` decimal | Precision: `exact`, `street`, `neighbourhood`, `municipality`. Precision alone is allowed. Supplying either coordinate requires both coordinates and precision; coordinates may be omitted entirely for coarse publication. |
| Price | `price_basis` select | Only `total`; required with standard price. |
| Price | `price_mode` select | `fixed`, `from`, `offers-from`, `on-request`, `auction`. |
| Price | `rate_amount`, `rate_area` decimal | Currency per m2 and m2 respectively; see Section 7. |
| Price | `vat` select | `included`, `excluded`, `exempt`, `unknown`. |
| Price | `sale_costs` text | Sale only; local cost convention, not a universal tax calculation. |
| Price | `deposit`, `service_charges`, `association_fees` decimal; `charges_frequency` select | Listing currency; frequency `month` or `year` for recurring charges. Deposit is not automatically a recurring charge. |
| Rental | `utilities_included` repeatable text; `lease_terms` text | Rent only. |
| Rental | `furnishing` select; `minimum_lease_months` integer; `pets_policy` select | Rent only. Furnishing: `unfurnished`, `part-furnished`, `furnished`. Pets: `allowed`, `by-agreement`, `not-allowed`, `unknown`. |
| Areas | `living_area`, `usable_area`, `lettable_area`, `gross_area`, `plot_area`, `terrace_area`, `garden_area` decimal; `measurement_standard` text | All areas m2; method recommended when area is supplied. |
| Residential | `rooms`, `bedrooms`, `bathrooms`, `toilets` integer | Residential inputs. Counts MUST NOT be inferred from each other. |
| Building | `floor` integer | Residential and commercial; ground `0`, basements negative. |
| Building | `floors`, `construction_year` integer | Residential, commercial, industrial. |
| Building | `renovation_year` integer; `construction_stage`, `condition` select | Stage: `existing`, `new-build`, `off-plan`, `under-construction`. Condition: `new`, `good`, `renovation-needed`, `demolition`, `unknown`. |
| Amenities | `garden`, `terrace`, `balcony`, `lift`, `wheelchair_access`, `pool`, `cellar`, `attic`, `solar_panels`, `heat_pump`, `double_glazing` boolean | Residential and commercial inputs. |
| Amenities | `parking_spaces`, `garage_spaces` integer | Counts, not independent parking-listing categories. |
| Energy | `heating` repeatable text; `energy_scheme`, `energy_label`, `energy_reference` text; `energy_score` decimal; `energy_valid_until` date | Scheme required with label or score, e.g. `BE-VLG-EPC`, `BE-WAL-PEB`, `NL-energylabel`. Labels are scheme-dependent. |
| Business | `office_area`, `retail_area`, `storage_area`, `production_area`, `warehouse_area`, `yard_area` decimal | Commercial and industrial; m2. |
| Business | `frontage` decimal | Commercial and plot; m. |
| Business | `occupancy` select | `vacant`, `owner-occupied`, `tenanted`, `part-tenanted`, `unknown`. |
| Business | `annual_rental_income` decimal | Commercial or industrial sale; listing currency/year, not the asking price. |
| Industrial | `clear_height`, `floor_load`, `power_capacity`, `contracted_power`, `crane_capacity` decimal | Industrial; m, kg/m2, kVA, kW, kg respectively. |
| Industrial | `loading_docks`, `overhead_doors` integer; `truck_access` boolean; `environmental_class` text | Industrial. Environmental classes require jurisdictional context. |
| Planning | `permitted_use` repeatable text | Do not infer legal permission from current physical use. |
| Regional disclosures | `zoning`, `planning_authority`, `cadastral_reference`, `tenure`, `easements`, `building_permit`, `subdivision_permit`, `preemption_right`, `heritage_status`, `soil_status`, `flood_risk`, `flood_p_score`, `flood_g_score`, `asbestos_status`, `electrical_inspection`, `renovation_obligation` text | Jurisdiction-dependent; do not reduce these nuanced facts to booleans. |
| Plot | `buildable_area`, `maximum_footprint` decimal | Plot; m2. Neither implies an approved permit. |
| Plot | `plot_depth`, `building_depth`, `maximum_height` decimal | Plot; m. |
| Plot | `utilities` repeatable text; `road_access` text | Plot; physical availability is not proof of legal connection or access rights. |
| Media | `floor_plan`, `video`, `virtual_tour`, `brochure` repeatable URL | HTTPS public resources; images remain standard `image` tags. |
| Contact | `contact_url` URL | Public publisher contact page; no implied verification of ownership or agency authority. |

Illustrative subtype vocabulary from the proposed registry:

- Residential: `house`, `apartment`, `studio`, `villa`, `penthouse`, `duplex`, `bungalow`, `farmhouse`, `castle`, `chalet`, `static-caravan`, `student-room`, `service-flat`, `holiday-home`, `houseboat`, `apartment-block`, `other`.
- Commercial: `office`, `retail`, `hospitality`, `practice`, `mixed-use`, `hotel`, `leisure`, `care`, `education`, `other`.
- Industrial: `warehouse`, `production`, `logistics`, `workshop`, `business-unit`, `outdoor-storage`, `other`.
- Plot: `building-land`, `agricultural`, `industrial-land`, `woodland`, `recreational`, `other`.

These are suggestions, not exhaustive allowed values. Mixed-use offers SHOULD select a meaningful primary category and describe the combination, without duplicating scalar `category`. New-build is a construction stage, not a fifth category. Multi-unit developments, independently offered parking/garages, fractional interests, and portfolios need further modeling; this draft MUST NOT be advertised as complete coverage for them. If none of the four categories is truthful, a publisher SHOULD use plain NIP-99 or await an explicit profile revision rather than falsify the category. Future category additions require version-aware handling.

## 6. Publishing Requirements and Validation Layers

A newly published event claiming this profile MUST have an unambiguous schema declaration, nonempty `d`, nonempty standard `title`, meaningful Markdown `content`, one `vastgoed-language`, and valid `category`, `transaction`, and `country`. Summary, original publication time, public location, images where available, and relevant hashtags SHOULD be supplied in their standard forms. Missing required profile fields prevent a claim of profile conformance, not signature verification or generic NIP-99 display.

Conditional requirements are independent of whether the normalized schema can express them:

- Coordinates require both latitude and longitude and `location_precision`.
- Energy label or score requires `energy_scheme`; a scheme MUST NOT be guessed solely from the language of the advertisement.
- A standard price requires `price_basis=total`, a valid amount and currency, and a rental recurrence when `transaction=rent`.
- `rate_amount` requires a positive `rate_area` and the standard total price, with matching currency and recurrence semantics.
- Currency-valued supplemental fields require an unambiguous standard listing currency. This draft has no independent supplemental currency tag. If an on-request listing has no standard price, such fields MUST be omitted from structured data rather than assigned a guessed currency; explanatory Markdown MAY retain appropriately labeled information.
- Recurring service charges or association fees require `charges_frequency`. It does not redefine the rental frequency in standard `price`.
- Category and transaction-specific input controls MUST follow the registry conditions. Changing either MUST prompt review of incompatible values, not silently discard them or reinterpret their meaning.

The proposed JSON Schema is for a **normalized field-value object only**, for example:

```json
{
  "category": "residential",
  "transaction": "rent",
  "country": "BE",
  "bedrooms": 3,
  "garden": true,
  "heating": ["heat-pump", "underfloor"]
}
```

It is not a schema for signed Nostr events, tag arrays, translations, or NIP-99 metadata. Numeric and boolean JSON values exist only after decoding the wire strings. `additionalProperties: true` enables forward-compatible values; it does not authorize emitting unregistered meanings as if standardized. JSON Schema date formats may need explicit validator configuration. Decimal arithmetic MUST retain exact string/decimal precision rather than rely on lossy JSON number round-tripping.

Schema success alone does not validate canonical wire encoding, conflicting tags, signatures, title/body/language, category applicability, currencies, price arithmetic, privacy, translation accuracy, source truth, or legal compliance. Implementations MUST validate those separately.

Jurisdiction-specific advertising duties, including energy, planning, flood, asbestos, electrical, rental, tax, consumer, and agency disclosures, MUST be reviewed against current applicable law. This profile's optional fields do not waive mandatory disclosures. Neither registry inclusion nor a passing schema proves that an offer can lawfully be published.

## 7. Prices and Area-Based Rates

The standard `price` MUST always be the total amount for the offered scope. A sale ordinarily uses `["price", "395000", "EUR"]`; rent uses, for example, `["price", "1500", "EUR", "month"]`. Rental frequency MUST be explicit in profile publishing. Frequency values SHOULD follow NIP-99 noun forms such as `month` or `year`.

Currency occupies its own standard slot. It MUST NOT be `EUR/m2`, `EUR/m2/year`, or another compound per-area currency. Per-area pricing is supplemental:

```json
[
  ["price", "174800", "EUR", "year"],
  ["vastgoed", "price_basis", "total"],
  ["vastgoed", "rate_amount", "46"],
  ["vastgoed", "rate_area", "3800"]
]
```

Here `46` means EUR per m2 per year, because it inherits both currency and recurrence from `price`. The total is `rate_amount * rate_area`, rounded once to the currency's minor unit. Publishers MUST use exact decimal arithmetic with round-half-up for this draft, not binary floating-point or intermediate rounding. For EUR, `12.345 * 10 = 123.45`, and `1.005 * 1` rounds to `1.01`. Currency minor-unit precision MUST come from a maintained currency definition; it MUST NOT be assumed to be two digits for every currency. Unsupported ISO-like asset precision requires an explicit application policy before computation, not a guess.

Where both total and rate are supplied, they MUST agree after this rounding and refer to the same scope, tax treatment, and rental period. A yearly rate MUST NOT accompany a monthly total as though their periods matched. Separate component tariffs, discounts, stepped rents, or approximate quoted areas can make this simple relation invalid. In that case the publisher MUST resolve the scope or omit the structured rate pair and explain the terms in Markdown; a reader MUST show a mismatch warning, not silently replace the signed total.

`price_mode=from` or `offers-from` qualifies the displayed total threshold; it does not turn a rate into a total. An auction price MUST NOT be fabricated from an unknown reserve or a zero placeholder. If no meaningful amount is public, omit standard `price` and explain the auction terms in Markdown.

For `price_mode=on-request`, publishers MUST omit `price`, MUST NOT emit a zero price, and MUST omit `price_basis` and the rate pair. An absent amount is not a free offer. NIP-99 says standard metadata, including `price`, SHOULD be included; on-request and an auction without a public amount are deliberate exceptions to that guidance, not a claim that NIP-99 prohibits omission. Readers MUST display the absence honestly rather than substitute `0` or sort it as a zero-cost offer.

Deposits, recurring charges, annual rental income, VAT treatment, and local sale cost conventions MUST remain distinguishable from the base asking total. Currency and period labels MUST be visible. A price arithmetic check does not verify taxes, fees, or legal accuracy.

## 8. Languages and Translation Review

The default language describes the standard title, summary, and content. Structured facts are shared across languages, never independently translated amounts, units, enums, addresses, or booleans. A translation MUST NOT override structured facts.

Readers MUST choose one complete presentation bundle, not mix the title from one language with another language's summary or body. After rejecting malformed or conflicted translation entries, selection for a requested BCP 47 language is:

1. Use an exact case-insensitive match. The default bundle is also a candidate when its language matches exactly.
2. Otherwise use a shared primary-language match, e.g. `nl-NL` to `nl-BE`. Prefer a bare primary-language entry, then a matching default bundle, then the first eligible translation in event tag order. A base-language fallback MUST be labeled with the actual selected language, not passed off as an exact locale translation.
3. Otherwise use the standard default title, summary, and Markdown content.

Readers MUST NOT guess a default language from `country`. If the declaration is missing or conflicted, generic display MAY still show standard text, with language unresolved. A conflicted translation MUST fall back through the remaining eligible candidates, never win by arbitrary duplicate order.

Translations SHOULD preserve substantive disclosures, conditions, and qualifiers, not merely marketing prose. Publishers remain responsible for their accuracy. When default title, summary, or Markdown changes, the editor MUST mark all existing translations as needing source review in local editing state and show which default source changed. Changes to shared facts that affect translated prose SHOULD trigger the same review.

Before publishing the edited event, the editor MUST require revalidation of each retained translation against the current default source, or clear the unvalidated translation tags from the new event with explicit publisher confirmation. It MUST NOT silently retain translations known to be stale, copy default text into every language, relabel languages, or claim that automatic synchronization has validated accuracy. Machine translation MAY assist review but MUST NOT be presented as publisher-validated without that review. The previous signed event remains unchanged.

This draft defines no translation review timestamp, source hash, machine-translation marker, or other optional translation metadata on the wire. Implementations MUST NOT invent such tags and call them part of version `0.1.0-draft`. Local review state cannot prove the freshness of an independently received translation; readers SHOULD avoid claims of certified freshness.

## 9. Location, Geohashes, and Privacy

Coordinates are public WGS84 latitude/longitude decimal degrees. They MUST be a pair with a truthful `location_precision`. Approximate coordinates represent a deliberately public point or area reference, not a secretly retained exact location disguised by a label. Readers SHOULD show an area rather than an exact property pin for approximate publication.

NIP-01 relay filtering for a single-letter tag such as `g` uses exact tag-value matching, not an implicit geohash prefix search. To support several search resolutions, publishers SHOULD emit permitted prefixes explicitly:

```json
[ ["g", "u"], ["g", "u1"], ["g", "u15"] ]
```

A filter `{"kinds":[30402],"#g":["u15"]}` can match the explicit `u15` tag; a listing with only `u15abc` is not guaranteed to match it. Publishers MUST NOT emit a geohash more precise than their intended public disclosure. Geohashes and coordinates, when both present, MUST describe the same public location. Multi-letter extension tags have no NIP-01 guarantee of relay indexing; consumers MUST NOT assume `#vastgoed` filters work universally.

Privacy applies to the whole event and linked media. If an address is withheld, publishers MUST NOT leak a finer location through street/house/unit tags, Markdown or translations, exact coordinate decimals, longer geohashes, map URLs, cadastral references, image filenames, floor plans, brochure text, or embedded EXIF/GPS metadata. Merely hiding a field in the UI is not withholding it from the public event. Media SHOULD be reviewed and identifying metadata removed before upload. A coarse `location_precision` label cannot undo a precise address or image disclosure. Public signatures and relay copies make later retraction unreliable.

## 10. Images, Media, and Untrusted Content

NIP-99 recommends standard `image` tags using NIP-58's URL and optional dimension convention:

```json
["image", "https://vastgoed.org/images/brick-house.webp", "1672x941"]
```

Dimensions, when present, MUST be positive integer pixel width, lowercase `x`, then height. They are hints, not trusted evidence about the downloaded resource. This adopts the image tag shape only, not NIP-58's badge-specific image size or aspect-ratio recommendations. Multiple standard image tags MAY form a gallery in tag order. Floor plans, videos, tours, and brochures use their repeatable extension URL keys, not invented replacements for `image`.

All new media and contact URLs in this profile MUST be HTTPS. Imported non-HTTPS or unsafe links MUST remain available in the raw event but MUST NOT be automatically loaded. Renderers MUST sanitize default and translated Markdown, escape plain text, reject executable URL schemes, and prevent scripts, event handlers, and unsafe raw HTML. External links SHOULD use appropriate opener/referrer protections. Tours and video embeds MUST NOT gain unrestricted script execution in the host origin.

Remote fetching, previews, scraping, oEmbed discovery, and document extraction MUST be opt-in rather than triggered simply by receiving an event. Publishers and viewers SHOULD be warned about IP disclosure and tracking. A server-side proxy is not inherently safe: it MUST prevent SSRF by checking destinations and every redirect, blocking loopback, private, link-local, reserved/internal destinations and cloud metadata services, restricting ports and protocols, and defending against DNS rebinding. Fetchers MUST enforce time, redirect, byte, content-type, and decompression limits, and MUST NOT forward private cookies or credentials. Client-side loading also requires a privacy decision; HTTPS alone does not make content safe or trustworthy.

## 11. Research and Evidence Matrix

The sources below motivate fields; they are not normative authority for this profile except where an explicit NIP requirement is identified. Listing pages are mutable and may disappear. The registry records a limited public-page investigation, not an audit of private publisher forms, APIs, exports, or all required inputs. A field marked `proposal` is a design proposal, not proof that a named portal supports it.

| Source | Public reference | Evidence and limits |
| --- | --- | --- |
| NIP-99 | [Classified listings](https://github.com/nostr-protocol/nips/blob/master/99.md) | Accessible protocol reference: `30402`, `30403`, Markdown, recommended metadata, recurring prices, images, geohash. NIP itself is draft/optional. |
| NIP-01 | [Events, identity, signatures, filters](https://github.com/nostr-protocol/nips/blob/master/01.md) | Protocol basis for string tag arrays, event hashing, addressable identity/replacement, and exact single-letter tag filters. |
| NIP-58 | [Image tag convention](https://github.com/nostr-protocol/nips/blob/master/58.md) | Accessible definition of image URL and optional `widthxheight`; badge rules are not property rules. |
| Immoweb sale | [House in Lier](https://www.immoweb.be/en/classified/house/for-sale/lier/2500/22030009) | Registry records public observation of bedrooms, bathrooms, living/plot area, tour, and regional disclosures, some in prose. No private form verification. |
| Immoweb rent | [Apartment in Antwerpen](https://www.immoweb.be/en/classified/apartment/for-rent/antwerpen-2018/2018/22030001) | Registry records monthly rent, floor, furnishing, utilities, lease duration, deposit, and pets policy; prose is not proof of a structured portal input. |
| Immoweb plot | [Building land in Wielsbeke](https://www.immoweb.be/en/classified/building-land/for-sale/wielsbeke/8710/22030004) | Registry records plot area, area rate, maximum footprint, and building depths. Legal/tax claims are not adopted. |
| Funda in Business | [De Groote Heeze 37, Heijen](https://www.fundainbusiness.nl/bedrijfshal/heijen/object-44529374-de-groote-heeze-37/) | Accessible public listing confirms EUR/m2/year, office/hall/plot areas, year, floors, label, power, cranes, doors, environmental class, and conflicting clear heights. |
| Funda residential | [Homepage](https://www.funda.nl/) | Registry records homepage inspection, but residential search returned HTTP 403. No exhaustive residential coverage claim. |
| Zimmo | [Public site](https://www.zimmo.be/nl/) | Registry records homepage, search, and blog requests blocked with HTTP 403. Verification remains outstanding; no Zimmo field parity is claimed. |
| Publisher inputs | No authenticated forms or private exports audited | Obtain authorized screenshots, export documentation, and representative category/transaction examples before claiming parity. Do not infer unpublished requirements from public cards. |

The Heijen commercial/industrial listing is a concrete conflict case: its description says approximately **4 m** clear height while its characteristics table says **40 m**. An importer MUST NOT silently choose the structured table, choose the more plausible prose, average them, or publish both as duplicate scalar values. It MUST preserve the source conflict for review and leave normalized `clear_height` unresolved until an authorized publisher confirms the value. Review notes may stay local; this draft defines no source-conflict metadata tag. The same discipline applies to rates, areas, units, and energy figures.

## 12. Illustrative Wire Event

This unsigned body illustrates the same conventions as the registry generator. It is not a real offer and is not publishable until the publisher supplies the normal NIP-01 event fields, calculates its ID, and signs it. Coordinates are deliberately omitted; the geohashes are coarse public search cells, not an exact address.

```json
{
  "kind": 30402,
  "created_at": 1796083200,
  "content": "## House with garden in Genk\n\nIllustrative sale listing. Contact the publisher to verify the details. This is not a real offer.",
  "tags": [
    ["d", "example-genk-001"],
    ["title", "House with garden in Genk"],
    ["summary", "An illustrative property listing"],
    ["published_at", "1796083200"],
    ["t", "real-estate"],
    ["location", "Genk, Limburg, BE"],
    ["price", "395000", "EUR"],
    ["status", "active"],
    ["image", "https://vastgoed.org/images/brick-house.webp", "1672x941"],
    ["g", "u"],
    ["g", "u1"],
    ["g", "u15"],
    ["vastgoed-schema", "0.1.0-draft"],
    ["vastgoed-language", "en"],
    ["vastgoed", "category", "residential"],
    ["vastgoed", "subtype", "house"],
    ["vastgoed", "transaction", "sale"],
    ["vastgoed", "country", "BE"],
    ["vastgoed", "availability", "available"],
    ["vastgoed", "price_basis", "total"],
    ["vastgoed", "location_precision", "municipality"],
    ["vastgoed", "living_area", "140"],
    ["vastgoed", "bedrooms", "3"],
    ["vastgoed", "bathrooms", "1"],
    ["vastgoed", "garden", "true"],
    ["vastgoed", "contact_url", "https://vastgoed.org/contact"],
    ["vastgoed-i18n", "nl-BE", "Vastgoed in Genk", "Een voorbeeldadvertentie", "## Vastgoed in Genk\n\nDit is een voorbeeld, geen echt aanbod. Controleer de gegevens bij de uitgever."],
    ["vastgoed-i18n", "fr-BE", "Bien immobilier à Genk", "Une annonce illustrative", "## Bien immobilier à Genk\n\nCeci est un exemple, pas une offre réelle. Vérifiez les informations auprès de l'annonceur."]
  ]
}
```

## 13. Integration Checklist for vastgoed.net

This is an implementation and verification checklist, not a statement that vastgoed.net or this repository has passed it.

- Keep generic `30402` display functional without any extension tags; display default Markdown and standard metadata first.
- Verify NIP-01 signatures against unmodified events and store raw events separately from normalized fields and editing state.
- Implement version negotiation, strict tag-shape parsing, diagnostics, scalar conflicts, repeatable values, and unknown-data preservation.
- Separate normalized schema validation from event, publication, semantic, legal, privacy, and security validation.
- Use category/transaction conditions for inputs without silently stripping imported unsupported data or future categories.
- Implement exact decimal amounts, currency precision, total/rate checks, recurring labels, and honest on-request presentation.
- Implement complete-bundle language fallback, actual-language labels, and source-review requirements before retaining translations after edits.
- Preserve `kind`, author, and `d` for ordinary updates; explicitly handle the separate `30403` address and old active publication.
- Index profile facts in the application where necessary; do not depend on unsupported multi-letter relay filters or implicit geohash prefix matching.
- Review disclosure precision across tags, prose, all translations, images, and document metadata before signing.
- Sanitize rendered text/Markdown and require opt-in remote media handling with appropriate client privacy and server SSRF controls.
- Run compatibility vectors below against plain readers, profile readers, import/edit/export, and relay search paths before making interoperability claims. UI implementation and executable testing are separate integration work.

## 14. Compatibility Vectors

These are specified expected outcomes, not reports of executed tests. Tag snippets apply to an otherwise appropriate fixture; malformed profile data does not by itself invalidate a valid Nostr signature.

| Vector | Input / action | Required outcome |
| --- | --- | --- |
| Plain NIP-99 | `30402`, Markdown, standard tags, no `vastgoed-*` | Meaningful generic display; no extension conformance claim or profile-required-field rejection. |
| Extended round trip | Illustrative event plus an unknown `['vendor-data','keep','all','positions']` tag | Standard reader still has useful title/body/price; profile edit preserves unknown tag exactly. |
| Unknown field/version | `['vastgoed','future_metric','17']` or unsupported schema version | Preserve data, do not infer semantics, disclose unsupported validation. |
| Scalar duplicate | Two `bedrooms=3` tags | One normalized value allowed, unchanged raw event. |
| Scalar conflict | `bedrooms=3` and `bedrooms=4` | Unresolved value and visible diagnostic; explicit resolution before profile publishing. |
| Repeat | `heating=heat-pump`, `heating=underfloor`, repeated `heat-pump` | Two distinct normalized entries permitted, not a scalar conflict or comma-joined wire value. |
| String types | Tag element `true` rather than `"true"`, or `"yes"` | Not a valid boolean field encoding; no silent truthy coercion. |
| Missing boolean | No `garden` | Unknown, not `false`; unrelated edit does not add `false`. |
| Signed numbers | `floor=-1`, `latitude=-33.8688`, `longitude=151.2093`, precision provided | Accept within bounds; do not clamp to zero. |
| Invalid numbers | `"01"`, `"1e3"`, `"1,5"`, `"-0"`, negative area, latitude `91` | Reject for new profile publishing; preserve imported raw values with diagnostics. |
| Dates | `2024-02-29` / `2025-02-29` | Accept / reject calendar validity respectively. |
| Language exact | Request `fr-BE` with its valid translation | Select its title, summary, and Markdown together. |
| Language base | Request `nl-NL`, only `nl-BE` alternate | Select `nl-BE` bundle and identify actual language. |
| Language default | Request `de`, default `en`, only `nl-BE` and `fr-BE` alternates | Use all standard default text. |
| Translation conflict | Different entries for `nl-BE` and `NL-be` | Do not silently choose either; diagnose and fall back. |
| Source edit | Change default description while translations exist | Mark for local source review; revalidate retained entries or explicitly clear them before publishing. No invented wire review tag. |
| Area rate | EUR/year total `174800`, rate `46`, area `3800` | Valid exact product; display both total/year and rate/m2/year. |
| Rounding | EUR rate `1.005`, area `1`, total `1.01` | Valid round-half-up at EUR minor-unit precision. |
| Rate mismatch | Total `1500` EUR/month with an unconverted yearly rate | Diagnostic and blocked new profile publication until corrected or rate omitted. |
| Compound currency | `['price','46','EUR/m2/year']` | Not a profile total price; no silent currency/period inference. |
| On request | `price_mode=on-request`, no price | Display on request, not zero; no rate or currency-valued supplement without currency context. |
| Price conflict | Two different standard prices | No silent cheapest/first/last selection for structured profile presentation. |
| Coarse search | Explicit `g=u`, `g=u1`, `g=u15`; filter `#g=['u15']` | Exact tag match supported; only `g=u15abc` does not imply a match. |
| Privacy | Municipality label but exact hidden street/coordinates or EXIF | Fail publisher privacy review; hiding fields visually is insufficient. |
| Image dimensions | Standard HTTPS image with `1672x941` | Read dimension hint; do not impose badge square sizing. |
| Unsafe media | Markdown script, `javascript:` link, private-network media target | No execution or automatic fetch; preserve raw event separately. |
| Source inconsistency | Heijen clear height 4 m in prose, 40 m in characteristics | Keep unresolved and request publisher confirmation; no plausibility-based silent correction. |
| Category change | Residential to plot with bedroom/amenity values | Prompt explicit review; no silent data loss or false reinterpretation. |
| Kind transition | Same author and `d`, change `30402` to `30403` | New address; previous active listing not assumed replaced or erased. |
| Signature integrity | Display normalization or translation selection | Original event ID/signature verification unchanged; edits require a fresh signature. |

## 15. Draft Evolution

Publishers MUST emit the version they actually implement. Readers SHOULD expose unsupported versions without suppressing the ordinary NIP-99 listing. Future revisions may refine taxonomy, legal mappings, measurement methods, lifecycle workflows, and translation provenance, but none is implicitly defined here. Any future migration MUST preserve original signed events and explicitly review semantic changes rather than silently rewriting public facts.
