{
  "schemaVersion": "1.0",
  "item": {
    "slug": "near-intents",
    "name": "NEAR Intents 1click Api",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/cuongdcdev/near-intents",
    "canonicalUrl": "https://clawhub.ai/cuongdcdev/near-intents",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/near-intents",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=near-intents",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "QUICKSTART.md",
      "AI-AGENT-GUIDE.md",
      "TOKENS.md",
      "CHANGELOG.md",
      "SKILL.md",
      "package-lock.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/near-intents"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/near-intents",
    "agentPageUrl": "https://openagent3.xyz/skills/near-intents/agent",
    "manifestUrl": "https://openagent3.xyz/skills/near-intents/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/near-intents/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "📋 TL;DR",
        "body": "What it does: Universal cross-chain swap & bridge tool powered by the 1Click API and the @defuse-protocol/one-click-sdk-typescript SDK.\n\nSupported chains: NEAR, Base, Ethereum, Arbitrum, Solana, BSC, Gnosis, Starknet, Bitcoin, Dogecoin, Zcash, Litecoin.\n\nHow it works:\n\nGet a quote from the 1Click API → receive a deposit address\nSend tokens to the deposit address on the origin chain\n1Click handles the swap/bridge automatically\nTokens arrive at the recipient address on the destination chain\n\nKey facts:\n\nMinimum ~$0.10 USD per swap\nNEAR account only required when the origin asset is on NEAR\nNo NEAR account needed for cross-chain swaps from other chains (e.g., Arb USDC → Sol USDC)\nJWT authentication optional but avoids 0.2% fee → register at partners.near-intents.org"
      },
      {
        "title": "Core Concept",
        "body": "All swaps go through the 1Click API (https://1click.chaindefuser.com):\n\nUser Wallet ──► [Deposit to 1Click address] ──► Market Makers ──► Recipient on Destination Chain\n\nThere is no need to interact with intents.near directly — the 1Click API abstracts everything."
      },
      {
        "title": "executeIntent() API",
        "body": "The single entry point exported by index.ts:\n\nimport { executeIntent } from './index';\n\nconst result = await executeIntent({\n  assetIn: 'NEAR',           // Origin token (see Asset Naming below)\n  assetOut: 'base:USDC',     // Destination token\n  amount: '1.0',             // Human-readable amount\n  recipient: '0x...',        // Destination address (optional if same-chain NEAR)\n  mode: 'auto',              // 'auto' (default) or 'manual'\n  swapType: 'EXACT_INPUT',   // 'EXACT_INPUT' (default) or 'EXACT_OUTPUT'\n});"
      },
      {
        "title": "Parameters",
        "body": "ParameterTypeRequiredDescriptionassetInstring✅Origin asset symbol (e.g., 'NEAR', 'base:USDC', 'arb:ARB')assetOutstring✅Destination asset symbolamountstring✅Human-readable amount (e.g., '1.0', '0.5')recipientstring❌Destination address. Required for cross-chain. Defaults to NEAR accountrefundAddressstring⚠️REQUIRED for non-NEAR origins. Address on origin chain for refunds if swap fails. CRITICAL for fund safety!modestring❌'auto' sends deposit automatically from NEAR account. 'manual' returns quote + deposit address for user to send manuallyswapTypestring❌'EXACT_INPUT' (amount = input), 'EXACT_OUTPUT' (amount = desired output)"
      },
      {
        "title": "⚠️ CRITICAL: Refund Address Safety",
        "body": "When assetIn is on a non-NEAR chain (e.g., 'base:USDC', 'arb:ARB', 'btc:BTC'):\n\nrefundAddress is REQUIRED — the function will throw an error if missing\nALWAYS ask the user for their wallet address on the origin chain\nNEVER assume or guess — using the wrong address = permanent fund loss\nExplain to the user: \"If the swap fails, your tokens will be refunded to this address\"\n\nExample:\n\n// ❌ WRONG - Missing refundAddress for non-NEAR origin\nawait executeIntent({\n  assetIn: 'base:USDC',  // Base origin\n  assetOut: 'NEAR',\n  amount: '0.5',\n  recipient: 'user.near',\n  mode: 'manual'\n});\n// → Error: Cross-chain swap from base:USDC requires refundAddress parameter\n\n// ✅ CORRECT - User's Base wallet address provided\nawait executeIntent({\n  assetIn: 'base:USDC',\n  assetOut: 'NEAR',\n  amount: '0.5',\n  recipient: 'user.near',\n  refundAddress: '0x123...',  // User's Base address\n  mode: 'manual'\n});\n\nWhy this matters:\n\nSwaps can fail due to market conditions, liquidity issues, or timing\nFailed swaps trigger automatic refunds to refundAddress on the origin chain\nIf refundAddress is wrong or belongs to someone else, funds are permanently lost"
      },
      {
        "title": "Returns",
        "body": "Auto mode: \"Swap Successful! 1.0 NEAR → 0.97 USDC\\nTransaction: https://nearblocks.io/txns/...\\nExplorer: https://explorer.near-intents.org/transactions/...\"\nManual mode: Formatted instructions with deposit address, amounts, tracking URL, and deadline"
      },
      {
        "title": "Asset Naming",
        "body": "Use chain:SYMBOL format. Omit chain prefix for NEAR-native tokens.\n\nChainPrefixExamplesNEAR(none)NEAR, USDC, USDT, wNEARBasebase:base:USDCEthereumeth:eth:ETH, eth:USDCArbitrumarb:arb:USDC, arb:ARBSolanasol:sol:SOL, sol:USDCBSCbsc:bsc:USDCBitcoinbtc:btc:BTC (native only)Dogecoindoge:doge:DOGE (native only)Zcashzec:zec:ZEC (native only)Litecoinltc:ltc:LTC (native only)\n\nCase-insensitive: near, NEAR, Near all work\nUTXO chains (BTC, DOGE, ZEC, LTC): native tokens only — no wrapped/ERC-20 equivalents"
      },
      {
        "title": "Auto Mode (default)",
        "body": "Automatically sends the deposit from the configured NEAR account.\n\nUse when: Origin asset is on NEAR and agent has NEAR credentials in .env.\n\nawait executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'base:USDC',\n  amount: '1.0',\n  recipient: '0xYourBaseAddress',\n});"
      },
      {
        "title": "Manual Mode",
        "body": "Returns a quote with deposit address — the user (or agent) sends tokens separately.\n\nUse when: Origin is on a non-NEAR chain, or you want to show the user a quote first.\n\nconst quote = await executeIntent({\n  assetIn: 'arb:USDC',\n  assetOut: 'sol:USDC',\n  amount: '5.0',\n  recipient: 'YourSolanaAddress',\n  mode: 'manual',\n});\n// Returns deposit address + instructions"
      },
      {
        "title": "EXACT_OUTPUT",
        "body": "Specify the desired output amount; the 1Click API tells you how much to send.\n\nconst quote = await executeIntent({\n  assetIn: 'USDT',\n  assetOut: 'base:USDC',\n  amount: '10.0',          // Want exactly 10 USDC out\n  recipient: '0x...',\n  mode: 'manual',\n  swapType: 'EXACT_OUTPUT',\n});"
      },
      {
        "title": "1. Swap NEAR → USDC on Base (Auto)",
        "body": "await executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'base:USDC',\n  amount: '1.0',\n  recipient: '0xYourBaseAddress',\n});"
      },
      {
        "title": "2. Bridge USDC from Arbitrum → Solana (Manual)",
        "body": "const quote = await executeIntent({\n  assetIn: 'arb:USDC',\n  assetOut: 'sol:USDC',\n  amount: '5.0',\n  recipient: 'YourSolanaAddress',\n  refundAddress: '0xYourArbitrumAddress',  // REQUIRED for refunds\n  mode: 'manual',\n});\n// User sends 5 USDC to the deposit address on Arbitrum"
      },
      {
        "title": "3. Swap NEAR → USDC (same chain)",
        "body": "await executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'USDC',\n  amount: '2.0',\n});"
      },
      {
        "title": "4. Get a quote: How much NEAR for 10 USDC on Arbitrum?",
        "body": "const quote = await executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'arb:USDC',\n  amount: '10.0',\n  recipient: '0xYourArbAddress',\n  mode: 'manual',\n  swapType: 'EXACT_OUTPUT',\n});"
      },
      {
        "title": "5. Send BTC to NEAR address",
        "body": "const quote = await executeIntent({\n  assetIn: 'btc:BTC',\n  assetOut: 'NEAR',\n  amount: '0.01',\n  recipient: 'yourname.near',\n  refundAddress: 'bc1q...',  // REQUIRED - Your Bitcoin address\n  mode: 'manual',\n});\n// User sends 0.01 BTC to the deposit address on Bitcoin"
      },
      {
        "title": ".env file (only needed for auto mode with NEAR origin):",
        "body": "NEAR_ACCOUNT_ID=your-account.near\nNEAR_PRIVATE_KEY=ed25519:your_private_key_here\nNEAR_RPC_URL=https://rpc.mainnet.fastnear.com\nNEAR_NETWORK_ID=mainnet\nONE_CLICK_JWT=optional_jwt_token\n\nONE_CLICK_JWT: Register at partners.near-intents.org to avoid the 0.2% fee.\nSkip .env entirely if only using manual mode for non-NEAR-origin swaps.\n\n⚠️ Never commit .env to version control!"
      },
      {
        "title": "Under the Hood — 1Click SDK Flow",
        "body": "executeIntent()\n  │\n  ├─ 1. resolveToken(assetIn)  →  { symbol, decimals, assetId }\n  ├─ 2. resolveToken(assetOut) →  { symbol, decimals, assetId }\n  ├─ 3. toSmallestUnit(amount, decimals)\n  │\n  ├─ 4. OneClickService.getQuote({\n  │       originAsset, destinationAsset, amount,\n  │       refundTo, recipient, deadline, ...\n  │    })\n  │    → Returns { depositAddress, amountIn, amountOut }\n  │\n  ├─ [manual mode] → return quote instructions\n  │\n  ├─ 5. account.transfer() → send deposit to depositAddress\n  ├─ 6. OneClickService.submitDepositTx() → (optional, speeds up)\n  └─ 7. OneClickService.getExecutionStatus() → poll until SUCCESS"
      },
      {
        "title": "Swap Statuses",
        "body": "StatusMeaningPENDING_DEPOSITWaiting for depositPROCESSINGDeposit detected, market makers executingSUCCESSTokens delivered to recipientINCOMPLETE_DEPOSITDeposit below required amountREFUNDEDSwap failed, tokens returned to refund addressFAILEDSwap failed due to error"
      },
      {
        "title": "Token Map (built-in)",
        "body": "The code includes a static TOKEN_MAP for common tokens:\n\nKeyAsset ID (NEP-141)DecimalsNEARnep141:wrap.near24USDCnep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a16USDTnep141:usdt.tether-token.near6base:USDCnep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near6arb:USDCnep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near6arb:ARBnep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near18eth:ETHnep141:eth.omft.near18eth:USDCnep141:eth-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.omft.near6sol:SOLnep141:sol.omft.near9sol:USDCnep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near6\n\nTo add more tokens: use OneClickService.getTokens() or check TOKENS.md."
      },
      {
        "title": "Decimals Quick Reference",
        "body": "TokenDecimals\"1.0\" → smallest unitNEAR241000000000000000000000000USDC61000000USDT61000000ETH181000000000000000000SOL91000000000BTC8100000000\n\nDecimal conversion is handled automatically by index.ts using decimal.js."
      },
      {
        "title": "Tracking & Explorer",
        "body": "NEAR transactions: https://nearblocks.io/txns/<txHash>\n1Click swap status: https://explorer.near-intents.org/transactions/<depositAddress>"
      },
      {
        "title": "Troubleshooting",
        "body": "ErrorSolutionToken not found: XCheck symbol and chain prefix. See TOKEN_MAP or TOKENS.mdNo deposit address in quote responseSolver couldn't match the pair/amount. Try a different amount or pairNEAR_ACCOUNT_ID and NEAR_PRIVATE_KEY must be setConfigure .env or use mode: 'manual'Swap failed with status: REFUNDEDTokens returned to refund address. Retry with different amountStatus polling timed outCheck explorer URL manually. Swap may still complete401 Authentication errorJWT is invalid or expired. Register at partners.near-intents.org"
      },
      {
        "title": "Dependencies",
        "body": "{\n  \"@defuse-protocol/one-click-sdk-typescript\": \"0.1.1\",\n  \"@near-js/accounts\": \"^2.2.4\",\n  \"@near-js/crypto\": \"^2.2.4\",\n  \"@near-js/providers\": \"^2.2.4\",\n  \"@near-js/signers\": \"^2.2.4\",\n  \"@near-js/tokens\": \"^2.2.4\",\n  \"decimal.js\": \"^10.4.3\",\n  \"dotenv\": \"^16.3.1\"\n}"
      },
      {
        "title": "Files Overview",
        "body": "FilePurposeindex.tsMain entry — exports executeIntent()lib-1click/Step-by-step 1Click SDK examples (get tokens, get quote, send deposit, etc.)SKILL.mdThis file — primary AI agent referenceAI-AGENT-GUIDE.mdDetailed agent workflow guideTOKENS.mdFull token reference with decimals and asset IDsmanifest.jsonSkill manifest for OpenClawREADME.mdProject documentationUSAGE_GUIDE.mdUsage patterns and troubleshooting"
      },
      {
        "title": "Version",
        "body": "v2.0.0 — Powered by 1Click SDK and NEAR Intents"
      },
      {
        "title": "License",
        "body": "MIT"
      }
    ],
    "body": "NEAR Intents Skill — 1Click SDK\n📋 TL;DR\n\nWhat it does: Universal cross-chain swap & bridge tool powered by the 1Click API and the @defuse-protocol/one-click-sdk-typescript SDK.\n\nSupported chains: NEAR, Base, Ethereum, Arbitrum, Solana, BSC, Gnosis, Starknet, Bitcoin, Dogecoin, Zcash, Litecoin.\n\nHow it works:\n\nGet a quote from the 1Click API → receive a deposit address\nSend tokens to the deposit address on the origin chain\n1Click handles the swap/bridge automatically\nTokens arrive at the recipient address on the destination chain\n\nKey facts:\n\nMinimum ~$0.10 USD per swap\nNEAR account only required when the origin asset is on NEAR\nNo NEAR account needed for cross-chain swaps from other chains (e.g., Arb USDC → Sol USDC)\nJWT authentication optional but avoids 0.2% fee → register at partners.near-intents.org\nCore Concept\n\nAll swaps go through the 1Click API (https://1click.chaindefuser.com):\n\nUser Wallet ──► [Deposit to 1Click address] ──► Market Makers ──► Recipient on Destination Chain\n\n\nThere is no need to interact with intents.near directly — the 1Click API abstracts everything.\n\nexecuteIntent() API\n\nThe single entry point exported by index.ts:\n\nimport { executeIntent } from './index';\n\nconst result = await executeIntent({\n  assetIn: 'NEAR',           // Origin token (see Asset Naming below)\n  assetOut: 'base:USDC',     // Destination token\n  amount: '1.0',             // Human-readable amount\n  recipient: '0x...',        // Destination address (optional if same-chain NEAR)\n  mode: 'auto',              // 'auto' (default) or 'manual'\n  swapType: 'EXACT_INPUT',   // 'EXACT_INPUT' (default) or 'EXACT_OUTPUT'\n});\n\nParameters\nParameter\tType\tRequired\tDescription\nassetIn\tstring\t✅\tOrigin asset symbol (e.g., 'NEAR', 'base:USDC', 'arb:ARB')\nassetOut\tstring\t✅\tDestination asset symbol\namount\tstring\t✅\tHuman-readable amount (e.g., '1.0', '0.5')\nrecipient\tstring\t❌\tDestination address. Required for cross-chain. Defaults to NEAR account\nrefundAddress\tstring\t⚠️\tREQUIRED for non-NEAR origins. Address on origin chain for refunds if swap fails. CRITICAL for fund safety!\nmode\tstring\t❌\t'auto' sends deposit automatically from NEAR account. 'manual' returns quote + deposit address for user to send manually\nswapType\tstring\t❌\t'EXACT_INPUT' (amount = input), 'EXACT_OUTPUT' (amount = desired output)\n⚠️ CRITICAL: Refund Address Safety\n\nWhen assetIn is on a non-NEAR chain (e.g., 'base:USDC', 'arb:ARB', 'btc:BTC'):\n\nrefundAddress is REQUIRED — the function will throw an error if missing\nALWAYS ask the user for their wallet address on the origin chain\nNEVER assume or guess — using the wrong address = permanent fund loss\nExplain to the user: \"If the swap fails, your tokens will be refunded to this address\"\n\nExample:\n\n// ❌ WRONG - Missing refundAddress for non-NEAR origin\nawait executeIntent({\n  assetIn: 'base:USDC',  // Base origin\n  assetOut: 'NEAR',\n  amount: '0.5',\n  recipient: 'user.near',\n  mode: 'manual'\n});\n// → Error: Cross-chain swap from base:USDC requires refundAddress parameter\n\n// ✅ CORRECT - User's Base wallet address provided\nawait executeIntent({\n  assetIn: 'base:USDC',\n  assetOut: 'NEAR',\n  amount: '0.5',\n  recipient: 'user.near',\n  refundAddress: '0x123...',  // User's Base address\n  mode: 'manual'\n});\n\n\nWhy this matters:\n\nSwaps can fail due to market conditions, liquidity issues, or timing\nFailed swaps trigger automatic refunds to refundAddress on the origin chain\nIf refundAddress is wrong or belongs to someone else, funds are permanently lost\nReturns\nAuto mode: \"Swap Successful! 1.0 NEAR → 0.97 USDC\\nTransaction: https://nearblocks.io/txns/...\\nExplorer: https://explorer.near-intents.org/transactions/...\"\nManual mode: Formatted instructions with deposit address, amounts, tracking URL, and deadline\nAsset Naming\n\nUse chain:SYMBOL format. Omit chain prefix for NEAR-native tokens.\n\nChain\tPrefix\tExamples\nNEAR\t(none)\tNEAR, USDC, USDT, wNEAR\nBase\tbase:\tbase:USDC\nEthereum\teth:\teth:ETH, eth:USDC\nArbitrum\tarb:\tarb:USDC, arb:ARB\nSolana\tsol:\tsol:SOL, sol:USDC\nBSC\tbsc:\tbsc:USDC\nBitcoin\tbtc:\tbtc:BTC (native only)\nDogecoin\tdoge:\tdoge:DOGE (native only)\nZcash\tzec:\tzec:ZEC (native only)\nLitecoin\tltc:\tltc:LTC (native only)\nCase-insensitive: near, NEAR, Near all work\nUTXO chains (BTC, DOGE, ZEC, LTC): native tokens only — no wrapped/ERC-20 equivalents\nModes\nAuto Mode (default)\n\nAutomatically sends the deposit from the configured NEAR account.\n\nUse when: Origin asset is on NEAR and agent has NEAR credentials in .env.\n\nawait executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'base:USDC',\n  amount: '1.0',\n  recipient: '0xYourBaseAddress',\n});\n\nManual Mode\n\nReturns a quote with deposit address — the user (or agent) sends tokens separately.\n\nUse when: Origin is on a non-NEAR chain, or you want to show the user a quote first.\n\nconst quote = await executeIntent({\n  assetIn: 'arb:USDC',\n  assetOut: 'sol:USDC',\n  amount: '5.0',\n  recipient: 'YourSolanaAddress',\n  mode: 'manual',\n});\n// Returns deposit address + instructions\n\nEXACT_OUTPUT\n\nSpecify the desired output amount; the 1Click API tells you how much to send.\n\nconst quote = await executeIntent({\n  assetIn: 'USDT',\n  assetOut: 'base:USDC',\n  amount: '10.0',          // Want exactly 10 USDC out\n  recipient: '0x...',\n  mode: 'manual',\n  swapType: 'EXACT_OUTPUT',\n});\n\nExamples\n1. Swap NEAR → USDC on Base (Auto)\nawait executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'base:USDC',\n  amount: '1.0',\n  recipient: '0xYourBaseAddress',\n});\n\n2. Bridge USDC from Arbitrum → Solana (Manual)\nconst quote = await executeIntent({\n  assetIn: 'arb:USDC',\n  assetOut: 'sol:USDC',\n  amount: '5.0',\n  recipient: 'YourSolanaAddress',\n  refundAddress: '0xYourArbitrumAddress',  // REQUIRED for refunds\n  mode: 'manual',\n});\n// User sends 5 USDC to the deposit address on Arbitrum\n\n3. Swap NEAR → USDC (same chain)\nawait executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'USDC',\n  amount: '2.0',\n});\n\n4. Get a quote: How much NEAR for 10 USDC on Arbitrum?\nconst quote = await executeIntent({\n  assetIn: 'NEAR',\n  assetOut: 'arb:USDC',\n  amount: '10.0',\n  recipient: '0xYourArbAddress',\n  mode: 'manual',\n  swapType: 'EXACT_OUTPUT',\n});\n\n5. Send BTC to NEAR address\nconst quote = await executeIntent({\n  assetIn: 'btc:BTC',\n  assetOut: 'NEAR',\n  amount: '0.01',\n  recipient: 'yourname.near',\n  refundAddress: 'bc1q...',  // REQUIRED - Your Bitcoin address\n  mode: 'manual',\n});\n// User sends 0.01 BTC to the deposit address on Bitcoin\n\nConfiguration\n.env file (only needed for auto mode with NEAR origin):\nNEAR_ACCOUNT_ID=your-account.near\nNEAR_PRIVATE_KEY=ed25519:your_private_key_here\nNEAR_RPC_URL=https://rpc.mainnet.fastnear.com\nNEAR_NETWORK_ID=mainnet\nONE_CLICK_JWT=optional_jwt_token\n\nONE_CLICK_JWT: Register at partners.near-intents.org to avoid the 0.2% fee.\nSkip .env entirely if only using manual mode for non-NEAR-origin swaps.\n\n⚠️ Never commit .env to version control!\n\nUnder the Hood — 1Click SDK Flow\nexecuteIntent()\n  │\n  ├─ 1. resolveToken(assetIn)  →  { symbol, decimals, assetId }\n  ├─ 2. resolveToken(assetOut) →  { symbol, decimals, assetId }\n  ├─ 3. toSmallestUnit(amount, decimals)\n  │\n  ├─ 4. OneClickService.getQuote({\n  │       originAsset, destinationAsset, amount,\n  │       refundTo, recipient, deadline, ...\n  │    })\n  │    → Returns { depositAddress, amountIn, amountOut }\n  │\n  ├─ [manual mode] → return quote instructions\n  │\n  ├─ 5. account.transfer() → send deposit to depositAddress\n  ├─ 6. OneClickService.submitDepositTx() → (optional, speeds up)\n  └─ 7. OneClickService.getExecutionStatus() → poll until SUCCESS\n\nSwap Statuses\nStatus\tMeaning\nPENDING_DEPOSIT\tWaiting for deposit\nPROCESSING\tDeposit detected, market makers executing\nSUCCESS\tTokens delivered to recipient\nINCOMPLETE_DEPOSIT\tDeposit below required amount\nREFUNDED\tSwap failed, tokens returned to refund address\nFAILED\tSwap failed due to error\nToken Map (built-in)\n\nThe code includes a static TOKEN_MAP for common tokens:\n\nKey\tAsset ID (NEP-141)\tDecimals\nNEAR\tnep141:wrap.near\t24\nUSDC\tnep141:17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1\t6\nUSDT\tnep141:usdt.tether-token.near\t6\nbase:USDC\tnep141:base-0x833589fcd6edb6e08f4c7c32d4f71b54bda02913.omft.near\t6\narb:USDC\tnep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near\t6\narb:ARB\tnep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near\t18\neth:ETH\tnep141:eth.omft.near\t18\neth:USDC\tnep141:eth-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.omft.near\t6\nsol:SOL\tnep141:sol.omft.near\t9\nsol:USDC\tnep141:sol-5ce3bf3a31af18be40ba30f721101b4341690186.omft.near\t6\n\nTo add more tokens: use OneClickService.getTokens() or check TOKENS.md.\n\nDecimals Quick Reference\nToken\tDecimals\t\"1.0\" → smallest unit\nNEAR\t24\t1000000000000000000000000\nUSDC\t6\t1000000\nUSDT\t6\t1000000\nETH\t18\t1000000000000000000\nSOL\t9\t1000000000\nBTC\t8\t100000000\n\nDecimal conversion is handled automatically by index.ts using decimal.js.\n\nTracking & Explorer\nNEAR transactions: https://nearblocks.io/txns/<txHash>\n1Click swap status: https://explorer.near-intents.org/transactions/<depositAddress>\nTroubleshooting\nError\tSolution\nToken not found: X\tCheck symbol and chain prefix. See TOKEN_MAP or TOKENS.md\nNo deposit address in quote response\tSolver couldn't match the pair/amount. Try a different amount or pair\nNEAR_ACCOUNT_ID and NEAR_PRIVATE_KEY must be set\tConfigure .env or use mode: 'manual'\nSwap failed with status: REFUNDED\tTokens returned to refund address. Retry with different amount\nStatus polling timed out\tCheck explorer URL manually. Swap may still complete\n401 Authentication error\tJWT is invalid or expired. Register at partners.near-intents.org\nDependencies\n{\n  \"@defuse-protocol/one-click-sdk-typescript\": \"0.1.1\",\n  \"@near-js/accounts\": \"^2.2.4\",\n  \"@near-js/crypto\": \"^2.2.4\",\n  \"@near-js/providers\": \"^2.2.4\",\n  \"@near-js/signers\": \"^2.2.4\",\n  \"@near-js/tokens\": \"^2.2.4\",\n  \"decimal.js\": \"^10.4.3\",\n  \"dotenv\": \"^16.3.1\"\n}\n\nFiles Overview\nFile\tPurpose\nindex.ts\tMain entry — exports executeIntent()\nlib-1click/\tStep-by-step 1Click SDK examples (get tokens, get quote, send deposit, etc.)\nSKILL.md\tThis file — primary AI agent reference\nAI-AGENT-GUIDE.md\tDetailed agent workflow guide\nTOKENS.md\tFull token reference with decimals and asset IDs\nmanifest.json\tSkill manifest for OpenClaw\nREADME.md\tProject documentation\nUSAGE_GUIDE.md\tUsage patterns and troubleshooting\nVersion\n\nv2.0.0 — Powered by 1Click SDK and NEAR Intents\n\nLicense\n\nMIT"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/cuongdcdev/near-intents",
    "publisherUrl": "https://clawhub.ai/cuongdcdev/near-intents",
    "owner": "cuongdcdev",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/near-intents",
    "downloadUrl": "https://openagent3.xyz/downloads/near-intents",
    "agentUrl": "https://openagent3.xyz/skills/near-intents/agent",
    "manifestUrl": "https://openagent3.xyz/skills/near-intents/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/near-intents/agent.md"
  }
}