miden-lib 0.12.4

Standard library of the Miden protocol
Documentation
use crate::errors::MasmError;

// This file is generated by build.rs, do not modify manually.
// It is generated by extracting errors from the masm files in the `miden-lib/asm` directory.
//
// To add a new error, define a constant in masm of the pattern `const.ERR_<CATEGORY>_...`.
// Try to fit the error into a pre-existing category if possible (e.g. Account, Prologue,
// Non-Fungible-Asset, ...).

// NOTE SCRIPT ERRORS
// ================================================================================================

/// Error Message: "auth procedure had been called from outside the epilogue"
pub const ERR_AUTH_PROCEDURE_CALLED_FROM_WRONG_CONTEXT: MasmError = MasmError::from_static_str("auth procedure had been called from outside the epilogue");

/// Error Message: "burn requires exactly 1 note asset"
pub const ERR_BASIC_FUNGIBLE_BURN_WRONG_NUMBER_OF_ASSETS: MasmError = MasmError::from_static_str("burn requires exactly 1 note asset");

/// Error Message: "number of approvers must be equal to or greater than threshold"
pub const ERR_MALFORMED_MULTISIG_CONFIG: MasmError = MasmError::from_static_str("number of approvers must be equal to or greater than threshold");

/// Error Message: "MINT script expects exactly 9 note inputs"
pub const ERR_MINT_WRONG_NUMBER_OF_INPUTS: MasmError = MasmError::from_static_str("MINT script expects exactly 9 note inputs");

/// Error Message: "note sender is not the owner of the faucet who can mint assets"
pub const ERR_ONLY_OWNER_CAN_MINT: MasmError = MasmError::from_static_str("note sender is not the owner of the faucet who can mint assets");

/// Error Message: "failed to reclaim P2IDE note because the reclaiming account is not the sender"
pub const ERR_P2IDE_RECLAIM_ACCT_IS_NOT_SENDER: MasmError = MasmError::from_static_str("failed to reclaim P2IDE note because the reclaiming account is not the sender");
/// Error Message: "P2IDE reclaim is disabled"
pub const ERR_P2IDE_RECLAIM_DISABLED: MasmError = MasmError::from_static_str("P2IDE reclaim is disabled");
/// Error Message: "failed to reclaim P2IDE note because the reclaim block height is not reached yet"
pub const ERR_P2IDE_RECLAIM_HEIGHT_NOT_REACHED: MasmError = MasmError::from_static_str("failed to reclaim P2IDE note because the reclaim block height is not reached yet");
/// Error Message: "failed to consume P2IDE note because the note is still timelocked"
pub const ERR_P2IDE_TIMELOCK_HEIGHT_NOT_REACHED: MasmError = MasmError::from_static_str("failed to consume P2IDE note because the note is still timelocked");
/// Error Message: "P2IDE note expects exactly 4 note inputs"
pub const ERR_P2IDE_WRONG_NUMBER_OF_INPUTS: MasmError = MasmError::from_static_str("P2IDE note expects exactly 4 note inputs");

/// Error Message: "P2ID's target account address and transaction address do not match"
pub const ERR_P2ID_TARGET_ACCT_MISMATCH: MasmError = MasmError::from_static_str("P2ID's target account address and transaction address do not match");
/// Error Message: "P2ID note expects exactly 2 note inputs"
pub const ERR_P2ID_WRONG_NUMBER_OF_INPUTS: MasmError = MasmError::from_static_str("P2ID note expects exactly 2 note inputs");

/// Error Message: "SWAP script requires exactly 1 note asset"
pub const ERR_SWAP_WRONG_NUMBER_OF_ASSETS: MasmError = MasmError::from_static_str("SWAP script requires exactly 1 note asset");
/// Error Message: "SWAP script expects exactly 12 note inputs"
pub const ERR_SWAP_WRONG_NUMBER_OF_INPUTS: MasmError = MasmError::from_static_str("SWAP script expects exactly 12 note inputs");

/// Error Message: "number of approvers or threshold must not be zero"
pub const ERR_ZERO_IN_MULTISIG_CONFIG: MasmError = MasmError::from_static_str("number of approvers or threshold must not be zero");