Crate miden_sdk

Crate miden_sdk 

Source

Macros§

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

Structs§

AccountId
BumpAlloc
A very simple allocator for Miden SDK-based programs.
CoreAsset
Felt
NoteId
NoteType
Recipient
Tag
Word
WordAligned

Enums§

FeltError

Functions§

add_asset
Add the specified asset to the vault. Returns the final asset in the account vault defined as follows: If asset is a non-fungible asset, then returns the same as asset. If asset is a fungible asset, then returns the total fungible asset in the account vault after asset was added to it.
assert
If a == 1, removes it from the stack. Fails if a != 1
assert_eq
If a == b, removes them from the stack. Fails if a != b
assertz
If a == 0, removes it from the stack. Fails if a != 0
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.
create_note
Creates a new note. asset is the asset to be included in the note. tag is the tag to be included in the note. recipient is the recipient of the note. Returns the id of the created note.
get_id
Get the account ID of the currently executing note account.
get_inputs
Get the inputs of the currently executing note.
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.
remove_asset
Remove the specified asset from the vault.
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.