Skip to main content
POST
/
v1
/
wallets
/
{wallet_id}
/
rpc
curl --request POST \
  --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": "signAndSendTransaction",
  "caip2": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
  "sponsor": true,
  "params": {
    "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRpb0mdmKftapwzzqUtlcDnuWbw8vwlyiyuWyyieQFKESezu52HWNss0SAcb60ftz7DSpgTwUmfUSl1CYHJ91GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAScgJ7J0AXFr1azCEvB1Y5zpiF4eXR+yTW0UB7am+E/MBAgIAAQwCAAAAQEIPAAAAAAA=",
    "encoding": "base64"
  }
}
'
{
  "method": "signAndSendTransaction",
  "data": {
    "hash": "22VS6wqrbeaN21ku3pjEjfnrWgk1deiFBSB1kZzS8ivr2G8wYmpdnV3W7oxpjFPGkt5bhvZvK1QBzuCfUPUYYFQq",
    "caip2": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
    "transaction_id": "nyorsf87s9d08jimesv3n8yq"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.privy.io/llms.txt

Use this file to discover all available pages before exploring further.

SDK methods

Learn more about sending transactions using our SDKs here.
curl --request POST \
  --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": "signAndSendTransaction",
  "caip2": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
  "sponsor": true,
  "params": {
    "transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRpb0mdmKftapwzzqUtlcDnuWbw8vwlyiyuWyyieQFKESezu52HWNss0SAcb60ftz7DSpgTwUmfUSl1CYHJ91GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAScgJ7J0AXFr1azCEvB1Y5zpiF4eXR+yTW0UB7am+E/MBAgIAAQwCAAAAQEIPAAAAAAA=",
    "encoding": "base64"
  }
}
'
{
  "method": "signAndSendTransaction",
  "data": {
    "hash": "22VS6wqrbeaN21ku3pjEjfnrWgk1deiFBSB1kZzS8ivr2G8wYmpdnV3W7oxpjFPGkt5bhvZvK1QBzuCfUPUYYFQq",
    "caip2": "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",
    "transaction_id": "nyorsf87s9d08jimesv3n8yq"
  }
}

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.

Body

method
string
required
Available options: signAndSendTransaction
caip2
string
required
Available options: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp (Solana Mainnet), solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 (Solana Devnet), solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z (Solana Testnet)
params
object
required
sponsor
boolean
Optional parameter to enable gas sponsorship for this transaction. Learn more.
reference_id
string
Optional developer-provided reference ID for transaction reconciliation. Must be unique per transaction and up to 64 characters. Use this to correlate transactions with your own internal records. The reference_id is included in transaction webhook payloads and can be used to look up transactions.
optimistic_broadcast
boolean
Optional. If set to true, the signed transaction will be immediately returned after the enclave signs, and submission to the network will happen asynchronously. Useful if you want to minimize E2E latency, or if you want to submit to multiple endpoints to get the best transaction landing time possible. Note that enabling this option also disables network preflight checks to minimize latency, which means an invalid transaction will not return an error in the API response and will not fire webhooks. You are responsible for validating a transaction, which can be done against a Solana RPC endpoint.

Returns

method
enum<string>
required
Available options: signAndSendTransaction
data
object
required