kernl API
    Preparing search index...

    Function createGrants

    • User-facing grants over kehto's ACL state.

      The runtime ACL is restrictive (aclDefaultPolicy, D-020): an applet with no entry holds nothing. kernl grants the baseline domains plus what the user allowed, and revokes whatever the applet's entry holds beyond that, which covers a domain the user took back and an entry kept from an earlier posture. An applet that holds messages is sealed: only the domains that cannot send what it read anywhere stay in force, and the rest are reported as withheld, unless the person chose to keep one beside messages (D-046, D-060). The per-identity record is persisted at kernl:grants:v1; the ACL itself is persisted by kehto. Blocking an applet blocks it in the ACL and empties its environment through createEnvironmentResolver.

      A change made with remember: false lives in memory beside the stored record, takes precedence over it, and is never written; forgetTemporary drops it and puts the stored record back in force (D-060).

      Parameters

      • options: GrantsOptions

        ACL container, storage and the live domain list.

      Returns KernlGrants

      The grants surface.

      const grants = createGrants({ acl: bridge.runtime.aclState, storage, availableDomains });
      grants.allowDomain(identity, 'relay');
      grants.get(identity)?.capabilities; // includes 'relay:read' and 'relay:write'
      grants.allowDomain(identity, 'outbox', { remember: false }); // until grants.forgetTemporary(identity)