Helpful?
Overview
Table of contents
Enumerations
Classes
Type Aliases
Variables
Functions
Type Aliases
BigintIsh
Ƭ BigintIsh: JSBI | string | number
Defined in
Currency
Ƭ Currency: NativeCurrency | Token
Defined in
Variables
MaxUint256
• Const MaxUint256: default
Defined in
WETH9
• Const WETH9: Object
Known WETH9 implementation addresses, used in our implementation of Ether#wrapped
Index signature
▪ [chainId: number]: Token
Defined in
Functions
computePriceImpact
▸ computePriceImpact<TBase, TQuote>(midPrice, inputAmount, outputAmount): Percent
Returns the percent difference between the mid price and the execution price, i.e. price impact.
Type parameters
| Name | Type | 
|---|---|
| TBase | extends Currency | 
| TQuote | extends Currency | 
Parameters
| Name | Type | Description | 
|---|---|---|
| midPrice | Price<TBase,TQuote> | mid price before the trade | 
| inputAmount | CurrencyAmount<TBase> | the input amount of the trade | 
| outputAmount | CurrencyAmount<TQuote> | the output amount of the trade | 
Returns
Defined in
sortedInsert
▸ sortedInsert<T>(items, add, maxSize, comparator): T | null
Type parameters
| Name | 
|---|
| T | 
Parameters
| Name | Type | 
|---|---|
| items | T[] | 
| add | T | 
| maxSize | number | 
| comparator | ( a:T,b:T) =>number | 
Returns
T | null
Defined in
sqrt
▸ sqrt(value): JSBI
Computes floor(sqrt(value))
Parameters
| Name | Type | Description | 
|---|---|---|
| value | default | the value for which to compute the square root, rounded down | 
Returns
JSBI
Defined in
validateAndParseAddress
▸ validateAndParseAddress(address): string
Validates an address and returns the parsed (checksummed) version of that address
Parameters
| Name | Type | Description | 
|---|---|---|
| address | string | the unchecksummed hex address | 
Returns
string