ndk
ndk copied to clipboard
Constructor of NDKNip46Backend class throws "Invalid signer" when hex string is provided for privateKeyOrSigner argument
The condition here in the constructor of the NDKNip46Backend class always evaluates to false because a hex string is not an instance of the String class. Consequently, passing a hex string for the privateKeyOrSigner argument results in an "Invalid signer" error.
Modify the condition to properly check if privateKeyOrSigner is a hex string by using a more appropriate method, such as checking the type with typeof or using a regular expression to validate hex string format.