Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uniswap/sdk-core

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniswap/sdk-core

⚒️ An SDK for building applications on top of Uniswap V3

  • 6.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
74K
increased by3.33%
Maintainers
0
Weekly downloads
 
Created

What is @uniswap/sdk-core?

@uniswap/sdk-core is a JavaScript library that provides core utilities and functions for interacting with the Uniswap protocol. It is designed to help developers build applications that integrate with Uniswap by providing tools for handling tokens, pairs, and transactions.

What are @uniswap/sdk-core's main functionalities?

Token Management

This feature allows you to create and manage token instances. The code sample demonstrates how to create a new token instance for DAI on the Ethereum mainnet.

const { Token } = require('@uniswap/sdk-core');
const token = new Token(1, '0x6B175474E89094C44Da98b954EedeAC495271d0F', 18, 'DAI', 'Dai Stablecoin');

Currency Amounts

This feature allows you to handle currency amounts in a precise manner. The code sample shows how to create a currency amount for 1 DAI.

const { Token, CurrencyAmount } = require('@uniswap/sdk-core');
const token = new Token(1, '0x6B175474E89094C44Da98b954EedeAC495271d0F', 18, 'DAI', 'Dai Stablecoin');
const amount = CurrencyAmount.fromRawAmount(token, '1000000000000000000');

Fractional Math

This feature provides utilities for fractional math operations. The code sample demonstrates how to perform addition with fractions.

const { Fraction } = require('@uniswap/sdk-core');
const fraction = new Fraction(1, 2);
const result = fraction.add(new Fraction(3, 4));

Other packages similar to @uniswap/sdk-core

Keywords

FAQs

Package last updated on 16 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc