@agnic/wallet-skills 1.2.0 → 1.2.1
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 +2 -0
- package/package.json +1 -1
- package/skills/agent-email.md +21 -0
- package/skills/agnic/SKILL.md +88 -0
- package/.agents/skills/authenticate-wallet/SKILL.md +0 -51
- package/.agents/skills/check-balance/SKILL.md +0 -51
- package/.agents/skills/fund-wallet/SKILL.md +0 -46
- package/.agents/skills/get-agent-identity/SKILL.md +0 -52
- package/.agents/skills/pay-for-service/SKILL.md +0 -67
- package/.agents/skills/search-for-service/SKILL.md +0 -57
- package/.agents/skills/send-usdc/SKILL.md +0 -61
- package/.agents/skills/trade-tokens/SKILL.md +0 -78
- package/skills-lock.json +0 -45
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ Agent Skills for crypto wallet operations. These skills enable AI agents to auth
|
|
|
14
14
|
| **pay-for-service** | Make paid API requests via x402 |
|
|
15
15
|
| **fund-wallet** | Get instructions for adding funds to the wallet |
|
|
16
16
|
| **get-agent-identity** | Check on-chain ERC-8004 identity and trust score |
|
|
17
|
+
| **agent-email** | Manage agent email — send, receive, check inbox |
|
|
18
|
+
| **agnic** | Unified skill — all wallet, payment, email, and identity capabilities |
|
|
17
19
|
|
|
18
20
|
## Installation
|
|
19
21
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-email
|
|
3
|
+
description: Manage your agent's email address. Use when the user asks about agent email, sending email, checking inbox, or email setup.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Instructions
|
|
7
|
+
|
|
8
|
+
1. Check if agent has an email: `npx agnic@latest email address --json`
|
|
9
|
+
2. If no email exists, create one: `npx agnic@latest email setup --json`
|
|
10
|
+
3. For inbox: `npx agnic@latest email inbox --limit 20 --json`
|
|
11
|
+
4. To send: `npx agnic@latest email send --to <address> --subject "<subject>" --body "<body>"`
|
|
12
|
+
5. To reply: `npx agnic@latest email reply --message-id <id> --body "<reply>"`
|
|
13
|
+
|
|
14
|
+
Each agent gets a unique address like `agent-123@agnic.ai`. Emails are stored with 30-day retention.
|
|
15
|
+
|
|
16
|
+
## Allowed Tools
|
|
17
|
+
- npx agnic@latest email address
|
|
18
|
+
- npx agnic@latest email setup
|
|
19
|
+
- npx agnic@latest email inbox
|
|
20
|
+
- npx agnic@latest email send
|
|
21
|
+
- npx agnic@latest email reply
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agnic
|
|
3
|
+
description: >
|
|
4
|
+
Complete AI agent wallet with payments, trading, email, and on-chain identity.
|
|
5
|
+
Use when the user wants to manage their agent's wallet, make payments, trade tokens,
|
|
6
|
+
send/receive email, or check their agent identity.
|
|
7
|
+
user-invocable: true
|
|
8
|
+
disable-model-invocation: false
|
|
9
|
+
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Agnic — Unified Agent Wallet Skill
|
|
13
|
+
|
|
14
|
+
This skill gives your AI agent a full identity stack: wallet, email, payments, trading, and on-chain identity.
|
|
15
|
+
|
|
16
|
+
### Authentication
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx agnic@latest auth login # Opens browser for OAuth login
|
|
20
|
+
npx agnic@latest auth logout # Clear stored credentials
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Balance & Funding
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx agnic@latest balance --json # All networks
|
|
27
|
+
npx agnic@latest balance --network base --json # Specific network
|
|
28
|
+
npx agnic@latest address # Show wallet address
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Supported networks: `base`, `solana`, `base-sepolia`, `solana-devnet`
|
|
32
|
+
|
|
33
|
+
### X402 Payments
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Search for APIs
|
|
37
|
+
npx agnic@latest x402 search "weather data" --json
|
|
38
|
+
|
|
39
|
+
# Preview cost before paying
|
|
40
|
+
npx agnic@latest x402 preview <url>
|
|
41
|
+
|
|
42
|
+
# Make a paid API call
|
|
43
|
+
npx agnic@latest x402 pay <url> --method GET --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Token Trading
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Get a quote
|
|
50
|
+
npx agnic@latest trade quote 10 USDC ETH --json
|
|
51
|
+
|
|
52
|
+
# Execute a trade (Base mainnet only)
|
|
53
|
+
npx agnic@latest trade 10 USDC ETH --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Supported tokens: USDC, ETH, WETH, cbETH, DAI, AERO
|
|
57
|
+
|
|
58
|
+
### Send USDC
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx agnic@latest send <amount> <address> --network base --json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Agent Identity
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx agnic@latest agent-identity --json # ERC-8004 identity, trust score, delegation
|
|
68
|
+
npx agnic@latest status --json # General account status
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Agent Email
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx agnic@latest email address --json # Show email alias
|
|
75
|
+
npx agnic@latest email setup --display-name "My Agent" # Create email alias
|
|
76
|
+
npx agnic@latest email inbox --limit 10 --json # Check inbox
|
|
77
|
+
npx agnic@latest email send --to user@example.com --subject "Hello" --body "Message"
|
|
78
|
+
npx agnic@latest email reply --message-id <id> --body "Reply text"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Workflow: Sign Up + Pay + Report
|
|
82
|
+
|
|
83
|
+
1. Check auth: `npx agnic@latest status --json`
|
|
84
|
+
2. Sign up for a service using agent email (`email send`)
|
|
85
|
+
3. Check inbox for verification (`email inbox`)
|
|
86
|
+
4. Reply to verify (`email reply`)
|
|
87
|
+
5. Make paid API call (`x402 pay`)
|
|
88
|
+
6. Email results to user (`email send`)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: authenticate-wallet
|
|
3
|
-
description: Sign in to AgnicPay wallet via browser-based OAuth
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Authenticate Wallet
|
|
10
|
-
|
|
11
|
-
Authenticate the user with their AgnicPay wallet using browser-based OAuth login.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Run the login command:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest auth login
|
|
18
|
-
```
|
|
19
|
-
This opens the user's browser to AgnicPay where they sign in and set spending limits.
|
|
20
|
-
|
|
21
|
-
2. Wait for the browser flow to complete. The CLI will show "Authenticated!" when done.
|
|
22
|
-
|
|
23
|
-
3. Verify authentication:
|
|
24
|
-
```bash
|
|
25
|
-
npx agnic@latest status --json
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Expected Output
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{
|
|
32
|
-
"authenticated": true,
|
|
33
|
-
"userId": "did:privy:...",
|
|
34
|
-
"email": "user@example.com",
|
|
35
|
-
"walletAddress": "0x...",
|
|
36
|
-
"tokenExpiry": "2026-05-22T..."
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Error Handling
|
|
41
|
-
|
|
42
|
-
- If the user cancels the browser flow, the CLI will show "Authentication failed".
|
|
43
|
-
- If the browser doesn't open, the CLI prints a URL the user can copy manually.
|
|
44
|
-
- If already authenticated, `agnic status` will confirm without re-login.
|
|
45
|
-
|
|
46
|
-
## Logout
|
|
47
|
-
|
|
48
|
-
To remove stored credentials:
|
|
49
|
-
```bash
|
|
50
|
-
npx agnic@latest auth logout
|
|
51
|
-
```
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: check-balance
|
|
3
|
-
description: Check USDC balance across networks (Base, Solana)
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Check Balance
|
|
10
|
-
|
|
11
|
-
Check the user's USDC balance across supported networks.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Verify authentication:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest status --json
|
|
18
|
-
```
|
|
19
|
-
If not authenticated, run `npx agnic@latest auth login` first.
|
|
20
|
-
|
|
21
|
-
2. Check balance for all networks:
|
|
22
|
-
```bash
|
|
23
|
-
npx agnic@latest balance --json
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
3. Or check a specific network:
|
|
27
|
-
```bash
|
|
28
|
-
npx agnic@latest balance --network base --json
|
|
29
|
-
npx agnic@latest balance --network solana --json
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Expected Output
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
[
|
|
36
|
-
{ "network": "base", "balance": "125.50", "address": "0x..." },
|
|
37
|
-
{ "network": "solana", "balance": "0", "address": "N/A" }
|
|
38
|
-
]
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Supported Networks
|
|
42
|
-
|
|
43
|
-
- `base` — Base mainnet (EVM, primary)
|
|
44
|
-
- `solana` — Solana mainnet
|
|
45
|
-
- `base-sepolia` — Base testnet
|
|
46
|
-
- `solana-devnet` — Solana devnet
|
|
47
|
-
|
|
48
|
-
## Error Handling
|
|
49
|
-
|
|
50
|
-
- If not authenticated: prompt user to run `npx agnic@latest auth login`
|
|
51
|
-
- If a network returns an error, report it and show available balances
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: fund-wallet
|
|
3
|
-
description: Get instructions for funding your AgnicPay wallet
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Fund Wallet
|
|
10
|
-
|
|
11
|
-
Provide instructions for adding funds to the user's AgnicPay wallet.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Check if the user is authenticated:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest status --json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Show the user's wallet address:
|
|
21
|
-
```bash
|
|
22
|
-
npx agnic@latest address --json
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
3. Explain funding options:
|
|
26
|
-
|
|
27
|
-
**Option 1: AgnicPay Dashboard**
|
|
28
|
-
- Go to [pay.agnic.ai](https://pay.agnic.ai)
|
|
29
|
-
- Navigate to your dashboard
|
|
30
|
-
- Use the "Add Funds" feature to deposit USDC
|
|
31
|
-
|
|
32
|
-
**Option 2: Direct Transfer**
|
|
33
|
-
- Send USDC to your wallet address on Base network
|
|
34
|
-
- The address is shown by `agnic address`
|
|
35
|
-
- Use any wallet (MetaMask, Coinbase, etc.) to send USDC on Base
|
|
36
|
-
|
|
37
|
-
4. After funding, verify the balance:
|
|
38
|
-
```bash
|
|
39
|
-
npx agnic@latest balance --json
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Important Notes
|
|
43
|
-
|
|
44
|
-
- AgnicPay wallets use USDC (not ETH) for payments and trading
|
|
45
|
-
- Base network is the primary chain
|
|
46
|
-
- Minimum recommended balance: $1.00 USDC for testing
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: get-agent-identity
|
|
3
|
-
description: Check your agent's on-chain ERC-8004 identity and trust score
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Get Agent Identity
|
|
10
|
-
|
|
11
|
-
Check the user's on-chain ERC-8004 agent identity, trust score, and KYA credentials.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Verify authentication:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest status --json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Check agent identity:
|
|
21
|
-
```bash
|
|
22
|
-
npx agnic@latest agent-identity --json
|
|
23
|
-
```
|
|
24
|
-
Note: If `agent-identity` is not available, use the API directly:
|
|
25
|
-
```bash
|
|
26
|
-
npx agnic@latest x402 pay "https://api.agnic.ai/api/agent/identity" --method GET --json
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## What is ERC-8004?
|
|
30
|
-
|
|
31
|
-
ERC-8004 ("Trustless Agents") is an Ethereum standard that gives AI agents:
|
|
32
|
-
- **On-chain identity** — An NFT representing the agent
|
|
33
|
-
- **Reputation score** — Trust score based on transaction history
|
|
34
|
-
- **Verifiable credentials** — KYA (Know Your Agent) credentials for identity verification
|
|
35
|
-
|
|
36
|
-
## Expected Output
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"agentId": 373,
|
|
41
|
-
"ownerAddress": "0x046906b3...",
|
|
42
|
-
"status": "active",
|
|
43
|
-
"registeredAt": "2024-12-15T...",
|
|
44
|
-
"trustScore": 85,
|
|
45
|
-
"categories": ["payment", "general"]
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Error Handling
|
|
50
|
-
|
|
51
|
-
- If the user doesn't have an agent identity, they can create one via the AgnicPay dashboard
|
|
52
|
-
- Agent identity is automatically created during OAuth sign-up
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pay-for-service
|
|
3
|
-
description: Make paid requests to x402-enabled APIs
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Pay for Service
|
|
10
|
-
|
|
11
|
-
Make a paid x402 request to an API endpoint. AgnicPay handles the payment automatically.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Verify authentication:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest status --json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Check balance to ensure sufficient funds:
|
|
21
|
-
```bash
|
|
22
|
-
npx agnic@latest balance --network base --json
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
3. Make the x402 payment request:
|
|
26
|
-
```bash
|
|
27
|
-
npx agnic@latest x402 pay "<url>" --json
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
4. For POST requests with a body:
|
|
31
|
-
```bash
|
|
32
|
-
npx agnic@latest x402 pay "<url>" --method POST --body '{"key": "value"}' --json
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Parameters
|
|
36
|
-
|
|
37
|
-
- `<url>` — Full URL of the x402-enabled API endpoint
|
|
38
|
-
- `--method` — HTTP method (default: GET)
|
|
39
|
-
- `--body` — Request body as JSON string (for POST/PUT)
|
|
40
|
-
|
|
41
|
-
## Example
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npx agnic@latest x402 pay "https://api.example.com/analysis" \
|
|
45
|
-
--method POST \
|
|
46
|
-
--body '{"query": "latest market data"}' \
|
|
47
|
-
--json
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Expected Output
|
|
51
|
-
|
|
52
|
-
```json
|
|
53
|
-
{
|
|
54
|
-
"status": 200,
|
|
55
|
-
"cost": "0.001",
|
|
56
|
-
"network": "base",
|
|
57
|
-
"transactionHash": "0xabc123...",
|
|
58
|
-
"data": { "result": "..." }
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Error Handling
|
|
63
|
-
|
|
64
|
-
- If not authenticated: prompt user to run `npx agnic@latest auth login`
|
|
65
|
-
- If balance is insufficient, inform the user and suggest funding
|
|
66
|
-
- If the API returns an error, show the status code and response body
|
|
67
|
-
- The `--body` flag must be valid JSON; if invalid, the CLI will report the parse error
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: search-for-service
|
|
3
|
-
description: Search for x402-enabled APIs and services
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Search for Service
|
|
10
|
-
|
|
11
|
-
Discover x402-enabled APIs that can be paid for using AgnicPay.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Search for APIs matching the user's query:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest x402 search "<query>" --json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Optionally filter by category:
|
|
21
|
-
```bash
|
|
22
|
-
npx agnic@latest x402 search "<query>" --category AI --json
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
3. Present the results to the user with names, descriptions, prices, and URLs.
|
|
26
|
-
|
|
27
|
-
## Parameters
|
|
28
|
-
|
|
29
|
-
- `<query>` — Search term (e.g., "sentiment analysis", "weather data")
|
|
30
|
-
- `--category` — Filter by category: AI, Crypto, Data, Trading, Finance, Weather
|
|
31
|
-
- `--limit <n>` — Max results (default: 10)
|
|
32
|
-
|
|
33
|
-
## Example
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npx agnic@latest x402 search "sentiment analysis" --category AI --json
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Expected Output
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"apis": [
|
|
44
|
-
{
|
|
45
|
-
"name": "Sentiment Pro",
|
|
46
|
-
"description": "Real-time sentiment analysis",
|
|
47
|
-
"price": "0.001",
|
|
48
|
-
"url": "https://api.example.com/sentiment"
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Error Handling
|
|
55
|
-
|
|
56
|
-
- If no results found, suggest broadening the search or trying different keywords
|
|
57
|
-
- Authentication is NOT required for search (it's a public endpoint)
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: send-usdc
|
|
3
|
-
description: Send USDC to a wallet address on Base or Solana
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Send USDC
|
|
10
|
-
|
|
11
|
-
Send USDC from the user's wallet to a recipient address.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Verify authentication:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest status --json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Check balance to ensure sufficient funds:
|
|
21
|
-
```bash
|
|
22
|
-
npx agnic@latest balance --network base --json
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
3. Confirm with the user: the amount, recipient address, and network.
|
|
26
|
-
|
|
27
|
-
4. Send USDC:
|
|
28
|
-
```bash
|
|
29
|
-
npx agnic@latest send <amount> <recipient_address> --network base --json
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Parameters
|
|
33
|
-
|
|
34
|
-
- `<amount>` — Amount in USDC (e.g., `5.00`)
|
|
35
|
-
- `<recipient_address>` — Destination wallet address (0x... for EVM)
|
|
36
|
-
- `--network` — Network to send on (default: `base`)
|
|
37
|
-
- `--memo` — Optional transaction memo
|
|
38
|
-
|
|
39
|
-
## Example
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npx agnic@latest send 5.00 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7 --network base --json
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Expected Output
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"amount": "5.00",
|
|
50
|
-
"to": "0x742d35Cc...",
|
|
51
|
-
"network": "base",
|
|
52
|
-
"transactionHash": "0xabc123...",
|
|
53
|
-
"explorerUrl": "https://basescan.org/tx/0xabc123..."
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## Error Handling
|
|
58
|
-
|
|
59
|
-
- If balance is insufficient, inform the user and suggest funding their wallet
|
|
60
|
-
- Always confirm the recipient address and amount before sending
|
|
61
|
-
- If the transaction fails, show the error message from the API
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: trade-tokens
|
|
3
|
-
description: Trade/swap tokens on Base (USDC, ETH, WETH, cbETH, DAI, AERO)
|
|
4
|
-
user-invocable: true
|
|
5
|
-
disable-model-invocation: false
|
|
6
|
-
allowed-tools: ["Bash(npx agnic@latest *)"]
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Trade Tokens
|
|
10
|
-
|
|
11
|
-
Swap tokens on Base mainnet using AgnicPay's DEX integration.
|
|
12
|
-
|
|
13
|
-
## Steps
|
|
14
|
-
|
|
15
|
-
1. Verify authentication:
|
|
16
|
-
```bash
|
|
17
|
-
npx agnic@latest status --json
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
2. Check balance to ensure sufficient funds:
|
|
21
|
-
```bash
|
|
22
|
-
npx agnic@latest balance --network base --json
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
3. Preview the trade (optional but recommended):
|
|
26
|
-
```bash
|
|
27
|
-
npx agnic@latest trade <amount> <sell_token> <buy_token> --dry-run --json
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
4. Confirm with the user: amount, tokens, and estimated output.
|
|
31
|
-
|
|
32
|
-
5. Execute the trade:
|
|
33
|
-
```bash
|
|
34
|
-
npx agnic@latest trade <amount> <sell_token> <buy_token> --json
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Supported Tokens
|
|
38
|
-
|
|
39
|
-
USDC, ETH, WETH, cbETH, DAI, AERO (case-insensitive)
|
|
40
|
-
|
|
41
|
-
## Parameters
|
|
42
|
-
|
|
43
|
-
- `<amount>` — Amount of the sell token
|
|
44
|
-
- `<sell_token>` — Token to sell (e.g., `usdc`)
|
|
45
|
-
- `<buy_token>` — Token to buy (e.g., `eth`)
|
|
46
|
-
- `--slippage <percent>` — Max slippage (default: `1.0`)
|
|
47
|
-
- `--dry-run` — Show quote without executing
|
|
48
|
-
|
|
49
|
-
## Example
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Preview
|
|
53
|
-
npx agnic@latest trade 10 usdc eth --dry-run --json
|
|
54
|
-
|
|
55
|
-
# Execute
|
|
56
|
-
npx agnic@latest trade 10 usdc eth --json
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Expected Output
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"success": true,
|
|
64
|
-
"sellAmount": "10",
|
|
65
|
-
"sellToken": "USDC",
|
|
66
|
-
"buyAmount": "0.00396",
|
|
67
|
-
"buyToken": "ETH",
|
|
68
|
-
"price": "2525.25",
|
|
69
|
-
"transactionHash": "0xabc123...",
|
|
70
|
-
"explorerUrl": "https://basescan.org/tx/0xabc123..."
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Error Handling
|
|
75
|
-
|
|
76
|
-
- Always preview with `--dry-run` first to show the user expected output
|
|
77
|
-
- If slippage is too high, suggest a lower amount or higher slippage tolerance
|
|
78
|
-
- Trading is only available on Base mainnet
|
package/skills-lock.json
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"skills": {
|
|
4
|
-
"authenticate-wallet": {
|
|
5
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
6
|
-
"sourceType": "local",
|
|
7
|
-
"computedHash": "74ef64363b7511197e6c1716fef89e4a1e81ba7f498056835fa901a9a2c01b99"
|
|
8
|
-
},
|
|
9
|
-
"check-balance": {
|
|
10
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
11
|
-
"sourceType": "local",
|
|
12
|
-
"computedHash": "f10496084d9bf659e310136df35dbb387d6f217d54e58a45fca28d6a818223ff"
|
|
13
|
-
},
|
|
14
|
-
"fund-wallet": {
|
|
15
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
16
|
-
"sourceType": "local",
|
|
17
|
-
"computedHash": "7aeb3e1cec7cba25583a0beefa8144dd7aebb300db52e5e41c4aa5ee844a509f"
|
|
18
|
-
},
|
|
19
|
-
"get-agent-identity": {
|
|
20
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
21
|
-
"sourceType": "local",
|
|
22
|
-
"computedHash": "b71599479c6a337980b26a98bb99b3a2688d3ce2ae80472c9ca3827624031c7f"
|
|
23
|
-
},
|
|
24
|
-
"pay-for-service": {
|
|
25
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
26
|
-
"sourceType": "local",
|
|
27
|
-
"computedHash": "bfbc7396f25604d9f6ad6f5075b27c9a285f9da145b66d2e916638bc9ad3c7c8"
|
|
28
|
-
},
|
|
29
|
-
"search-for-service": {
|
|
30
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
31
|
-
"sourceType": "local",
|
|
32
|
-
"computedHash": "1e5f108a628b15184f5044af4d47cc63cff2362de3b98efa0785c9a23a18ece6"
|
|
33
|
-
},
|
|
34
|
-
"send-usdc": {
|
|
35
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
36
|
-
"sourceType": "local",
|
|
37
|
-
"computedHash": "890ea005d0a629b093fe4be952169eac50de034d0fe1ba039518df5851cf26c8"
|
|
38
|
-
},
|
|
39
|
-
"trade-tokens": {
|
|
40
|
-
"source": "/Users/asadsafari/Desktop/Projects/fitchecktest/agnicwallet-project/agnic-wallet-skills",
|
|
41
|
-
"sourceType": "local",
|
|
42
|
-
"computedHash": "14743ac9f8f1410dab6f34b865fbedb0d1ee136bce329418945963140d671bfe"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|