Hey Nostriches,

Looing for help!

What's the best way to Zap a url?

As part of https://nostr-components.web.app, we are building a zap buttons, that can be embedded in any website.

Think each wordpress post (or any url), gets a zap button.

Looking for some thoughts on what's the right way to do this?

1. Nip-57 says add a #e tag to tag to a event, rather than a person. (Says nothing about external URL)

Combine this with Nip-73 event, that refers to the url using #i tag and #k tag (web)

So for first zap to a URL, I create a Nip-73 event with the url in #i tag and zap to that event.

2. As Nip-24 suggest, just add a #r tag directly to the Zap event (kind: 9734) Looks much simpler.

3. Or is there any better way?

Thanks!

Tagging (/spamming) people for reach :-)

nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3vamnwvaz7tmwdaehgun9d35hgetn9ehhyee0qqsvyxc6dndjglxtmyudevttzkj05wpdqrla0vfdtja669e2pn2dzuq5zt4j7 nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq36amnwvaz7tmwdaehgu3wvf5hgcm0d9hx2u3wwdhkx6tpdshsqgp57x42dv2s3hst4vlssmzt6kaa0dg0skv528rwdzkf2h7gxm3u6c0nppvv nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3zamnwvaz7tmwdaehgu3wwa5kuef0qqsyda4vm7gxgg6pytaqsr6anmmf2u7hjyzguze9vcc03tefvvcmdecr8q8t8 nostr:nprofile1qy08wumn8ghj7mn0wd68yttsw43zuam9d3kx7unyv4ezumn9wshsz8thwden5te0dehhxarj94ex2mrp0yh8wmrkwvh8xurpvdjj7qpqtql9ag08agns8t4ws24e6z6tuqsx5fqtmppulkvp8nsshdzwllws4vp8ny nostr:nprofile1qyxhwumn8ghj7mn0wvhxcmmvqy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsqg86ekh3ee6chhcyehc6r73j5dty5cydf27zfqdzsmluz78cd9f77qk2u0uq nostr:nprofile1qythwumn8ghj7ct5d3shxtnwdaehgu3wd3skuep0qyt8wumn8ghj7etyv4hzumn0wd68ytnvv9hxgtcqypzfcy8y73q05sz3ksujhawqywgsscle7h93sy48z4mv88q2wav8q794s55 nostr:nprofile1qyv8wumn8ghj7ct59ehx7um5wfmk7untwvhxxmmd9uq3vamnwvaz7tm9v3jkutnwdaehgu3wd3skuep0qqspmy3tyzdtr8y0vh64tskdrr363w0cf0pvxpenqt2eqy6pds7s2zqzkan62 nostr:nprofile1qyt8wumn8ghj7etyv4hzumn0wd68ytnvv9hxgtcppemhxue69uhkummn9ekx7mp0qqs8mugqfd2rlwv28t3pwt5t902mvay0p7tnhueedl27v0e4d42mjrqxcxvj5

#asknostr #needhelp

Reply to this note

Please Login to reply.

Discussion

Approach 2 is leaner, but tags don't mean the same thing across event kinds, so using `r` tags might not be a good idea

Some event kinds are always anchored to other things like comments. That's why NIP-22 was created.

Here is an example of a comment on a URL from NIP-22

{

"kind": 1111,

"content": "Nice article!",

"tags": [

// referencing the root url

["I", "https://abc.com/articles/1"],

// the root "kind": for an url, the kind is its domain

["K", "https://abc.com"],

// the parent reference (same as root for top-level comments)

["i", "https://abc.com/articles/1"],

// the parent "kind": for an url, the kind is its domain

["k", "https://abc.com"]

]

// other fields

}

Considering zap requests and receipts are also anchored to other events, maybe you can use the K, E, A, I, k, e, a, i tags with the zap event kinds?

Good one. Thanks for sharing this, Basanta.

Also found that Nip-25 uses a kind 17 for reactions and to react to external URLs, the URL is tagged using #r

https://github.com/nostr-protocol/nips/blob/master/25.md#reactions-to-a-website

Lets me try to post this in Nostr TG to get more inputs ✌🏽

It doesn't matter just add any tag with the url to your zap request and you're fine.

Thanks Abhay. Yeah, anything works with Nostr.

But I just like to make sure, the implementation is closer to the spec, so it’s compatible with any related works done by others.

Naa yedho developer maari enna tag panrenga idhula πŸ˜‚

Un circle ulla developers ku share pannu paa :-)

Enakku therinja Nostr devs ellathayu already tag pannitinga