Autogenerate "id" for NIP46.Request objects
It would be nice if there was a way to construct a NIP46.Request object with a constructor like: new Request(method, params) and have the id randomly autogenerated.
NOTE: It seems from my testing this generated id must be a hex string, or else it won't work with nsec.app. Not sure if this is true but it seems to be the case.
You can use UUIDs for randomly generating ids.
-- Sent with Tuta; enjoy secure & ad-free emails: https://tuta.com
10 Apr 2024, 02:18 by @.***:
It would be nice if there was a way to construct a NIP46.Request object with a constructor like: > new Request(method, params)> and have the > id> randomly autogenerated.
NOTE: It seems from my testing this generated id must be a hex string, or else it won't work with nsec.app. Not sure if this is true but it seems to be the case.
— Reply to this email directly, > view it on GitHub https://github.com/tcheeric/nostr-java/issues/137> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/ABQMG7BO45VTQQ3M645YJLTY4SHOJAVCNFSM6AAAAABF7RJ4NOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTINJWHA2DKNI> . You are receiving this because you are subscribed to this thread.> Message ID: > <tcheeric/nostr-java/issues/137> @> github> .> com>