procedure_digest

Macro procedure_digest 

Source
macro_rules! procedure_digest {
    ($name:ident, $proc_name:expr, $library_fn:expr) => { ... };
}
Expand description

Macro to simplify the creation of static procedure digest constants.

This macro generates a LazyLock<Word> static variable that lazily initializes the digest of a procedure from a library.

Note: This macro references exported types from miden_objects, so your crate must include miden-objects as a dependency.

§Arguments

  • $name - The name of the static variable to create
  • $proc_name - The string name of the procedure
  • $library_fn - The function that returns the library containing the procedure

§Example

procedure_digest!(
    BASIC_WALLET_RECEIVE_ASSET,
    BasicWallet::RECEIVE_ASSET_PROC_NAME,
    basic_wallet_library
);