Sign Message
signMessage
window.bitpocket.unisat.signMessage(msg)
sign message by ecdsa
Parameters
msg-string: a string to sign
Returns
Promise-string: the signature.
Example
// sign by ecdsa
try {
let res = await window.unisat.signMessage("abcdefghijk123456789");
console.log(res)
} catch (e) {
console.log(e);
}
>
IIWkILQ2HErnvdDWr/eRpE0myERHlxcY/cNJ/ozlcg+2T/Zs657fZrtP36thoo+L/PYxP3d505Q10XqD7J+lh6E=