UMIS SDK
    Preparing search index...

    Function checkDelegation

    • The delegation rules, checked in this order: depth (parent.depth + 1 within maxDepth), lifetime (child.exp not after parent.exp), and width (every child item is narrower than some parent item). Values that are not numbers fail their rule.

      Parameters

      • i: {
            child: { authority: AuthorityItem[]; exp: number };
            parent: {
                authority: AuthorityItem[];
                depth: number;
                exp: number;
                maxDepth: number;
            };
        }

      Returns
          | { ok: true }
          | {
              ok: false;
              reason:
                  | "DELEGATION_WIDER_THAN_PARENT"
                  | "DELEGATION_DEPTH_EXCEEDED"
                  | "DELEGATION_OUTLIVES_PARENT";
          }