> **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.from

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

Converts an arbitrary transaction object or serialized transaction into a Transaction Envelope.

## Imports

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

## Examples

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

const envelope = TxEnvelope.from({
  chainId: 1,
  maxFeePerGas: 1n,
  type: 'eip1559'
})
```

## Definition

```ts
function from<envelope, signature>(
  envelope: envelope | Typeable | Hex.Hex,
  options?: from.Options<signature>,
): from.ReturnType<envelope>
```

## Parameters

### envelope

* **Type:** `envelope | Typeable | Hex.Hex`

The transaction envelope.

### options

* **Type:** `from.Options<signature>`
* **Optional**

Options.

#### options.signature

* **Type:** `{ r: 0x${string}; s: 0x${string}; yParity: number; } | signature`
* **Optional**

Signature to append to the Transaction Envelope.

## Return Type

Transaction Envelope.

`from.ReturnType<envelope>`
