Create an enforcement gate with the given configuration.
Returns a function that checks a single capability for a given pubkey. Every call is logged to the audit callback.
Enforcement configuration with ACL checker, identity resolver, and audit hooks
An enforce function that checks capabilities and logs decisions
const gate = createEnforceGate({ checkAcl: aclStore.check, resolveIdentity: (pk) => nappKeyRegistry.getEntry(pk), onAclCheck: hooks.onAclCheck,});const result = gate('abc123...', 'relay:write');// result.allowed === true | false Copy
const gate = createEnforceGate({ checkAcl: aclStore.check, resolveIdentity: (pk) => nappKeyRegistry.getEntry(pk), onAclCheck: hooks.onAclCheck,});const result = gate('abc123...', 'relay:write');// result.allowed === true | false
Create an enforcement gate with the given configuration.
Returns a function that checks a single capability for a given pubkey. Every call is logged to the audit callback.