near-intents_skill

This skill enables cross-chain token swaps using NEAR Intents 1Click API to fetch quotes, generate deposits, and track status across chains.

5

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill near/agent-skills --skill near-intents

  • SKILL.md3.7 KB

Overview

This skill integrates NEAR Intents 1Click API to enable cross-chain token swaps and multi-chain transfers. It provides the flow to fetch token lists, get quotes (preview and deposit-ready), build chain-specific deposit transactions, submit deposits, and poll for final status. Use it to add swap widgets, bridge flows, or server-side swap handlers across EVM, Solana, NEAR, TON, Stellar, and Tron.

How this skill works

The integration fetches supported tokens and requests quotes from the 1Click REST API. A dry quote gives pricing and parameters; a wet quote (dry:false) returns a temporary deposit address and deposit instructions. You assemble and submit the deposit transaction on the specified chain, notify the API via deposit/submit, and poll status until a terminal state (SUCCESS, FAILED, REFUNDED, INCOMPLETE_DEPOSIT).

When to use it

  • Building an in-page swap widget supporting many chains
  • Powering a bridge or multi-chain transfer flow
  • Server-side scripts that orchestrate swaps and track status
  • Wallet integrations that need deposit instructions per chain
  • When you need consistent deposit handling across EVM, Solana, NEAR, TON, Stellar, Tron

Best practices

  • Always use assetId from GET /v0/tokens — never construct asset identifiers manually
  • Request quotes with dry:true to preview UX and fees, then dry:false to obtain deposit details (deposit addresses expire ~10 minutes)
  • Cache the /v0/tokens response and refresh periodically to avoid stale token lists
  • Implement chain-specific deposit builders (EVM, Solana, NEAR, TON, Stellar, Tron) using the provided deposit-{chain} patterns
  • After broadcasting the deposit, call POST /v0/deposit/submit to speed processing and then poll GET /v0/status until terminal state

Example use cases

  • React swap widget using wagmi that gets tokens, previews quote, builds deposit TX, and polls status
  • Node.js server that requests quotes, returns deposit info to clients, and monitors swaps
  • Wallet integration that opens the correct deposit flow per chain and provides instructions to users
  • QR/passive-deposit flow for manual transfers where a user scans deposit instructions and the server polls status
  • Holding an intents.near balance for faster same-chain swaps and liquidity management

FAQ

Deposit addresses from a wet quote are short-lived — typically valid for about 10 minutes. Request a new quote if the user delays.

What status values indicate completion?

Terminal statuses are SUCCESS, FAILED, REFUNDED, and INCOMPLETE_DEPOSIT. Poll GET /v0/status until you see one of these.

Do I need to support chain-specific deposit formats?

Yes. Use the deposit-{chain} patterns: EVM uses raw tx or signed data, Solana uses SPL/native transfer details, NEAR uses NEP-141 and wallet selector, Stellar requires MEMO, etc.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational