# Send gasless transactions

## Install dependencies

:::code-group
```sh [npm]
npm install viem

```

```sh [yarn]
yarn add viem

```

```sh [pnpm]
pnpm add viem

```
:::

`sendTransaction` handles the full gasless flow in a single call: it upgrades the wallet to a [Delegated Account](https://eips.ethereum.org/EIPS/eip-7702) if needed, creates the transaction intent, signs it, and submits it. You only need a [gas sponsorship](/docs/configuration/gas-sponsorship) configured.

::::steps
## Create a backend wallet

```ts
import 'dotenv/config'
import Openfort from '@openfort/openfort-node'

const openfort = new Openfort(process.env.OPENFORT_SECRET_KEY!, {
  walletSecret: process.env.OPENFORT_WALLET_SECRET!,
})

const account = await openfort.accounts.evm.backend.create()
```

## Send a gasless transaction

```ts
const result = await openfort.accounts.evm.backend.sendTransaction({
  account,
  chainId: 84532, // Base Sepolia
  interactions: [
    {
      to: '{{CONTRACT_ADDRESS}}',
      data: '{{CALLDATA}}',
    },
  ],
  policy: '{{POLICY_ID}}',
})

console.log('Transaction hash:', result.response?.transactionHash)
```

:::tip
The `policy` parameter is optional. If you omit it, Openfort uses your project-scoped gas sponsorship automatically. Pass a specific `{{POLICY_ID}}` to override with a particular policy from the [Openfort dashboard](/docs/configuration/gas-sponsorship). See the [full sendTransaction example](https://github.com/openfort-xyz/openfort-node/tree/main/examples/evm/transactions/sendTransaction.ts) in the Node SDK repository.
:::
::::
