Superbridge
Start typing to search...

Getting Started

SDK

A type-safe TypeScript wrapper around the Superbridge API

The Superbridge SDK is a type-safe TypeScript wrapper around the Superbridge API. It provides fully typed request and response objects generated from the OpenAPI spec.

Installation

npm install @superbridge/sdk

Quick Start

import { createClient } from '@superbridge/sdk';

const sb = createClient({
  apiKey: 'your-api-key',
});

const routes = await sb.getRoutes({
  fromChainKey: 'eth',
  toChainKey: 'base',
  fromTokenAddress: '0x0000000000000000000000000000000000000000',
  toTokenAddress: '0x0000000000000000000000000000000000000000',
  amount: '1000000000000000000',
  slippage: 0.005,
});

Methods

The SDK exposes one method per public API endpoint: health, getChains, getTokens, getToken, getRoutes, getActivity, getStepTransaction, indexTransaction, and submitGasless.

Learn More

The SDK mirrors the Superbridge API 1:1. For understanding bridging flows, response types, error handling, and transaction lifecycle, see the API Reference — everything there applies directly to the SDK.