Expand description

Derivation macros for commit encoding. To learn more about the strict commit please check commit_verify crate.

Derivation macros

Library exports derivation macros #[derive(CommitEncode)], which can be added on top of any structure you’d like to support commitment encoding.

Encoding/decoding implemented by both of these macros may be configured at type and individual field level using #[commit_encode(...)] attributes.

Attribute

CommitEncode behavior can be customized with #[commit_encoding(...)] attribute, which accepts different arguments depending to which part of the data type it is applied.

Attribute arguments at type declaration level

Derivation macros accept #[commit_encoding()] attribute with the following arguments:

Derive Macros