# `BSV.Tokens.ActionData`
[🔗](https://github.com/Bittoku/bsv_sdk_elixir/blob/main/lib/bsv/tokens/types.ex#L62)

Additional data attached to a STAS 3.0 action.

## Swap Variant

The swap variant carries the full 61-byte swap leg structure:
- `requested_script_hash` (32 bytes) — SHA256 of counterparty's locking script tail
- `requested_pkh` (20 bytes) — requested recipient public key hash
- `rate_numerator` (uint32 LE) — exchange rate numerator
- `rate_denominator` (uint32 LE) — exchange rate denominator

Special case: both numerator=0 and denominator=0 indicates swap cancellation.

# `swap_fields`

```elixir
@type swap_fields() :: %{
  requested_script_hash: &lt;&lt;_::256&gt;&gt;,
  requested_pkh: &lt;&lt;_::160&gt;&gt;,
  rate_numerator: non_neg_integer(),
  rate_denominator: non_neg_integer()
}
```

# `t`

```elixir
@type t() :: {:swap, swap_fields()} | {:custom, binary()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
