pub fn caller_address() -> Result<Address, AuthError> 
Expand description

Get the owner of the inputs (of type Input::Coin or Input::Message) to a
TransactionScript if they all share the same owner.

Returns

  • [Result<Address, AuthError>] - Ok(Address) if the owner can be determined, Err(AuthError) otherwise.

Examples

use std::auth::inputs_owner;

fn foo() {
    match inputs_owner() {
        Ok(address) => log(address),
        Err(AuthError::InputsNotAllOwnedBySameAddress) => log("Inputs not all owned by same address."),
    }
}