Expand description
Arkworks serialization wrapped in Parity SCALE codec
ArkScale(T) can be serialized or deserialized using parity-scale-codec,
provided T can be serialized or deserialized using ark-serialize.
Arkworks serializes via the std::io::{Read,Write} traits, or its
no_std fork of those traits, as do other zcash sapling derivatives.
At its core, Parity SCALE codec also consists of traits {Input,Output}
analogous to std::io::{Read,Write} respectively, as well as traits
{Decode,Encode} also quite similar to
ark-serialize::{CanonicalDeserialize,CanonicalSerialize}.
We simply translate between these extremely similar traits, including
wrapping and unwrapping errors appropriately.
Modules
Structs
- Arkworks type wrapped for serialization by Scale
Constants
- ArkScale usage which neither compresses nor validates inputs, only for usage in host calls where the runtime already performed validation checks.
- ArkScale usage for typical wire formats, like block data and gossip messages. Always safe.
Functions
- Arkworks’
CanonicalSerializecannot consumeIterators directly, butiter_ark_to_ark_bytesserializes exactly likeVec<T>,&'a [T], or[T]do withCanonicalSerialize. - Arkworks’
CanonicalSerializecannot consumeIterators directly, butiter_ark_to_scale_bytesserializes exactly likeArkScale(Vec<T>),ArkScale(&'a [T]), orArkScale([T])do underparity_scale_codec::Encode. - Arkworks’ serialization modes hack.
Type Definitions
- Arkworks’ serialization modes, morally (Compress, Validate) but const generics only supports integers,
boolandcharright now.