Crate miden

Crate miden 

Source

Re-exports§

pub use wit_bindgen;

Modules§

account
intrinsics
note
storage
tx

Macros§

felt
Creates a Felt from an integer constant checking that it is within the valid range at compile time.
generate

Structs§

AccountId
Asset
BumpAlloc
A very simple allocator for Miden SDK-based programs.
Digest
A cryptographic digest representing a 256-bit hash value.
Felt
NoteIdx
NoteType
Recipient
StorageCommitmentRoot
StorageMap
Tag
Value
Word
WordAligned

Traits§

StorageMapAccess
ValueAccess

Functions§

adv_load_preimage
Pops an arbitrary number of words from the advice stack and asserts it matches the commitment. Returns a Vec containing the loaded words.
assert_eq
Fails if a != b
blake3_hash_1to1
Hashes a 32-byte input to a 32-byte output using the BLAKE3 hash function.
blake3_hash_2to1
Hashes a 64-byte input to a 32-byte output using the BLAKE3 hash function.
emit_falcon_sig_to_stack
Emits an event to request a Falcon signature for the current message/public key. Host is expected to push the signature onto the advice stack in response. This is a workaround until migrating to VM v0.18 where the emit op reads the value from the stack.
extern_hash_memory
Computes the hash of a sequence of field elements using the Rescue Prime Optimized (RPO) hash function.
hash_elements
Computes the hash of a sequence of field elements using the Rescue Prime Optimized (RPO) hash function.
hash_words
Computes the hash of a sequence of words using the Rescue Prime Optimized (RPO) hash function.
pipe_double_words_to_memory
Returns an even number of words from the advice stack along with the RPO hash of all read words.
pipe_words_to_memory
Reads an arbitrary number of words num_words from the advice stack and returns them along with sequantial RPO hash of all read words.
rpo_falcon512_verify
Verifies a signature against a public key and a message. The procedure gets as inputs the hash of the public key and the hash of the message via the operand stack. The signature is expected to be provided via the advice provider. The signature is valid if and only if the procedure returns.
sha256_hash_1to1
Hashes a 32-byte input to a 32-byte output using the SHA256 hash function.
sha256_hash_2to1
Hashes a 64-byte input to a 32-byte output using the SHA256 hash function.

Attribute Macros§

component
note_script
tx_script