---
title: Transaction
description: Sign, execute, inspect, and sort transactions with thru txn
source_url:
  html: https://thru.org/docs/cli-reference/transaction-commands/
  md: https://thru.org/docs/cli-reference/transaction-commands.md
---

# Transaction

Use `thru txn` when you need to build or inspect transactions directly instead of using a higher-level command family.

## Commands

| Command | Use it for |
| - | - |
| `sign` | Build and sign a transaction, then emit it as base64. |
| `execute` | Build, sign, and submit a transaction directly. |
| `make-state-proof` | Generate a cryptographic state proof for an account. |
| `get` | Fetch transaction details by signature. |
| `sort` | Sort public keys for transaction account lists. |

## Important Inputs

- `program`
- `instruction_data`
- optional fee/resource fields such as `fee`, `compute_units`, `state_units`, and `memory_units`
- ordered `--readwrite-accounts` and `--readonly-accounts`

## Minimal Patterns

```bash
thru txn sign ta...[program] deadbeef
thru txn get ts...[signature] --retry-count 5
```

## Notes

- Use this family when you already know the raw instruction data and account list you need.
- Use a higher-level family like `token`, `program`, or `registrar` when it already wraps the transaction-building logic for your task.
