That would be possible, it just hasn’t been built yet. It’s also not easy to get an accurate follow count because of how relays work. But we’ll put it on the roadmap.

Reply to this note

Please Login to reply.

Discussion

In-fucking-credible.

99.9% are zombies 🧟‍♀️

Feature Name: Survivor Count

User Story: “As a survivor of the Nostr zombie apocalypse, I want to count how many of my followers are also survivors, so I can gauge the strength and authenticity of my network.”

nostr:npub176p7sup477k5738qhxx0hk2n0cty2k5je5uvalzvkvwmw4tltmeqw7vgup I probably need to call on your expertise to figure out how to build this feature. I’m not exactly sure where to get a reasonably accurate follower count from for each user. Primal’s API only fetches a limited number. Nostr.band is unreliable. Could I connect this to Vertex?

you can use this endpoint called RankProfile, either by DVM (websocket) or API (http).

https://vertexlab.io/docs/endpoints/rank-profiles/

you just choose the sort algorithm to be "followerCount".

And in the content of the response you get everything you want.

yes. So the credits are linked to the key that signed the event.

Any reputable key on nostr gets 100 credits / day. If the user is signed out you would have to hardcode a key.

But actually I would just ask the user to sign in.

Yeah, but in practice most don’t want to. And don’t want to build a NIP-46 sign-in for this that won’t get a lot of use anyway. The feature really needs to work without requiring sign-in.

feedback taken.

How would you do it if you were in me?

I’m not sure, but how many queries could I get with the API if it didn’t depend on a Nostr profile to serve as the key? And could the feature be zap-based to activate?

At the moment no queries unless you sign with a nostr key with credits.

At the beginning it was totally open and in 2 weeks since the launch I got people abusing it, so I had to gate it somehow.

Yes it could be zap based but I would still have to check if your key has zapped vertex, so still sign in.

I could accept ecash in the request, but then your user would have to have a wallet, which imo is more selective than a sign in

What about an NWC subscription?

but what's the difference between signing in and connecting your wallet with NWC?

I argue that the first is even easier, and it's free.

To clarify, I mean an NWC subscription to use the API from the app itself, not a per-user fee, and it doesn’t require sign-in. I could choose to add a session fee on the app side, or keep it free to the user, depending on the cost.

Yes, this is a good idea.

You would have to use an API key in the client, which is the same as loading credits on a nostr key and using it in the client. It's basically the same

Right, the difference being that with NWC I can set a budget so there’s no need to manually top-up the balance.

yes this is true.

The UX for builders is not where I want it to be, but there is so much to build and I have to prioritise

ᴡʀᴏɴɢ. ɴᴏꜱᴛʀ ɴɪᴘ-07 ʟᴏɢɪɴ ɪꜱ ᴛʀɪᴠɪᴀʟ ᴛᴏ ɪᴍᴘʟᴇᴍᴇɴᴛ. ᴡɪᴛʜᴏᴜᴛ ᴀᴜᴛʜ ᴛʜᴇʀᴇ ɪꜱ ɴᴏ ᴡᴀʏ ᴛᴏ ʙʟᴀᴄᴋʟɪꜱᴛ ᴀʙᴜꜱɪᴠᴇ ᴜꜱᴇʀꜱ ᴏʀ ᴛʀᴀᴄᴋ ᴇxᴄᴇꜱꜱɪᴠᴇ ᴜꜱᴇ ᴡɪᴛʜᴏᴜᴛ ᴘᴀʏɪɴɢ