kernl API
    Preparing search index...

    Function classifyEnvelope

    • Assign an operation class to an inbound applet envelope.

      kehto treats the class as an opaque key; this is where kernl gives it meaning. Deletions get their own class because a flood of deletes is the cheapest way for an applet to damage an account's public record.

      Parameters

      • envelope: GuardEnvelope

        The envelope fields the guard classifies on.

      Returns OpClass

      The operation class the rates and caps are keyed by.

      classifyEnvelope({ type: 'relay.publish', kind: 5 }); // 'relay:publish:delete'
      classifyEnvelope({ type: 'resource.fetch' }); // 'resource:bytes'
      classifyEnvelope({ type: 'clipboard.write' }); // 'generic'