@babydogeswap/sdk
TypeScript icon, indicating that this package has built-in type declarations

3.1.31 • Public • Published

BabyDogeSwap SDK

Forked from the Uniswap SDK.

You can refer to the Uniswap SDK documentation uniswap.org.

BabyDogeSwap SDK is a comprehensive library that provides major entities and constants for the BabyDogeSwap DEX. It includes various types, big number / math classes, tokens and currencies abstract classes, error types, and more.

Table of Contents

Installation

You can install the SDK via package manager or by manually including the necessary files in your project.

Using package manager (example with npm)

yarn add @babydogeswap/sdk

Usage

Import the SDK and start using the available entities and constants in your application.

import { Currency, Token, ChainId } from '@babydogeswap/sdk'

const babydoge = new Token(
  ChainId.MAINNET,
  '0xc748673057861a797275cd8a068abb95a902e8de',
  18,
  'BabyDoge',
  'BabyDoge',
)

Apart from that packages also include variety of things such as

Running tests

To run the tests, follow these steps. You must have at least node v10 and yarn installed.

First clone the repository:

git clone https://github.com/Baby-doge/babydoge-swap-sdk.git

Move into the babydoge-swap-sdk working directory

cd babydoge-swap-sdk/

Install dependencies

yarn install

Run tests

yarn test

You should see output like the following:

yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.

Readme

Keywords

Package Sidebar

Install

npm i @babydogeswap/sdk

Weekly Downloads

840

Version

3.1.31

License

MIT

Unpacked Size

1.77 MB

Total Files

93

Last publish

Collaborators

  • andriibabydoge
  • derek-babydoge
  • babydoge