pub fn input_witness_index(index: u64) -> Option<u16> 
Expand description

Gets the witness index from the input at index.

Arguments

  • index: [u64] - The index of the input to check.

Returns

  • [Option] - The witness index of the input at index, if the input’s type is Input::Coin or Input::Message, else None.

Examples

use std::inputs::input_witness_index;

fn foo() {
    let input_witness_index = input_witness_index(0);
    assert(input_witness_index.is_some()); // Ensure the input has a witness index.
}