Expand description
Field-level serde helpers for address-based transition fields.
These helpers reshape the JSON / wasm Object output of BTreeMap<PlatformAddress, _>
and Option<(PlatformAddress, _)> fields from an opaque map-of-tuples into a
self-describing array (or single object) of { address, nonce?, amount? } entries.
Only serde JSON / platform_value output is affected — the bincode Encode /
Decode derives on the parent transitions are independent of serde and remain
unchanged, so consensus binary format and PlatformSignable sighash are
intentionally untouched. Same safety argument as the custom-serde change applied
to AddressFundsFeeStrategyStep.
Each helper exposes pub fn serialize and pub fn deserialize so it can be
attached to a struct field via #[serde(with = "...")].
Module gating lives on the parent re-export in address_funds/mod.rs
(#[cfg(feature = "json-conversion")]), so this file does not need its
own inner #![cfg(...)] attribute.
Modules§
- address_
input_ map #[serde(with = "address_input_map")]helper.- address_
output_ map_ optional_ amount #[serde(with = "address_output_map_optional_amount")]helper.- address_
output_ map_ required_ amount #[serde(with = "address_output_map_required_amount")]helper.- address_
output_ singular #[serde(with = "address_output_singular")]helper.