Skip to main content
POST
/
v1
/
intents
/
wallets
/
{wallet_id}
/
rpc
Create RPC intent
curl --request POST \
  --url https://api.privy.io/v1/intents/wallets/{wallet_id}/rpc \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'privy-app-id: <privy-app-id>' \
  --data '
{
  "method": "eth_signTransaction",
  "params": {
    "transaction": {
      "from": "<string>",
      "to": "<string>",
      "chain_id": "<string>",
      "nonce": "<string>",
      "data": "<string>",
      "value": "<string>",
      "type": 0,
      "gas_limit": "<string>",
      "gas_price": "<string>",
      "max_fee_per_gas": "<string>",
      "max_priority_fee_per_gas": "<string>",
      "authorization_list": [
        {
          "contract": "<string>",
          "chain_id": "<string>",
          "nonce": "<string>",
          "r": "<string>",
          "s": "<string>",
          "y_parity": 123
        }
      ]
    }
  },
  "address": "<string>",
  "chain_type": "ethereum",
  "wallet_id": "<string>"
}
'
HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/intents/wallets/{wallet_id}/rpc")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"eth_signTransaction\",\n \"params\": {\n \"transaction\": {\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"data\": \"<string>\",\n \"value\": \"<string>\",\n \"type\": 0,\n \"gas_limit\": \"<string>\",\n \"gas_price\": \"<string>\",\n \"max_fee_per_gas\": \"<string>\",\n \"max_priority_fee_per_gas\": \"<string>\",\n \"authorization_list\": [\n {\n \"contract\": \"<string>\",\n \"chain_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"y_parity\": 123\n }\n ]\n }\n },\n \"address\": \"<string>\",\n \"chain_type\": \"ethereum\",\n \"wallet_id\": \"<string>\"\n}")
.asString();
const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'eth_signTransaction',
params: {
transaction: {
from: '<string>',
to: '<string>',
chain_id: '<string>',
nonce: '<string>',
data: '<string>',
value: '<string>',
type: 0,
gas_limit: '<string>',
gas_price: '<string>',
max_fee_per_gas: '<string>',
max_priority_fee_per_gas: '<string>',
authorization_list: [
{
contract: '<string>',
chain_id: '<string>',
nonce: '<string>',
r: '<string>',
s: '<string>',
y_parity: 123
}
]
}
},
address: '<string>',
chain_type: 'ethereum',
wallet_id: '<string>'
})
};

fetch('https://api.privy.io/v1/intents/wallets/{wallet_id}/rpc', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privy.io/v1/intents/wallets/{wallet_id}/rpc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'eth_signTransaction',
'params' => [
'transaction' => [
'from' => '<string>',
'to' => '<string>',
'chain_id' => '<string>',
'nonce' => '<string>',
'data' => '<string>',
'value' => '<string>',
'type' => 0,
'gas_limit' => '<string>',
'gas_price' => '<string>',
'max_fee_per_gas' => '<string>',
'max_priority_fee_per_gas' => '<string>',
'authorization_list' => [
[
'contract' => '<string>',
'chain_id' => '<string>',
'nonce' => '<string>',
'r' => '<string>',
's' => '<string>',
'y_parity' => 123
]
]
]
],
'address' => '<string>',
'chain_type' => 'ethereum',
'wallet_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.privy.io/v1/intents/wallets/{wallet_id}/rpc"

payload := strings.NewReader("{\n \"method\": \"eth_signTransaction\",\n \"params\": {\n \"transaction\": {\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"data\": \"<string>\",\n \"value\": \"<string>\",\n \"type\": 0,\n \"gas_limit\": \"<string>\",\n \"gas_price\": \"<string>\",\n \"max_fee_per_gas\": \"<string>\",\n \"max_priority_fee_per_gas\": \"<string>\",\n \"authorization_list\": [\n {\n \"contract\": \"<string>\",\n \"chain_id\": \"<string>\",\n \"nonce\": \"<string>\",\n \"r\": \"<string>\",\n \"s\": \"<string>\",\n \"y_parity\": 123\n }\n ]\n }\n },\n \"address\": \"<string>\",\n \"chain_type\": \"ethereum\",\n \"wallet_id\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "intent_id": "clpq1234567890abcdefghij",
  "intent_type": "RPC",
  "created_by_display_name": "[email protected]",
  "created_by_id": "did:privy:clabcd123",
  "created_at": 1741834854578,
  "resource_id": "xs76o3pi0v5syd62ui1wmijw",
  "authorization_details": [
    {
      "members": [
        {
          "type": "user",
          "user_id": "did:privy:clabcd123",
          "signed_at": null
        }
      ],
      "threshold": 1,
      "display_name": "Admin Key Quorum"
    }
  ],
  "status": "pending",
  "custom_expiry": false,
  "expires_at": 1741921254578,
  "request_details": {
    "method": "POST",
    "url": "https://api.privy.io/v1/wallets/xs76o3pi0v5syd62ui1wmijw/rpc",
    "body": {
      "method": "eth_sendTransaction",
      "caip2": "eip155:8453",
      "chain_type": "ethereum",
      "params": {
        "transaction": {
          "to": "0x0000000000000000000000000000000000000000",
          "value": 1
        }
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

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.

Body

application/json

Executes the EVM eth_signTransaction RPC to sign a transaction.

method
enum<string>
required
Available options:
eth_signTransaction
params
EthereumSignTransactionRpcInputParams · object
required

Parameters for the EVM eth_signTransaction RPC.

address
string
chain_type
enum<string>
Available options:
ethereum
wallet_id
string

Response

200 - application/json

Created RPC intent.

Response for an RPC intent

intent_id
string
required

Unique ID for the intent

created_by_display_name
string
required

Display name of the user who created the intent

created_at
number
required

Unix timestamp when the intent was created

resource_id
string
required

ID of the resource being modified (wallet_id, policy_id, etc)

authorization_details
IntentAuthorization · object[]
required

Detailed authorization information including key quorum members, thresholds, and signature status

status
enum<string>
required

Current status of an intent.

Available options:
pending,
processing,
executed,
failed,
expired,
rejected,
dismissed
custom_expiry
boolean
required

Whether this intent has a custom expiry time set by the client. If false, the intent expires after a default duration.

expires_at
number
required

Unix timestamp when the intent expires

intent_type
enum<string>
required
Available options:
RPC
request_details
object
required

The original RPC request that would be sent to the wallet endpoint

created_by_id
string

ID of the user who created the intent. If undefined, the intent was created using the app secret

rejected_at
number

Unix timestamp when the intent was rejected, present when status is 'rejected'

dismissed_at
number

Unix timestamp when the intent was dismissed, present when status is 'dismissed'

dismissal_reason
string

Human-readable reason for dismissal, present when status is 'dismissed'

current_resource_data
Wallet · object

Current state of the wallet before any changes. If undefined, the resource was deleted and no longer exists

Example:
{
"id": "id2tptkqrxd39qo9j423etij",
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"display_name": "Treasury",
"external_id": "my-order-123",
"chain_type": "ethereum",
"policy_ids": [],
"additional_signers": [],
"owner_id": "rkiz0ivz254drv1xw982v3jq",
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}
action_result
BaseActionResult · object

Result of RPC execution (only present if status is 'executed' or 'failed')