@pancakeswap/sdk 2.3.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/constants.d.ts +9 -1
- package/dist/entities/fractions/fraction.d.ts +4 -0
- package/dist/entities/token.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/sdk.cjs.development.js +752 -17
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +751 -18
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ To run the tests, follow these steps. You must have at least node v10 and [yarn]
|
|
|
11
11
|
First clone the repository:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
git clone https://github.com/pancakeswap/
|
|
14
|
+
git clone https://github.com/pancakeswap/pancake-swap-sdk.git
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Move into the pancakeswap-sdk working directory
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import JSBI from 'jsbi';
|
|
2
|
-
export declare type BigintIsh = JSBI |
|
|
2
|
+
export declare type BigintIsh = JSBI | number | string;
|
|
3
3
|
export declare enum ChainId {
|
|
4
4
|
MAINNET = 56,
|
|
5
5
|
TESTNET = 97
|
|
@@ -14,7 +14,15 @@ export declare enum Rounding {
|
|
|
14
14
|
ROUND_UP = 2
|
|
15
15
|
}
|
|
16
16
|
export declare const FACTORY_ADDRESS = "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73";
|
|
17
|
+
export declare const FACTORY_ADDRESS_MAP: {
|
|
18
|
+
56: string;
|
|
19
|
+
97: string;
|
|
20
|
+
};
|
|
17
21
|
export declare const INIT_CODE_HASH = "0x00fb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5";
|
|
22
|
+
export declare const INIT_CODE_HASH_MAP: {
|
|
23
|
+
56: string;
|
|
24
|
+
97: string;
|
|
25
|
+
};
|
|
18
26
|
export declare const MINIMUM_LIQUIDITY: JSBI;
|
|
19
27
|
export declare const ZERO: JSBI;
|
|
20
28
|
export declare const ONE: JSBI;
|
|
@@ -16,4 +16,8 @@ export declare class Fraction {
|
|
|
16
16
|
divide(other: Fraction | BigintIsh): Fraction;
|
|
17
17
|
toSignificant(significantDigits: number, format?: object, rounding?: Rounding): string;
|
|
18
18
|
toFixed(decimalPlaces: number, format?: object, rounding?: Rounding): string;
|
|
19
|
+
/**
|
|
20
|
+
* Helper method for converting any super class back to a fraction
|
|
21
|
+
*/
|
|
22
|
+
get asFraction(): Fraction;
|
|
19
23
|
}
|
package/dist/entities/token.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import { Currency } from './currency';
|
|
|
6
6
|
export declare class Token extends Currency {
|
|
7
7
|
readonly chainId: ChainId;
|
|
8
8
|
readonly address: string;
|
|
9
|
-
|
|
9
|
+
readonly projectLink?: string;
|
|
10
|
+
constructor(chainId: ChainId, address: string, decimals: number, symbol?: string, name?: string, projectLink?: string);
|
|
10
11
|
/**
|
|
11
12
|
* Returns true if the two tokens are equivalent, i.e. have the same chainId and address.
|
|
12
13
|
* @param other other token to compare
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import JSBI from 'jsbi';
|
|
2
2
|
export { JSBI };
|
|
3
|
-
export { BigintIsh, ChainId, TradeType, Rounding, FACTORY_ADDRESS, INIT_CODE_HASH, MINIMUM_LIQUIDITY } from './constants';
|
|
3
|
+
export { BigintIsh, ChainId, TradeType, Rounding, FACTORY_ADDRESS, FACTORY_ADDRESS_MAP, INIT_CODE_HASH, INIT_CODE_HASH_MAP, MINIMUM_LIQUIDITY } from './constants';
|
|
4
4
|
export * from './errors';
|
|
5
5
|
export * from './entities';
|
|
6
6
|
export * from './router';
|