Hi everyone,
I would like to propose a lightweight extension to NIP-57 (Zaps) to support native, on-chain zaps using the Tari (XTM) network.
Abstract & Design Pivot
Initially, my goal was to avoid modifying the user's profile metadata (Kind 0) altogether. However, after further consideration regarding client complexity, I decided to pivot. Forcing Nostr clients to derive native blockchain addresses directly from an npub would require every client to implement heavy, complex cryptographic libraries for chains like Tari or Sui and handle transaction building manually.
By introducing a structured wallets array to Kind 0 instead, the protocol becomes drastically simpler. Instead of bloating every single Zap Event with raw addresses or URLs, payment capabilities are defined once in the metadata. The client remains an asset-agnostic pipeline that triggers native wallet apps via dynamic deeplink templates, keeping the global relay events incredibly lightweight and preserving on-chain privacy.
Currently, NIP-57 is heavily tailored around Bitcoin Lightning invoices. While Lightning works great, incorporating an alternative, privacy-focused, and highly scalable asset like Tari opens up new possibilities for sovereign Web3 messaging clients—especially because it allows us to eliminate extra metadata.
The Core Advantage: Identity = Wallet
Since Nostr keys (npub / nsec) utilize the Secp256k1 elliptic curve, they can be directly mapped or deterministically converted into native Tari public/private keys.
This means:
- Zero Profile Bloat: Users do not need to add a new custom tag (like
["tari", "..."]) to their Kind 0 metadata. The client can derive the destination payment address directly from the author's native Nostr pubkey.
- One-Key Backup: Backing up the Nostr
nsec automatically backs up the integrated Tari wallet.
- No Third-Party/Custodial Hassle: Clients can embed a Tari light-client SDK directly into the app (e.g., in Rust/Zig) to handle peer-to-peer on-chain transactions directly.
Proposed Protocol Extension
Instead of introducing a brand-new Event Kind, we can gracefully extend the existing NIP-57 flow by introducing two optional tags: asset and tx.
1. Extended Zap Request (Kind 9734)
When a client intends to zap a post via Tari, it creates a standard Kind 9734 event but specifies the asset type and the amount (denominated in Micro-Tari to avoid rounding issues):
{
"id": "...",
"pubkey": "sender_nostr_pubkey_hex",
"created_at": 1781874000,
"kind": 9734,
"tags": [
["p", "recipient_nostr_pubkey_hex"],
["e", "targeted_event_id_hex"],
["relays", "wss://relay.damus.io"],
// Extension Tags:
["asset", "xtm"],
["amount", "5000000"]
],
"content": "Native Tari Zap!",
"sig": "..."
}
2. Extended Zap Receipt (Kind 9735)
Once the integrated client/wallet executes the on-chain transfer to the derived Tari address and broadcasting is complete, a standard Kind 9735 Zap Receipt is published. Instead of a Lightning preimage, it attaches the cryptographic proof from the blockchain (the Tari Transaction ID or Kernel Excess Hash):
{
"id": "...",
"pubkey": "recipient_or_sender_nostr_pubkey_hex",
"created_at": 1781874050,
"kind": 9735,
"tags": [
["p", "recipient_nostr_pubkey_hex"],
["P", "sender_nostr_pubkey_hex"],
["e", "targeted_event_id_hex"],
// Extension Tags:
["asset", "xtm"],
["tx", "tari_tx_id_or_kernel_excess_hex"],
["description", "{\"...expanded_kind_9734_json...\"}"]
],
"content": "",
"sig": "..."
}
Backward Compatibility
This approach is fully backward-compatible. Relays don't need any modifications since they treat it as a standard NIP-57 event. Legacy clients that do not support Tari will simply ignore the unknown asset and tx tags, preventing any breaking behavior, while modern clients can render a seamless "Lightning or Tari" Zap UI.
I am planning to build an experimental proof-of-concept for this inside a custom Rust-based client, but I would love to hear the community's thoughts on the tag naming conventions (asset vs. currency) and the general flow before opening a formal PR.
Looking forward to your feedback!
Hi everyone,
I would like to propose a lightweight extension to NIP-57 (Zaps) to support native, on-chain zaps using the Tari (XTM) network.
Abstract & Design Pivot
Initially, my goal was to avoid modifying the user's profile metadata (Kind 0) altogether. However, after further consideration regarding client complexity, I decided to pivot. Forcing Nostr clients to derive native blockchain addresses directly from an
npubwould require every client to implement heavy, complex cryptographic libraries for chains like Tari or Sui and handle transaction building manually.By introducing a structured
walletsarray to Kind 0 instead, the protocol becomes drastically simpler. Instead of bloating every single Zap Event with raw addresses or URLs, payment capabilities are defined once in the metadata. The client remains an asset-agnostic pipeline that triggers native wallet apps via dynamic deeplink templates, keeping the global relay events incredibly lightweight and preserving on-chain privacy.Currently, NIP-57 is heavily tailored around Bitcoin Lightning invoices. While Lightning works great, incorporating an alternative, privacy-focused, and highly scalable asset like Tari opens up new possibilities for sovereign Web3 messaging clients—especially because it allows us to eliminate extra metadata.
The Core Advantage: Identity = Wallet
Since Nostr keys (
npub/nsec) utilize the Secp256k1 elliptic curve, they can be directly mapped or deterministically converted into native Tari public/private keys.This means:
["tari", "..."]) to their Kind 0 metadata. The client can derive the destination payment address directly from the author's native Nostrpubkey.nsecautomatically backs up the integrated Tari wallet.Proposed Protocol Extension
Instead of introducing a brand-new Event Kind, we can gracefully extend the existing NIP-57 flow by introducing two optional tags:
assetandtx.1. Extended Zap Request (Kind 9734)
When a client intends to zap a post via Tari, it creates a standard Kind 9734 event but specifies the asset type and the amount (denominated in Micro-Tari to avoid rounding issues):
2. Extended Zap Receipt (Kind 9735)
Once the integrated client/wallet executes the on-chain transfer to the derived Tari address and broadcasting is complete, a standard Kind 9735 Zap Receipt is published. Instead of a Lightning preimage, it attaches the cryptographic proof from the blockchain (the Tari Transaction ID or Kernel Excess Hash):
Backward Compatibility
This approach is fully backward-compatible. Relays don't need any modifications since they treat it as a standard NIP-57 event. Legacy clients that do not support Tari will simply ignore the unknown
assetandtxtags, preventing any breaking behavior, while modern clients can render a seamless "Lightning or Tari" Zap UI.I am planning to build an experimental proof-of-concept for this inside a custom Rust-based client, but I would love to hear the community's thoughts on the tag naming conventions (
assetvs.currency) and the general flow before opening a formal PR.Looking forward to your feedback!