signMultipleMessages
This is an Xverse custom method. It can only be invoked for users using the Xverse wallet.
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 messagemessage(required): a string representing the message to be signed by the walletprotocol(optional): the signature protocol to use for this message (ECDSAorBIP322)
protocol (optional)
protocol (optional)By default, signMultipleMessages will use two type of signatures depending on the Bitcoin address used for signing:
ECDSA signatures over the secp256k1 curve when signing with the Bitcoin payment (
p2sh) addressBIP322 signatures when signing with the Bitcoin Ordinals (
p2tr) address or a Ledger-based Bitcoin payment address (p2wpkh)
You have the option to specify your preferred signature type with the protocol parameter:
ECDSAto request ECDSA signatures over the secp256k1 curve Available for payment addresses only (p2shandp2wpkh)BIP322to request BIP322 signatures Available for all payment (p2shandp2wpkh) & ordinals addresses (p2tr)
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 messagemessageHash: a string representing the hash of the message
Last updated