Expand description
JSON Schema adapter types for the IOTA JSON-RPC surface, applied at field
sites via #[serde_as(as = "...")]. Core serde behaviour lives in
iota_types::iota_serde; this module adds the schemars::JsonSchema layer
on top (the iota-types crate intentionally has no schemars dependency).
To add a new adapter, prefer a unit marker struct with a manual
JsonSchema impl for explicit control over description, format, and shape.
If custom serialisation is needed, delegate SerializeAs / DeserializeAs
to the corresponding adapter in iota_types::iota_serde so the two crates
cannot drift. Newtype wrappers (e.g. SequenceNumberString(u64)) are only
appropriate when the wrapper itself is the serialised value.
Structs§
- Base58
- A schema type that defines the JSON representation of a Base58 encoded string. A custom JsonSchema impl is necessary to add the “base58” format to the schema.
- Base64
- A schema type that defines the JSON representation of a Base64 encoded string. A custom JsonSchema impl is necessary to add the “base64” format to the schema.
- Generic
Signature - A schema type that defines the JSON representation of a Base64 encoded signature.
- Identifier
- A schema type that defines the JSON representation of a Move identifier,
and provides a string serialization usable via
#[serde_as]. - Iota
Address - A schema type that defines the JSON representation of the
IotaAddresstype. - ObjectID
- A schema type that defines the JSON representation of the
ObjectIDtype. - Protocol
Version - A schema type that defines the JSON representation of the
ProtocolVersiontype as a string and provides an alternate serialization usable via#[serde_as]. - Sequence
Number String - A schema type that defines the JSON representation of the
SequenceNumbertype as a string and provides an alternate serialization usable via#[serde_as]. - Sequence
Number U64 - A schema type that defines the JSON representation of the
SequenceNumbertype as a u64 integer and uses the default serialization. - Struct
Tag - A schema type that defines the JSON representation of a Move
StructTagas a string, and provides a string serialization usable via#[serde_as]. - TypeTag
- A schema type that defines the JSON representation of a Move
TypeTagas a string, and provides a string serialization usable via#[serde_as].