{"id":"6b59be89-df26-473c-b22d-6186063497e9","entityType":"agent","slug":"clawhub-agentwalletapi-agent-crypto-wallet-depricated","name":"OpenClawCash","canonicalUrl":"https://www.xpersona.co/agent/clawhub-agentwalletapi-agent-crypto-wallet-depricated","canonicalPath":"/agent/clawhub-agentwalletapi-agent-crypto-wallet-depricated","generatedAt":"2026-10-10T14:44:25.374Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":null},"description":"Deprecated legacy skill entry. Use the current OpenClawCash skill instead. Skill: OpenClawCash Owner: agentwalletapi Summary: Deprecated legacy skill entry. Use the current OpenClawCash skill instead. Tags: latest:1.9.9 Version history: v1.9.9 | 2026-02-28T17:23:27.410Z | user - Deprecated the legacy OpenClawCash (agent-crypto-wallet) skill. - All documentation and setup instructions have been removed. - Users are instructed to use the updated OpenClawCash skill at https://clawhub.ai/macd2/","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17fskj696ncrkafwepgdw23ad8fqt35:agent-crypto-wallet-depricated","sourceUrl":"https://clawhub.ai/agentwalletapi/agent-crypto-wallet-depricated","homepage":"https://clawhub.ai/agentwalletapi/skills/agent-crypto-wallet-depricated","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/agentwalletapi/agent-crypto-wallet-depricated","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/agentwalletapi/skills/agent-crypto-wallet-depricated","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":63,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Deprecated legacy skill entry. Use the current OpenClawCash skill instead. Skill: OpenClawCash Owner: agentwalletapi Summary: Deprecated legacy skill entry. Use"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":null},"stars":null,"forks":null,"downloads":1455,"packageName":null,"latestVersion":"1.9.9","tractionLabel":"1.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T11:45:26.888Z","lastCrawledAt":"2026-10-10T11:45:26.888Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T11:45:26.888Z","lastVerifiedAt":null,"highlights":[{"version":"1.9.9","createdAt":"2026-02-28T17:23:27.410Z","changelog":"- Deprecated the legacy OpenClawCash (agent-crypto-wallet) skill. - All documentation and setup instructions have been removed. - Users are instructed to use the updated OpenClawCash skill at https://clawhub.ai/macd2/open-claw-cash.","fileCount":3,"zipByteSize":1691},{"version":"1.9.1","createdAt":"2026-02-23T15:49:08.375Z","changelog":"agent-crypto-wallet v1.9.1 - Improved guidance for automation-safe wallet import, recommending input of private key via stdin for better security. - Updated documentation to clarify that wallet import is optional and gated by explicit dashboard permissions. - Noted that dashboard wallet creation and private-key export require a strong passphrase, with new security restrictions. - Expanded safety information regarding CLI input practices and passphrase storage. - No code changes; documentation and usage guidance improvements only.","fileCount":5,"zipByteSize":13049},{"version":"1.9.0","createdAt":"2026-02-21T01:45:24.503Z","changelog":"Version 1.9.0 - Added explicit documentation for required and optional environment variables (`AGENTWALLETAPI_KEY`, `AGENTWALLETAPI_URL`) and required binaries (`curl`, optional: `jq`). - Improved safety guidance, including recommendation to use read-only calls first and requirement for explicit `--yes` confirmation for write actions in CLI. - Clarified trust and risk model for wallet import and API-key permission gating. - Updated CLI documentation to make explicit which commands are safe/read-only and which require confirmation. - Metadata section updated to reflect new requirements and version.","fileCount":5,"zipByteSize":11205},{"version":"1.8.5","createdAt":"2026-02-21T00:25:26.439Z","changelog":"agent-crypto-wallet 1.8.1 → 1.8.5 - Added new `/api/agent/wallet` endpoint to fetch a specific wallet’s details (with balances) by ID or label. - Clarified that `/wallets` is for discovery (listing) and does not include balances. - Updated CLI usage examples to demonstrate new `wallet` subcommand for fetching detailed wallet info. - Improved description of `/supported-tokens` to note guidance fields in response. - Revised workflow to recommend sequence: list wallets, fetch detailed wallet, then check balances or quote/swap. - Documentation and examples refined for clarity and expanded endpoint coverage.","fileCount":5,"zipByteSize":9784},{"version":"1.8.0","createdAt":"2026-02-20T01:23:27.266Z","changelog":"Major update: Expanded from EVM-only (\"AgentWalletApi\") to multi-chain (\"OpenclawCash\") with Solana support and advanced agent APIs. - Skill now supports both EVM and Solana wallets (token transfers, balance checks, transaction history, swaps). - Added agent-safe wallet creation/import endpoints, gated by API-key dashboard controls. - Expanded CLI tool with transaction history and Solana support. - Renamed endpoints and documentation to reflect new OpenclawCash platform and host URL. - Enhanced troubleshooting and host override section in setup instructions. - Updated example payloads and tables to include Solana, chain parameter, and expanded policy/error coverage.","fileCount":5,"zipByteSize":8939},{"version":"1.4.0","createdAt":"2026-02-19T15:50:02.747Z","changelog":"AgentWalletApi v1.2.1 → v1.4 adds swap and quote support, and expands token handling: - Added Uniswap swap and quote endpoints, enabling token swaps programmatically. - CLI tool now supports `quote` and `swap` commands. - All endpoints accept any valid ERC-20 contract address, not just a curated list. - Improved documentation for multi-step workflows including swaps. - Clarified error codes and agent integration guidance.","fileCount":5,"zipByteSize":6528},{"version":"1.2.0","createdAt":"2026-02-18T19:24:06.809Z","changelog":"- Added bash setup script (`scripts/setup.sh`) to generate a `.env` config for the API key. - Introduced CLI utility (`scripts/agentwalletapi.sh`) for direct command-line API calls (list wallets, check balances, send funds, list tokens). - Added detailed setup and CLI usage instructions to documentation. - Published comprehensive endpoint details in a new reference file (`references/api-endpoints.md`). - Updated documentation to reflect new version (1.3), enhanced setup process, and improved security guidance for API key handling.","fileCount":5,"zipByteSize":5397},{"version":"1.0.0","createdAt":"2026-02-18T19:07:20.927Z","changelog":"AgentWalletApi — Crypto Wallet API for AI Agents Give your AI agent its own Ethereum wallet. AgentWalletApi provides a simple, AI-friendly REST API that lets any agent send ETH and ERC-20 tokens, check balances, and manage wallets — without needing to understand Web3 complexity. What this skill enables: Instant wallet access — Agents discover available wallets, balances, and supported tokens through simple GET/POST endpoints Token transfers in one call — Send ETH, USDC, USDT, DAI, WETH, WBTC, UNI, or LINK with a single POST request using human-readable amounts (e.g., \"amount\": \"100\" for 100 USDC) Built-in governance — Wallet owners set spending limits and address whitelists; the API enforces them automatically so agents can only operate within approved boundaries Works with any framework — OpenAI Agents, LangChain, CrewAI, AutoGPT, or any LLM that can make HTTP requests Mainnet and Sepolia support — Test on Sepolia with free testnet ETH, then switch to Mainnet for production No Web3 knowledge required — The agent just needs an API key and this skill file; no ABI encoding, gas estimation, or nonce management Getting started: Sign up at agentwalletapi.com, create a wallet, generate an API key, and give your agent this skill file. It handles the rest.","fileCount":2,"zipByteSize":1793}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17fskj696ncrkafwepgdw23ad8fqt35:agent-crypto-wallet-depricated","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T14:44:25.371Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-agentwalletapi-agent-crypto-wallet-depricated/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":null},"readme":"Skill: OpenClawCash\n\nOwner: agentwalletapi\n\nSummary: Deprecated legacy skill entry. Use the current OpenClawCash skill instead.\n\nTags: latest:1.9.9\n\nVersion history:\n\nv1.9.9 | 2026-02-28T17:23:27.410Z | user\n\n- Deprecated the legacy OpenClawCash (agent-crypto-wallet) skill.\n- All documentation and setup instructions have been removed.\n- Users are instructed to use the updated OpenClawCash skill at https://clawhub.ai/macd2/open-claw-cash.\n\nv1.9.1 | 2026-02-23T15:49:08.375Z | user\n\nagent-crypto-wallet v1.9.1\n\n- Improved guidance for automation-safe wallet import, recommending input of private key via stdin for better security.\n- Updated documentation to clarify that wallet import is optional and gated by explicit dashboard permissions.\n- Noted that dashboard wallet creation and private-key export require a strong passphrase, with new security restrictions.\n- Expanded safety information regarding CLI input practices and passphrase storage.\n- No code changes; documentation and usage guidance improvements only.\n\nv1.9.0 | 2026-02-21T01:45:24.503Z | user\n\nVersion 1.9.0\n\n- Added explicit documentation for required and optional environment variables (`AGENTWALLETAPI_KEY`, `AGENTWALLETAPI_URL`) and required binaries (`curl`, optional: `jq`).\n- Improved safety guidance, including recommendation to use read-only calls first and requirement for explicit `--yes` confirmation for write actions in CLI.\n- Clarified trust and risk model for wallet import and API-key permission gating.\n- Updated CLI documentation to make explicit which commands are safe/read-only and which require confirmation.\n- Metadata section updated to reflect new requirements and version.\n\nv1.8.5 | 2026-02-21T00:25:26.439Z | user\n\nagent-crypto-wallet 1.8.1 → 1.8.5\n\n- Added new `/api/agent/wallet` endpoint to fetch a specific wallet’s details (with balances) by ID or label.\n- Clarified that `/wallets` is for discovery (listing) and does not include balances.\n- Updated CLI usage examples to demonstrate new `wallet` subcommand for fetching detailed wallet info.\n- Improved description of `/supported-tokens` to note guidance fields in response.\n- Revised workflow to recommend sequence: list wallets, fetch detailed wallet, then check balances or quote/swap.\n- Documentation and examples refined for clarity and expanded endpoint coverage.\n\nv1.8.0 | 2026-02-20T01:23:27.266Z | user\n\nMajor update: Expanded from EVM-only (\"AgentWalletApi\") to multi-chain (\"OpenclawCash\") with Solana support and advanced agent APIs.\n\n- Skill now supports both EVM and Solana wallets (token transfers, balance checks, transaction history, swaps).\n- Added agent-safe wallet creation/import endpoints, gated by API-key dashboard controls.\n- Expanded CLI tool with transaction history and Solana support.\n- Renamed endpoints and documentation to reflect new OpenclawCash platform and host URL.\n- Enhanced troubleshooting and host override section in setup instructions.\n- Updated example payloads and tables to include Solana, chain parameter, and expanded policy/error coverage.\n\nv1.4.0 | 2026-02-19T15:50:02.747Z | user\n\nAgentWalletApi v1.2.1 → v1.4 adds swap and quote support, and expands token handling:\n\n- Added Uniswap swap and quote endpoints, enabling token swaps programmatically.\n- CLI tool now supports `quote` and `swap` commands.\n- All endpoints accept any valid ERC-20 contract address, not just a curated list.\n- Improved documentation for multi-step workflows including swaps.\n- Clarified error codes and agent integration guidance.\n\nv1.2.0 | 2026-02-18T19:24:06.809Z | user\n\n- Added bash setup script (`scripts/setup.sh`) to generate a `.env` config for the API key.\n- Introduced CLI utility (`scripts/agentwalletapi.sh`) for direct command-line API calls (list wallets, check balances, send funds, list tokens).\n- Added detailed setup and CLI usage instructions to documentation.\n- Published comprehensive endpoint details in a new reference file (`references/api-endpoints.md`).\n- Updated documentation to reflect new version (1.3), enhanced setup process, and improved security guidance for API key handling.\n\nv1.0.0 | 2026-02-18T19:07:20.927Z | user\n\nAgentWalletApi — Crypto Wallet API for AI Agents\n\nGive your AI agent its own Ethereum wallet. AgentWalletApi provides a simple, AI-friendly REST API that lets any agent send ETH and ERC-20 tokens, check balances, and manage wallets — without needing to understand Web3 complexity.\n\nWhat this skill enables:\n\nInstant wallet access — Agents discover available wallets, balances, and supported tokens through simple GET/POST endpoints\n\nToken transfers in one call — Send ETH, USDC, USDT, DAI, WETH, WBTC, UNI, or LINK with a single POST request using human-readable amounts (e.g., \"amount\": \"100\" for 100 USDC)\n\nBuilt-in governance — Wallet owners set spending limits and address whitelists; the API enforces them automatically so agents can only operate within approved boundaries\n\nWorks with any framework — OpenAI Agents, LangChain, CrewAI, AutoGPT, or any LLM that can make HTTP requests\n\nMainnet and Sepolia support — Test on Sepolia with free testnet ETH, then switch to Mainnet for production\n\nNo Web3 knowledge required — The agent just needs an API key and this skill file; no ABI encoding, gas estimation, or nonce management\n\nGetting started: Sign up at agentwalletapi.com, create a wallet, generate an API key, and give your agent this skill file. It handles the rest.\n\nArchive index:\n\nArchive v1.9.9: 3 files, 1691 bytes\n\nFiles: skill-card.md (1754b), SKILL.md (758b), _meta.json (149b)\n\nFile v1.9.9:SKILL.md\n\n---\nname: agentwalletapi\ndescription: Deprecated legacy skill entry. Use the current OpenClawCash skill instead.\nlicense: Proprietary\ncompatibility: Deprecated. Use the current OpenClawCash skill at https://clawhub.ai/macd2/open-claw-cash\nmetadata:\n  author: agentwalletapi\n  version: \"1.9.1\"\n  required_env_vars:\n    - AGENTWALLETAPI_KEY\n  optional_env_vars:\n    - AGENTWALLETAPI_URL\n  required_binaries:\n    - curl\n  optional_binaries:\n    - jq\n---\n\n# Deprecated\n\nThis legacy OpenClawCash skill is deprecated and should no longer be used.\n\nUse the current OpenClawCash skill instead:\nhttps://clawhub.ai/macd2/open-claw-cash\n\nDo not continue setup with this legacy copy.\nInstall the replacement skill from the URL above and follow its current instructions.\n\nFile v1.9.9:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.9.9\",\n  \"publishedAt\": 1772299407410\n}\n\nFile v1.9.9:skill-card.md\n\n## Description:\n\nDeprecated legacy skill entry that directs users to the current OpenClawCash skill instead.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[macd2](https://clawhub.ai/user/macd2)\n\n### License/Terms of Use:\n\nProprietary\n\n## Use Case:\n\nExternal users and agents use this deprecated placeholder to identify that the legacy OpenClawCash skill should no longer be used and to find the current replacement skill.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Users may install or rely on the deprecated legacy placeholder instead of the maintained OpenClawCash skill.\n\nMitigation: Do not continue setup with this legacy copy; install the current OpenClawCash skill from the replacement link and follow its current instructions.\n\nRisk: The replacement skill is not pinned or audited by this legacy placeholder.\n\nMitigation: Before installing the replacement, review its current package, publisher, permissions, and version.\n\n## Reference(s):\n\n- [OpenClawCash skill page](https://clawhub.ai/macd2/skills/agent-crypto-wallet-depricated)\n- [Current OpenClawCash skill](https://clawhub.ai/macd2/open-claw-cash)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Markdown]\n\n**Output Format:** [Markdown guidance with a replacement skill link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Deprecated placeholder; no executable code.]\n\n## Skill Version(s):\n\n1.9.9 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v1.9.1: 5 files, 13049 bytes\n\nFiles: references/api-endpoints.md (12461b), scripts/agentwalletapi.sh (15866b), scripts/setup.sh (1036b), SKILL.md (11632b), _meta.json (149b)\n\nFile v1.9.1:SKILL.md\n\n---\nname: agentwalletapi\ndescription: OpenclawCash crypto wallet API for AI agents. Use when an agent needs to send native or token transfers, check balances, list wallets, or interact with EVM and Solana wallets programmatically via OpenclawCash.\nlicense: Proprietary\ncompatibility: Requires network access to https://openclawcash.com\nmetadata:\n  author: agentwalletapi\n  version: \"1.9.1\"\n  required_env_vars:\n    - AGENTWALLETAPI_KEY\n  optional_env_vars:\n    - AGENTWALLETAPI_URL\n  required_binaries:\n    - curl\n  optional_binaries:\n    - jq\n---\n\n# OpenclawCash Agent API\n\nInteract with OpenclawCash-managed wallets to send native assets and tokens, check balances, and execute agent-safe wallet operations across EVM and Solana networks.\n\n## Requirements\n\n- Required env var: `AGENTWALLETAPI_KEY`\n- Optional env var: `AGENTWALLETAPI_URL` (default: `https://openclawcash.com`)\n- Required local binary: `curl`\n- Optional local binary: `jq` (for pretty JSON output in CLI)\n- Network access required: `https://openclawcash.com`\n\n## Safety Model\n\n- Start with read-only calls (`wallets`, `wallet`, `balance`, `tokens`) on testnets first.\n- High-risk actions are gated:\n  - API key permissions in dashboard (`allowWalletCreation`, `allowWalletImport`)\n  - Explicit CLI confirmation (`--yes`) for write actions\n\n## Setup\n\n1. Run the setup script to create your `.env` file:\n   ```\n   bash scripts/setup.sh\n   ```\n2. Edit the `.env` file in this skill folder and replace the placeholder with your real API key:\n   ```\n   AGENTWALLETAPI_KEY=ag_your_real_key_here\n   ```\n3. Get your API key at https://openclawcash.com (sign up, create a wallet, go to API Keys page).\n\n## CLI Tool\n\nUse the included tool script to make API calls directly:\n\n```bash\n# Read-only (recommended first)\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh wallet 2\nbash scripts/agentwalletapi.sh wallet \"Trading Bot\"\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transactions 2\nbash scripts/agentwalletapi.sh tokens mainnet\n\n# Write actions (require explicit --yes)\nbash scripts/agentwalletapi.sh create \"Ops Wallet\" sepolia --yes\nbash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet --yes\n# Automation-safe import: read private key from stdin instead of command args\nprintf '%s' '<private_key>' | bash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet - --yes\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01 --yes\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC --yes\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh swap 2 WETH USDC 10000000000000000 0.5 --yes\n```\n\n### Import Input Safety\n\n- Wallet import is optional and not required for normal wallet operations (list, balance, transfer, swap).\n- Import works only when the user explicitly enables API key permission `allowWalletImport` in dashboard settings.\n- Import execution requires explicit confirmation in the CLI (`--yes` for automation, or interactive `YES` prompt).\n- Avoid passing sensitive inputs as CLI arguments when possible (shell history/process logs risk).\n- Preferred options:\n  - Interactive hidden prompt: omit the private key argument.\n  - Automation: pass `-` and pipe input via stdin.\n\n## Base URL\n\n```\nhttps://openclawcash.com\n```\n\n## Troubleshooting\n\nIf requests fail because of host/URL issues, use this recovery flow:\n\n1. Open `agentwalletapi/.env` and verify `AGENTWALLETAPI_KEY` is set and has no extra spaces.\n2. If the API host is wrong or unreachable, set this in the same `.env` file:\n   ```\n   AGENTWALLETAPI_URL=https://openclawcash.com\n   ```\n3. Retry a simple read call first:\n   ```bash\n   bash scripts/agentwalletapi.sh wallets\n   ```\n4. If it still fails, report the exact error and stop before attempting transfer/swap actions.\n\n## Authentication\n\nThe API key is loaded from the `.env` file in this skill folder. For direct HTTP calls, include it as a header:\n\n```\nX-Agent-Key: ag_your_key_here\nContent-Type: application/json\n```\n\n## API Surfaces\n\n- **Agent API (API key auth):** `/api/agent/*`\n  - Authenticate with `X-Agent-Key`\n  - Used for autonomous agent execution (wallets list/create/import, transactions, balance, transfer, swap, quote, approve)\n- **Dashboard/User API (session auth):** `/api/wallets/*`\n  - Authenticate with bearer token or `aw_session` cookie\n  - Used for user-managed dashboard operations (including wallet import and wallet creation).\n  - Dashboard wallet creation now requires `exportPassphrase` (minimum 12 characters).\n  - Private-key export requires `exportPassphrase` and is protected by rate limits and temporary lockouts.\n\n## Workflow\n\n1. `GET /api/agent/wallets` - Discover available wallets (id, label, address, network, chain; no balances)\n2. `GET /api/agent/wallet?walletId=...` or `?walletLabel=...` - Fetch one wallet with native/token balances\n3. Optional wallet lifecycle actions:\n   - `POST /api/agent/wallets/create` - Create a new wallet under API-key policy controls\n   - `POST /api/agent/wallets/import` - Import a `mainnet` or `solana-mainnet` wallet under API-key policy controls\n4. `GET /api/agent/transactions?walletId=...` - Read merged wallet transaction history (on-chain + app-recorded)\n5. `GET /api/agent/supported-tokens?network=...` or `?chain=evm|solana` - Get recommended common, well-known token list + guidance\n6. `POST /api/agent/token-balance` - Check wallet balances (native + token balances; specific token by symbol/address supported)\n7. `POST /api/agent/quote` - Get a Uniswap quote before execution (EVM only)\n8. `POST /api/agent/swap` - Execute token swap on Uniswap (EVM) or Jupiter (Solana)\n9. `POST /api/agent/transfer` - Send native coin or token on the wallet's chain (optional `chain` guard)\n10. Use returned `txHash` values to confirm transactions\n\n## Quick Reference\n\n| Endpoint | Method | Auth | Purpose |\n|---|---|---|---|\n| `/api/agent/wallets` | GET | Yes | List wallets (discovery only, no balances) |\n| `/api/agent/wallet` | GET | Yes | Get one wallet detail with native/token balances |\n| `/api/agent/wallets/create` | POST | Yes | Create a new API-key-managed wallet |\n| `/api/agent/wallets/import` | POST | Yes | Import a mainnet/solana-mainnet wallet via API key |\n| `/api/agent/transactions` | GET | Yes | List per-wallet transaction history |\n| `/api/agent/transfer` | POST | Yes | Send native/token transfers (EVM + Solana) |\n| `/api/agent/swap` | POST | Yes | Execute DEX swap (Uniswap on EVM, Jupiter on Solana) |\n| `/api/agent/quote` | POST | No | Get Uniswap quote (EVM only) |\n| `/api/agent/token-balance` | POST | Yes | Check balances |\n| `/api/agent/supported-tokens` | GET | No | List recommended common, well-known tokens per network |\n| `/api/agent/approve` | POST | Yes | Approve spender for ERC-20 token (EVM only) |\n\n## Agent Wallet Create/Import (Agent API)\n\nAgent-side wallet lifecycle endpoints:\n\n- `POST /api/agent/wallets/create`\n- `POST /api/agent/wallets/import`\n\nBehavior notes:\n- Both require `X-Agent-Key`.\n- Both are gated by API key permissions configured in dashboard:\n  - `allowWalletCreation` for create\n  - `allowWalletImport` for import\n- Both are rate-limited per API key. Exceeding the limit returns `429` with `Retry-After`.\n- Agent import supports `mainnet` and `solana-mainnet`.\n- Agent wallet create requires:\n  - `exportPassphrase` (minimum 12 characters)\n  - `confirmExportPassphraseSaved: true`\n- Agent-safe create sequence:\n  - Save export passphrase in secure storage first.\n  - Then call `POST /api/agent/wallets/create` with that passphrase and confirmation.\n\n## Transfer Examples\n\nSend native coin (default when no token specified):\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend arbitrary ERC-20 by contract address:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend SOL by symbol:\n```json\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\n\nSend SOL with memo (Solana only):\n```json\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amount\": \"0.01\", \"memo\": \"payment verification note\" }\n```\n\nUse `amount` for human-readable values (e.g., \"100\" = 100 USDC). Use `value` for base units (smallest denomination on each chain).\nUse optional `chain: \"evm\" | \"solana\"` in agent payloads for explicit chain routing and validation.\n`memo` is supported only for Solana transfers and must pass safety validation (max 5 words, max 256 UTF-8 bytes, no control/invisible characters).\nFor native SOL transfers, the API may auto-adjust requested value to fit platform fee + network fee.\nTransfer responses include `requestedValue`, `adjustedValue`, `requestedAmount`, and `adjustedAmount`.\n\n## Token Support Model\n\n- `GET /api/agent/supported-tokens` returns recommended common, well-known tokens plus guidance fields.\n- EVM transfer/swap/balance endpoints support **any valid ERC-20 token contract address**.\n- Solana transfer/balance endpoints support **any valid SPL mint address**.\n- Native tokens appear as `ETH` on EVM and `SOL` on Solana (with chain-specific native token IDs in balance payloads).\n\n## Error Codes\n\n- 200: Success\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\n- 400 `chain_mismatch`: requested `chain` does not match the selected wallet\n- 400 `insufficient_balance`: requested transfer + fees exceed available balance\n- 401: Missing/invalid API key\n- 404: Wallet not found\n- 500: Internal error (retry with corrected payload or reduced amount)\n\n## Policy Constraints\n\nWallets may have governance policies:\n- **Whitelist**: Only transfers to pre-approved addresses allowed\n- **Spending Limit**: Max value per transaction (configured per wallet policy)\n\nViolations return HTTP 401 with an explanation message.\n\n## Important Notes\n\n- All POST requests require `Content-Type: application/json`\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for fees\n- Solana transfer memos are optional and Solana-only: max 5 words, max 256 UTF-8 bytes, no control/invisible characters\n- Solana native transfers account for network fee and can auto-adjust requested transfer amount\n- If requested native SOL + platform fee + network fee cannot fit wallet balance, API returns `400 insufficient_balance`\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- A platform fee (default 1%) is deducted from the token amount\n- Use `amount` for simplicity, use `value` for precise base-unit control\n- For robust agent behavior:\n  - First call `wallets`, then `wallet` (or `token-balance`), then `quote`, then `swap`.\n  - On 400 with `insufficient_token_balance`, reduce amount or change token.\n- The `.env` file in this skill folder stores your API key — never commit it to version control\n\n## File Structure\n\n```\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n```\n\nSee [references/api-endpoints.md](references/api-endpoints.md) for full endpoint details with request/response examples.\n\nFile v1.9.1:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.9.1\",\n  \"publishedAt\": 1771861748375\n}\n\nFile v1.9.1:references/api-endpoints.md\n\n# OpenclawCash API Endpoint Details\n\n## Requirements\n\n- Required env var: `AGENTWALLETAPI_KEY`\n- Optional env var: `AGENTWALLETAPI_URL` (default `https://openclawcash.com`)\n- Required local binary for bundled CLI script: `curl`\n- Optional local binary: `jq` (used for pretty JSON output when available)\n- Network access: `https://openclawcash.com`\n\n## Security Notes\n\n- Start with read-only calls first (`wallets`, `wallet`, `balance`, `supported-tokens`), preferably on testnets.\n- Write actions (`create`, `import`, `transfer`, `swap`, `approve`) are high-risk and should use explicit confirmation in the CLI (`--yes`).\n- `POST /api/agent/wallets/import` sends a private key to OpenclawCash for encrypted storage and managed execution.\n- Wallet import and wallet creation are disabled unless the API key has permission enabled in dashboard (`allowWalletImport`, `allowWalletCreation`).\n\n## API Surfaces\n\n- **Agent API (`/api/agent/*`)**: authenticate with `X-Agent-Key`.\n- **Dashboard/User API (`/api/wallets/*`)**: authenticate with bearer token or session cookie.\n  - `POST /api/wallets` requires `exportPassphrase` (minimum 12 characters).\n  - Private-key export requires `exportPassphrase` and is protected by rate limits and temporary lockouts.\n\nUse Agent API for autonomous execution. Use Dashboard API for user-account management actions.\n\n## List Wallets\n\n```\nGET /api/agent/wallets\nX-Agent-Key: ag_your_key\n```\n\nReturns discovery data only (id/label/address/network/chain). Use `GET /api/agent/wallet` for balances.\n\nResponse:\n```json\n[\n  { \"id\": 2, \"label\": \"Trading Bot\", \"address\": \"0x14ae8d93...\", \"network\": \"sepolia\", \"chain\": \"evm\" },\n  { \"id\": 5, \"label\": \"SOL TEST\", \"address\": \"GmjrX8...\", \"network\": \"solana-devnet\", \"chain\": \"solana\" }\n]\n```\n\n## Get Wallet Detail + Balances\n\n```\nGET /api/agent/wallet?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/wallet?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\n\nOptional:\n```\nGET /api/agent/wallet?walletId=2&chain=evm\n```\n\nResponse:\n```json\n{\n  \"id\": 2,\n  \"label\": \"Trading Bot\",\n  \"address\": \"0x14ae8d93...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\",\n  \"balance\": \"0.048 ETH\",\n  \"nativeSymbol\": \"ETH\",\n  \"otherTokenCount\": 1,\n  \"tokenBalances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Create Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/create\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Agent Ops Wallet\",\n  \"network\": \"sepolia\",\n  \"exportPassphrase\": \"your-strong-passphrase\",\n  \"confirmExportPassphraseSaved\": true\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 12,\n  \"label\": \"Agent Ops Wallet\",\n  \"address\": \"0x1234...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\"\n}\n```\n\nNotes:\n- API key must have wallet creation enabled (`allowWalletCreation`).\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n- Create requires `exportPassphrase` (minimum 12 characters).\n- Agent must persist passphrase first, then send `confirmExportPassphraseSaved: true`.\n\n## Import Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/import\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Treasury Imported\",\n  \"network\": \"solana-mainnet\",\n  \"privateKey\": \"...\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 13,\n  \"label\": \"Treasury Imported\",\n  \"address\": \"GmjrX8...\",\n  \"network\": \"solana-mainnet\",\n  \"chain\": \"solana\"\n}\n```\n\nNotes:\n- API key must have wallet import enabled (`allowWalletImport`).\n- Supported networks: `mainnet`, `solana-mainnet`.\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Wallet Transaction History\n\n```\nGET /api/agent/transactions?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/transactions?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\nOptional:\n```\nGET /api/agent/transactions?walletId=2&chain=evm\n```\n\nResponse:\n```json\n[\n  {\n    \"id\": 0,\n    \"walletId\": 2,\n    \"hash\": \"5tS4...sig\",\n    \"to\": \"GmjrX8...\",\n    \"value\": \"1000000000\",\n    \"fee\": \"5000\",\n    \"type\": \"transfer\",\n    \"status\": \"confirmed\",\n    \"data\": \"{\\\"source\\\":\\\"on-chain\\\",\\\"direction\\\":\\\"incoming\\\",\\\"token\\\":\\\"SOL\\\"}\",\n    \"createdAt\": \"2026-02-19T17:15:00.000Z\"\n  }\n]\n```\n\n## Transfer Native or Tokens\n\n```\nPOST /api/agent/transfer\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| walletId | number \\| string | One of walletId/walletLabel | Wallet numeric ID or public wallet ID from list wallets |\n| walletLabel | string | One of walletId/walletLabel | Wallet name from dashboard |\n| chain | string | No | Optional guard: `\"evm\"` or `\"solana\"` |\n| to | string | Yes | Recipient address (0x... for EVM, base58 for Solana) |\n| token | string | No | Token symbol or token address/mint. Defaults to chain native token (ETH/SOL) |\n| amount | string | One of amount/value | Human-readable amount (e.g., \"100\" for 100 USDC) |\n| value | string | One of amount/value | Amount in base units (e.g., \"100000000\" for 100 USDC with 6 decimals) |\n| memo | string | No | Solana-only transfer memo. Max 5 words, max 256 UTF-8 bytes, no control/invisible characters |\n\n### Examples\n\nSend 0.01 ETH:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend USDC by contract address + base units:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"value\": \"100000000\" }\n```\n\nSend arbitrary ERC-20 by address + human amount:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend 0.01 SOL:\n```json\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\nSend 0.01 SOL with memo:\n```json\n{ \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"token\": \"SOL\", \"amount\": \"0.01\", \"memo\": \"payment verification note\" }\n```\nOptional chain guard example:\n```json\n{ \"chain\": \"solana\", \"walletId\": \"Q7X2K9P\", \"to\": \"SolanaRecipientWalletAddress...\", \"amount\": \"0.01\" }\n```\n\n### Response\n\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"token\": \"USDC\",\n  \"tokenAddress\": \"0xA0b86991...\",\n  \"requestedValue\": \"100000000\",\n  \"adjustedValue\": \"100000000\",\n  \"requestedAmount\": \"100\",\n  \"adjustedAmount\": \"100\",\n  \"fee\": \"1000000\",\n  \"feePercent\": \"1%\",\n  \"feeAmount\": \"1.0\",\n  \"netValue\": \"99000000\",\n  \"netAmount\": \"99.0\",\n  \"feeWalletAddress\": \"0x...\",\n  \"feeTxHash\": \"0xdef456...\",\n  \"memo\": \"payment verification note\"\n}\n```\n\nBehavior notes:\n- For native SOL transfers, server estimates network fee and may reduce requested gross amount so transfer + platform fee + network fee fits wallet balance.\n- For native SOL with configured Solana fee wallet, recipient transfer and platform fee transfer are sent in one transaction.\n- Memo is accepted only for Solana wallets; providing memo on EVM returns `400 invalid_transfer_input`.\n- Memo validation: max 5 words, max 256 UTF-8 bytes, rejects control/invisible characters.\n- If requested transfer cannot fit after required fees, API returns `400` with code `insufficient_balance`.\n\n## Check Balances\n\n```\nPOST /api/agent/token-balance\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nAll balances (native + discovered/default token set):\n```json\n{ \"walletId\": 2 }\n```\n\nSpecific token by symbol:\n```json\n{ \"walletId\": 2, \"token\": \"USDC\" }\n```\n\nSpecific token by address/mint:\n```json\n{ \"walletId\": 2, \"tokenAddress\": \"0xA0b86991...\" }\n```\n\nResponse:\n```json\n{\n  \"balances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 },\n    { \"token\": \"0xdAC17F...\", \"symbol\": \"USDT\", \"balance\": \"0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Supported Tokens\n\n```\nGET /api/agent/supported-tokens?network=mainnet\nGET /api/agent/supported-tokens?network=sepolia\nGET /api/agent/supported-tokens?network=solana-mainnet\nGET /api/agent/supported-tokens?network=solana-devnet\nGET /api/agent/supported-tokens?chain=solana\n```\n\nNo authentication required. Returns **recommended common, well-known tokens** for the specified network (defaults to mainnet).\nAgents can still use any valid ERC-20 token contract address on EVM and any valid SPL mint on Solana.\n\nResponse:\n```json\n{\n  \"recommendedTokens\": [\n    { \"address\": \"0x0000...0000\", \"symbol\": \"ETH\", \"name\": \"Ether\", \"decimals\": 18 },\n    { \"address\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"name\": \"USD Coin\", \"decimals\": 6 }\n  ],\n  \"guidance\": {\n    \"message\": \"These are recommended common, well-known tokens. You can still use any valid ERC-20 token on EVM or any valid SPL mint on Solana.\",\n    \"evm\": \"Any valid ERC-20 token contract address is supported in agent wallet operations.\",\n    \"solana\": \"Any valid SPL token mint address is supported in agent wallet operations.\"\n  }\n}\n```\n\nNotes:\n- ETH is native and represented as zero-address in API payloads.\n- ERC-20 addresses are network-specific (mainnet and sepolia differ).\n- SOL is native on Solana and represented by `native:sol`.\n\n## Get Swap Quote (Uniswap v2)\n\n```\nPOST /api/agent/quote?network=mainnet\nContent-Type: application/json\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"tokenIn\": \"WETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"amountOut\": \"31234567\",\n  \"amountOutHuman\": \"31.234567\",\n  \"amountIn\": \"10000000000000000\",\n  \"amountInHuman\": \"0.01\",\n  \"route\": \"0xC02a... -> 0xA0b8...\",\n  \"feePercent\": \"0.30%\",\n  \"dex\": \"uniswap-v2\",\n  \"network\": \"mainnet\"\n}\n```\n\n## Execute Swap (DEX)\n\n```\nPOST /api/agent/swap\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\",\n  \"slippage\": 0.5\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"amountOut\": \"7791993\",\n  \"amountOutMin\": \"7753033\",\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"fee\": \"100000000000000\",\n  \"feePercent\": \"1%\",\n  \"approvalTxHash\": null,\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\nIf balance is insufficient for tokenIn, API returns:\n```json\n{\n  \"message\": \"Insufficient WETH balance in wallet 4. Available: 0 WETH, required: 0.001 WETH.\",\n  \"code\": \"insufficient_token_balance\",\n  \"walletId\": 4,\n  \"token\": \"WETH\",\n  \"available\": \"0\",\n  \"required\": \"0.001\"\n}\n```\n\nSolana (Jupiter) example:\n```json\n{\n  \"chain\": \"solana\",\n  \"walletId\": 5,\n  \"tokenIn\": \"SOL\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000\",\n  \"slippage\": 0.5\n}\n```\n\n## Token Approval (ERC-20)\n\n```\nPOST /api/agent/approve\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n  \"spender\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n  \"amount\": \"1000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\"\n}\n```\n\nNotes:\n- Use base units for `amount` (e.g., USDC 1000 with 6 decimals = `1000000000`).\n- ETH (native token) does not require approval.\n- Wallet must have ETH for gas.\n\n## Networks\n\n- **mainnet**: Ethereum Mainnet (real ETH, all tokens)\n- **sepolia**: Sepolia Testnet (test ETH, limited token selection: ETH, USDC, WETH, LINK)\n- **solana-mainnet**: Solana Mainnet (real SOL + SPL tokens)\n- **solana-devnet**: Solana Devnet (dev SOL + test SPL tokens)\n\nNetwork is fixed at wallet creation and cannot be changed.\n\n## Important Notes\n\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for transaction fees\n- Native SOL transfers account for network fee and may return adjusted transfer values in response\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- Platform fee is deducted from the token amount (not ETH), consistent with ETH transfers\n- Use `amount` for simplicity (human-readable), use `value` when you need precise base-unit control\n- Optional `chain` guard is supported on agent endpoints; mismatches return `400` with `code: \"chain_mismatch\"`.\n\nArchive v1.9.0: 5 files, 11205 bytes\n\nFiles: references/api-endpoints.md (10827b), scripts/agentwalletapi.sh (13127b), scripts/setup.sh (1036b), SKILL.md (9559b), _meta.json (149b)\n\nFile v1.9.0:SKILL.md\n\n---\nname: agentwalletapi\ndescription: OpenclawCash crypto wallet API for AI agents. Use when an agent needs to send native or token transfers, check balances, list wallets, or interact with EVM and Solana wallets programmatically via OpenclawCash.\nlicense: Proprietary\ncompatibility: Requires network access to https://openclawcash.com\nmetadata:\n  author: agentwalletapi\n  version: \"1.9.0\"\n  required_env_vars:\n    - AGENTWALLETAPI_KEY\n  optional_env_vars:\n    - AGENTWALLETAPI_URL\n  required_binaries:\n    - curl\n  optional_binaries:\n    - jq\n---\n\n# OpenclawCash Agent API\n\nInteract with OpenclawCash-managed wallets to send native assets and tokens, check balances, and execute agent-safe wallet operations across EVM and Solana networks.\n\n## Requirements\n\n- Required env var: `AGENTWALLETAPI_KEY`\n- Optional env var: `AGENTWALLETAPI_URL` (default: `https://openclawcash.com`)\n- Required local binary: `curl`\n- Optional local binary: `jq` (for pretty JSON output in CLI)\n- Network access required: `https://openclawcash.com`\n\n## Safety Model\n\n- Start with read-only calls (`wallets`, `wallet`, `balance`, `tokens`) on testnets first.\n- High-risk actions are gated:\n  - API key permissions in dashboard (`allowWalletCreation`, `allowWalletImport`)\n  - Explicit CLI confirmation (`--yes`) for write actions\n- Wallet import sends a private key to OpenclawCash for encrypted storage and managed execution. Only use this if you understand and accept that trust model.\n\n## Setup\n\n1. Run the setup script to create your `.env` file:\n   ```\n   bash scripts/setup.sh\n   ```\n2. Edit the `.env` file in this skill folder and replace the placeholder with your real API key:\n   ```\n   AGENTWALLETAPI_KEY=ag_your_real_key_here\n   ```\n3. Get your API key at https://openclawcash.com (sign up, create a wallet, go to API Keys page).\n\n## CLI Tool\n\nUse the included tool script to make API calls directly:\n\n```bash\n# Read-only (recommended first)\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh wallet 2\nbash scripts/agentwalletapi.sh wallet \"Trading Bot\"\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transactions 2\nbash scripts/agentwalletapi.sh tokens mainnet\n\n# Write actions (require explicit --yes)\nbash scripts/agentwalletapi.sh create \"Ops Wallet\" sepolia --yes\nbash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet --yes\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01 --yes\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC --yes\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh swap 2 WETH USDC 10000000000000000 0.5 --yes\n```\n\n## Base URL\n\n```\nhttps://openclawcash.com\n```\n\n## Troubleshooting\n\nIf requests fail because of host/URL issues, use this recovery flow:\n\n1. Open `agentwalletapi/.env` and verify `AGENTWALLETAPI_KEY` is set and has no extra spaces.\n2. If the API host is wrong or unreachable, set this in the same `.env` file:\n   ```\n   AGENTWALLETAPI_URL=https://openclawcash.com\n   ```\n3. Retry a simple read call first:\n   ```bash\n   bash scripts/agentwalletapi.sh wallets\n   ```\n4. If it still fails, report the exact error and stop before attempting transfer/swap actions.\n\n## Authentication\n\nThe API key is loaded from the `.env` file in this skill folder. For direct HTTP calls, include it as a header:\n\n```\nX-Agent-Key: ag_your_key_here\nContent-Type: application/json\n```\n\n## API Surfaces\n\n- **Agent API (API key auth):** `/api/agent/*`\n  - Authenticate with `X-Agent-Key`\n  - Used for autonomous agent execution (wallets list/create/import, transactions, balance, transfer, swap, quote, approve)\n- **Dashboard/User API (session auth):** `/api/wallets/*`\n  - Authenticate with bearer token or `aw_session` cookie\n  - Used for user-managed dashboard operations (including wallet import)\n\n## Workflow\n\n1. `GET /api/agent/wallets` - Discover available wallets (id, label, address, network, chain; no balances)\n2. `GET /api/agent/wallet?walletId=...` or `?walletLabel=...` - Fetch one wallet with native/token balances\n3. Optional wallet lifecycle actions:\n   - `POST /api/agent/wallets/create` - Create a new wallet under API-key policy controls\n   - `POST /api/agent/wallets/import` - Import a `mainnet` or `solana-mainnet` wallet under API-key policy controls\n4. `GET /api/agent/transactions?walletId=...` - Read merged wallet transaction history (on-chain + app-recorded)\n5. `GET /api/agent/supported-tokens?network=...` or `?chain=evm|solana` - Get recommended common, well-known token list + guidance\n6. `POST /api/agent/token-balance` - Check wallet balances (native + token balances; specific token by symbol/address supported)\n7. `POST /api/agent/quote` - Get a Uniswap quote before execution (EVM only)\n8. `POST /api/agent/swap` - Execute token swap on Uniswap (EVM) or Jupiter (Solana)\n9. `POST /api/agent/transfer` - Send native coin or token on the wallet's chain (optional `chain` guard)\n10. Use returned `txHash` values to confirm transactions\n\n## Quick Reference\n\n| Endpoint | Method | Auth | Purpose |\n|---|---|---|---|\n| `/api/agent/wallets` | GET | Yes | List wallets (discovery only, no balances) |\n| `/api/agent/wallet` | GET | Yes | Get one wallet detail with native/token balances |\n| `/api/agent/wallets/create` | POST | Yes | Create a new API-key-managed wallet |\n| `/api/agent/wallets/import` | POST | Yes | Import a mainnet/solana-mainnet wallet via API key |\n| `/api/agent/transactions` | GET | Yes | List per-wallet transaction history |\n| `/api/agent/transfer` | POST | Yes | Send native/token transfers (EVM + Solana) |\n| `/api/agent/swap` | POST | Yes | Execute DEX swap (Uniswap on EVM, Jupiter on Solana) |\n| `/api/agent/quote` | POST | No | Get Uniswap quote (EVM only) |\n| `/api/agent/token-balance` | POST | Yes | Check balances |\n| `/api/agent/supported-tokens` | GET | No | List recommended common, well-known tokens per network |\n| `/api/agent/approve` | POST | Yes | Approve spender for ERC-20 token (EVM only) |\n\n## Agent Wallet Create/Import (Agent API)\n\nAgent-side wallet lifecycle endpoints:\n\n- `POST /api/agent/wallets/create`\n- `POST /api/agent/wallets/import`\n\nBehavior notes:\n- Both require `X-Agent-Key`.\n- Both are gated by API key permissions configured in dashboard:\n  - `allowWalletCreation` for create\n  - `allowWalletImport` for import\n- Both are rate-limited per API key. Exceeding the limit returns `429` with `Retry-After`.\n- Agent import supports `mainnet` and `solana-mainnet`.\n\n## Transfer Examples\n\nSend native coin (default when no token specified):\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend arbitrary ERC-20 by contract address:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend SOL by symbol:\n```json\n{ \"walletId\": 7, \"to\": \"9xQeWvG816bUx9EPfHmaT23yvVMY6sX3uA9wX6kM3cVG\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\n\nUse `amount` for human-readable values (e.g., \"100\" = 100 USDC). Use `value` for base units (smallest denomination on each chain).\nUse optional `chain: \"evm\" | \"solana\"` in agent payloads for explicit chain routing and validation.\n\n## Token Support Model\n\n- `GET /api/agent/supported-tokens` returns recommended common, well-known tokens plus guidance fields.\n- EVM transfer/swap/balance endpoints support **any valid ERC-20 token contract address**.\n- Solana transfer/balance endpoints support **any valid SPL mint address**.\n- Native tokens appear as `ETH` on EVM and `SOL` on Solana (with chain-specific native token IDs in balance payloads).\n\n## Error Codes\n\n- 200: Success\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\n- 400 `chain_mismatch`: requested `chain` does not match the selected wallet\n- 401: Missing/invalid API key\n- 404: Wallet not found\n- 500: Internal error (retry with corrected payload or reduced amount)\n\n## Policy Constraints\n\nWallets may have governance policies:\n- **Whitelist**: Only transfers to pre-approved addresses allowed\n- **Spending Limit**: Max value per transaction (configured per wallet policy)\n\nViolations return HTTP 401 with an explanation message.\n\n## Important Notes\n\n- All POST requests require `Content-Type: application/json`\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for fees\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- A platform fee (default 1%) is deducted from the token amount\n- Use `amount` for simplicity, use `value` for precise base-unit control\n- For robust agent behavior:\n  - First call `wallets`, then `wallet` (or `token-balance`), then `quote`, then `swap`.\n  - On 400 with `insufficient_token_balance`, reduce amount or change token.\n- The `.env` file in this skill folder stores your API key — never commit it to version control\n\n## File Structure\n\n```\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n```\n\nSee [references/api-endpoints.md](references/api-endpoints.md) for full endpoint details with request/response examples.\n\nFile v1.9.0:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.9.0\",\n  \"publishedAt\": 1771638324503\n}\n\nFile v1.9.0:references/api-endpoints.md\n\n# OpenclawCash API Endpoint Details\n\n## Requirements\n\n- Required env var: `AGENTWALLETAPI_KEY`\n- Optional env var: `AGENTWALLETAPI_URL` (default `https://openclawcash.com`)\n- Required local binary for bundled CLI script: `curl`\n- Optional local binary: `jq` (used for pretty JSON output when available)\n- Network access: `https://openclawcash.com`\n\n## Security Notes\n\n- Start with read-only calls first (`wallets`, `wallet`, `balance`, `supported-tokens`), preferably on testnets.\n- Write actions (`create`, `import`, `transfer`, `swap`, `approve`) are high-risk and should use explicit confirmation in the CLI (`--yes`).\n- `POST /api/agent/wallets/import` sends a private key to OpenclawCash for encrypted storage and managed execution.\n- Wallet import and wallet creation are disabled unless the API key has permission enabled in dashboard (`allowWalletImport`, `allowWalletCreation`).\n\n## API Surfaces\n\n- **Agent API (`/api/agent/*`)**: authenticate with `X-Agent-Key`.\n- **Dashboard/User API (`/api/wallets/*`)**: authenticate with bearer token or session cookie.\n\nUse Agent API for autonomous execution. Use Dashboard API for user-account management actions.\n\n## List Wallets\n\n```\nGET /api/agent/wallets\nX-Agent-Key: ag_your_key\n```\n\nReturns discovery data only (id/label/address/network/chain). Use `GET /api/agent/wallet` for balances.\n\nResponse:\n```json\n[\n  { \"id\": 2, \"label\": \"Trading Bot\", \"address\": \"0x14ae8d93...\", \"network\": \"sepolia\", \"chain\": \"evm\" },\n  { \"id\": 5, \"label\": \"SOL TEST\", \"address\": \"GmjrX8...\", \"network\": \"solana-devnet\", \"chain\": \"solana\" }\n]\n```\n\n## Get Wallet Detail + Balances\n\n```\nGET /api/agent/wallet?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/wallet?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\n\nOptional:\n```\nGET /api/agent/wallet?walletId=2&chain=evm\n```\n\nResponse:\n```json\n{\n  \"id\": 2,\n  \"label\": \"Trading Bot\",\n  \"address\": \"0x14ae8d93...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\",\n  \"balance\": \"0.048 ETH\",\n  \"nativeSymbol\": \"ETH\",\n  \"otherTokenCount\": 1,\n  \"tokenBalances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Create Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/create\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Agent Ops Wallet\",\n  \"network\": \"sepolia\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 12,\n  \"label\": \"Agent Ops Wallet\",\n  \"address\": \"0x1234...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\"\n}\n```\n\nNotes:\n- API key must have wallet creation enabled (`allowWalletCreation`).\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Import Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/import\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Treasury Imported\",\n  \"network\": \"solana-mainnet\",\n  \"privateKey\": \"...\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 13,\n  \"label\": \"Treasury Imported\",\n  \"address\": \"GmjrX8...\",\n  \"network\": \"solana-mainnet\",\n  \"chain\": \"solana\"\n}\n```\n\nNotes:\n- API key must have wallet import enabled (`allowWalletImport`).\n- Supported networks: `mainnet`, `solana-mainnet`.\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Wallet Transaction History\n\n```\nGET /api/agent/transactions?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/transactions?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\nOptional:\n```\nGET /api/agent/transactions?walletId=2&chain=evm\n```\n\nResponse:\n```json\n[\n  {\n    \"id\": 0,\n    \"walletId\": 2,\n    \"hash\": \"5tS4...sig\",\n    \"to\": \"GmjrX8...\",\n    \"value\": \"1000000000\",\n    \"fee\": \"5000\",\n    \"type\": \"transfer\",\n    \"status\": \"confirmed\",\n    \"data\": \"{\\\"source\\\":\\\"on-chain\\\",\\\"direction\\\":\\\"incoming\\\",\\\"token\\\":\\\"SOL\\\"}\",\n    \"createdAt\": \"2026-02-19T17:15:00.000Z\"\n  }\n]\n```\n\n## Transfer Native or Tokens\n\n```\nPOST /api/agent/transfer\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| walletId | number | One of walletId/walletLabel | Wallet ID from list wallets |\n| walletLabel | string | One of walletId/walletLabel | Wallet name from dashboard |\n| chain | string | No | Optional guard: `\"evm\"` or `\"solana\"` |\n| to | string | Yes | Recipient address (0x... for EVM, base58 for Solana) |\n| token | string | No | Token symbol or token address/mint. Defaults to chain native token (ETH/SOL) |\n| amount | string | One of amount/value | Human-readable amount (e.g., \"100\" for 100 USDC) |\n| value | string | One of amount/value | Amount in base units (e.g., \"100000000\" for 100 USDC with 6 decimals) |\n\n### Examples\n\nSend 0.01 ETH:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend USDC by contract address + base units:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"value\": \"100000000\" }\n```\n\nSend arbitrary ERC-20 by address + human amount:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend 0.01 SOL:\n```json\n{ \"walletId\": 7, \"to\": \"9xQeWvG816bUx9EPfHmaT23yvVMY6sX3uA9wX6kM3cVG\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\nOptional chain guard example:\n```json\n{ \"chain\": \"solana\", \"walletId\": 7, \"to\": \"9xQeWvG816...\", \"amount\": \"0.01\" }\n```\n\n### Response\n\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"token\": \"USDC\",\n  \"tokenAddress\": \"0xA0b86991...\",\n  \"fee\": \"1000000\",\n  \"feePercent\": \"1%\",\n  \"feeAmount\": \"1.0\",\n  \"netValue\": \"99000000\",\n  \"netAmount\": \"99.0\",\n  \"feeWalletAddress\": \"0x...\",\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\n## Check Balances\n\n```\nPOST /api/agent/token-balance\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nAll balances (native + discovered/default token set):\n```json\n{ \"walletId\": 2 }\n```\n\nSpecific token by symbol:\n```json\n{ \"walletId\": 2, \"token\": \"USDC\" }\n```\n\nSpecific token by address/mint:\n```json\n{ \"walletId\": 2, \"tokenAddress\": \"0xA0b86991...\" }\n```\n\nResponse:\n```json\n{\n  \"balances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 },\n    { \"token\": \"0xdAC17F...\", \"symbol\": \"USDT\", \"balance\": \"0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Supported Tokens\n\n```\nGET /api/agent/supported-tokens?network=mainnet\nGET /api/agent/supported-tokens?network=sepolia\nGET /api/agent/supported-tokens?network=solana-mainnet\nGET /api/agent/supported-tokens?network=solana-devnet\nGET /api/agent/supported-tokens?chain=solana\n```\n\nNo authentication required. Returns **recommended common, well-known tokens** for the specified network (defaults to mainnet).\nAgents can still use any valid ERC-20 token contract address on EVM and any valid SPL mint on Solana.\n\nResponse:\n```json\n{\n  \"recommendedTokens\": [\n    { \"address\": \"0x0000...0000\", \"symbol\": \"ETH\", \"name\": \"Ether\", \"decimals\": 18 },\n    { \"address\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"name\": \"USD Coin\", \"decimals\": 6 }\n  ],\n  \"guidance\": {\n    \"message\": \"These are recommended common, well-known tokens. You can still use any valid ERC-20 token on EVM or any valid SPL mint on Solana.\",\n    \"evm\": \"Any valid ERC-20 token contract address is supported in agent wallet operations.\",\n    \"solana\": \"Any valid SPL token mint address is supported in agent wallet operations.\"\n  }\n}\n```\n\nNotes:\n- ETH is native and represented as zero-address in API payloads.\n- ERC-20 addresses are network-specific (mainnet and sepolia differ).\n- SOL is native on Solana and represented by `native:sol`.\n\n## Get Swap Quote (Uniswap v2)\n\n```\nPOST /api/agent/quote?network=mainnet\nContent-Type: application/json\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"tokenIn\": \"WETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"amountOut\": \"31234567\",\n  \"amountOutHuman\": \"31.234567\",\n  \"amountIn\": \"10000000000000000\",\n  \"amountInHuman\": \"0.01\",\n  \"route\": \"0xC02a... -> 0xA0b8...\",\n  \"feePercent\": \"0.30%\",\n  \"dex\": \"uniswap-v2\",\n  \"network\": \"mainnet\"\n}\n```\n\n## Execute Swap (DEX)\n\n```\nPOST /api/agent/swap\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\",\n  \"slippage\": 0.5\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"amountOut\": \"7791993\",\n  \"amountOutMin\": \"7753033\",\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"fee\": \"100000000000000\",\n  \"feePercent\": \"1%\",\n  \"approvalTxHash\": null,\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\nIf balance is insufficient for tokenIn, API returns:\n```json\n{\n  \"message\": \"Insufficient WETH balance in wallet 4. Available: 0 WETH, required: 0.001 WETH.\",\n  \"code\": \"insufficient_token_balance\",\n  \"walletId\": 4,\n  \"token\": \"WETH\",\n  \"available\": \"0\",\n  \"required\": \"0.001\"\n}\n```\n\nSolana (Jupiter) example:\n```json\n{\n  \"chain\": \"solana\",\n  \"walletId\": 5,\n  \"tokenIn\": \"SOL\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000\",\n  \"slippage\": 0.5\n}\n```\n\n## Token Approval (ERC-20)\n\n```\nPOST /api/agent/approve\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n  \"spender\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n  \"amount\": \"1000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\"\n}\n```\n\nNotes:\n- Use base units for `amount` (e.g., USDC 1000 with 6 decimals = `1000000000`).\n- ETH (native token) does not require approval.\n- Wallet must have ETH for gas.\n\n## Networks\n\n- **mainnet**: Ethereum Mainnet (real ETH, all tokens)\n- **sepolia**: Sepolia Testnet (test ETH, limited token selection: ETH, USDC, WETH, LINK)\n- **solana-mainnet**: Solana Mainnet (real SOL + SPL tokens)\n- **solana-devnet**: Solana Devnet (dev SOL + test SPL tokens)\n\nNetwork is fixed at wallet creation and cannot be changed.\n\n## Important Notes\n\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for transaction fees\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- Platform fee is deducted from the token amount (not ETH), consistent with ETH transfers\n- Use `amount` for simplicity (human-readable), use `value` when you need precise base-unit control\n- Optional `chain` guard is supported on agent endpoints; mismatches return `400` with `code: \"chain_mismatch\"`.\n\nArchive v1.8.5: 5 files, 9784 bytes\n\nFiles: references/api-endpoints.md (9975b), scripts/agentwalletapi.sh (12358b), scripts/setup.sh (880b), SKILL.md (8596b), _meta.json (149b)\n\nFile v1.8.5:SKILL.md\n\n---\nname: agentwalletapi\ndescription: OpenclawCash crypto wallet API for AI agents. Use when an agent needs to send native or token transfers, check balances, list wallets, or interact with EVM and Solana wallets programmatically via OpenclawCash.\nlicense: Proprietary\ncompatibility: Requires network access to https://openclawcash.com\nmetadata:\n  author: agentwalletapi\n  version: \"1.8.5\"\n---\n\n# OpenclawCash Agent API\n\nInteract with OpenclawCash-managed wallets to send native assets and tokens, check balances, and execute agent-safe wallet operations across EVM and Solana networks.\n\n## Setup\n\n1. Run the setup script to create your `.env` file:\n   ```\n   bash scripts/setup.sh\n   ```\n2. Edit the `.env` file in this skill folder and replace the placeholder with your real API key:\n   ```\n   AGENTWALLETAPI_KEY=ag_your_real_key_here\n   ```\n3. Get your API key at https://openclawcash.com (sign up, create a wallet, go to API Keys page).\n\n## CLI Tool\n\nUse the included tool script to make API calls directly:\n\n```bash\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh wallet 2\nbash scripts/agentwalletapi.sh wallet \"Trading Bot\"\nbash scripts/agentwalletapi.sh create \"Ops Wallet\" sepolia\nbash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet 0xYOUR_PRIVATE_KEY\nbash scripts/agentwalletapi.sh transactions 2\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC\nbash scripts/agentwalletapi.sh tokens mainnet\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh swap 2 WETH USDC 10000000000000000 0.5\n```\n\n## Base URL\n\n```\nhttps://openclawcash.com\n```\n\n## Troubleshooting\n\nIf requests fail because of host/URL issues, use this recovery flow:\n\n1. Open `agentwalletapi/.env` and verify `AGENTWALLETAPI_KEY` is set and has no extra spaces.\n2. If the API host is wrong or unreachable, set this in the same `.env` file:\n   ```\n   AGENTWALLETAPI_URL=https://openclawcash.com\n   ```\n3. Retry a simple read call first:\n   ```bash\n   bash scripts/agentwalletapi.sh wallets\n   ```\n4. If it still fails, report the exact error and stop before attempting transfer/swap actions.\n\n## Authentication\n\nThe API key is loaded from the `.env` file in this skill folder. For direct HTTP calls, include it as a header:\n\n```\nX-Agent-Key: ag_your_key_here\nContent-Type: application/json\n```\n\n## API Surfaces\n\n- **Agent API (API key auth):** `/api/agent/*`\n  - Authenticate with `X-Agent-Key`\n  - Used for autonomous agent execution (wallets list/create/import, transactions, balance, transfer, swap, quote, approve)\n- **Dashboard/User API (session auth):** `/api/wallets/*`\n  - Authenticate with bearer token or `aw_session` cookie\n  - Used for user-managed dashboard operations (including wallet import)\n\n## Workflow\n\n1. `GET /api/agent/wallets` - Discover available wallets (id, label, address, network, chain; no balances)\n2. `GET /api/agent/wallet?walletId=...` or `?walletLabel=...` - Fetch one wallet with native/token balances\n3. Optional wallet lifecycle actions:\n   - `POST /api/agent/wallets/create` - Create a new wallet under API-key policy controls\n   - `POST /api/agent/wallets/import` - Import a `mainnet` or `solana-mainnet` wallet under API-key policy controls\n4. `GET /api/agent/transactions?walletId=...` - Read merged wallet transaction history (on-chain + app-recorded)\n5. `GET /api/agent/supported-tokens?network=...` or `?chain=evm|solana` - Get recommended common, well-known token list + guidance\n6. `POST /api/agent/token-balance` - Check wallet balances (native + token balances; specific token by symbol/address supported)\n7. `POST /api/agent/quote` - Get a Uniswap quote before execution (EVM only)\n8. `POST /api/agent/swap` - Execute token swap on Uniswap (EVM) or Jupiter (Solana)\n9. `POST /api/agent/transfer` - Send native coin or token on the wallet's chain (optional `chain` guard)\n10. Use returned `txHash` values to confirm transactions\n\n## Quick Reference\n\n| Endpoint | Method | Auth | Purpose |\n|---|---|---|---|\n| `/api/agent/wallets` | GET | Yes | List wallets (discovery only, no balances) |\n| `/api/agent/wallet` | GET | Yes | Get one wallet detail with native/token balances |\n| `/api/agent/wallets/create` | POST | Yes | Create a new API-key-managed wallet |\n| `/api/agent/wallets/import` | POST | Yes | Import a mainnet/solana-mainnet wallet via API key |\n| `/api/agent/transactions` | GET | Yes | List per-wallet transaction history |\n| `/api/agent/transfer` | POST | Yes | Send native/token transfers (EVM + Solana) |\n| `/api/agent/swap` | POST | Yes | Execute DEX swap (Uniswap on EVM, Jupiter on Solana) |\n| `/api/agent/quote` | POST | No | Get Uniswap quote (EVM only) |\n| `/api/agent/token-balance` | POST | Yes | Check balances |\n| `/api/agent/supported-tokens` | GET | No | List recommended common, well-known tokens per network |\n| `/api/agent/approve` | POST | Yes | Approve spender for ERC-20 token (EVM only) |\n\n## Agent Wallet Create/Import (Agent API)\n\nAgent-side wallet lifecycle endpoints:\n\n- `POST /api/agent/wallets/create`\n- `POST /api/agent/wallets/import`\n\nBehavior notes:\n- Both require `X-Agent-Key`.\n- Both are gated by API key permissions configured in dashboard:\n  - `allowWalletCreation` for create\n  - `allowWalletImport` for import\n- Both are rate-limited per API key. Exceeding the limit returns `429` with `Retry-After`.\n- Agent import supports `mainnet` and `solana-mainnet`.\n\n## Transfer Examples\n\nSend native coin (default when no token specified):\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend arbitrary ERC-20 by contract address:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend SOL by symbol:\n```json\n{ \"walletId\": 7, \"to\": \"9xQeWvG816bUx9EPfHmaT23yvVMY6sX3uA9wX6kM3cVG\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\n\nUse `amount` for human-readable values (e.g., \"100\" = 100 USDC). Use `value` for base units (smallest denomination on each chain).\nUse optional `chain: \"evm\" | \"solana\"` in agent payloads for explicit chain routing and validation.\n\n## Token Support Model\n\n- `GET /api/agent/supported-tokens` returns recommended common, well-known tokens plus guidance fields.\n- EVM transfer/swap/balance endpoints support **any valid ERC-20 token contract address**.\n- Solana transfer/balance endpoints support **any valid SPL mint address**.\n- Native tokens appear as `ETH` on EVM and `SOL` on Solana (with chain-specific native token IDs in balance payloads).\n\n## Error Codes\n\n- 200: Success\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\n- 400 `chain_mismatch`: requested `chain` does not match the selected wallet\n- 401: Missing/invalid API key\n- 404: Wallet not found\n- 500: Internal error (retry with corrected payload or reduced amount)\n\n## Policy Constraints\n\nWallets may have governance policies:\n- **Whitelist**: Only transfers to pre-approved addresses allowed\n- **Spending Limit**: Max value per transaction (configured per wallet policy)\n\nViolations return HTTP 401 with an explanation message.\n\n## Important Notes\n\n- All POST requests require `Content-Type: application/json`\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for fees\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- A platform fee (default 1%) is deducted from the token amount\n- Use `amount` for simplicity, use `value` for precise base-unit control\n- For robust agent behavior:\n  - First call `wallets`, then `wallet` (or `token-balance`), then `quote`, then `swap`.\n  - On 400 with `insufficient_token_balance`, reduce amount or change token.\n- The `.env` file in this skill folder stores your API key — never commit it to version control\n\n## File Structure\n\n```\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n```\n\nSee [references/api-endpoints.md](references/api-endpoints.md) for full endpoint details with request/response examples.\n\nFile v1.8.5:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.8.5\",\n  \"publishedAt\": 1771633526439\n}\n\nFile v1.8.5:references/api-endpoints.md\n\n# OpenclawCash API Endpoint Details\n\n## API Surfaces\n\n- **Agent API (`/api/agent/*`)**: authenticate with `X-Agent-Key`.\n- **Dashboard/User API (`/api/wallets/*`)**: authenticate with bearer token or session cookie.\n\nUse Agent API for autonomous execution. Use Dashboard API for user-account management actions.\n\n## List Wallets\n\n```\nGET /api/agent/wallets\nX-Agent-Key: ag_your_key\n```\n\nReturns discovery data only (id/label/address/network/chain). Use `GET /api/agent/wallet` for balances.\n\nResponse:\n```json\n[\n  { \"id\": 2, \"label\": \"Trading Bot\", \"address\": \"0x14ae8d93...\", \"network\": \"sepolia\", \"chain\": \"evm\" },\n  { \"id\": 5, \"label\": \"SOL TEST\", \"address\": \"GmjrX8...\", \"network\": \"solana-devnet\", \"chain\": \"solana\" }\n]\n```\n\n## Get Wallet Detail + Balances\n\n```\nGET /api/agent/wallet?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/wallet?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\n\nOptional:\n```\nGET /api/agent/wallet?walletId=2&chain=evm\n```\n\nResponse:\n```json\n{\n  \"id\": 2,\n  \"label\": \"Trading Bot\",\n  \"address\": \"0x14ae8d93...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\",\n  \"balance\": \"0.048 ETH\",\n  \"nativeSymbol\": \"ETH\",\n  \"otherTokenCount\": 1,\n  \"tokenBalances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Create Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/create\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Agent Ops Wallet\",\n  \"network\": \"sepolia\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 12,\n  \"label\": \"Agent Ops Wallet\",\n  \"address\": \"0x1234...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\"\n}\n```\n\nNotes:\n- API key must have wallet creation enabled (`allowWalletCreation`).\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Import Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/import\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Treasury Imported\",\n  \"network\": \"solana-mainnet\",\n  \"privateKey\": \"...\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 13,\n  \"label\": \"Treasury Imported\",\n  \"address\": \"GmjrX8...\",\n  \"network\": \"solana-mainnet\",\n  \"chain\": \"solana\"\n}\n```\n\nNotes:\n- API key must have wallet import enabled (`allowWalletImport`).\n- Supported networks: `mainnet`, `solana-mainnet`.\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Wallet Transaction History\n\n```\nGET /api/agent/transactions?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/transactions?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\nOptional:\n```\nGET /api/agent/transactions?walletId=2&chain=evm\n```\n\nResponse:\n```json\n[\n  {\n    \"id\": 0,\n    \"walletId\": 2,\n    \"hash\": \"5tS4...sig\",\n    \"to\": \"GmjrX8...\",\n    \"value\": \"1000000000\",\n    \"fee\": \"5000\",\n    \"type\": \"transfer\",\n    \"status\": \"confirmed\",\n    \"data\": \"{\\\"source\\\":\\\"on-chain\\\",\\\"direction\\\":\\\"incoming\\\",\\\"token\\\":\\\"SOL\\\"}\",\n    \"createdAt\": \"2026-02-19T17:15:00.000Z\"\n  }\n]\n```\n\n## Transfer Native or Tokens\n\n```\nPOST /api/agent/transfer\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| walletId | number | One of walletId/walletLabel | Wallet ID from list wallets |\n| walletLabel | string | One of walletId/walletLabel | Wallet name from dashboard |\n| chain | string | No | Optional guard: `\"evm\"` or `\"solana\"` |\n| to | string | Yes | Recipient address (0x... for EVM, base58 for Solana) |\n| token | string | No | Token symbol or token address/mint. Defaults to chain native token (ETH/SOL) |\n| amount | string | One of amount/value | Human-readable amount (e.g., \"100\" for 100 USDC) |\n| value | string | One of amount/value | Amount in base units (e.g., \"100000000\" for 100 USDC with 6 decimals) |\n\n### Examples\n\nSend 0.01 ETH:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend USDC by contract address + base units:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"value\": \"100000000\" }\n```\n\nSend arbitrary ERC-20 by address + human amount:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend 0.01 SOL:\n```json\n{ \"walletId\": 7, \"to\": \"9xQeWvG816bUx9EPfHmaT23yvVMY6sX3uA9wX6kM3cVG\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\nOptional chain guard example:\n```json\n{ \"chain\": \"solana\", \"walletId\": 7, \"to\": \"9xQeWvG816...\", \"amount\": \"0.01\" }\n```\n\n### Response\n\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"token\": \"USDC\",\n  \"tokenAddress\": \"0xA0b86991...\",\n  \"fee\": \"1000000\",\n  \"feePercent\": \"1%\",\n  \"feeAmount\": \"1.0\",\n  \"netValue\": \"99000000\",\n  \"netAmount\": \"99.0\",\n  \"feeWalletAddress\": \"0x...\",\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\n## Check Balances\n\n```\nPOST /api/agent/token-balance\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nAll balances (native + discovered/default token set):\n```json\n{ \"walletId\": 2 }\n```\n\nSpecific token by symbol:\n```json\n{ \"walletId\": 2, \"token\": \"USDC\" }\n```\n\nSpecific token by address/mint:\n```json\n{ \"walletId\": 2, \"tokenAddress\": \"0xA0b86991...\" }\n```\n\nResponse:\n```json\n{\n  \"balances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 },\n    { \"token\": \"0xdAC17F...\", \"symbol\": \"USDT\", \"balance\": \"0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Supported Tokens\n\n```\nGET /api/agent/supported-tokens?network=mainnet\nGET /api/agent/supported-tokens?network=sepolia\nGET /api/agent/supported-tokens?network=solana-mainnet\nGET /api/agent/supported-tokens?network=solana-devnet\nGET /api/agent/supported-tokens?chain=solana\n```\n\nNo authentication required. Returns **recommended common, well-known tokens** for the specified network (defaults to mainnet).\nAgents can still use any valid ERC-20 token contract address on EVM and any valid SPL mint on Solana.\n\nResponse:\n```json\n{\n  \"recommendedTokens\": [\n    { \"address\": \"0x0000...0000\", \"symbol\": \"ETH\", \"name\": \"Ether\", \"decimals\": 18 },\n    { \"address\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"name\": \"USD Coin\", \"decimals\": 6 }\n  ],\n  \"guidance\": {\n    \"message\": \"These are recommended common, well-known tokens. You can still use any valid ERC-20 token on EVM or any valid SPL mint on Solana.\",\n    \"evm\": \"Any valid ERC-20 token contract address is supported in agent wallet operations.\",\n    \"solana\": \"Any valid SPL token mint address is supported in agent wallet operations.\"\n  }\n}\n```\n\nNotes:\n- ETH is native and represented as zero-address in API payloads.\n- ERC-20 addresses are network-specific (mainnet and sepolia differ).\n- SOL is native on Solana and represented by `native:sol`.\n\n## Get Swap Quote (Uniswap v2)\n\n```\nPOST /api/agent/quote?network=mainnet\nContent-Type: application/json\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"tokenIn\": \"WETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"amountOut\": \"31234567\",\n  \"amountOutHuman\": \"31.234567\",\n  \"amountIn\": \"10000000000000000\",\n  \"amountInHuman\": \"0.01\",\n  \"route\": \"0xC02a... -> 0xA0b8...\",\n  \"feePercent\": \"0.30%\",\n  \"dex\": \"uniswap-v2\",\n  \"network\": \"mainnet\"\n}\n```\n\n## Execute Swap (DEX)\n\n```\nPOST /api/agent/swap\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\",\n  \"slippage\": 0.5\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"amountOut\": \"7791993\",\n  \"amountOutMin\": \"7753033\",\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"fee\": \"100000000000000\",\n  \"feePercent\": \"1%\",\n  \"approvalTxHash\": null,\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\nIf balance is insufficient for tokenIn, API returns:\n```json\n{\n  \"message\": \"Insufficient WETH balance in wallet 4. Available: 0 WETH, required: 0.001 WETH.\",\n  \"code\": \"insufficient_token_balance\",\n  \"walletId\": 4,\n  \"token\": \"WETH\",\n  \"available\": \"0\",\n  \"required\": \"0.001\"\n}\n```\n\nSolana (Jupiter) example:\n```json\n{\n  \"chain\": \"solana\",\n  \"walletId\": 5,\n  \"tokenIn\": \"SOL\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000\",\n  \"slippage\": 0.5\n}\n```\n\n## Token Approval (ERC-20)\n\n```\nPOST /api/agent/approve\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n  \"spender\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n  \"amount\": \"1000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\"\n}\n```\n\nNotes:\n- Use base units for `amount` (e.g., USDC 1000 with 6 decimals = `1000000000`).\n- ETH (native token) does not require approval.\n- Wallet must have ETH for gas.\n\n## Networks\n\n- **mainnet**: Ethereum Mainnet (real ETH, all tokens)\n- **sepolia**: Sepolia Testnet (test ETH, limited token selection: ETH, USDC, WETH, LINK)\n- **solana-mainnet**: Solana Mainnet (real SOL + SPL tokens)\n- **solana-devnet**: Solana Devnet (dev SOL + test SPL tokens)\n\nNetwork is fixed at wallet creation and cannot be changed.\n\n## Important Notes\n\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for transaction fees\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- Platform fee is deducted from the token amount (not ETH), consistent with ETH transfers\n- Use `amount` for simplicity (human-readable), use `value` when you need precise base-unit control\n- Optional `chain` guard is supported on agent endpoints; mismatches return `400` with `code: \"chain_mismatch\"`.\n\nArchive v1.8.0: 5 files, 8939 bytes\n\nFiles: references/api-endpoints.md (8887b), scripts/agentwalletapi.sh (9085b), scripts/setup.sh (880b), SKILL.md (8046b), _meta.json (149b)\n\nFile v1.8.0:SKILL.md\n\n---\nname: agentwalletapi\ndescription: OpenclawCash crypto wallet API for AI agents. Use when an agent needs to send native or token transfers, check balances, list wallets, or interact with EVM and Solana wallets programmatically via OpenclawCash.\nlicense: Proprietary\ncompatibility: Requires network access to https://openclawcash.com\nmetadata:\n  author: agentwalletapi\n  version: \"1.8\"\n---\n\n# OpenclawCash Agent API\n\nInteract with OpenclawCash-managed wallets to send native assets and tokens, check balances, and execute agent-safe wallet operations across EVM and Solana networks.\n\n## Setup\n\n1. Run the setup script to create your `.env` file:\n   ```\n   bash scripts/setup.sh\n   ```\n2. Edit the `.env` file in this skill folder and replace the placeholder with your real API key:\n   ```\n   AGENTWALLETAPI_KEY=ag_your_real_key_here\n   ```\n3. Get your API key at https://openclawcash.com (sign up, create a wallet, go to API Keys page).\n\n## CLI Tool\n\nUse the included tool script to make API calls directly:\n\n```bash\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh transactions 2\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC\nbash scripts/agentwalletapi.sh tokens mainnet\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh swap 2 WETH USDC 10000000000000000 0.5\n```\n\n## Base URL\n\n```\nhttps://openclawcash.com\n```\n\n## Troubleshooting\n\nIf requests fail because of host/URL issues, use this recovery flow:\n\n1. Open `agentwalletapi/.env` and verify `AGENTWALLETAPI_KEY` is set and has no extra spaces.\n2. If the API host is wrong or unreachable, set this in the same `.env` file:\n   ```\n   AGENTWALLETAPI_URL=https://openclawcash.com\n   ```\n3. Retry a simple read call first:\n   ```bash\n   bash scripts/agentwalletapi.sh wallets\n   ```\n4. If it still fails, report the exact error and stop before attempting transfer/swap actions.\n\n## Authentication\n\nThe API key is loaded from the `.env` file in this skill folder. For direct HTTP calls, include it as a header:\n\n```\nX-Agent-Key: ag_your_key_here\nContent-Type: application/json\n```\n\n## API Surfaces\n\n- **Agent API (API key auth):** `/api/agent/*`\n  - Authenticate with `X-Agent-Key`\n  - Used for autonomous agent execution (wallets list/create/import, transactions, balance, transfer, swap, quote, approve)\n- **Dashboard/User API (session auth):** `/api/wallets/*`\n  - Authenticate with bearer token or `aw_session` cookie\n  - Used for user-managed dashboard operations (including wallet import)\n\n## Workflow\n\n1. `GET /api/agent/wallets` - Discover available wallets (id, label, address, network, chain)\n2. Optional wallet lifecycle actions:\n   - `POST /api/agent/wallets/create` - Create a new wallet under API-key policy controls\n   - `POST /api/agent/wallets/import` - Import a `mainnet` or `solana-mainnet` wallet under API-key policy controls\n3. `GET /api/agent/transactions?walletId=...` - Read merged wallet transaction history (on-chain + app-recorded)\n4. `GET /api/agent/supported-tokens?network=...` or `?chain=evm|solana` - Get default curated token list\n5. `POST /api/agent/token-balance` - Check wallet balances (native + token balances; specific token by symbol/address supported)\n6. `POST /api/agent/quote` - Get a Uniswap quote before execution (EVM only)\n7. `POST /api/agent/swap` - Execute token swap on Uniswap (EVM) or Jupiter (Solana)\n8. `POST /api/agent/transfer` - Send native coin or token on the wallet's chain (optional `chain` guard)\n9. Use returned `txHash` values to confirm transactions\n\n## Quick Reference\n\n| Endpoint | Method | Auth | Purpose |\n|---|---|---|---|\n| `/api/agent/wallets` | GET | Yes | List wallets |\n| `/api/agent/wallets/create` | POST | Yes | Create a new API-key-managed wallet |\n| `/api/agent/wallets/import` | POST | Yes | Import a mainnet/solana-mainnet wallet via API key |\n| `/api/agent/transactions` | GET | Yes | List per-wallet transaction history |\n| `/api/agent/transfer` | POST | Yes | Send native/token transfers (EVM + Solana) |\n| `/api/agent/swap` | POST | Yes | Execute DEX swap (Uniswap on EVM, Jupiter on Solana) |\n| `/api/agent/quote` | POST | No | Get Uniswap quote (EVM only) |\n| `/api/agent/token-balance` | POST | Yes | Check balances |\n| `/api/agent/supported-tokens` | GET | No | List default curated tokens per network |\n| `/api/agent/approve` | POST | Yes | Approve spender for ERC-20 token (EVM only) |\n\n## Agent Wallet Create/Import (Agent API)\n\nAgent-side wallet lifecycle endpoints:\n\n- `POST /api/agent/wallets/create`\n- `POST /api/agent/wallets/import`\n\nBehavior notes:\n- Both require `X-Agent-Key`.\n- Both are gated by API key permissions configured in dashboard:\n  - `allowWalletCreation` for create\n  - `allowWalletImport` for import\n- Both are rate-limited per API key. Exceeding the limit returns `429` with `Retry-After`.\n- Agent import supports `mainnet` and `solana-mainnet`.\n\n## Transfer Examples\n\nSend native coin (default when no token specified):\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend arbitrary ERC-20 by contract address:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend SOL by symbol:\n```json\n{ \"walletId\": 7, \"to\": \"9xQeWvG816bUx9EPfHmaT23yvVMY6sX3uA9wX6kM3cVG\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\n\nUse `amount` for human-readable values (e.g., \"100\" = 100 USDC). Use `value` for base units (smallest denomination on each chain).\nUse optional `chain: \"evm\" | \"solana\"` in agent payloads for explicit chain routing and validation.\n\n## Token Support Model\n\n- `GET /api/agent/supported-tokens` returns the default curated set for each network.\n- EVM transfer/swap/balance endpoints support **any valid ERC-20 token contract address**.\n- Solana transfer/balance endpoints support **any valid SPL mint address**.\n- Native tokens appear as `ETH` on EVM and `SOL` on Solana (with chain-specific native token IDs in balance payloads).\n\n## Error Codes\n\n- 200: Success\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\n- 400 `chain_mismatch`: requested `chain` does not match the selected wallet\n- 401: Missing/invalid API key\n- 404: Wallet not found\n- 500: Internal error (retry with corrected payload or reduced amount)\n\n## Policy Constraints\n\nWallets may have governance policies:\n- **Whitelist**: Only transfers to pre-approved addresses allowed\n- **Spending Limit**: Max value per transaction (configured per wallet policy)\n\nViolations return HTTP 401 with an explanation message.\n\n## Important Notes\n\n- All POST requests require `Content-Type: application/json`\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for fees\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- A platform fee (default 1%) is deducted from the token amount\n- Use `amount` for simplicity, use `value` for precise base-unit control\n- For robust agent behavior:\n  - First call `wallets`, then `token-balance`, then `quote`, then `swap`.\n  - On 400 with `insufficient_token_balance`, reduce amount or change token.\n- The `.env` file in this skill folder stores your API key — never commit it to version control\n\n## File Structure\n\n```\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n```\n\nSee [references/api-endpoints.md](references/api-endpoints.md) for full endpoint details with request/response examples.\n\nFile v1.8.0:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.8.0\",\n  \"publishedAt\": 1771550607266\n}\n\nFile v1.8.0:references/api-endpoints.md\n\n# OpenclawCash API Endpoint Details\n\n## API Surfaces\n\n- **Agent API (`/api/agent/*`)**: authenticate with `X-Agent-Key`.\n- **Dashboard/User API (`/api/wallets/*`)**: authenticate with bearer token or session cookie.\n\nUse Agent API for autonomous execution. Use Dashboard API for user-account management actions.\n\n## List Wallets\n\n```\nGET /api/agent/wallets\nX-Agent-Key: ag_your_key\n```\n\nResponse:\n```json\n[\n  { \"id\": 2, \"label\": \"Trading Bot\", \"address\": \"0x14ae8d93...\", \"network\": \"sepolia\", \"chain\": \"evm\" },\n  { \"id\": 5, \"label\": \"SOL TEST\", \"address\": \"GmjrX8...\", \"network\": \"solana-devnet\", \"chain\": \"solana\" }\n]\n```\n\n## Create Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/create\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Agent Ops Wallet\",\n  \"network\": \"sepolia\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 12,\n  \"label\": \"Agent Ops Wallet\",\n  \"address\": \"0x1234...\",\n  \"network\": \"sepolia\",\n  \"chain\": \"evm\"\n}\n```\n\nNotes:\n- API key must have wallet creation enabled (`allowWalletCreation`).\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Import Wallet (Agent API)\n\n```\nPOST /api/agent/wallets/import\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"label\": \"Treasury Imported\",\n  \"network\": \"solana-mainnet\",\n  \"privateKey\": \"...\"\n}\n```\n\nResponse:\n```json\n{\n  \"id\": 13,\n  \"label\": \"Treasury Imported\",\n  \"address\": \"GmjrX8...\",\n  \"network\": \"solana-mainnet\",\n  \"chain\": \"solana\"\n}\n```\n\nNotes:\n- API key must have wallet import enabled (`allowWalletImport`).\n- Supported networks: `mainnet`, `solana-mainnet`.\n- Endpoint is rate-limited per API key; on limit exceeded returns `429` + `Retry-After`.\n\n## Wallet Transaction History\n\n```\nGET /api/agent/transactions?walletId=2\nX-Agent-Key: ag_your_key\n```\n\nAlternative:\n```\nGET /api/agent/transactions?walletLabel=Trading%20Bot\nX-Agent-Key: ag_your_key\n```\nOptional:\n```\nGET /api/agent/transactions?walletId=2&chain=evm\n```\n\nResponse:\n```json\n[\n  {\n    \"id\": 0,\n    \"walletId\": 2,\n    \"hash\": \"5tS4...sig\",\n    \"to\": \"GmjrX8...\",\n    \"value\": \"1000000000\",\n    \"fee\": \"5000\",\n    \"type\": \"transfer\",\n    \"status\": \"confirmed\",\n    \"data\": \"{\\\"source\\\":\\\"on-chain\\\",\\\"direction\\\":\\\"incoming\\\",\\\"token\\\":\\\"SOL\\\"}\",\n    \"createdAt\": \"2026-02-19T17:15:00.000Z\"\n  }\n]\n```\n\n## Transfer Native or Tokens\n\n```\nPOST /api/agent/transfer\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| walletId | number | One of walletId/walletLabel | Wallet ID from list wallets |\n| walletLabel | string | One of walletId/walletLabel | Wallet name from dashboard |\n| chain | string | No | Optional guard: `\"evm\"` or `\"solana\"` |\n| to | string | Yes | Recipient address (0x... for EVM, base58 for Solana) |\n| token | string | No | Token symbol or token address/mint. Defaults to chain native token (ETH/SOL) |\n| amount | string | One of amount/value | Human-readable amount (e.g., \"100\" for 100 USDC) |\n| value | string | One of amount/value | Amount in base units (e.g., \"100000000\" for 100 USDC with 6 decimals) |\n\n### Examples\n\nSend 0.01 ETH:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend USDC by contract address + base units:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"value\": \"100000000\" }\n```\n\nSend arbitrary ERC-20 by address + human amount:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nSend 0.01 SOL:\n```json\n{ \"walletId\": 7, \"to\": \"9xQeWvG816bUx9EPfHmaT23yvVMY6sX3uA9wX6kM3cVG\", \"token\": \"SOL\", \"amount\": \"0.01\" }\n```\nOptional chain guard example:\n```json\n{ \"chain\": \"solana\", \"walletId\": 7, \"to\": \"9xQeWvG816...\", \"amount\": \"0.01\" }\n```\n\n### Response\n\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"token\": \"USDC\",\n  \"tokenAddress\": \"0xA0b86991...\",\n  \"fee\": \"1000000\",\n  \"feePercent\": \"1%\",\n  \"feeAmount\": \"1.0\",\n  \"netValue\": \"99000000\",\n  \"netAmount\": \"99.0\",\n  \"feeWalletAddress\": \"0x...\",\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\n## Check Balances\n\n```\nPOST /api/agent/token-balance\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nAll balances (native + discovered/default token set):\n```json\n{ \"walletId\": 2 }\n```\n\nSpecific token by symbol:\n```json\n{ \"walletId\": 2, \"token\": \"USDC\" }\n```\n\nSpecific token by address/mint:\n```json\n{ \"walletId\": 2, \"tokenAddress\": \"0xA0b86991...\" }\n```\n\nResponse:\n```json\n{\n  \"balances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 },\n    { \"token\": \"0xdAC17F...\", \"symbol\": \"USDT\", \"balance\": \"0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Supported Tokens\n\n```\nGET /api/agent/supported-tokens?network=mainnet\nGET /api/agent/supported-tokens?network=sepolia\nGET /api/agent/supported-tokens?network=solana-mainnet\nGET /api/agent/supported-tokens?network=solana-devnet\nGET /api/agent/supported-tokens?chain=solana\n```\n\nNo authentication required. Returns the **default curated tokens** available on the specified network (defaults to mainnet).\nThese are defaults; EVM transfer/swap/balance endpoints also accept any valid ERC-20 token contract address, and Solana transfer/balance endpoints accept SPL mint addresses.\n\nResponse:\n```json\n[\n  { \"address\": \"0x0000...0000\", \"symbol\": \"ETH\", \"name\": \"Ether\", \"decimals\": 18 },\n  { \"address\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"name\": \"USD Coin\", \"decimals\": 6 }\n]\n```\n\nNotes:\n- ETH is native and represented as zero-address in API payloads.\n- ERC-20 addresses are network-specific (mainnet and sepolia differ).\n- SOL is native on Solana and represented by `native:sol`.\n\n## Get Swap Quote (Uniswap v2)\n\n```\nPOST /api/agent/quote?network=mainnet\nContent-Type: application/json\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"tokenIn\": \"WETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"amountOut\": \"31234567\",\n  \"amountOutHuman\": \"31.234567\",\n  \"amountIn\": \"10000000000000000\",\n  \"amountInHuman\": \"0.01\",\n  \"route\": \"0xC02a... -> 0xA0b8...\",\n  \"feePercent\": \"0.30%\",\n  \"dex\": \"uniswap-v2\",\n  \"network\": \"mainnet\"\n}\n```\n\n## Execute Swap (DEX)\n\n```\nPOST /api/agent/swap\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\",\n  \"slippage\": 0.5\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"amountOut\": \"7791993\",\n  \"amountOutMin\": \"7753033\",\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"fee\": \"100000000000000\",\n  \"feePercent\": \"1%\",\n  \"approvalTxHash\": null,\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\nIf balance is insufficient for tokenIn, API returns:\n```json\n{\n  \"message\": \"Insufficient WETH balance in wallet 4. Available: 0 WETH, required: 0.001 WETH.\",\n  \"code\": \"insufficient_token_balance\",\n  \"walletId\": 4,\n  \"token\": \"WETH\",\n  \"available\": \"0\",\n  \"required\": \"0.001\"\n}\n```\n\nSolana (Jupiter) example:\n```json\n{\n  \"chain\": \"solana\",\n  \"walletId\": 5,\n  \"tokenIn\": \"SOL\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000\",\n  \"slippage\": 0.5\n}\n```\n\n## Token Approval (ERC-20)\n\n```\nPOST /api/agent/approve\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"chain\": \"evm\",\n  \"walletId\": 2,\n  \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n  \"spender\": \"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\n  \"amount\": \"1000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\"\n}\n```\n\nNotes:\n- Use base units for `amount` (e.g., USDC 1000 with 6 decimals = `1000000000`).\n- ETH (native token) does not require approval.\n- Wallet must have ETH for gas.\n\n## Networks\n\n- **mainnet**: Ethereum Mainnet (real ETH, all tokens)\n- **sepolia**: Sepolia Testnet (test ETH, limited token selection: ETH, USDC, WETH, LINK)\n- **solana-mainnet**: Solana Mainnet (real SOL + SPL tokens)\n- **solana-devnet**: Solana Devnet (dev SOL + test SPL tokens)\n\nNetwork is fixed at wallet creation and cannot be changed.\n\n## Important Notes\n\n- EVM token transfers require ETH in the wallet for gas fees\n- Solana token transfers require SOL in the wallet for transaction fees\n- Swap supports EVM (Uniswap) and Solana (Jupiter); Quote/Approve are EVM-only\n- Platform fee is deducted from the token amount (not ETH), consistent with ETH transfers\n- Use `amount` for simplicity (human-readable), use `value` when you need precise base-unit control\n- Optional `chain` guard is supported on agent endpoints; mismatches return `400` with `code: \"chain_mismatch\"`.\n\nArchive v1.4.0: 5 files, 6528 bytes\n\nFiles: references/api-endpoints.md (5149b), scripts/agentwalletapi.sh (6279b), scripts/setup.sh (890b), SKILL.md (5266b), _meta.json (149b)\n\nFile v1.4.0:SKILL.md\n\n---\nname: agentwalletapi\ndescription: AgentWalletApi crypto wallet API for AI agents. Use when an agent needs to send ETH or ERC-20 tokens, check balances, list wallets, or interact with Ethereum wallets programmatically via AgentWalletApi.\nlicense: Proprietary\ncompatibility: Requires network access to https://agentwalletapi.com\nmetadata:\n  author: agentwalletapi\n  version: \"1.4\"\n---\n\n# AgentWalletApi Agent API\n\nInteract with AgentWalletApi-managed Ethereum wallets to send ETH and ERC-20 tokens, check balances, quote swaps, and execute Uniswap swaps.\n\n## Setup\n\n1. Run the setup script to create your `.env` file:\n   ```\n   bash scripts/setup.sh\n   ```\n2. Edit the `.env` file in this skill folder and replace the placeholder with your real API key:\n   ```\n   AGENTWALLETAPI_KEY=ag_your_real_key_here\n   ```\n3. Get your API key at https://agentwalletapi.com (sign up, create a wallet, go to API Keys page).\n\n## CLI Tool\n\nUse the included tool script to make API calls directly:\n\n```bash\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC\nbash scripts/agentwalletapi.sh tokens mainnet\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh swap 2 WETH USDC 10000000000000000 0.5\n```\n\n## Base URL\n\n```\nhttps://agentwalletapi.com\n```\n\n## Authentication\n\nThe API key is loaded from the `.env` file in this skill folder. For direct HTTP calls, include it as a header:\n\n```\nX-Agent-Key: ag_your_key_here\nContent-Type: application/json\n```\n\n## Workflow\n\n1. `GET /api/agent/wallets` - Discover available wallets (id, label, address, network)\n2. `GET /api/agent/supported-tokens?network=sepolia` - Get default curated token list for network\n3. `POST /api/agent/token-balance` - Check wallet balances (ETH + default ERC-20 set; specific token by address is supported)\n4. `POST /api/agent/quote` - Get a Uniswap quote before execution\n5. `POST /api/agent/swap` - Execute token swap on Uniswap\n6. `POST /api/agent/transfer` - Send ETH or ERC-20 token\n7. Use returned `txHash` values to confirm transactions\n\n## Quick Reference\n\n| Endpoint | Method | Auth | Purpose |\n|---|---|---|---|\n| `/api/agent/wallets` | GET | Yes | List wallets |\n| `/api/agent/transfer` | POST | Yes | Send ETH or ERC-20 tokens |\n| `/api/agent/swap` | POST | Yes | Execute Uniswap swap |\n| `/api/agent/quote` | POST | No | Get Uniswap quote |\n| `/api/agent/token-balance` | POST | Yes | Check balances |\n| `/api/agent/supported-tokens` | GET | No | List default curated tokens per network |\n| `/api/agent/approve` | POST | Yes | Not yet (501) |\n\n## Transfer Examples\n\nSend ETH (default when no token specified):\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend arbitrary ERC-20 by contract address:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\nUse `amount` for human-readable values (e.g., \"100\" = 100 USDC). Use `value` for base units (smallest denomination).\n\n## Token Support Model\n\n- `GET /api/agent/supported-tokens` returns the default curated set (includes top market-cap ERC-20s on mainnet).\n- Transfer/swap/balance endpoints also support **any valid ERC-20 token contract address** on that network.\n- Native ETH appears as `0x0000000000000000000000000000000000000000` in API responses.\n\n## Error Codes\n\n- 200: Success\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\n- 401: Missing/invalid API key\n- 404: Wallet not found\n- 500: Internal error (retry with corrected payload or reduced amount)\n\n## Policy Constraints\n\nWallets may have governance policies:\n- **Whitelist**: Only transfers to pre-approved addresses allowed\n- **Spending Limit**: Max value per transaction in ETH\n\nViolations return HTTP 401 with an explanation message.\n\n## Important Notes\n\n- All POST requests require `Content-Type: application/json`\n- ERC-20 transfers require ETH in the wallet for gas fees, even when sending tokens\n- ERC-20 swaps require ETH in the wallet for gas fees\n- A platform fee (default 1%) is deducted from the token amount\n- Use `amount` for simplicity, use `value` for precise base-unit control\n- For robust agent behavior:\n  - First call `wallets`, then `token-balance`, then `quote`, then `swap`.\n  - On 400 with `insufficient_token_balance`, reduce amount or change token.\n- The `.env` file in this skill folder stores your API key — never commit it to version control\n\n## File Structure\n\n```\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n```\n\nSee [references/api-endpoints.md](references/api-endpoints.md) for full endpoint details with request/response examples.\n\nFile v1.4.0:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.4.0\",\n  \"publishedAt\": 1771516202747\n}\n\nFile v1.4.0:references/api-endpoints.md\n\n# AgentWalletApi API Endpoint Details\n\n## List Wallets\n\n```\nGET /api/agent/wallets\nX-Agent-Key: ag_your_key\n```\n\nResponse:\n```json\n[\n  { \"id\": 2, \"label\": \"Trading Bot\", \"address\": \"0x14ae8d93...\", \"network\": \"sepolia\" },\n  { \"id\": 3, \"label\": \"Mainnet Ops\", \"address\": \"0xe220bf12...\", \"network\": \"mainnet\" }\n]\n```\n\n## Transfer ETH or Tokens\n\n```\nPOST /api/agent/transfer\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| walletId | number | One of walletId/walletLabel | Wallet ID from list wallets |\n| walletLabel | string | One of walletId/walletLabel | Wallet name from dashboard |\n| to | string | Yes | Recipient address (0x...) |\n| token | string | No | Token symbol (\"USDC\") or contract address. Defaults to ETH |\n| amount | string | One of amount/value | Human-readable amount (e.g., \"100\" for 100 USDC) |\n| value | string | One of amount/value | Amount in base units (e.g., \"100000000\" for 100 USDC with 6 decimals) |\n\n### Examples\n\nSend 0.01 ETH:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend USDC by contract address + base units:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"value\": \"100000000\" }\n```\n\nSend arbitrary ERC-20 by address + human amount:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"amount\": \"100\" }\n```\n\n### Response\n\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"token\": \"USDC\",\n  \"tokenAddress\": \"0xA0b86991...\",\n  \"fee\": \"1000000\",\n  \"feePercent\": \"1%\",\n  \"feeAmount\": \"1.0\",\n  \"netValue\": \"99000000\",\n  \"netAmount\": \"99.0\",\n  \"feeWalletAddress\": \"0x...\",\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\n## Check Balances\n\n```\nPOST /api/agent/token-balance\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nAll balances (ETH + default curated ERC-20 set):\n```json\n{ \"walletId\": 2 }\n```\n\nSpecific token by symbol:\n```json\n{ \"walletId\": 2, \"token\": \"USDC\" }\n```\n\nSpecific token by address (works for arbitrary ERC-20):\n```json\n{ \"walletId\": 2, \"tokenAddress\": \"0xA0b86991...\" }\n```\n\nResponse:\n```json\n{\n  \"balances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 },\n    { \"token\": \"0xdAC17F...\", \"symbol\": \"USDT\", \"balance\": \"0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Supported Tokens\n\n```\nGET /api/agent/supported-tokens?network=mainnet\nGET /api/agent/supported-tokens?network=sepolia\n```\n\nNo authentication required. Returns the **default curated tokens** available on the specified network (defaults to mainnet).\nThese are defaults; transfer/swap/balance endpoints also accept any valid ERC-20 token contract address.\n\nResponse:\n```json\n[\n  { \"address\": \"0x0000...0000\", \"symbol\": \"ETH\", \"name\": \"Ether\", \"decimals\": 18 },\n  { \"address\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"name\": \"USD Coin\", \"decimals\": 6 }\n]\n```\n\nNotes:\n- ETH is native and represented as zero-address in API payloads.\n- ERC-20 addresses are network-specific (mainnet and sepolia differ).\n\n## Get Swap Quote (Uniswap v2)\n\n```\nPOST /api/agent/quote?network=mainnet\nContent-Type: application/json\n```\n\nRequest:\n```json\n{\n  \"tokenIn\": \"WETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\"\n}\n```\n\nResponse:\n```json\n{\n  \"amountOut\": \"31234567\",\n  \"amountOutHuman\": \"31.234567\",\n  \"amountIn\": \"10000000000000000\",\n  \"amountInHuman\": \"0.01\",\n  \"route\": \"0xC02a... -> 0xA0b8...\",\n  \"feePercent\": \"0.30%\",\n  \"dex\": \"uniswap-v2\",\n  \"network\": \"mainnet\"\n}\n```\n\n## Execute Swap (Uniswap v2)\n\n```\nPOST /api/agent/swap\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nRequest:\n```json\n{\n  \"walletId\": 2,\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"amountIn\": \"10000000000000000\",\n  \"slippage\": 0.5\n}\n```\n\nResponse:\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"amountOut\": \"7791993\",\n  \"amountOutMin\": \"7753033\",\n  \"tokenIn\": \"ETH\",\n  \"tokenOut\": \"USDC\",\n  \"fee\": \"100000000000000\",\n  \"feePercent\": \"1%\",\n  \"approvalTxHash\": null,\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\nIf balance is insufficient for tokenIn, API returns:\n```json\n{\n  \"message\": \"Insufficient WETH balance in wallet 4. Available: 0 WETH, required: 0.001 WETH.\",\n  \"code\": \"insufficient_token_balance\",\n  \"walletId\": 4,\n  \"token\": \"WETH\",\n  \"available\": \"0\",\n  \"required\": \"0.001\"\n}\n```\n\n## Networks\n\n- **mainnet**: Ethereum Mainnet (real ETH, all tokens)\n- **sepolia**: Sepolia Testnet (test ETH, limited token selection: ETH, USDC, WETH, LINK)\n\nNetwork is fixed at wallet creation and cannot be changed.\n\n## Important Notes\n\n- ERC-20 transfers require ETH in the wallet for gas fees, even when sending tokens\n- ERC-20 swaps require ETH in the wallet for gas fees\n- Platform fee is deducted from the token amount (not ETH), consistent with ETH transfers\n- Use `amount` for simplicity (human-readable), use `value` when you need precise base-unit control\n\nArchive v1.2.0: 5 files, 5397 bytes\n\nFiles: references/api-endpoints.md (3330b), scripts/agentwalletapi.sh (3837b), scripts/setup.sh (890b), SKILL.md (4352b), _meta.json (149b)\n\nFile v1.2.0:SKILL.md\n\n---\nname: agentwalletapi\ndescription: AgentWalletApi crypto wallet API for AI agents. Use when an agent needs to send ETH or ERC-20 tokens, check balances, list wallets, or interact with Ethereum wallets programmatically via AgentWalletApi.\nlicense: Proprietary\ncompatibility: Requires network access to https://agentwalletapi.com\nmetadata:\n  author: agentwalletapi\n  version: \"1.3\"\n---\n\n# AgentWalletApi Agent API\n\nInteract with AgentWalletApi-managed Ethereum wallets to send ETH and ERC-20 tokens (USDC, USDT, DAI, WETH, WBTC, UNI, LINK), check balances, and list wallets.\n\n## Setup\n\n1. Run the setup script to create your `.env` file:\n   ```\n   bash scripts/setup.sh\n   ```\n2. Edit the `.env` file in this skill folder and replace the placeholder with your real API key:\n   ```\n   AGENTWALLETAPI_KEY=ag_your_real_key_here\n   ```\n3. Get your API key at https://agentwalletapi.com (sign up, create a wallet, go to API Keys page).\n\n## CLI Tool\n\nUse the included tool script to make API calls directly:\n\n```bash\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC\nbash scripts/agentwalletapi.sh tokens mainnet\n```\n\n## Base URL\n\n```\nhttps://agentwalletapi.com\n```\n\n## Authentication\n\nThe API key is loaded from the `.env` file in this skill folder. For direct HTTP calls, include it as a header:\n\n```\nX-Agent-Key: ag_your_key_here\nContent-Type: application/json\n```\n\n## Workflow\n\n1. `GET /api/agent/wallets` - Discover available wallets (id, label, address, network)\n2. `GET /api/agent/supported-tokens?network=sepolia` - See tokens available on that network\n3. `POST /api/agent/token-balance` - Check wallet balances (ETH + all ERC-20 tokens)\n4. `POST /api/agent/transfer` - Send ETH or tokens (by symbol like \"USDC\")\n5. Use the returned `txHash` to confirm the transaction\n\n## Quick Reference\n\n| Endpoint | Method | Auth | Purpose |\n|---|---|---|---|\n| `/api/agent/wallets` | GET | Yes | List wallets |\n| `/api/agent/transfer` | POST | Yes | Send ETH or ERC-20 tokens |\n| `/api/agent/token-balance` | POST | Yes | Check balances |\n| `/api/agent/supported-tokens` | GET | No | List available tokens per network |\n| `/api/agent/swap` | POST | Yes | Not yet (501) |\n| `/api/agent/approve` | POST | Yes | Not yet (501) |\n| `/api/agent/quote` | POST | No | Not yet (501) |\n\n## Transfer Examples\n\nSend ETH (default when no token specified):\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nUse `amount` for human-readable values (e.g., \"100\" = 100 USDC). Use `value` for base units (smallest denomination).\n\n## Supported Tokens\n\nETH, USDC, USDT, DAI, WBTC, WETH, UNI, LINK\n\nNot all tokens are available on all networks. Use the supported-tokens endpoint to check.\n\n## Error Codes\n\n- 200: Success\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\n- 401: Missing/invalid API key\n- 404: Wallet not found\n- 501: Feature not yet available\n\n## Policy Constraints\n\nWallets may have governance policies:\n- **Whitelist**: Only transfers to pre-approved addresses allowed\n- **Spending Limit**: Max value per transaction in ETH\n\nViolations return HTTP 401 with an explanation message.\n\n## Important Notes\n\n- All POST requests require `Content-Type: application/json`\n- ERC-20 transfers require ETH in the wallet for gas fees, even when sending tokens\n- A platform fee (default 1%) is deducted from the token amount\n- Use `amount` for simplicity, use `value` for precise base-unit control\n- The `.env` file in this skill folder stores your API key — never commit it to version control\n\n## File Structure\n\n```\nagentwalletapi/\n├── SKILL.md                    # This file\n├── .env                        # Your API key (created by setup.sh)\n├── scripts/\n│   ├── setup.sh                # Creates .env with API key placeholder\n│   └── agentwalletapi.sh       # CLI tool for making API calls\n└── references/\n    └── api-endpoints.md        # Full endpoint documentation\n```\n\nSee [references/api-endpoints.md](references/api-endpoints.md) for full endpoint details with request/response examples.\n\nFile v1.2.0:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.2.0\",\n  \"publishedAt\": 1771442646809\n}\n\nFile v1.2.0:references/api-endpoints.md\n\n# AgentWalletApi API Endpoint Details\n\n## List Wallets\n\n```\nGET /api/agent/wallets\nX-Agent-Key: ag_your_key\n```\n\nResponse:\n```json\n[\n  { \"id\": 2, \"label\": \"Trading Bot\", \"address\": \"0x14ae8d93...\", \"network\": \"sepolia\" },\n  { \"id\": 3, \"label\": \"Mainnet Ops\", \"address\": \"0xe220bf12...\", \"network\": \"mainnet\" }\n]\n```\n\n## Transfer ETH or Tokens\n\n```\nPOST /api/agent/transfer\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| walletId | number | One of walletId/walletLabel | Wallet ID from list wallets |\n| walletLabel | string | One of walletId/walletLabel | Wallet name from dashboard |\n| to | string | Yes | Recipient address (0x...) |\n| token | string | No | Token symbol (\"USDC\") or contract address. Defaults to ETH |\n| amount | string | One of amount/value | Human-readable amount (e.g., \"100\" for 100 USDC) |\n| value | string | One of amount/value | Amount in base units (e.g., \"100000000\" for 100 USDC with 6 decimals) |\n\n### Examples\n\nSend 0.01 ETH:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\n```\n\nSend 100 USDC by symbol:\n```json\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\n```\n\nSend USDC by contract address + base units:\n```json\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"token\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\", \"value\": \"100000000\" }\n```\n\n### Response\n\n```json\n{\n  \"txHash\": \"0xabc123...\",\n  \"status\": \"confirmed\",\n  \"token\": \"USDC\",\n  \"tokenAddress\": \"0xA0b86991...\",\n  \"fee\": \"1000000\",\n  \"feePercent\": \"1%\",\n  \"feeAmount\": \"1.0\",\n  \"netValue\": \"99000000\",\n  \"netAmount\": \"99.0\",\n  \"feeWalletAddress\": \"0x...\",\n  \"feeTxHash\": \"0xdef456...\"\n}\n```\n\n## Check Balances\n\n```\nPOST /api/agent/token-balance\nContent-Type: application/json\nX-Agent-Key: ag_your_key\n```\n\nAll balances (ETH + all supported ERC-20 tokens):\n```json\n{ \"walletId\": 2 }\n```\n\nSpecific token by symbol:\n```json\n{ \"walletId\": 2, \"token\": \"USDC\" }\n```\n\nSpecific token by address:\n```json\n{ \"walletId\": 2, \"tokenAddress\": \"0xA0b86991...\" }\n```\n\nResponse:\n```json\n{\n  \"balances\": [\n    { \"token\": \"0x0000...0000\", \"symbol\": \"ETH\", \"balance\": \"0.048\", \"decimals\": 18 },\n    { \"token\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"balance\": \"250.0\", \"decimals\": 6 },\n    { \"token\": \"0xdAC17F...\", \"symbol\": \"USDT\", \"balance\": \"0\", \"decimals\": 6 }\n  ]\n}\n```\n\n## Supported Tokens\n\n```\nGET /api/agent/supported-tokens?network=mainnet\nGET /api/agent/supported-tokens?network=sepolia\n```\n\nNo authentication required. Returns tokens available on the specified network (defaults to mainnet).\n\nResponse:\n```json\n[\n  { \"address\": \"0x0000...0000\", \"symbol\": \"ETH\", \"name\": \"Ether\", \"decimals\": 18 },\n  { \"address\": \"0xA0b86991...\", \"symbol\": \"USDC\", \"name\": \"USD Coin\", \"decimals\": 6 }\n]\n```\n\n## Networks\n\n- **mainnet**: Ethereum Mainnet (real ETH, all tokens)\n- **sepolia**: Sepolia Testnet (test ETH, limited token selection: ETH, USDC, WETH, LINK)\n\nNetwork is fixed at wallet creation and cannot be changed.\n\n## Important Notes\n\n- ERC-20 transfers require ETH in the wallet for gas fees, even when sending tokens\n- Platform fee is deducted from the token amount (not ETH), consistent with ETH transfers\n- Use `amount` for simplicity (human-readable), use `value` when you need precise base-unit control\n\nArchive v1.0.0: 2 files, 1793 bytes\n\nFiles: SKILL.md (3136b), _meta.json (149b)\n\nFile v1.0.0:SKILL.md\n\n---\r\nname: agentwalletapi\r\ndescription: AgentWalletApi crypto wallet API for AI agents. Use when an agent needs to send ETH or ERC-20 tokens, check balances, list wallets, or interact with Ethereum wallets programmatically via AgentWalletApi.\r\nlicense: Proprietary\r\ncompatibility: Requires network access to https://agentwalletapi.com\r\nmetadata:\r\n  author: agentwalletapi\r\n  version: \"1.2\"\r\n---\r\n\r\n# AgentWalletApi Agent API\r\n\r\nInteract with AgentWalletApi-managed Ethereum wallets to send ETH and ERC-20 tokens (USDC, USDT, DAI, WETH, WBTC, UNI, LINK), check balances, and list wallets.\r\n\r\n## Base URL\r\nhttps://agentwalletapi.com\r\n\r\n## Getting Your API Key (Optional)\r\nTo use the authenticated endpoints, sign up at https://agentwalletapi.com,\r\ncreate a wallet, and generate an API key from the API Keys page.\r\n\r\n## Authentication\r\nInclude your API key in every request as a header:\r\n```\r\nX-Agent-Key: ag_your_api_key_here\r\nContent-Type: application/json\r\n```\r\n\r\n## Workflow\r\n1. GET /api/agent/wallets - Discover available wallets (id, label, address, network)\r\n2. GET /api/agent/supported-tokens?network=sepolia - See tokens available on that network\r\n3. POST /api/agent/token-balance - Check wallet balances (ETH + all ERC-20 tokens)\r\n4. POST /api/agent/transfer - Send ETH or tokens (by symbol like \"USDC\")\r\n5. Use the returned txHash to confirm the transaction\r\n\r\n## Quick Reference\r\n\r\n| Endpoint | Method | Auth | Purpose |\r\n|---|---|---|---|\r\n| /api/agent/wallets | GET | Yes | List wallets |\r\n| /api/agent/transfer | POST | Yes | Send ETH or ERC-20 tokens |\r\n| /api/agent/token-balance | POST | Yes | Check balances |\r\n| /api/agent/supported-tokens | GET | No | List available tokens per network |\r\n| /api/agent/swap | POST | Yes | Not yet (501) |\r\n| /api/agent/approve | POST | Yes | Not yet (501) |\r\n| /api/agent/quote | POST | No | Not yet (501) |\r\n\r\n## Transfer Examples\r\n\r\nSend ETH (default when no token specified):\r\n```json\r\n{ \"walletId\": 2, \"to\": \"0xRecipient...\", \"amount\": \"0.01\" }\r\n```\r\n\r\nSend 100 USDC by symbol:\r\n```json\r\n{ \"walletLabel\": \"Trading Bot\", \"to\": \"0xRecipient...\", \"token\": \"USDC\", \"amount\": \"100\" }\r\n```\r\n\r\nUse \"amount\" for human-readable values (e.g., \"100\" = 100 USDC). Use \"value\" for base units.\r\n\r\n## Supported Tokens\r\nETH, USDC, USDT, DAI, WBTC, WETH, UNI, LINK\r\n(Not all tokens available on all networks. Use the supported-tokens endpoint to check.)\r\n\r\n## Error Codes\r\n- 200: Success\r\n- 400: Invalid input, insufficient funds, unknown token, or policy violation\r\n- 401: Missing/invalid API key\r\n- 404: Wallet not found\r\n- 501: Feature not yet available\r\n\r\n## Policy Constraints\r\nWallets may have governance policies:\r\n- Whitelist: Only transfers to pre-approved addresses allowed\r\n- Spending Limit: Max value per transaction in ETH\r\nViolations return HTTP 401 with an explanation message.\r\n\r\n## Important Notes\r\n- All POST requests require Content-Type: application/json\r\n- ERC-20 transfers require ETH in the wallet for gas fees, even when sending tokens\r\n- A platform fee (default 1%) is deducted from the token amount\r\n- Use \"amount\" for simplicity, use \"value\" for precise base-unit control\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1771441640927\n}","readmeExcerpt":"Skill: OpenClawCash Owner: agentwalletapi Summary: Deprecated legacy skill entry. Use the current OpenClawCash skill instead. Tags: latest:1.9.9 Version history: v1.9.9 | 2026-02-28T17:23:27.410Z | user - Deprecated the legacy OpenClawCash (agent-crypto-wallet) skill. - All documentation and setup instructions have been removed. - Users are instructed to use the updated OpenClawCash skill at https://clawhub.ai/macd2/","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"bash scripts/setup.sh"},{"language":"text","snippet":"AGENTWALLETAPI_KEY=ag_your_real_key_here"},{"language":"bash","snippet":"# Read-only (recommended first)\nbash scripts/agentwalletapi.sh wallets\nbash scripts/agentwalletapi.sh wallet 2\nbash scripts/agentwalletapi.sh wallet \"Trading Bot\"\nbash scripts/agentwalletapi.sh balance 2\nbash scripts/agentwalletapi.sh transactions 2\nbash scripts/agentwalletapi.sh tokens mainnet\n\n# Write actions (require explicit --yes)\nbash scripts/agentwalletapi.sh create \"Ops Wallet\" sepolia --yes\nbash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet --yes\n# Automation-safe import: read private key from stdin instead of command args\nprintf '%s' '<private_key>' | bash scripts/agentwalletapi.sh import \"Treasury Imported\" mainnet - --yes\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 0.01 --yes\nbash scripts/agentwalletapi.sh transfer 2 0xRecipient 100 USDC --yes\nbash scripts/agentwalletapi.sh quote mainnet WETH USDC 10000000000000000\nbash scripts/agentwalletapi.sh swap 2 WETH USDC 10000000000000000 0.5 --yes"},{"language":"text","snippet":"https://openclawcash.com"},{"language":"text","snippet":"AGENTWALLETAPI_URL=https://openclawcash.com"},{"language":"bash","snippet":"bash scripts/agentwalletapi.sh wallets"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: agentwalletapi\ndescription: Deprecated legacy skill entry. Use the current OpenClawCash skill instead.\nlicense: Proprietary\ncompatibility: Deprecated. Use the current OpenClawCash skill at https://clawhub.ai/macd2/open-claw-cash\nmetadata:\n  author: agentwalletapi\n  version: \"1.9.1\"\n  required_env_vars:\n    - AGENTWALLETAPI_KEY\n  optional_env_vars:\n    - AGENTWALLETAPI_URL\n  required_binaries:\n    - curl\n  optional_binaries:\n    - jq\n---\n\n# Deprecated\n\nThis legacy OpenClawCash skill is deprecated and should no longer be used.\n\nUse the current OpenClawCash skill instead:\nhttps://clawhub.ai/macd2/open-claw-cash\n\nDo not continue setup with this legacy copy.\nInstall the replacement skill from the URL above and follow its current instructions."},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn76ctzckvx88qbr4e49dwkxah8fqt52\",\n  \"slug\": \"agent-crypto-wallet-depricated\",\n  \"version\": \"1.9.9\",\n  \"publishedAt\": 1772299407410\n}"},{"path":"skill-card.md","content":"## Description:\n\nDeprecated legacy skill entry that directs users to the current OpenClawCash skill instead.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[macd2](https://clawhub.ai/user/macd2)\n\n### License/Terms of Use:\n\nProprietary\n\n## Use Case:\n\nExternal users and agents use this deprecated placeholder to identify that the legacy OpenClawCash skill should no longer be used and to find the current replacement skill.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Users may install or rely on the deprecated legacy placeholder instead of the maintained OpenClawCash skill.\n\nMitigation: Do not continue setup with this legacy copy; install the current OpenClawCash skill from the replacement link and follow its current instructions.\n\nRisk: The replacement skill is not pinned or audited by this legacy placeholder.\n\nMitigation: Before installing the replacement, review its current package, publisher, permissions, and version.\n\n## Reference(s):\n\n- [OpenClawCash skill page](https://clawhub.ai/macd2/skills/agent-crypto-wallet-depricated)\n- [Current OpenClawCash skill](https://clawhub.ai/macd2/open-claw-cash)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Markdown]\n\n**Output Format:** [Markdown guidance with a replacement skill link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Deprecated placeholder; no executable code.]\n\n## Skill Version(s):\n\n1.9.9 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Deprecated legacy skill entry. Use the current OpenClawCash skill instead. Skill: OpenClawCash Owner: agentwalletapi Summary: Deprecated legacy skill entry. Use the current OpenClawCash skill instead. Tags: latest:1.9.9 Version history: v1.9.9 | 2026-02-28T17:23:27.410Z | user - Deprecated the legacy OpenClawCash (agent-crypto-wallet) skill. - All documentation and setup instructions have been removed. - Users are instructed to use the updated OpenClawCash skill at https://clawhub.ai/macd2/","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1368,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T11:45:26.888Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:44:25.374Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}