@pancakeswap/swap-sdk-core
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -30,2 +30,3 @@ export type BigintIsh = bigint | number | string; | ||
}; | ||
export declare const ZERO_ADDRESS: "0x0000000000000000000000000000000000000000"; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -5,2 +5,3 @@ import { BigintIsh, Rounding } from '../constants'; | ||
import { CurrencyAmount } from './currencyAmount'; | ||
import { Token } from '../token'; | ||
export declare class Price<TBase extends Currency, TQuote extends Currency> extends Fraction { | ||
@@ -39,3 +40,4 @@ readonly baseCurrency: TBase; | ||
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string; | ||
get wrapped(): Price<Token, Token>; | ||
} | ||
//# sourceMappingURL=price.d.ts.map |
@@ -47,2 +47,3 @@ 'use strict'; | ||
}; | ||
var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; | ||
var BaseCurrency = class { | ||
@@ -319,2 +320,5 @@ /** | ||
} | ||
get wrapped() { | ||
return new Price(this.baseCurrency.wrapped, this.quoteCurrency.wrapped, this.denominator, this.numerator); | ||
} | ||
}; | ||
@@ -479,2 +483,8 @@ | ||
} | ||
function getCurrencyAddress(currency) { | ||
if (currency.isNative) { | ||
return ZERO_ADDRESS; | ||
} | ||
return currency.address; | ||
} | ||
@@ -502,2 +512,3 @@ exports.BaseCurrency = BaseCurrency; | ||
exports.ZERO = ZERO; | ||
exports.ZERO_ADDRESS = ZERO_ADDRESS; | ||
exports._100 = _100; | ||
@@ -507,2 +518,3 @@ exports._10000 = _10000; | ||
exports.computePriceImpact = computePriceImpact; | ||
exports.getCurrencyAddress = getCurrencyAddress; | ||
exports.getTokenComparator = getTokenComparator; | ||
@@ -509,0 +521,0 @@ exports.sortCurrencies = sortCurrencies; |
@@ -19,2 +19,3 @@ import { VMType } from './constants'; | ||
export declare function sortCurrencies<T extends Currency>(currencies: T[]): T[]; | ||
export declare function getCurrencyAddress(currency: Currency): `0x${string}`; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@pancakeswap/swap-sdk-core", | ||
"license": "MIT", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "🛠 An SDK for building applications on top of Pancakeswap.", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
59460
1278
0