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": "developer@example.com",
"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
}
}
}
}
}Usage
Create RPC transaction
Create an intent to execute an RPC method on a wallet. The intent must be authorized by either the wallet owner or signers before it can be executed.
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": "developer@example.com",
"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
Headers
Body
application/json
- EthereumSignTransactionRpcInput
- EthereumSendTransactionRpcInput
- EthereumPersonalSignRpcInput
- EthereumSignTypedDataRpcInput
- EthereumSecp256k1SignRpcInput
- EthereumSign7702AuthorizationRpcInput
- EthereumSignUserOperationRpcInput
- EthereumSendCallsRpcInput
- AptosSignTransactionRpcInput
- SolanaSignTransactionRpcInput
- SolanaSignAndSendTransactionRpcInput
- SolanaSignMessageRpcInput
- SparkTransferRpcInput
- SparkGetBalanceRpcInput
- SparkTransferTokensRpcInput
- SparkGetStaticDepositAddressRpcInput
- SparkGetClaimStaticDepositQuoteRpcInput
- SparkClaimStaticDepositRpcInput
- SparkCreateLightningInvoiceRpcInput
- SparkPayLightningInvoiceRpcInput
- SparkSignMessageWithIdentityKeyRpcInput
- SparkWithdrawRpcInput
- SparkGetWithdrawalFeeQuoteRpcInput
- TronSignTransactionRpcInput
- TronSendTransactionRpcInput
- XrplSignTransactionRpcInput
- NearSignTransactionRpcRequestBody
- ExportPrivateKeyRpcInput
- ExportSeedPhraseRpcInput
Executes the EVM eth_signTransaction RPC to sign a transaction.
Response
200 - application/json
Created RPC intent.
Response for an RPC intent
Current state of the wallet before any changes. If undefined, the resource was deleted and no longer exists
Show child attributes
Show child attributes
Example:
{
"id": "id2tptkqrxd39qo9j423etij",
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"display_name": "Treasury",
"external_id": "my-order-123",
"chain_type": "ethereum",
"policy_ids": [],
"additional_signers": [],
"owner_id": "rkiz0ivz254drv1xw982v3jq",
"parent_wallet_id": null,
"entity": {
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
},
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}
Was this page helpful?

