NIP-46 optional values: null or empty string?
Positional arguments 2 and 3 of the connect method are "optional":
[<remote_user_pubkey>, <optional_secret>, <optional_requested_permissions>]
But what if I don't want to specify a secret, but I do want to specify permissions?
There is no way to avoid null in here, thus the type of params cannot be string[] as many existing apps expect, but (string | null)[]
The only other way is to use an empty string in "optional" arguments. Then the type remains string[]. But this could be a gotcha in languages where empty string is not considered falsy.
I think that it would make the most sense to use null for no value but unfortunately there are NIPs that already use "" to mean that (e.g., NIP-10, NIP-1 optional relay url).
So I'd say empty string or consistently define nullas the way to convey no value everywhere (nobody will want this lol).