pub fn input_coin_owner(index: u64) -> Option<Address> 
Expand description

Gets owner field from input at index if it’s a coin.

Arguments

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

Returns

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

Examples

use std::inputs::input_coin_owner;

fn foo() {
    let input_coin_owner = input_coin_owner(0);
    assert(input_coin_owner.is_some()); // Ensure the input is a coin input.
}