true if the identity has the capability, false otherwise
import { check, createState, grant } from '@kehto/acl';
import { CAP_RELAY_READ } from '@kehto/acl';
const state = createState('restrictive');
const id = { dTag: 'chat', hash: 'ff00' };
check(state, id, CAP_RELAY_READ); // false (restrictive, no entry)
const state2 = grant(state, id, CAP_RELAY_READ);
check(state2, id, CAP_RELAY_READ); // true
Check whether an identity has a specific capability.
Decision logic: