Skip to main content
POST
/
v1
/
wallets
/
{wallet_id}
/
rpc
  --url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "method": "signMessageWithIdentityKey",
  "network": "MAINNET",
  "params": {
    "message": "Hello, Spark!",
    "compact": true
  }
}'
{
  "method": "signMessageWithIdentityKey",
  "data": {
    "signature": "304402201a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f80902201a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f809"
  }
}
  --url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '{
  "method": "signMessageWithIdentityKey",
  "network": "MAINNET",
  "params": {
    "message": "Hello, Spark!",
    "compact": true
  }
}'
{
  "method": "signMessageWithIdentityKey",
  "data": {
    "signature": "304402201a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f80902201a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f809"
  }
}

Headers

privy-app-id
string
required
ID of your Privy app.
privy-authorization-signature
string
Request authorization signature. If multiple signatures are required, they should be comma separated.
privy-request-expiry
string
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.

Path Parameters

wallet_id
string
required
ID of the wallet to get.
These wallet methods are modeled after the Spark Wallet SDK. For more information about this wallet method, check out the Spark Wallet documentation.

Body

method
string
required
Available options: signMessageWithIdentityKey
network
string
required
Available options: MAINNET, REGTEST
params
object
required

Returns

method
enum<string>
required
Available options: signMessageWithIdentityKey
data
object
required
The signature response object