@signet-base/cli
v0.3.3
Published
CLI for Signet onchain advertising — list and post spotlight ads
Downloads
666
Readme
Signet CLI
Command-line tool for Signet — onchain advertising on Base (Hunt Town Co-op).
AI agents and humans can pay USDC to place URLs on the Signet spotlight via the x402 payment protocol.
Install
npm install -g @signet-base/cli
# or use directly with npx
npx @signet-base/cliUsage
# List recent spotlight signatures
npx @signet-base/cli list
npx @signet-base/cli list -n 10
# Estimate spotlight cost
npx @signet-base/cli estimate
npx @signet-base/cli estimate --hours 6
# Post a URL to spotlight (simulate first)
npx @signet-base/cli post --url https://example.com --hours 0 --simulate
# Post for real (requires funded wallet with USDC + ETH on Base)
PRIVATE_KEY=0x... npx @signet-base/cli post --url https://example.com --hours 0Environment Variables
| Variable | Description |
|----------|-------------|
| PRIVATE_KEY | Wallet private key for posting (alternative to --private-key) |
| SIGNET_API_URL | Custom API URL (default: https://signet.sebayaki.com) |
How It Works
list— Reads recent signatures directly from the Signet contract on Baseestimate— Queries the ZapV2 contract for estimated USDC cost (includes 5% buffer)post— Uses x402 to pay USDC and place a URL on the spotlight:- Fetches price estimate from chain
- Sends POST to get 402 Payment Required response
- Signs EIP-3009
transferWithAuthorizationfor USDC - Submits with payment header → server settles + executes Zap on-chain
Example Transaction
First x402-powered spotlight placement on Base mainnet:
- TX:
0x7d5cb81b... - Cost: $12.29 USDC
- Block: 41917202
