signMessage()
Othent JS SDK signMessage() function
Last updated
Othent JS SDK signMessage() function
Last updated
The signMessage()
function creates a cryptographic signature of any data (after hashing it) for later validation, using the active (authenticated) user's private key.
This function assumes (and requires) a user is authenticated. See .
Also, this function should only be used to allow data validation. It cannot be used for on-chain transactions, interactions or bundles, for security reasons. Consider using , or instead.
data: string | BinaryDataType
The data to generate the signature for.
options?: SignMessageOptions
The options
argument is optional. If it is not provided, the extension will use the SHA-256
hash algorithm.
return Promise<Uint8Array>
A Promise
containing an Uint8Array
with the signed hash of the data, which can be verified with .