# The MASM code of the Multi-Signature Authentication Component.
#
# See the `AuthMultisig` Rust type's documentation for more details.

use miden::standards::auth::multisig

pub use multisig::update_signers_and_threshold
pub use multisig::get_threshold_and_num_approvers
pub use multisig::set_procedure_threshold
pub use multisig::get_signer_at
pub use multisig::is_signer

#! Authenticate a transaction with multi-signature support.
#!
#! Inputs:
#!   Operand stack: [SALT]
#! Outputs:
#!   Operand stack: []
#!
#! Invocation: call
@auth_script
pub proc auth_tx_multisig(salt: word)
    exec.multisig::auth_tx
    # => [TX_SUMMARY_COMMITMENT]

    exec.multisig::assert_new_tx
    # => []
end
