STAS 3.0 v0.1 §8.1 transaction-type (txType) parameter.
Every STAS 3.0 unlocking script carries a 1-byte txType value (slot 18 in
the spec §7 witness layout) describing the high-level shape of the spend:
| Value | Atom | Operation |
|---|---|---|
| 0 | :regular | Regular spend / split / 1-in/1-out |
| 1 | :atomic_swap | Atomic swap (counterparty trailing parameters apply) |
| 2 | :merge_2 | Merge with 2 pieces |
| 3 | :merge_3 | Merge with 3 pieces |
| 4 | :merge_4 | Merge with 4 pieces |
| 5 | :merge_5 | Merge with 5 pieces |
| 6 | :merge_6 | Merge with 6 pieces |
| 7 | :merge_7 | Merge with 7 pieces |
Mirrors BSV.Tokens.SpendType in shape: to_byte/1 and from_byte/1.
Summary
Functions
Convert a wire-format byte value (0..7) to a txType atom.
Convert a txType atom to its wire-format byte value (0..7).