bitcoinsignMultipleMessages

circle-info

This is an Xverse custom method. It can only be invoked for users using the Xverse walletarrow-up-right.

You can request your user to sign multiple messages with their wallet's Bitcoin addresses, by invoking the signMultipleMessages method.

This enables your app to prompt users to sign batches of messages in a single step, instead of requiring multiple individual signMessage calls and multiple wallet popups.


Request parameters

signMultipleMessages expects the request payload to be an array of message objects matching the schema below:

  • address (required): a string representing the address to use to sign the message

  • message (required): a string representing the message to be signed by the wallet

  • protocol (optional): the signature protocol to use for this message (ECDSA or BIP322)

protocol (optional)

By default, signMultipleMessages will use two type of signatures depending on the Bitcoin address used for signing:

You have the option to specify your preferred signature type with the protocol parameter:


Usage example


Wallet prompt

The user will see a single message signing request prompt in the wallet, guiding them through the batch of messages to review and sign:

  • Messages 1/N stepper

  • Summary screen with Cancel / Sign all

  • Option to review each message individually using ← / β†’


Response format

The signMultipleMessages method returns a Promise that resolves to an array of SignMessageResult objects.

  • The array is returned in the same order as the request payload.

  • Each item corresponds to the signed result for the message at the same index.

Each item in the response array contains:

  • signature: a string representing the signed message

  • messageHash: a string representing the hash of the message

Last updated