# Send a transaction

Sign a transaction, choose an encoding and decide whether to run preflight

Source: https://zerocopy.sh/docs/swqos/transactions

Build and sign the complete transaction before you submit it. SWQoS forwards your bytes unchanged. Include a [tip transfer](/docs/swqos/tips) in SOL, USDC, USDT or WSOL to a live tip account or its token account, or use a [declared tip](/docs/swqos/tips#declared-tips) if it is enabled for your key.

Read the blockhash from a separate Solana RPC provider. SWQoS cannot supply `getLatestBlockhash` or confirm your transaction.

## Choose a format and encoding [#size-limits]

SWQoS accepts legacy, v0 and v1 transactions. Use a signing library that supports your chosen version. Legacy and v0 transactions can contain up to 1,232 wire bytes; v1 transactions can contain up to 4,096. Check the [transaction size limits](/docs/swqos/limits#sizes) before sending.

Set `encoding: "base64"` when your signing library produces base64 wire transactions, including those produced by `@solana/kit`. Check the [`sendTransaction` encoding rules](/docs/reference/json-rpc/send-transaction) for supported formats and limits.

For v1, set the compute-unit and loaded-account-data limits in the message's transaction configuration. Unset limits are zero. The priority fee is a total in lamports; Compute Budget instructions do not set it on v1. v1 uses inline account addresses and has no address lookup tables.

Choose [binary HTTP](/docs/reference/http/binary), [QUIC](/docs/reference/quic) or [IPC](/docs/reference/ipc) for raw signed bytes. Use [base64 HTTP](/docs/reference/http/plaintext) for base64 text. The reference pages define the exact submission formats.

## Checks before sending [#checks]

Submit a fully signed transaction. An all zero first signature returns [`unsigned`](/docs/reference/errors#unsigned); a signature count that differs from the message returns [`signature_count`](/docs/reference/errors#signature_count). Acceptance does not verify that the transaction can execute.

Fund the fee payer for Solana's network fees. A tip does not cover those fees. With preflight off, check the blockhash lifetime and validate your instructions before sending.

Durable nonce transactions are supported. Use Solana's normal nonce structure and sign with the nonce account's current blockhash.

## Preflight [#preflight]

Preflight is off by default. When requested, simulation runs on ZeroCopy's RPC infrastructure provider, as described in [Terms 5.2](https://zerocopy.sh/terms#sending-2). Over hosted JSON-RPC, set `skipPreflight: false` to simulate before dispatch:

```json title="Preflight options for sendTransaction"
{
  "encoding": "base64",
  "skipPreflight": false,
  "preflightCommitment": "confirmed",
  "minContextSlot": 123456789
}
```

Supply your own context slot when you need one, or omit it. The [`sendTransaction` reference](/docs/reference/json-rpc/send-transaction) defines option defaults and simulation responses.

A simulation error returns [`simulation_failed`](/docs/reference/errors#simulation_failed), including the node's `err`, `logs` and other result fields. If simulation is unavailable, times out or cannot meet `minContextSlot`, SWQoS returns retryable [`preflight_unavailable`](/docs/reference/errors#preflight_unavailable).

For QUIC, follow the [preflight stream rules](/docs/reference/quic#streams). For the local agent, check the [local method differences](/docs/reference/json-rpc#local-agent) before choosing simulation options.

## Delivery [#engine-routing]

Single transactions use leader delivery and may also qualify for block engine delivery. See [Routing](/docs/swqos/routing) for the current paths. A successful response does not identify the path or guarantee block engine delivery.

See [`sendTransaction`](/docs/reference/json-rpc/send-transaction) for exact requests and errors. After submitting, [confirm the signature](/docs/swqos/confirmation) through your Solana RPC provider.
