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
onCancel: () => alert("Canceled"),
await signMessage(signMessageOptions);
When signing a message using Xverse there are two types of signatures you should expect:
  • ECDSA signatures over the secp256k1 curve when signing with the BTC payment (p2sh(p2wpkh)) address
  • BIP322 signatures when signing with the Ordinals (p2tr) address