# TransactionStep

Individual transaction step within a purchase flow. Represents a single blockchain transaction that needs to be executed. Steps enable explicit user control over multi-transaction operations, following Web3 best practices for transparency and user consent.

## Fields

| Field                                                                                                                                    | Type                | Required | Description                                                 |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------- | ----------------------------------------------------------- |
| id                                                                                                                                       | string              | ✅        | Unique identifier for this step                             |
| name                                                                                                                                     | string              | ✅        | Human-readable step name (e.g., "Approve USDC", "Mint NFT") |
| type                                                                                                                                     | TransactionStepType | ✅        | Type of transaction: `'mint'` \| `'approve'`                |
| [transactionData](https://github.com/manifoldxyz/client-sdk/blob/main/packages/client-sdk/docs/sdk/transaction-steps/transactionData.md) | TransactionData     | ✅        | Raw transaction data for custom execution                   |
| [execute](/client-sdk/sdk/transaction-steps/execute.md)                                                                                  | function            | ✅        | Executes this transaction step                              |
| description                                                                                                                              | string              | ❌        | Optional detailed description of what this step does        |
| cost                                                                                                                                     | object              | ❌        | Cost breakdown for this specific step                       |
| cost.native                                                                                                                              | Money               | ❌        | Native token cost (ETH, etc.)                               |
| cost.erc20s                                                                                                                              | Money\[]            | ❌        | ERC20 token costs                                           |

## Common Step Types

* **`approve`**: ERC20 token approval for payment
* **`mint`**: Actual NFT minting transaction

## Usage

Steps should be executed in order, as later steps may depend on earlier ones.

### Example: Iterating Through Steps

```typescript
// Execute steps manually for better UX
for (const step of preparedPurchase.steps) {
  console.log(`Executing: ${step.name}`);
  const receipt = await step.execute(adapter);
  console.log(`✓ ${step.name} complete: ${receipt.txHash}`);
}
```

## See Also

* [TransactionData](https://github.com/manifoldxyz/client-sdk/blob/main/packages/client-sdk/docs/sdk/transaction-steps/transactionData.md) - Raw transaction data for custom execution
* [execute](/client-sdk/sdk/transaction-steps/execute.md) - Built-in execution function
* [PreparedPurchase](/client-sdk/reference/preparedpurchase.md) - Parent structure containing steps


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.manifold.xyz/client-sdk/reference/transactionstep.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
