Skip to main content

is_self

Function is_self 

Source
pub fn is_self(provided_id: Principal) -> bool
Expand description

Checks if an id (e.g. a caller, a user or a principal) is the canister itself.

§Arguments

  • id: Principal of the id.

§Returns

true if the id is calling itself, if the canister is the caller, otherwise false.