@signet-base/cli 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +38 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Signet CLI
2
2
 
3
- Command-line tool for [Signet](https://signet.sebayaki.com) onchain advertising.
3
+ Command-line tool for [Signet](https://signet.sebayaki.com) onchain advertising on Base (Hunt Town Co-op).
4
+
5
+ AI agents and humans can pay USDC to place URLs on the Signet spotlight via the [x402 payment protocol](https://www.x402.org).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @signet-base/cli
11
+ # or use directly with npx
12
+ npx @signet-base/cli
13
+ ```
4
14
 
5
15
  ## Usage
6
16
 
@@ -13,9 +23,11 @@ npx @signet-base/cli list -n 10
13
23
  npx @signet-base/cli estimate
14
24
  npx @signet-base/cli estimate --hours 6
15
25
 
16
- # Post a URL to spotlight (requires wallet)
17
- npx @signet-base/cli post --url https://example.com --hours 0
18
- npx @signet-base/cli post --url https://example.com --private-key 0x...
26
+ # Post a URL to spotlight (simulate first)
27
+ npx @signet-base/cli post --url https://example.com --hours 0 --simulate
28
+
29
+ # Post for real (requires funded wallet with USDC + ETH on Base)
30
+ PRIVATE_KEY=0x... npx @signet-base/cli post --url https://example.com --hours 0
19
31
  ```
20
32
 
21
33
  ## Environment Variables
@@ -23,9 +35,28 @@ npx @signet-base/cli post --url https://example.com --private-key 0x...
23
35
  | Variable | Description |
24
36
  |----------|-------------|
25
37
  | `PRIVATE_KEY` | Wallet private key for posting (alternative to `--private-key`) |
38
+ | `SIGNET_API_URL` | Custom API URL (default: `https://signet.sebayaki.com`) |
26
39
 
27
40
  ## How It Works
28
41
 
29
- 1. **`list`** — Fetches recent signatures from the Signet API
30
- 2. **`estimate`** — Queries the estimated USDC cost for a spotlight placement
31
- 3. **`post`** — Uses the [x402 payment protocol](https://www.x402.org) to pay USDC and place a URL on the spotlight
42
+ 1. **`list`** — Reads recent signatures directly from the Signet contract on Base
43
+ 2. **`estimate`** — Queries the ZapV2 contract for estimated USDC cost (includes 5% buffer)
44
+ 3. **`post`** — Uses x402 to pay USDC and place a URL on the spotlight:
45
+ - Fetches price estimate from chain
46
+ - Sends POST to get 402 Payment Required response
47
+ - Signs EIP-3009 `transferWithAuthorization` for USDC
48
+ - Submits with payment header → server settles + executes Zap on-chain
49
+
50
+ ## Example Transaction
51
+
52
+ First x402-powered spotlight placement on Base mainnet:
53
+
54
+ - **TX**: [`0x7d5cb81b...`](https://basescan.org/tx/0x7d5cb81b3f9de246bfbc1e689b74ae244d689380227110dc430d984969e14485)
55
+ - **Cost**: $12.29 USDC
56
+ - **Block**: 41917202
57
+
58
+ ## Links
59
+
60
+ - [Signet](https://signet.sebayaki.com)
61
+ - [Hunt Town Docs](https://docs.hunt.town)
62
+ - [x402 Protocol](https://www.x402.org)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signet-base/cli",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "CLI for Signet onchain advertising — list and post spotlight ads",
5
5
  "type": "module",
6
6
  "bin": {