defuse_auth_call/
lib.rs

1use near_sdk::{AccountId, PromiseOrValue, ext_contract};
2
3#[ext_contract(ext_auth_callee)]
4pub trait AuthCallee {
5    /// Perform some actions on behalf of `signer_id`.
6    ///
7    /// Verification of `signer_id` is done by the
8    /// [`predecessor_id`](::near_sdk::env::predecessor_account_id),
9    /// so the implementation MUST whitelist allowed callers.
10    ///
11    /// NOTE: implementations are recommended to be `#[payable]`
12    fn on_auth(&mut self, signer_id: AccountId, msg: String) -> PromiseOrValue<()>;
13}