Documentation
    Preparing search index...

    Interface AclCheckEvent

    Event emitted on every ACL enforcement check.

    The napplet identity being checked

    The capability being checked

    Whether the check passed or failed

    hooks.onAclCheck = (event: AclCheckEvent) => {
    console.log(`${event.decision}: ${event.capability} for ${event.identity.pubkey}`);
    };
    interface AclCheckEvent {
        capability: string;
        decision: "allow" | "deny";
        identity: { dTag: string; hash: string; pubkey: string };
        message?: NappletMessage | unknown[];
        reason?: "allowed" | "capability-missing";
    }
    Index

    Properties

    capability: string

    The capability being checked (e.g., 'relay:write', 'state:read').

    decision: "allow" | "deny"

    The enforcement decision.

    identity: { dTag: string; hash: string; pubkey: string }

    The identity being checked.

    message?: NappletMessage | unknown[]

    The triggering message, if available. Accepts NIP-01 arrays or NIP-5D NappletMessage envelopes.

    reason?: "allowed" | "capability-missing"

    Why the decision was reached. Optional for backwards compatibility with pre-v1.7 audit consumers. 'allowed' -> decision === 'allow' 'capability-missing' -> decision === 'deny' (capability lookup failed)