Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Latest commit

History

History
42 lines (28 loc) 路 2.12 KB

01-getting-started.md

File metadata and controls

42 lines (28 loc) 路 2.12 KB
title
Getting Started
Uniswap V1 does not exists on RSK, and while still fully functional on ehtereum, is no longer under active development. Looking for V2 documentation?

The Uniswap SDK is meant to simplify every aspect of integrating Uniswap into your project. It's written in TypeScript, has a robust test suite, uses bignumber.js for math, and includes an optional data-fetching module which relies on ethers.js.

The SDK was built to be extremely easy to use, but also feature-rich. It offers various levels of abstraction that make it suitable for use nearly anywhere, from hackathon projects to production applications.

Overview

The SDK is divided into several modular components that perform tightly scoped tasks:

  • Data - Fetches Uniswap data from the blockchain
  • Computation - Computes market- and trade-specific statistics using blockchain data
  • Format - Formats data for display
  • Orchestration - Offers named abstraction functions that seamlessly combine lower-level data- and computation-related functions
  • Transact - Prepares computed trades for execution against Uniswap smart contracts
  • Constants - Exports various helpful constants for use throughout the SDK

Additionally, it exports a number of custom types:

  • Types - Exports all types used by the SDK

Installation

To start using the SDK, simply install it into your project...

yarn add @thinkanddev/rskswap-sdk

...import some functions...

import { ... } from '@thinkanddev/rskswap-sdk'

...and dive into the rest of the documentation to learn more!