eth_sendTransaction
Sends a single transaction through the 1auth intent system. The user reviews the transaction details and approves with their passkey. Gas is automatically sponsored, so users don't need ETH for fees. Returns an intent ID that you can poll with wallet_getCallsStatus to track execution.
Try it
Parameters
| Position | Type | Description |
|---|---|---|
| 0 | object | The transaction object |
Transaction Object
| Field | Type | Description |
|---|---|---|
to | string | The recipient address or contract |
data | string | The calldata (optional, defaults to "0x") |
value | string | number | The value in wei (optional, defaults to "0") |
chainId | number | Target chain ID (optional, uses current chain) |
tokenRequests | array | Tokens needed for this transaction (optional, see below) |
Token Requests
For ERC20 transfers or contract calls that consume tokens, specify tokenRequests to enable cross-chain funding:
| Field | Type | Description |
|---|---|---|
token | string | Token contract address on target chain |
amount | bigint | Amount in base units (e.g., 6 decimals for USDC) |
Returns
string - The intent ID (can be used with wallet_getCallsStatus).
Example
import { encodeFunctionData, parseUnits } from 'viem';
// Simple ETH transfer (no tokenRequests needed)
const intentId = await provider.request({
method: 'eth_sendTransaction',
params: [{
to: '0x...',
value: '1000000000000000000', // 1 ETH in wei
}],
});
// ERC20 transfer with tokenRequests
const USDC = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913';
const amount = parseUnits('100', 6); // 100 USDC
const transferData = encodeFunctionData({
abi: erc20Abi,
functionName: 'transfer',
args: [recipientAddress, amount],
});
const intentId = await provider.request({
method: 'eth_sendTransaction',
params: [{
to: USDC,
data: transferData,
tokenRequests: [{ token: USDC, amount }],
}],
});Notes
- Returns an intent ID, not a transaction hash
- Use
wallet_getCallsStatusto track the transaction status - The transaction is executed via the 1auth intent system
- Gas is automatically sponsored - no ETH needed for fees