Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
eth_sendTransaction – 1auth
Skip to content

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

PositionTypeDescription
0objectThe transaction object

Transaction Object

FieldTypeDescription
tostringThe recipient address or contract
datastringThe calldata (optional, defaults to "0x")
valuestring | numberThe value in wei (optional, defaults to "0")
chainIdnumberTarget chain ID (optional, uses current chain)
tokenRequestsarrayTokens 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:

FieldTypeDescription
tokenstringToken contract address on target chain
amountbigintAmount 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_getCallsStatus to track the transaction status
  • The transaction is executed via the 1auth intent system
  • Gas is automatically sponsored - no ETH needed for fees