Across is now live on BNB Smart Chain!
Bridge Now!
Across Documentation
V3 Developer Docs
V3 Developer Docs
  • 👋Introduction
    • Welcome to Across
    • What is Across?
    • Technical FAQ
    • Migration Guides
      • Migration from V2 to V3
      • Migration to CCTP
        • Migration Guide for Relayers
        • Migration Guide for API Users
      • Migration Guide for Non-EVM and Prefills
        • Breaking Changes for Indexers
        • Breaking Changes for API Users
        • Breaking Changes for Relayers
        • Testnet Environment for Migration
      • Solana Migration Guide
      • BNB Smart Chain Migration Guide
  • 🚀DEVELOPER QUICKSTART
    • Instant Bridging in your Application
      • Bridge Integration Guide
      • Multichain Bridge UI Guide
      • Single Chain Bridge UI Guide
    • Embedded Crosschain Actions
      • Crosschain Actions Integration Guide
        • Using the Generic Multicaller Handler Contract
        • Using a Custom Handler Contract
      • Crosschain Actions UI Guide
    • Settle Crosschain Intents
    • ERC-7683 in Production
  • 🧠Concepts
    • What are Crosschain Intents?
    • Intents Architecture in Across
    • Intent Lifecycle in Across
    • Canonical Asset Maximalism
  • 🛠️Reference
    • API Reference
    • App SDK Reference
    • Contracts
      • Aleph Zero
      • Arbitrum
      • Base
      • Blast
      • BNB Smart Chain
      • Ethereum
      • Linea
      • Lens Chain
      • Ink
      • Lisk
      • Mode
      • Optimism
      • Polygon
      • Redstone
      • Scroll
      • Soneium
      • Unichain
      • World Chain
      • zkSync
      • Zora
    • Selected Contract Functions
    • Supported Chains
    • Fees in the System
    • Actors in the System
    • Security Model and Verification
      • Disputing Root Bundles
      • Validating Root Bundles
    • Tracking Events
  • 🔁Relayers
    • Running a Relayer
    • Relayer Nomination
  • 📚Resources
    • Release Notes
    • Developer Support
    • Bug Bounty
    • Audits
Powered by GitBook
LogoLogo

Products

  • Across Bridge
  • Across+
  • Across Settlement

Socials

  • Discord
  • Twitter
  • Medium
  • Forum

Resources

  • Blog
  • Across Brand Assets
  • Github

Routes

  • Bridge to Unichain
  • Bridge to Arbitrum
  • Bridge to Optimism
  • Bridge to Linea
  • Bridge to Polygon
  • Bridge to Base
  • Bridge to World Chain
  • Bridge to zkSync
On this page
  • About the App SDK
  • How can I use the App SDK?
  • Installation
  • Testnet Across SDK
  • Basic Usage
  1. Reference

App SDK Reference

PreviousAPI ReferenceNextContracts

Last updated 3 months ago

About the App SDK

The Across App SDK is written and maintained by the engineering team at Risk Labs.

It is written in typescript and available on NPM at .

How can I use the App SDK?

The @across-protocol/app-sdk provides useful abstractions on top of Across' Smart Contracts and API. It can be used to easily integrate Across into your application to offer instant bridging or enable users to seamlessly interact with your app using assets from any chain. The App SDK provides utilities to:

  • retrieve routes, chain and token details

  • retrieve and execute quotes

  • handle destination chain contract calls

  • track status of deposits

Installation

To add the App SDK to your project, use npm or yarn to npm install @across-protocol/app-sdk or yarn add @across-protocol/app-sdk.

This can be used either in a frontend application or a node js project.

Testnet Across SDK

You can initialize the App SDK in testnet environment as follows:

import { createAcrossClient } from "@across-protocol/app-sdk";
import { mainnet, optimism, arbitrum } from "viem/chains";

const client = createAcrossClient({
  integratorId: "<your-integratorId>", // 2-byte hex string
  chains: [mainnet, optimism, arbitrum],
  useTestnet: true,
});

While using the App SDK in testnet environment, fills will typically take around 1 minute, significantly slower than mainnet's 2 second fills. This performance difference exists because testnet lacks the economic incentives and relayer competition that drive mainnet's performance and reliability.

Perform relatively smaller deposits (~$10) during testing. Remember that relayer settlement does not occur on the testnet and unfilled deposits are not automatically refunded.

We recommend using the testnet App SDK implementation only to verify your integration is correct, then switch to mainnet to experience Across in its true form. You can switch the App SDK to mainnet by simply removing the useTestnetparameter or setting it to false.

Basic Usage

Please ensure that you claim your integratorIDby filling before launching your product. This will allow Across to support you effectively and enable co-marketing opportunities as you grow and gain traction.

You can read about the different App SDK modules on the page.

🛠️
@across-protocol/app-sdk
this form
Github README