Skip to main content

SDK Overview

The Sifi SDK is a TypeScript package published on Npm that lets you integrate Sifi in a Node.js or browser application. The Sifi.org frontend uses SDK to request quotes and build swap transactions.

Installation

npm install @sifi/sdk

Usage

import { Sifi } from '@sifi/sdk';

const sifi = new Sifi();

const quote = await sifi.getQuote({
fromChain: 1,
fromToken: '0x111....',
toChain: 137,
toToken: '0x222....',
});

console.log('Received quote', quote);

const swap = await sifi.getSwap({
fromAddress: '0xyourwalletaddress',
quote,
});

See the SDK source-code for more information.