there is an event type called "application specific data" which can store all kinds of things... no idea what apps have used it for this kind of thing though... i know primal uses it for app settings at least
Discussion
oh, also, not sure exactly how to do it, but it should be possible in any OS to turn any nostr: prefixed thing, which can be npub, nevent, naddress, and so on, to open up with some specific app, what's it called x-mimetypes or something
in the tilix terminal you can set up recognisers that run some program when you control click on texts containing certain patterns, such as web addresses or nostr addresses... i use it for source code locations also