Knock docs

Reading the index…

Host the Console

The Console is static files, built with the knockds it talks to. Its settings, and what it needs from the person using it.

Markdown

The Knock Console is where a person sets up their Wedgie: they choose its name, bind it to themselves with World ID, name it in ENS, and kill it if it's lost. It runs in the browser. Everything it writes, it writes through the person's own wallet or through a knockd. It holds no keys of its own.

Build it

The Console and the Door are one app. Set the Console's settings as you build, from a checkout of getknock/knock:

Shell
bun install
cd apps/door
NEXT_PUBLIC_KNOCKD=https://knockd.example \
NEXT_PUBLIC_ETH_RPC=https://your-mainnet-rpc.example \
bun run build

Then serve apps/door/out/ on HTTPS, as Host the Door says. The Console is at /. On Vercel, set these settings in the project's environment variables, for Production, before it builds.

With no settings at all, it's a Console on Knock's network that uses Knock's knockd for everything. That example relays bindings through your own knockd and still gets its World ID requests signed by Knock's, which is the only one that can sign them.

Settings

They're read when it's built, so build again to change one.

SettingDefaultWhat it does
NEXT_PUBLIC_KNOCKDKnock's, https://knockd.getknock.dev; on localhost, http://127.0.0.1:8787The knockd the Console relays bindings through and looks them up with: Knock's, or your own.
NEXT_PUBLIC_KNOCKD_RPKnock's, https://knockd.getknock.dev; on localhost, http://127.0.0.1:8787The knockd that signs World ID requests. On Knock's network that's Knock's, the only one that holds Knock's World ID key. On a network of your own, yours.
NEXT_PUBLIC_ETH_RPChttps://ethereum-rpc.publicnode.comA mainnet RPC, for reading ENS when no wallet is connected, and for simulating transactions the wallet's own RPC won't.
NEXT_PUBLIC_DOCSthese docsWhere its links to the docs go.
NEXT_PUBLIC_CLUBthe Human ClubWhere its link to the Human Club goes.

Each knockd the Console calls has to let the Console's origin in: its KNOCKD_ORIGINS lists it, or is *, as Knock's is.

The KnockBindings it binds with, staging's and production's, come from contracts/deployments/480.json in the checkout it's built from. Knock's are there. A network of your own puts its own there before building.

What the person needs

  • A desktop Chromium browser, such as Chrome, Edge, Brave or Arc, for Web Serial.
  • Their Wedgie, running the Knock app, plugged in.
  • World App on their phone, to prove they're a human. The Console's Simulator option is for testing, on staging.
  • A wallet in the browser that holds, or can make, the ENS name: an extension that announces itself (EIP-6963). Naming is mainnet transactions, signed and paid for in their wallet.

What it calls

WhatWhy
The person's walletENS reads and the naming and kill-switch transactions, on mainnet.
NEXT_PUBLIC_ETH_RPCENS reads with no wallet connected, and simulations.
NEXT_PUBLIC_KNOCKD_RP/rp-context: World ID requests, signed.
NEXT_PUBLIC_KNOCKD/health, /bind, /bound, /binding and /human.
World App, through World's relayThe World ID proof, after the person scans the QR on the Wedgie.

Nothing else: no analytics, and nothing of Knock's beyond the knockds you name.