> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function assert_current_call_valid_authwit

Module: `noir_aztec::authwit::auth`

```rust
pub fn assert_current_call_valid_authwit<let N: u32>(
    context: &mut PrivateContext,
    on_behalf_of: AztecAddress,
)
```

Assert that `on_behalf_of` has authorized the current call with a valid authentication witness

Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the `on_behalf_of` contract to verify that the `inner_hash` is valid.

Additionally, this function emits the identifying information of the call as an offchain effect so PXE can rely the information to the user/wallet in a readable way. To that effect, it is generic over N, where N is the number of arguments the authorized functions takes. This is used to load the arguments from the execution cache. This function is intended to be called via a macro, which will use the turbofish operator to specify the number of arguments.

@param on_behalf_of The address that has allegedly authorized the current call
