Crate sov_modules_api

source ·

Modules

Structs

Enums

Traits

  • A context contains information which is passed to modules during transaction execution. Currently, context includes the sender of the transaction as recovered from its signature.
  • A trait that needs to be implemented for any call message.
  • Methods from this trait should be called only once during the rollup deployment.
  • A minimal trait representing a hash function. We implement our own rather than relying on Digest for broader compatibility.
  • Every module has to implement this trait. All the methods have a default implementation that can’t be invoked (because they take NonInstantiable parameter). This allows developers to override only some of the methods in their implementation and safely ignore the others.
  • Every module has to implement this trait.
  • PublicKey used in the Module System.
  • A StateTransitionRunner needs to implement this if the RPC service is needed
  • Signature used in the Module System.
  • The Spec trait configures certain key primitives to be used by a by a particular instance of a rollup. Spec is almost always implemented on a Context object; since all Modules are generic over a Context, rollup developers can easily optimize their code for different environments by simply swapping out the Context (and by extension, the Spec).