The Eye control interface
nabuguides · build log 001

Build the Eye

A voice-commanded onchain agent for transfers and raffles that cannot move a cent without your hand on the Ledger.

Architecture first

The agent thinks.
Your hand signs.

Voice or Telegram to AI brain to tools to Ledger veto to Base

The model may understand, discover and propose. It never gets the checkbook. Every transfer—and every raffle action that changes the chain—returns to the hardware wallet for a physical decision.

One sentence to memorize: “My agent can think, but only my hand can sign.”
PieceJobAnalogy
Claude / GrokUnderstands and plansBrain
OpenClawConnects Telegram, model and toolsOperator
MoonPay CLIBalances and transfersPayment toolbox
Raffle adapterLists, entries, funding and claimsTicket desk
LedgerSigns or rejects physicallyVeto
Chapter 1

The terminal, without the fear

Terminal basics

Five commands

cd move folders
ls list files
pwd show location
mkdir make a folder
pkill stop a process

Three rescues

~ is home. A running app occupies its tab. Stop it with Ctrl + C.

Paste rule: never run a command you do not understand. Ask your AI build partner first.
Chapter 2

Install Node and npm

Installing Node.js

Download the LTS installer from nodejs.org, reopen Terminal, then verify:

node --version
npm --version

Node runs JavaScript outside the browser; npm installs the tools.

Chapter 3

Make AI your build partner

AI build partner

You direct. The model writes. You test. Full errors come back. Repairs happen one step at a time.

I want a Ledger-gated Telegram onchain agent: text or voice → LLM gateway → MoonPay tools plus a raffle adapter → physical Ledger confirmation → Base. Raffle list/get are read-only; enter/create/fund/claim require Ledger. I am a beginner. Explain every command and wait for each test.
Chapter 4

Create the Telegram bot

Creating a Telegram bot
  1. Find verified @BotFather.
  2. Send /newbot.
  3. Choose a name and username ending in bot.
  4. Store the token in a password manager.
Whoever has the token controls the bot. Revoke it immediately if exposed.
Chapter 5

The brain: gateway + model

Connecting the gateway
npm i -g openclaw
openclaw onboard
openclaw gateway
  • Pair only your Telegram account.
  • Allow enough timeout for hardware confirmation.
  • Test chat before adding financial tools.
Chapter 6

The payment hands: MoonPay CLI

MoonPay CLI
npm i -g @moonpay/cli
mp --version
mp wallet create
mp wallet balance --label nabu-fresh
Fund only a tiny test balance on Base: a little USDC and enough ETH for gas.
Chapter 7

The veto: Ledger

Ledger confirmation
  • Verify network, amount and destination on the device.
  • Expect multiple confirmations for some calls.
  • Reject anything unclear.
  • Keep the recovery phrase offline and away from AI.
Chapter 8

The hidden layer: Tap + bridge

Tap and bridge

The tap mirrors every tool call to the dashboard. The bridge routes writes through hardware signing. Together they make the agent observable without weakening the veto.

Chapter 9

The Eye dashboard

The Eye dashboard
cd ~/signal-deck
node server.js
# open http://localhost:7777
Idle
Working
Confirm
Success
Reject
Chapter 10

Your first real transfer

Transfer checklist
  • Ledger connected and Ethereum app open.
  • Gateway and dashboard running.
  • Dashboard health online.
  • Fresh Telegram chat with /new.

Send send 1 USDC to 0xYourOtherWallet. Watch violet → orange, inspect the device, confirm, then open the BaseScan link from green.

Chapter 11

Talk to it

Voice interface
SayExpected behavior
Show active rafflesPrize, cost and closing time; no signature
Enter onceReads raffle, entry count and max cost; waits
Send 2 USDC to myselfReads transfer back; waits
Chapter 12

Spoken onchain actions

Spoken onchain action
  • Transfers use saved contacts and DECK_VOICE_MAX.
  • Raffles use fresh IDs and DECK_RAFFLE_MAX_ENTRIES=1.
  • One command may be in flight.
  • The Ledger still signs the final write.
Chapter 13 · New

Raffle mode, without weakening the veto

Raffle mode: discover, propose, verify and sign

A raffle is not a security exception. Separate read-only discovery from onchain writes.

Read only · no signature

  • List active raffles
  • Inspect prize, rules and deadline
  • Show entries and claim status

Onchain write · Ledger required

  • Enter, create or fund
  • Claim prize or refund
  • Trigger any draw transaction
Read-only raffle actions versus Ledger-gated writes

The model never invents a contract or chooses a winner. Use allowlisted contracts and chain IDs; winner selection belongs to verifiable onchain randomness.

Add raffle_list and raffle_get as read-only tools. Add raffle_enter, raffle_create, raffle_fund and raffle_claim as Ledger-gated writes. Accept IDs only from a fresh list result, allowlist contracts and chains, cap entries at one, show maximum total cost, simulate each write, and never let the model select a winner.
Discover → propose → verify → sign. The agent finds the opportunity. Your device decides whether the ticket exists.
Chapter 14

Build your cinematic Eye

Create one square fire-eye image, derive violet, green, red and bright-orange states, then animate only fire and embers with a locked camera. Export seamless H.264 loops as idle.mp4, working.mp4, confirm.mp4, done.mp4 and error.mp4.

No zoom. No pan. Camera locked.
Chapter 15

Troubleshooting

Bot silent

Check gateway and pairing.

Ledger timeout

Foreground gateway; kill stale USB processes.

Raffle refused

Refresh list; verify contract, chain, deadline and cap.

Write waits forever

Reject, inspect simulation, restart bridge.

Full error → one repair step → test → record the fix in HANDOFF.md.
Chapter 16

Security rules worth printing

Security rules
  1. Recovery phrase stays offline.
  2. Verify all writes on the Ledger screen.
  3. Begin with tiny balances.
  4. Keep tokens and keys private.
  5. Keep the system local.
  6. Raffle writes use verified contracts and hard caps.
  7. AI never chooses a winner; use verifiable randomness.
Chapter 17

Build the ecosystem in public

Week 1
Terminal, Node and AI build loop.
Week 2
Telegram, gateway and chat.
Week 3
Wallet, Ledger, tap and fake events.
Week 4
Tiny transfer, voice, then raffle mode.

This is an onchain-agent architecture: a swappable brain, addable hands and a veto that stays yours.