> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# TxEnvelope.getType

:::info
`TxEnvelope.getType` is a re-export of ox's [`TransactionEnvelope.getType`](https://oxlib.sh/api/TransactionEnvelope/getType). Refer to the ox documentation for the full reference.
:::

Returns the type of a Transaction Envelope.

## Imports

```ts
import { TxEnvelope } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { TxEnvelope } from 'viem/utils'

const type = TxEnvelope.getType({
  maxFeePerGas: 1n
})
// @log: 'eip1559'
```

## Definition

```ts
function getType<envelope>(
  envelope: envelope | Typeable,
): getType.ReturnType<envelope>
```

## Parameters

### envelope

* **Type:** `envelope | Typeable`

The transaction envelope.

## Return Type

Transaction Envelope type.

`getType.ReturnType<envelope>`
