stx_signStructuredMessage
Request the signature of a structured message using the Stacks address of an account.
Method name
stx_signStructuredMessage
Parameters
Parameter
Description
Required
Type
message
The structured message to sign, represented as a Clarity value. Can be a hex-encoded string
✅
string | object
domain
The domain tuple that defines the signing context, following SIP-018. Can be a hex-encoded string.
✅
string | object
Example request
try {
// Request signature
const response = await window.LeatherProvider.request("stx_signStructuredMessage", {
message: "3e5f6a7b9d8c1f2e4a6b",
domain: "2c26b46b68ffc68ff99b453c1d3041344b947b77"
});
console.log("Response:", response);
Example response
Last updated