Expand description

Traits and macros for constructing application specific strongly typed crypto wrappers.



  • Declares Public, Pair and Signature types which are functionally equivalent to the corresponding types defined by $module but are new application-specific types whose identifier is $key_type.
  • Declares Pair type which is functionally equivalent to $pair, but is new application-specific type whose identifier is $key_type.
  • Generate the given code if the pair type is available.
  • Implement bidirectional From and on-way AsRef/AsMut for two types, $inner and $outer.


  • An identifier for a specific cryptographic algorithm used by a key pair
  • An identifier for a type of cryptographic key.
  • A contiguous growable array type, written as Vec<T>, short for ‘vector’.


  • An error when deriving a key.
  • A since derivation junction description. It is the single parameter used when creating a new secret key from an existing secret key and, in the case of SoftRaw and SoftIndex a new public key from an existing public key.
  • An error with the interpretation of a secret.


  • Application-specific cryptographic object.
  • Application-specific key pair.
  • Application-specific public key.
  • Application-specific signature.
  • Something that is bound to a fixed RuntimeAppPublic.
  • Trait used for types that are really just a fixed-length array.
  • Type which has a particular kind of crypto associated with it.
  • Used for immutable dereferencing operations, like *v.
  • Derivable key trait.
  • One type is wrapped by another.
  • Type which implements Hash in std, not when no-std (std variant).
  • Trait suitable for typical cryptographic PKI key pair type.
  • Trait suitable for typical cryptographic key public type.
  • Runtime interface for an application’s public key.
  • Runtime interface for a public key.
  • Key that can be encoded to/from SS58.
  • Similar to From, except that the onus is on the part of the caller to ensure that data passed in makes sense. Basically, you’re not guaranteed to get anything sensible out.
  • Opposite of IsWrappedBy - denotes a type which is a simple wrapper around another type.

Derive Macros§