httpcat-cli 0.2.13 → 0.3.0
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.
- package/README.md +9 -9
- package/bun.lock +13 -1308
- package/dist/agent/tools.d.ts.map +1 -1
- package/dist/agent/tools.js +87 -5
- package/dist/agent/tools.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +403 -46
- package/dist/client.js.map +1 -1
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +1 -0
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/balances.d.ts.map +1 -1
- package/dist/commands/balances.js +39 -14
- package/dist/commands/balances.js.map +1 -1
- package/dist/commands/buy.d.ts.map +1 -1
- package/dist/commands/buy.js +29 -15
- package/dist/commands/buy.js.map +1 -1
- package/dist/commands/chat.d.ts.map +1 -1
- package/dist/commands/chat.js +34 -21
- package/dist/commands/chat.js.map +1 -1
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +12 -9
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/positions.js +4 -4
- package/dist/commands/positions.js.map +1 -1
- package/dist/commands/sell.d.ts.map +1 -1
- package/dist/commands/sell.js +18 -11
- package/dist/commands/sell.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +77 -10
- package/dist/config.js.map +1 -1
- package/dist/index.js +354 -118
- package/dist/index.js.map +1 -1
- package/dist/interactive/art.d.ts.map +1 -1
- package/dist/interactive/art.js +38 -0
- package/dist/interactive/art.js.map +1 -1
- package/dist/interactive/shell.d.ts.map +1 -1
- package/dist/interactive/shell.js +511 -111
- package/dist/interactive/shell.js.map +1 -1
- package/dist/mcp/chat-state.d.ts.map +1 -1
- package/dist/mcp/chat-state.js +2 -1
- package/dist/mcp/chat-state.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +108 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +44 -2
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +3 -3
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/privateKeyPrompt.d.ts.map +1 -1
- package/dist/utils/privateKeyPrompt.js +31 -7
- package/dist/utils/privateKeyPrompt.js.map +1 -1
- package/dist/utils/status.d.ts.map +1 -0
- package/dist/utils/status.js +67 -0
- package/dist/utils/status.js.map +1 -0
- package/dist/utils/token-resolver.d.ts.map +1 -1
- package/dist/utils/token-resolver.js +9 -0
- package/dist/utils/token-resolver.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -103,7 +103,7 @@ httpcat
|
|
|
103
103
|
You'll be prompted to enter:
|
|
104
104
|
|
|
105
105
|
- **Private Key** - Your wallet's private key (starts with 0x)
|
|
106
|
-
- **Network** - `
|
|
106
|
+
- **Network** - `eip155:84532` (Base Sepolia testnet) or `eip155:8453` (Base mainnet)
|
|
107
107
|
- **Agent URL** - The httpcat agent endpoint
|
|
108
108
|
- **ASCII Art** - Enable or disable cat art
|
|
109
109
|
|
|
@@ -118,7 +118,7 @@ $ httpcat
|
|
|
118
118
|
( ^.^ ) Welcome to httpcat!
|
|
119
119
|
> ^ < Your agent for token operations
|
|
120
120
|
|
|
121
|
-
🔗 Connected to:
|
|
121
|
+
🔗 Connected to: eip155:84532 (Base Sepolia)
|
|
122
122
|
🌐 Agent: https://agent.402.cat
|
|
123
123
|
|
|
124
124
|
httpcat> help
|
|
@@ -284,7 +284,7 @@ httpcat buy MTK 0.10 -r 10 -d 500
|
|
|
284
284
|
|
|
285
285
|
**Amounts:**
|
|
286
286
|
|
|
287
|
-
- Test mode (
|
|
287
|
+
- Test mode (Base Sepolia / eip155:84532): `0.05`, `0.10`, or `0.20` USDC
|
|
288
288
|
- Production (base): `50`, `100`, or `200` USDC
|
|
289
289
|
- Percentage: `10%`, `50%`, `100%` (percentage of your USDC balance)
|
|
290
290
|
- Example: `httpcat buy MTK 50%` - Buy with 50% of your USDC balance
|
|
@@ -1500,8 +1500,8 @@ Updates an existing environment's agent URL and optionally its network.
|
|
|
1500
1500
|
|
|
1501
1501
|
#### Predefined Environments
|
|
1502
1502
|
|
|
1503
|
-
- **local** - `http://localhost:8787` (
|
|
1504
|
-
- **sepolia** - `https://agent.402.cat` (
|
|
1503
|
+
- **local** - `http://localhost:8787` (eip155:84532)
|
|
1504
|
+
- **sepolia** - `https://agent.402.cat` (eip155:84532)
|
|
1505
1505
|
|
|
1506
1506
|
#### Environment Priority
|
|
1507
1507
|
|
|
@@ -1584,7 +1584,7 @@ Config is stored at `~/.config/httpcat/config.json`:
|
|
|
1584
1584
|
}
|
|
1585
1585
|
],
|
|
1586
1586
|
"activeAccountIndex": 0,
|
|
1587
|
-
"network": "
|
|
1587
|
+
"network": "eip155:84532",
|
|
1588
1588
|
"agentUrl": "https://agent.402.cat",
|
|
1589
1589
|
"facilitatorUrl": "https://facilitators.x402scan.com",
|
|
1590
1590
|
"defaultMaxPayment": "10.00",
|
|
@@ -1638,7 +1638,7 @@ Config is stored at `~/.config/httpcat/config.json`:
|
|
|
1638
1638
|
|
|
1639
1639
|
### x402 Payment Protocol
|
|
1640
1640
|
|
|
1641
|
-
httpcat uses the [x402 protocol](https://x402.org) for micropayments:
|
|
1641
|
+
httpcat uses the [x402 protocol V2](https://x402.org) for micropayments:
|
|
1642
1642
|
|
|
1643
1643
|
1. **Request** - CLI makes a request to the agent
|
|
1644
1644
|
2. **402 Response** - Agent returns payment requirements
|
|
@@ -1678,7 +1678,7 @@ export HTTPCAT_PRIVATE_KEY=0x...
|
|
|
1678
1678
|
|
|
1679
1679
|
Make sure you have enough USDC in your wallet:
|
|
1680
1680
|
|
|
1681
|
-
- Test mode (
|
|
1681
|
+
- Test mode (Base Sepolia / eip155:84532): Get testnet USDC from faucets
|
|
1682
1682
|
- Production (base): Bridge USDC to Base
|
|
1683
1683
|
|
|
1684
1684
|
You also need ETH for gas fees.
|
|
@@ -1688,7 +1688,7 @@ You also need ETH for gas fees.
|
|
|
1688
1688
|
The payment verification failed. Check:
|
|
1689
1689
|
|
|
1690
1690
|
1. Wallet has sufficient USDC and ETH
|
|
1691
|
-
2. Network is correct (
|
|
1691
|
+
2. Network is correct (eip155:84532 for testnet vs eip155:8453 for mainnet)
|
|
1692
1692
|
3. Agent URL is reachable
|
|
1693
1693
|
4. Facilitator URL is correct
|
|
1694
1694
|
|