Comment on page
Message Signing
You can request a message to be signed by the wallet simply by calling the
signMessage
function from sats-connect.import { signMessage } from 'sats-connect'
const signMessageOptions = {
payload: {
network: {
type: "Testnet",
},
address: 'ordinalsAddress',
message: "Hello World",
},
onFinish: (response) => {
// signature
alert(response);
},
onCancel: () => alert("Canceled"),
};
await signMessage(signMessageOptions);
When signing a message using Xverse there are two types of signatures you should expect: