Skip to content

Sign a Message

FSCO provides a secure way to sign messages using your wallet’s private key. This is useful for proving ownership of a wallet or signing off-chain messages.

Before you begin, ensure you have:

  • A valid FSCO API key
  • Your application’s environment configured with the API key
  • A wallet ID for the wallet you want to use for signing
  • The message data in hex format
POST /v2/wallet/{walletId}/sign/msg
{
"walletId": "8c1d496f-2827-4750-a11f-74b48c11108d",
"data": "0xdeadbeef"
}

The request requires:

  • walletId: The unique ID of the wallet to use for signing
  • data: The message to sign in hex format (must start with ‘0x’)
sign-message.sh
curl -X POST "https://api.fsco.io/v2/wallet/8c1d496f-2827-4750-a11f-74b48c11108d/sign/msg" \
-H "Authorization: Bearer $FSCO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"walletId": "8c1d496f-2827-4750-a11f-74b48c11108d",
"data": "0xdeadbeef"
}'
sign-message-response.json
{
"walletId": "8c1d496f-2827-4750-a11f-74b48c11108d",
"signedData": "0x4a882e6a0d41b0832a1d3c38d1c2d8a3a4a34a5e6f7c8d9e0f1a2b3c4d5e6f7"
}
  • The message must be in hex format and start with ‘0x’
  • The wallet must exist and be active
  • The signed message can be used for verification on-chain or off-chain
  • The signature follows the standard Ethereum message signing format
  • The walletId in the path must match the walletId in the request body