You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Fee preference** — auto-selects USDC over native POL when both available
125
129
-**`fund`** — reads `walletAddress` from the wallet session and sets it as `toAddress` in the Trails widget URL. Always run `polygon-agent fund` to get the correct URL — never construct it manually or hardcode any address.
126
-
-**`deposit`** — picks highest-TVL pool via Trails `getEarnPools`. If session rejects, re-create wallet with `--contract <depositAddress>`
130
+
-**`deposit`** — picks highest-TVL pool via Trails `getEarnPools`. If session rejects (contract not whitelisted), re-create wallet with `--contract <depositAddress>`
127
131
-**`x402-pay`** — probes endpoint for 402, smart wallet funds builder EOA with exact token amount, EOA signs EIP-3009 payment. Chain auto-detected from 402 response
128
132
-**`send-native --direct`** — bypasses ValueForwarder contract for direct EOA transfer
129
133
-**Session permissions** — without `--usdc-limit` etc., session gets bare-bones defaults and may not transact
130
134
-**Session expiry** — 6 months from creation
131
135
132
136
## Wallet Creation Flow (v2 Relay)
133
137
134
-
`wallet create` uses a Cloudflare Durable Object relay and a 6-digit out-of-band code — no cloudflared tunnel required:
135
-
136
-
1. CLI registers its X25519 public key with the relay, gets a request ID (`rid`)
137
-
2. CLI opens `https://agentconnect.polygon.technology/link?rid=<rid>&...` in the browser
138
-
3. User approves the wallet session in the browser (Sequence popup)
139
-
4. Browser encrypts the session with the CLI's public key and posts it to the relay
140
-
5. Browser displays a **6-digit code**
141
-
6. User enters the code in the terminal when prompted
142
-
7. CLI fetches the encrypted payload from the relay, decrypts it using the code, saves the session
138
+
`wallet create` uses a Cloudflare Durable Object relay and a 6-digit out-of-band code — no cloudflared tunnel required. The browser encrypts the approved session with an X25519 key negotiated via the relay; the 6-digit code is the decryption key entered in the terminal.
143
139
144
-
**`--print-url`flow:** CLI outputs the URL without blocking. Complete later with:
140
+
**`--print-url`flag:**Use this in headless or non-interactive environments (CI, remote shells) where `wallet create` can't block waiting for the code. The CLI prints the approval URL and exits immediately. Complete the flow separately:
@@ -166,7 +162,9 @@ CLI commands output JSON (non-TTY). After running a command, always render the r
166
162
|`deposit`| Summary: amount, asset, protocol, pool address. If broadcast, show tx hash + explorer link. |
167
163
|`fund`| Show the `fundingUrl` as a clickable link with a brief instruction to open it. |
168
164
|`wallet create` / `wallet list`| Wallet name, truncated address, chain in a small table or bullet list. |
169
-
|`agent register`| Show agent name and tx hash. Remind user to retrieve `agentId` from the Registered event. |
165
+
|`agent register`| Show agent name and tx hash as a code span with Polygonscan link. Remind user to retrieve `agentId` from the Registered event on the Logs tab. |
166
+
|`agent wallet`| Show `agentId`, wallet address, and whether a wallet is set. |
167
+
|`agent metadata`| Show `agentId`, key, and decoded value. |
170
168
|`agent reputation`| Format score and tag breakdown as a small table. |
171
169
172
170
**Dry-run results** — always make it visually clear this was a simulation. Prefix with `⚡ Dry run` and show what *would* happen. Remind the user to re-run with `--broadcast` to execute.
@@ -187,6 +185,9 @@ CLI commands output JSON (non-TTY). After running a command, always render the r
187
185
|`Relay request not found`| Session expired or already used — re-run `wallet create` (or `wallet create --print-url`) |
188
186
| Deposit session rejected | Re-create wallet with `--contract <depositAddress>`|
189
187
| Wrong recipient in Trails widget | Run `polygon-agent fund` (do not construct the URL manually) |
188
+
|`x402-pay`: no 402 response | Endpoint doesn't require x402 payment, or URL is wrong |
189
+
|`x402-pay`: payment token mismatch | Chain/token in the 402 response differs from wallet — check `--wallet` points to the right chain |
190
+
|`x402-pay`: EOA funding failed | Wallet lacks sufficient balance to cover the payment amount — run `balances` and fund if needed |
-**Fee preference** — auto-selects USDC over native POL when both available
125
129
-**`fund`** — reads `walletAddress` from the wallet session and sets it as `toAddress` in the Trails widget URL. Always run `polygon-agent fund` to get the correct URL — never construct it manually or hardcode any address.
126
-
-**`deposit`** — picks highest-TVL pool via Trails `getEarnPools`. If session rejects, re-create wallet with `--contract <depositAddress>`
130
+
-**`deposit`** — picks highest-TVL pool via Trails `getEarnPools`. If session rejects (contract not whitelisted), re-create wallet with `--contract <depositAddress>`
127
131
-**`x402-pay`** — probes endpoint for 402, smart wallet funds builder EOA with exact token amount, EOA signs EIP-3009 payment. Chain auto-detected from 402 response
128
132
-**`send-native --direct`** — bypasses ValueForwarder contract for direct EOA transfer
129
133
-**Session permissions** — without `--usdc-limit` etc., session gets bare-bones defaults and may not transact
130
134
-**Session expiry** — 6 months from creation
131
135
132
136
## Wallet Creation Flow (v2 Relay)
133
137
134
-
`wallet create` uses a Cloudflare Durable Object relay and a 6-digit out-of-band code — no cloudflared tunnel required:
135
-
136
-
1. CLI registers its X25519 public key with the relay, gets a request ID (`rid`)
137
-
2. CLI opens `https://agentconnect.polygon.technology/link?rid=<rid>&...` in the browser
138
-
3. User approves the wallet session in the browser (Sequence popup)
139
-
4. Browser encrypts the session with the CLI's public key and posts it to the relay
140
-
5. Browser displays a **6-digit code**
141
-
6. User enters the code in the terminal when prompted
142
-
7. CLI fetches the encrypted payload from the relay, decrypts it using the code, saves the session
138
+
`wallet create` uses a Cloudflare Durable Object relay and a 6-digit out-of-band code — no cloudflared tunnel required. The browser encrypts the approved session with an X25519 key negotiated via the relay; the 6-digit code is the decryption key entered in the terminal.
143
139
144
-
**`--print-url`flow:** CLI outputs the URL without blocking. Complete later with:
140
+
**`--print-url`flag:**Use this in headless or non-interactive environments (CI, remote shells) where `wallet create` can't block waiting for the code. The CLI prints the approval URL and exits immediately. Complete the flow separately:
@@ -166,7 +162,9 @@ CLI commands output JSON (non-TTY). After running a command, always render the r
166
162
|`deposit`| Summary: amount, asset, protocol, pool address. If broadcast, show tx hash + explorer link. |
167
163
|`fund`| Show the `fundingUrl` as a clickable link with a brief instruction to open it. |
168
164
|`wallet create` / `wallet list`| Wallet name, truncated address, chain in a small table or bullet list. |
169
-
|`agent register`| Show agent name and tx hash. Remind user to retrieve `agentId` from the Registered event. |
165
+
|`agent register`| Show agent name and tx hash as a code span with Polygonscan link. Remind user to retrieve `agentId` from the Registered event on the Logs tab. |
166
+
|`agent wallet`| Show `agentId`, wallet address, and whether a wallet is set. |
167
+
|`agent metadata`| Show `agentId`, key, and decoded value. |
170
168
|`agent reputation`| Format score and tag breakdown as a small table. |
171
169
172
170
**Dry-run results** — always make it visually clear this was a simulation. Prefix with `⚡ Dry run` and show what *would* happen. Remind the user to re-run with `--broadcast` to execute.
@@ -187,6 +185,9 @@ CLI commands output JSON (non-TTY). After running a command, always render the r
187
185
|`Relay request not found`| Session expired or already used — re-run `wallet create` (or `wallet create --print-url`) |
188
186
| Deposit session rejected | Re-create wallet with `--contract <depositAddress>`|
189
187
| Wrong recipient in Trails widget | Run `polygon-agent fund` (do not construct the URL manually) |
188
+
|`x402-pay`: no 402 response | Endpoint doesn't require x402 payment, or URL is wrong |
189
+
|`x402-pay`: payment token mismatch | Chain/token in the 402 response differs from wallet — check `--wallet` points to the right chain |
190
+
|`x402-pay`: EOA funding failed | Wallet lacks sufficient balance to cover the payment amount — run `balances` and fund if needed |
0 commit comments