Skip to content

Conversation

NOVMBILL
Copy link

@NOVMBILL NOVMBILL commented Aug 6, 2025

Summary

This pull request introduces several extensions and refinements to the NIP-15 event schema to enable expanded payment support, add bond mechanics, simplify privacy, and deprecate fiat-specific and plaintext address fields. All changes are implemented to optimize for sovereign payment flows and increase marketplace trust.


Changes Introduced

  1. Add payment_options array (ln, cashu, silent_payment) to stall and product event content

    • Replaces the previous payment_methods string array with a structured array of supported payment types.
    • Enables future extension for additional payment protocols.
    • Payment types now explicitly support:
      • ln (Lightning Network)
      • cashu (ecash/Chaumian tokens)
      • silent_payment (Bitcoin silent payment addresses)
    • Example:
      "payment_options": [
        {"type": "ln"},
        {"type": "cashu"},
        {"type": "silent_payment"}
      ]
  2. Introduce bond event kind 30330

    • New event kind to represent merchant/stall bonds for increased trust.
    • Event content format:
      {
        "bond_txid": "...",
        "amount": ...
      }
    • Event tags must include the merchant public key:
      ["p", "<merchant_pubkey>"]
    • Products or stalls referencing a bond event must include:
      ["e", "<bond_event_id>", "bond"]
  3. Update product, stall, and order event schemas

    • Embed new payment_options array in product and stall metadata.
    • All fiat-specific fields are removed or marked as optional (for backward compatibility, only Lightning/Bitcoin-native payments are required going forward).
    • Plaintext address field is removed. Instead, include privacy-preserving pickup fields:
      {
        "pickup_code": "...",
        "pickup_radius": "..."
      }
    • Order events (checkout flow) now use pickup_code and pickup_radius instead of plaintext address for customer privacy.
  4. Clarify event tags and UI badge logic

    • Document required e tags referencing bond events in product/stall listings.
    • Specify that client UIs should render a “bond badge” or visual trust marker when this tag is present.
    • See inline doc for format and logic.
  5. Spec text updated for all changes above

    • All relevant code blocks, tables, and field descriptions are updated to reflect the new event schema, with clear deprecation notes for removed fields and expanded examples for new types.

Implementation / Compatibility

  • This PR is self-contained and does not modify other NIPs.
  • No breaking changes for existing Lightning/Bitcoin workflows; changes are additive and privacy-preserving.
  • Companion PR to reference client implementation (NostrMarket) will ensure UI compatibility with new schema and badge logic.

Motivation

  • Expand NIP-15 payment interoperability (Cashu, silent payments).
  • Enable trust primitives via on-chain bonds.
  • Remove fiat/payment and address leakage.
  • Clarify event tag structure for UI integration.

Example Data

Bond Event (kind 30330)

{
  "kind": 30330,
  "pubkey": "merchant_pubkey_here",
  "content": "{\"bond_txid\":\"deadbeef...\",\"amount\":1234}",
  "tags": [
    ["p", "merchant_pubkey_here"]
  ]
}

Product Event referencing Bond

{
  "kind": 30315,
  "pubkey": "merchant_pubkey_here",
  "content": "{\"title\":\"Coffee\",\"payment_options\":[{\"type\":\"cashu\"}]}",
  "tags": [
    ["e", "<bond_event_id>", "bond"]
  ]
}

Order Event (with privacy fields)

{
  "pickup_code": "FJ7U29",
  "pickup_radius": "200m"
}

";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant