Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

across-bridge-v3-sdk

neklyud27ISC1.0.1TypeScript support: included

Light-weighted SDK for interacting with Across V3 API

across, bridge, defi, ethereum, sdk

readme

Across V3 SDK

A lightweight SDK for interacting with the Across V3 API.

Installation

npm install across-v3-sdk

Usage

import { createAcrossClient } from 'across-v3-sdk';

const client = createAcrossClient();

// Get suggested fees
const fees = await client.getSuggestedFees({
  originChainId: '1',
  destinationChainId: '2',
  inputToken: '0x123...',
  outputToken: '0x456...',
  amount: '1000000',
});

// Get limits
const limits = await client.getLimits({
  originChainId: '1',
  destinationChainId: '2',
  inputToken: '0x123...',
  outputToken: '0x456...',
});

// Get available routes
const routes = await client.getAvailableRoutes({
  originChainId: '1',
  destinationChainId: '2',
});

// Get deposit status
const status = await client.getDepositStatus({
  originChainId: '1',
  depositId: '123',
});

API Reference

createAcrossClient()

Creates a new instance of the Across client.

getSuggestedFees(params: AcrossSuggestedFeesParams)

Get suggested fees for a bridge transaction.

getLimits(params: AcrossLimitsParams)

Get deposit limits for a token pair.

getAvailableRoutes(params?: AcrossAvailableRoutesParams)

Get available bridge routes.

getDepositStatus(params: AcrossDepositStatusParams)

Get the status of a deposit.

License

ISC