Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

whitelistPolicy

import { whitelistPolicy } from "https://gitlab.com/soapbox-pub/strfry-policies/-/raw/develop/mod.ts";

Allows only the listed pubkeys to post to the relay. All other events are rejected.

@example
// Load allowed pubkeys from a text file.
import { readLines } from 'https://deno.land/std/io/mod.ts';
const pubkeys = readLines(await Deno.open('pubkeys.txt'));
const result = await whitelistPolicy(msg, pubkeys);
const whitelistPolicy: Policy<IterablePubkeys>;