搜索

PythonReactSEOPDF
OpenClaw

near-intents

Universal cross-chain swap & bridge skill for OpenClaw using the NEAR Intents 1Click SDK. Supports 14+ blockchains including NEAR, Base, Ethereum, Solana, and Bitcoin.

cuongdcdev0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cuongdcdev/near-intents

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

NEAR Intents Skill — 1Click SDK

📋 TL;DR

What it does: Universal cross-chain swap & bridge tool powered by the 1Click API and the @defuse-protocol/one-click-sdk-typescript SDK.

Supported chains: NEAR, Base, Ethereum, Arbitrum, Solana, BSC, Gnosis, Starknet, Bitcoin, Dogecoin, Zcash, Litecoin.

How it works:

  1. Get a quote from the 1Click API → receive a deposit address
  2. Send tokens to the deposit address on the origin chain
  3. 1Click handles the swap/bridge automatically
  4. Tokens arrive at the recipient address on the destination chain

Key facts:

  • Minimum ~$0.10 USD per swap
  • NEAR account only required when the origin asset is on NEAR
  • No NEAR account needed for cross-chain swaps from other chains (e.g., Arb USDC → Sol USDC)
  • JWT authentication optional but avoids 0.2% fee → register at partners.near-intents.org

Core Concept

All swaps go through the 1Click API (https://1click.chaindefuser.com):

User Wallet ──► [Deposit to 1Click address] ──► Market Makers ──► Recipient on Destination Chain

There is no need to interact with intents.near directly — the 1Click API abstracts everything.


executeIntent() API

The single entry point exported by index.ts:

import { executeIntent } from './index';

const result = await executeIntent({
  assetIn: 'NEAR',           // Origin token (see Asset Naming below)
  assetOut: 'base:USDC',     // Destination token
  amount: '1.0',             // Human-readable amount
  recipient: '0x...',        // Destination address (optional if same-chain NEAR)
  mode: 'auto',              // 'auto' (default) or 'manual'
  swapType: 'EXACT_INPUT',   // 'EXACT_INPUT' (default) or 'EXACT_OUTPUT'
});
Parameters

| Parameter | Type | Required | Description | |...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cuongdcdev/near-intents
Version
—
Commit
b528985ec8044e6b6e59a55ce5bc3dee9f14ab7f
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

NEAR Intents Skill v2.0.0 — Production Release

🎉 Production-Ready Cross-Chain Swap & Bridge

Universal cross-chain swap and bridge tool for OpenClaw agents, powered by the official NEAR Intents 1Click SDK.


✨ What's New in v2.0.0

🛡️ Critical Safety Features
  • Mandatory Refund Address Protection - Prevents permanent fund loss on failed swaps
  • Cross-Chain Validation - Automatic detection of origin chain and refund requirements
  • Clear Error Messages - Educates users about refund address requirements
  • Updated Documentation - Comprehensive safety guidelines for AI agents
🔧 Technical Improvements
  • Full integration with 1Click SDK v0.1.1
  • Support for 14+ blockchains (NEAR, Base, Ethereum, Arbitrum, Solana, Bitcoin, etc.)
  • Automatic decimal conversion for all tokens
  • Built-in token map for common assets
  • Status polling with timeout handling
  • Manual & Auto modes for maximum flexibility
📚 Documentation Updates
  • SKILL.md - Primary reference with safety warnings
  • AI-AGENT-GUIDE.md - Step-by-step workflows for agents
  • TOKENS.md - Complete token reference with decimals
  • USAGE_GUIDE.md - Common patterns and troubleshooting
  • INSTALL.md - Quick setup instructions

🚀 Quick Start

1. Install the Skill
# Download and extract to OpenClaw skills directory
cd /root/.openclaw/skills/
tar -xzf near-intents-v2.0.0.tar.gz
cd near-intents

# Install dependencies
npm install
2. Configure (Optional for Auto Mode)

Create .env file for auto-sending from NEAR:

NEAR_ACCOUNT_ID=your-account.near
NEAR_PRIVATE_KEY=ed25519:...
NEAR_RPC_URL=https://rpc.mainnet.fastnear.com
NEAR_NETWORK_ID=mainnet
ONE_CLICK_JWT=optional_jwt_token  # Avoids 0.2% fee

Register for JWT at: https://partners.near-intents.org

3. Use in Your Agent
import { executeIntent } from './index';

// NEAR → Base USDC (Auto mode)
c...

来源内容

SKILL.md
# NEAR Intents Skill — 1Click SDK

## 📋 TL;DR

**What it does**: Universal cross-chain swap & bridge tool powered by the [1Click API](https://docs.near-intents.org/near-intents/integration/distribution-channels/1click-api) and the [`@defuse-protocol/one-click-sdk-typescript`](https://github.com/defuse-protocol/one-click-sdk-typescript) SDK.

**Supported chains**: NEAR, Base, Ethereum, Arbitrum, Solana, BSC, Gnosis, Starknet, Bitcoin, Dogecoin, Zcash, Litecoin.

**How it works**:
1. Get a quote from the 1Click API → receive a deposit address
2. Send tokens to the deposit address on the origin chain
3. 1Click handles the swap/bridge automatically
4. Tokens arrive at the recipient address on the destination chain

**Key facts**:
- Minimum ~$0.10 USD per swap
- NEAR account only required when the *origin* asset is on NEAR
- No NEAR account needed for cross-chain swaps from other chains (e.g., Arb USDC → Sol USDC)
- JWT authentication optional but avoids 0.2% fee → register at [partners.near-intents.org](https://partners.near-intents.org/)

---

## Core Concept

All swaps go through the **1Click API** (`https://1click.chaindefuser.com`):

```
User Wallet ──► [Deposit to 1Click address] ──► Market Makers ──► Recipient on Destination Chain
```

There is **no need to interact with `intents.near` directly** — the 1Click API abstracts everything.

---

## `executeIntent()` API

The single entry point exported by `index.ts`:

```typescript
import { executeIntent } from './index';

const result = await executeIntent({
  assetIn: 'NEAR',           // Origin token (see Asset Naming below)
  assetOut: 'base:USDC',     // Destination token
  amount: '1.0',             // Human-readable amount
  recipient: '0x...',        // Destination address (optional if same-chain NEAR)
  mode: 'auto',              // 'auto' (default) or 'manual'
  swapType: 'EXACT_INPUT',   // 'EXACT_INPUT' (default) or 'EXACT_OUTPUT'
});
```

### Parameters

| Parameter   | Type   | Required | Description |
|...
README
# NEAR Intents Skill v2.0.0 — Production Release

## 🎉 Production-Ready Cross-Chain Swap & Bridge

Universal cross-chain swap and bridge tool for OpenClaw agents, powered by the official [NEAR Intents 1Click SDK](https://github.com/defuse-protocol/one-click-sdk-typescript).

---

## ✨ What's New in v2.0.0

### 🛡️ Critical Safety Features
- **Mandatory Refund Address Protection** - Prevents permanent fund loss on failed swaps
- **Cross-Chain Validation** - Automatic detection of origin chain and refund requirements
- **Clear Error Messages** - Educates users about refund address requirements
- **Updated Documentation** - Comprehensive safety guidelines for AI agents

### 🔧 Technical Improvements
- Full integration with 1Click SDK v0.1.1
- Support for 14+ blockchains (NEAR, Base, Ethereum, Arbitrum, Solana, Bitcoin, etc.)
- Automatic decimal conversion for all tokens
- Built-in token map for common assets
- Status polling with timeout handling
- Manual & Auto modes for maximum flexibility

### 📚 Documentation Updates
- **SKILL.md** - Primary reference with safety warnings
- **AI-AGENT-GUIDE.md** - Step-by-step workflows for agents
- **TOKENS.md** - Complete token reference with decimals
- **USAGE_GUIDE.md** - Common patterns and troubleshooting
- **INSTALL.md** - Quick setup instructions

---

## 🚀 Quick Start

### 1. Install the Skill

```bash
# Download and extract to OpenClaw skills directory
cd /root/.openclaw/skills/
tar -xzf near-intents-v2.0.0.tar.gz
cd near-intents

# Install dependencies
npm install
```

### 2. Configure (Optional for Auto Mode)

Create `.env` file for auto-sending from NEAR:
```env
NEAR_ACCOUNT_ID=your-account.near
NEAR_PRIVATE_KEY=ed25519:...
NEAR_RPC_URL=https://rpc.mainnet.fastnear.com
NEAR_NETWORK_ID=mainnet
ONE_CLICK_JWT=optional_jwt_token  # Avoids 0.2% fee
```

Register for JWT at: https://partners.near-intents.org

### 3. Use in Your Agent

```typescript
import { executeIntent } from './index';

// NEAR → Base USDC (Auto mode)
c...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...