> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://www.openfort.io/api/mcp` to find what you need.
>
> **Have feedback?** Use `submit_feedback` on the same MCP server.

# eth\_sendTransaction

Instructs the Wallet to broadcast a transaction to the network.

:::warning
This method is deprecated and exists for compatibility. Please [use `wallet_sendCalls` instead](/docs/products/cross-app-wallet/rpc/wallet_sendCalls).
:::

## Request

```ts
type Request = {
  method: 'eth_sendTransaction',
  params: [{
    /** Target chain ID. Defaults to the connected chain. */
    chainId?: `0x${string}`,
    /** Calldata to send with the transaction. */
    data?: `0x${string}`,
    /** Address of the sender. */
    from: `0x${string}`,
    /** Address of the recipient. */
    to: `0x${string}`,
    /** Value to transfer. Defaults to 0. */
    value?: `0x${string}`,
  }]
}
```

## Response

Transaction hash.

```ts
type Response = `0x${string}`
```

## Example

:::warning
To make these instructions concrete, we have created a sample global wallet called **Rapidfire ID**. To interact with it, you can find its SDK in the NPM package directory: [@rapidfire/id](https://www.npmjs.com/package/@rapidfire/id).

You can check out the GitHub [repository for Rapidfire Wallet](https://github.com/openfort-xyz/ecosystem-sample) to learn how to create your own wallet.
:::

### Mint ERC20 Tokens

The example below demonstrates minting 100 EXP.

An interactive demo, runnable on this page.

```ts
import RapidfireID from '@rapidfire/id'

const rapidfire = new RapidfireID()
const provider = rapidfire.getEthereumProvider()
import { encodeFunctionData, parseAbi, parseEther } from 'viem'

const [account] = await provider.request({
  method: 'eth_accounts',
})

const hash = await provider.request({
  method: 'eth_sendTransaction',
  params: [{
    from: account,
    to: '0x706aa5c8e5cc2c67da21ee220718f6f6b154e75c',
    data: encodeFunctionData({
      abi: parseAbi([
        'function mint(address, uint256)',
      ]),
      functionName: 'mint',
      args: [account, parseEther('100')],
    }),
  }],
})
```

### Send ETH

```ts
import RapidfireID from '@rapidfire/id'

const rapidfire = new RapidfireID()
const provider = rapidfire.getEthereumProvider()

const hash = await provider.request({// [!code focus]
  method: 'eth_sendTransaction',// [!code focus]
  params: [{// [!code focus]
    from: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',// [!code focus]
    to: '0xcafebabecafebabecafebabecafebabecafebabe',// [!code focus]
    value: '0x1',// [!code focus]
  }],// [!code focus]
})// [!code focus]
```
