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 tailrequested_pkh(20 bytes) — requested recipient public key hashrate_numerator(uint32 LE) — exchange rate numeratorrate_denominator(uint32 LE) — exchange rate denominator
Special case: both numerator=0 and denominator=0 indicates swap cancellation.
Summary
Types
@type swap_fields() :: %{ requested_script_hash: <<_::256>>, requested_pkh: <<_::160>>, rate_numerator: non_neg_integer(), rate_denominator: non_neg_integer() }
@type t() :: {:swap, swap_fields()} | {:custom, binary()}