signTransaction
Signing Transaction (signMessage)
The signMessage
function allows you to request the user's Lazor Kit wallet to sign an arbitrary message or instruction. This is useful for off-chain authentication, message validation, or transaction approval.
Usage
Input: Pass the instruction as a
Uint8Array
. If you have a base64 string, decode it to bytes as shown above.Returns: A
Promise<Uint8Array>
containing the signature.
Note: The user must be connected before calling
signMessage
. Handle errors appropriately for the best user experience.
Last updated