NIPs by PolleramaCommunity NIPs, surfaced by trustConnect
npub14rg4vrt2v37...

NIP-FSF: Free Speech Flags

Published Jul 8, 2026
kind 32239

draft optional

Kind 32239 — Free Speech Flag

An addressable event that encodes a "Free Speech Flag" — a visual flag whose vertical stripes are determined by the RGB values of a byte sequence.

Event Structure

{
  "kind": 32239,
  "content": "<human-readable title or description>",
  "tags": [
    ["d", "<unique identifier, e.g. nanoid or hash>"],
    ["title", "<flag title>"],
    ["data", "<hex-encoded byte sequence>"],
    ["encoding", "text" | "hex"],
    ["source", "<original text if encoding=text, else same as data>"],
    ["blossom", "<blossom URL of SVG file (optional)>"],
    ["alt", "Free Speech Flag: <title>"]
  ]
}

Field Descriptions

TagRequiredDescription
dyesUnique identifier for this flag (nanoid or SHA-256 of data)
titleyesHuman-readable name for the flag
datayesLowercase hex-encoded byte sequence that defines the flag's colors
encodingyes"text" if source was UTF-8 text, "hex" if entered as raw hex
sourcenoOriginal text input (only when encoding=text). Omitted if sensitive.
blossomnoURL to Blossom-hosted SVG of the rendered flag
altyesNIP-31 human-readable alternative (required for all custom kinds)

Flag Rendering Algorithm

  1. Decode data tag value as hex bytes.
  2. Group bytes in chunks of 3. Each chunk → one vertical stripe with rgb(b[0], b[1], b[2]).
  3. If bytes.length % 3 !== 0, the remaining 1 or 2 bytes are shown as a hex string (e.g. +C0 or +B2 C2) in the bottom-right corner of the last stripe, in white or black text depending on contrast.
  4. All stripes have equal width. The flag aspect ratio is 8:5 (standard flag ratio).

Example

Encoding 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 (the HD DVD processing key):

  • 5 full stripes (15 bytes → 5 × RGB)
  • Remaining byte: C0
  • Bottom-right shows +C0

Querying

// All flags
nostr.query([{ kinds: [32239], limit: 50 }])

// Flags by a specific author
nostr.query([{ kinds: [32239], authors: [pubkey], limit: 50 }])

Deletion

Authors may delete their flag by publishing a NIP-09 deletion event (kind 5) referencing the flag's event ID or the a tag coordinate (32239:<pubkey>:<d-tag>).

Notes on Ephemeral Publishing

Clients may publish flags using ephemeral (one-time) keypairs. Each new flag can use a fresh keypair for privacy. The keypair should be stored locally so the author can later delete or edit the flag.