Repository avatar
AI Tools
v0.1.0
active

wicket-mcp

io.github.0xdopewilly/wicket-mcp

One account per human via Binance Agent ID on BNB Chain: check IDs, one-per-human lists, entries.

Documentation

Wicket

One account per human in Telegram groups and Discord servers, proven by a Binance Agent ID on BNB Chain.

Wicket is a Telegram bot (@wicketid_bot), a Discord app and a smart contract on BNB Chain. A community that adds Wicket admits an account only once it holds a seat. A member's own AI agent takes the seat with one transaction from their Binance Agentic Wallet, and the contract only seats wallets that hold an Agent ID. Agent IDs are one per person and cannot be transferred, so every seat is a different human.

For places a bot can't go (an X giveaway, a WhatsApp community, an allowlist) there are Wicket Lists: a link that takes one entry per human, with an optional winner draw seeded by a block hash nobody knows in advance.

Built for the Binance Wallet × BNB Chain Agent ID Hackathon.

Why

Crypto communities are run over by bots, sock puppets and airdrop farms. Captcha bots stop scripts, not people with fifty accounts. What a community really wants is a cheap proof that each account is a different person, without collecting anyone's wallet or identity.

A Binance Agent ID is that proof. Each Binance user can claim exactly one, it can't be transferred or sold, and it lives on BNB Chain where any contract can check it. Wicket turns it into a seat: one seat per Agent ID per community, and one Agent ID per chat account.

How it works

  1. Join. Someone joins a Telegram group that uses Wicket (the bot mutes them and posts a "Verify with Agent ID" button), or presses "Verify with Agent ID" on a Discord server's Wicket panel.
  2. Ticket. Wicket privately sends an instruction for the member's agent: call enter(room, pass) on the Wicket contract. room and pass are HMAC tags derived from the community and the account.
  3. Agent. The member pastes it to Binance AI Pro or their own agent with the Agentic Wallet skill. The agent previews the call, the member confirms, and the Agentic Wallet sends it (Developer Mode on).
  4. Seat. The contract checks the sender holds an Agent ID and that the .ai handle resolves back to it, then records the seat. It refuses a second seat for the same Agent ID in that community, and a second Agent ID for the same account.
  5. In. The member taps "Check my seat". Wicket reads the seat from BNB Chain and unmutes them on Telegram, or gives them the Wicket Verified role on Discord.

Keeping it one account per human

A seat can move: the holder calls leave(room) and verifies another account. The old account must not keep its access, or one human could verify fifty accounts one after another. Wicket closes that without a database:

  • The contract remembers every pass that ever held a seat (status(room, pass) → (holder, valid, wasUsed)).
  • Telegram: when an account speaks, the bot reads its status (cached for 3 minutes). wasUsed && !valid means it was verified once and lost its seat: the message is deleted and the account muted until it verifies again. Members from before Wicket was added are never touched.
  • Discord: every 15 minutes a scheduled job (workflow) re-checks every role holder with checkMany(room, passes) and takes the role back where the seat is gone.
  • If BNB Chain can't be read, Wicket does nothing; it never punishes a member for an RPC outage.
  • If a seat's wallet loses its Agent ID (or the member moves it to a new wallet), the seat stops counting, and the member's new wallet can take the same account's seat over with the same instruction.

Approve-only mode (Telegram)

Groups that turn on Approve new members never let unverified people in at all: Wicket DMs each requester the agent instruction and approves the request once the seat exists. Seat holders are approved instantly.

Live verify page

The member's instruction comes with a personal, signed link (/v/<token>, a Telegram Mini App inside Telegram). The page shows the exact prompt to paste into the agent, can dry-run it first (resolve name.ai, simulate enter() from that wallet, check gas), and watches BNB Chain: the moment the seat lands it lets the member in (unmuted, join request approved, or Discord role) with no extra tap. It decides from the member's real state in the chat, so reloading never repeats anything.

Wicket Lists

A list is one entry per human, anywhere a link can go. There is no bot and no database: the list's title, closing time and number of winners live in its id, and its entries live on BNB Chain in the same contract.

  • Room: keccak256("wicket:list:v1:" + id). Public on purpose, so any contract can call isMember(room, wallet).
  • Entry: a ticket is a pass with an optional handle in its first bytes and 16 random bytes after, so nobody can take someone else's pass first. The entrant's agent calls enter(room, pass); the contract seats one pass per Agent ID per room. Entries show the entrant's Agent ID name, read from the registry.
  • Draw: the pool is every entry before the first block after closing time, in (block, log index) order. The seed is keccak256(blockHash ‖ room) of that block, and winner i is removed from the pool at keccak256(seed ‖ i) mod pool.length. Anyone can re-run it from the CSV export and the block hash.
  • Safety: the instruction an entrant gives their agent never contains the list's title or any other text from the list's creator, so a list can't smuggle instructions into someone's agent.

How Agent ID is used

Agent ID propertyWhat Wicket does with it
One per personOne seat per Agent ID per community, so one account per human
Non-transferableA verified seat can't be bought, sold or rented
On-chain on BNB ChainThe contract checks balanceOf and the handleOf → ownerOfHandle round trip on every seat and every check
Belongs to an Agentic WalletThe member's agent does the verification; nobody connects a wallet to a website
ComposableisMember(room, wallet) lets any contract limit an airdrop, allowlist or vote to a community's verified humans, or to a Wicket List
NamesWicket resolves name.ai to a wallet for the preflight and shows each list entry's Agent ID name

