Function std::inputs::input_witness_index
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 isInput::Coin
orInput::Message
, elseNone
.
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.
}