Solana Accounts

Signs an arbitrary message with the given Solana account.

WARNING: Never sign a message that you didn't generate, as it can be an arbitrary transaction. For example, it might send all of your funds to an attacker.

post/v2/solana/accounts/{address}/sign/message

Request

  • Base URL
    https://api.cdp.coinbase.com/platform
  • Auth
    HTTP bearer

Path parameters

address, string required

The base58 encoded address of the Solana account.

Headers

X-Wallet-Auth, string required

A JWT signed using your Wallet Secret, encoded in base64. Refer to the Generate Wallet Token section of our Authentication docs for more details on how to generate your Wallet Token.

X-Idempotency-Key, string

An optional string request header for making requests safely retryable. When included, duplicate requests with the same key will return identical responses. Refer to our Idempotency docs for more information on using idempotency keys.

Request body

object required
message, string required

The arbitrary message to sign.

encoding, 'utf8' | 'base64'

The encoding of the message. Use utf8 to sign the literal UTF-8 bytes of the message, or base64 to decode an RFC 4648 standard Base64 string before signing. Base64 input must use the standard + and / alphabet with = padding where required. If omitted, the message is interpreted as UTF-8.

Example request

{
  "message": "Hello, world!",
  "encoding": "utf8"
}

Response

Successfully signed message.

object required
signature, string required

The signature of the message, as a base58 encoded string.

Example response

{
  "signature": "4YecmNqVT9QFqzuSvE9Zih3toZzNAijjXpj8xupgcC6E4VzwzFjuZBk5P99yz9JQaLRLm1K4L4FpMjxByFxQBe2h"
}

Changes

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    • warning

      added the new policy_not_applicable enum value to the errorType response property for the response status

    6 more changes in this revision