Documentation
    Preparing search index...

    Function revoke

    • Revoke a capability from an identity.

      If the identity has no entry, one is created with default caps minus the revoked cap. Returns a new AclState — the original is not modified.

      Parameters

      • state: AclState

        Current ACL state

      • identity: Identity

        Napplet identity

      • cap: number

        Capability bit constant to revoke (e.g., CAP_RELAY_WRITE)

      Returns AclState

      New AclState with the capability revoked

      const state2 = revoke(state, id, CAP_RELAY_WRITE);
      check(state2, id, CAP_RELAY_WRITE); // false