/** * Official Zero Ad Network public key. * Used to verify that `X-Better-Web-Hello` header values are authentic * and have not been tampered with. */ declare const ZEROAD_NETWORK_PUBLIC_KEY: string; /** * IMPORTANT: Requirements listed for each feature class MUST be fulfilled fully. * Failure to comply will result in the site getting banned from Zero Ad Network platform. */ declare enum FEATURE { /** * Feature requirements: * - Disable all advertisements on the page; * - Disable all Cookie Consent screens (headers, footers, or dialogs); * - Fully opt out the user of non-functional trackers; * - Disable all marketing dialogs or popups (newsletters, promotions, etc.). */ CLEAN_WEB = 1, /** * Feature requirements: * - Provide Free access to content behind a paywall (news, articles, etc.); * - Provide Free access to your base subscription plan (if subscription model is present). */ ONE_PASS = 2 } declare enum SERVER_HEADER { WELCOME = "X-Better-Web-Welcome" } declare enum CLIENT_HEADER { HELLO = "X-Better-Web-Hello" } declare enum PROTOCOL_VERSION { V_1 = 1 } declare const CURRENT_PROTOCOL_VERSION = PROTOCOL_VERSION.V_1; declare function encodeServerHeader(clientId: string, features: FEATURE[]): string; type WelcomeHeader = { clientId: string; version: PROTOCOL_VERSION; features: (keyof typeof FEATURE)[]; }; declare function decodeServerHeader(headerValue: string | null | undefined): WelcomeHeader | undefined; export { CLIENT_HEADER as C, FEATURE as F, PROTOCOL_VERSION as P, SERVER_HEADER as S, ZEROAD_NETWORK_PUBLIC_KEY as Z, CURRENT_PROTOCOL_VERSION as a, decodeServerHeader as d, encodeServerHeader as e }; export type { WelcomeHeader as W };