Every community that adds Wicket gives its members a reason to claim an Agent ID.

Privacy and safety

  • No wallet connection, QR code, pairing code, seed phrase or key, ever. The agent sends one public transaction from the member's own wallet, after the member confirms the preview.
  • Nothing on-chain links a chat account to a wallet. room and pass are HMAC-SHA256 tags keyed by the bot's secret, in separate namespaces for Telegram and Discord. Outsiders can't tell which community a room is or which account a pass is.
  • What members can see: everyone in a community receives the same room tag, so a member could list which Agent IDs sit in their room. They still can't tell which account each one uses. This is inherent to any on-chain gate; Wicket never displays it.
  • What the operator can see: whoever runs the bot holds the tag secret, so it could link accounts to wallets. Wicket's bot doesn't store or show that link anywhere; run your own bot if that matters to you.
  • The bot stores nothing. It recomputes tags from ids and reads seats from the chain. The Telegram activity cache only remembers "checked recently".
  • Not a lookup tool. Wicket never shows a member's wallet or .ai name to anyone else.
  • Discord role safety: Wicket creates Wicket Verified with no permissions, and refuses to hand out that role if anyone later gives it moderator or admin permissions.
  • Contract permissions: no owner, no admin, no upgrade, no pause, no mint, no fees, no withdraw. Every function is non-payable. It never holds, moves or approves tokens. Its only external calls are read-only views on the Agent ID registry, which is not a proxy.
  • Known limit: a transaction is public while pending, so someone could copy a member's pending pass and seat it with their own Agent ID first. That spends their one seat in that community to verify someone else's account, and the member can still use the community.

Contract

contracts/src/Wicket.sol, v2.

FunctionNotes
enter(bytes32 room, bytes32 pass)Take a seat. Reverts NoAgentID, AlreadySeated(pass), PassTaken(holder), EmptyTag. A pass held by a wallet that no longer passes the Agent ID check is taken over
leave(bytes32 room)Give up your seat in a room
check(room, pass) → (holder, valid)valid re-checks the Agent ID
status(room, pass) → (holder, valid, wasUsed)Adds whether the pass ever held a seat
checkMany(room, passes) → bool[]Batch re-check
isMember(room, wallet) → boolFor other contracts
isAgent(address) → boolAgent ID balance plus handle round trip
seats(room), roomsOf(holder), totalSeats(), humans(), used(room, pass)Counters; humans is distinct Agent IDs ever seated

Selectors: enter 0x88565243, leave 0x5265303c.

Tests: unit tests for every rule, a BNB Chain fork test against the real registry, and an invariant suite that runs 32,768 random enter / leave / lose-ID / re-claim calls per run and checks that seats, passes and counters always agree in both directions.

v1 (0x41500a1d0eE72f7b1BA28f05251b0B39c6F4ED02) is superseded; see deployments/bsc.json.

Add Wicket

Telegram

  1. Add @wicketid_bot to the group.
  2. Make it an admin with the Ban users permission (plus Delete messages and Invite users). It replies "Wicket is on".
  3. New members are gated from then on. Existing members can verify with /verify. /wicket shows the count.
  4. Optional: turn on Approve new members for approve-only mode.

Discord

  1. Add the app (Manage Roles, View Channels, Send Messages, Embed Links).
  2. In the channel newcomers can see, run /wicket-setup. It creates Wicket Verified and posts the verify panel.
  3. Give your other channels to Wicket Verified and hide them from @everyone. /verify and /wicket work anywhere.

Repository

contracts/          Foundry: Wicket.sol; unit, fuzz, invariant and BNB Chain fork tests
web/                Next.js on Vercel: Telegram webhook (app/api/telegram), Discord interactions
                    (app/api/discord), Discord sweep (app/api/discord/sweep), live state (app/state.json),
                    gate log (app/log.json), verify page (app/v, app/api/v), Lists (app/lists, app/l, app/api/lists),
                    setup guide + check (app/start, app/api/setup/check), judges page (app/judges)
web/lib/wicket/     Bot logic for both platforms, HMAC tags, signed links, preflight, Lists (ids, tickets,
                    draws), chain reads, log scanning, API clients, and their tests
skills/wicket/      Agent skill (SKILL.md) for agents using the Binance Agentic Wallet
mcp/                MCP server (wicket-mcp): seven tools over the public API and the contract; no keys
.github/workflows/  The 15-minute Discord sweep
deployments/        Deployed addresses
cd contracts && forge test            # 20 tests: unit, fuzz, invariant, BNB Chain fork
cd web && pnpm install && pnpm test   # 80 tests: bots, sweep, signatures, tags, verify links, preflight, Lists, draws

Running your own: set WICKET_TAG_SECRET and WICKET_ADDRESS, plus TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_USERNAME, TELEGRAM_WEBHOOK_SECRET for Telegram, and DISCORD_APP_ID, DISCORD_PUBLIC_KEY, DISCORD_BOT_TOKEN, CRON_SECRET for Discord. Deploy web/, then run node scripts/set-webhook.ts <url>/api/telegram and node scripts/discord-register.ts <url>/api/discord.

License

MIT

NPM
wicket-mcp
Install Command
npm install wicket-mcp