--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"
}
}
Spark BTC
signMessageWithIdentityKey
Sign a message using the Spark wallet’s identity key.
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"
}
}
Idempotency on errors: On 4xx or 5xx, Privy caches the response and replays it for the same
key. Generate a new key to retry after a server error. Policy violations are an exception and
allow same-key retries.
--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
string
required
ID of your Privy app.
string
Request authorization signature. If multiple signatures are required, they should be comma
separated.
string
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the
request must be processed.
Path Parameters
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
string
required
Available options:
signMessageWithIdentityKeystring
required
Available options:
MAINNET, REGTESTobject
required
Returns
enum<string>
required
Available options:
signMessageWithIdentityKeyWas this page helpful?

