Skip to main content
The 1Click SDK provides client libraries in multiple languages for seamless cross-chain token swaps using the 1Click Swap API.

TypeScript

npm package

Go

Go module

Rust

Cargo crate

Using the SDK

There is no testnet version of NEAR Intents - use small amounts for test swaps.
1

Prerequisites

2

Install the SDK package

3

Configure client

4

Query supported tokens

5

Request a quote

Save quote.quote.depositAddress (and quote.quote.depositMemo if present). You will use these for deposit and status checks.
6

Send tokens

Transfer tokens to the depositAddress (on the origin chain) from the quote response. The swap begins automatically upon receipt.Save your transaction hash for optional submission and tracking.
7

Submit transaction hash (optional)

Submitting the transaction hash lets the service detect your deposit faster and start processing sooner.
8

Monitor status

Poll until status reaches a terminal state (SUCCESS, REFUNDED, or FAILED).