@qidao/sdk 5.1.40 → 5.1.42

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.
Files changed (51) hide show
  1. package/package.json +1 -1
  2. package/dist/index.js +0 -2
  3. package/dist/index.js.map +0 -1
  4. package/dist/index.modern.mjs +0 -2
  5. package/dist/index.modern.mjs.map +0 -1
  6. package/dist/index.module.js +0 -2
  7. package/dist/index.module.js.map +0 -1
  8. package/dist/index.umd.js +0 -2
  9. package/dist/index.umd.js.map +0 -1
  10. package/dist/src/ZapMeta.d.ts +0 -27
  11. package/dist/src/constants.d.ts +0 -96
  12. package/dist/src/contracts/CrosschainNativeQiStablecoin.d.ts +0 -978
  13. package/dist/src/contracts/CrosschainQiStablecoin.d.ts +0 -974
  14. package/dist/src/contracts/CrosschainQiStablecoinSlim.d.ts +0 -942
  15. package/dist/src/contracts/CrosschainQiStablecoinSlimV2.d.ts +0 -950
  16. package/dist/src/contracts/CrosschainQiStablecoinV2.d.ts +0 -910
  17. package/dist/src/contracts/CrosschainQiStablecoinwbtc.d.ts +0 -958
  18. package/dist/src/contracts/Erc20QiStablecoincamwbtc.d.ts +0 -986
  19. package/dist/src/contracts/Erc20QiStablecoinwbtc.d.ts +0 -994
  20. package/dist/src/contracts/Erc20Stablecoin.d.ts +0 -938
  21. package/dist/src/contracts/StableQiVault.d.ts +0 -1522
  22. package/dist/src/contracts/common.d.ts +0 -22
  23. package/dist/src/contracts/factories/CrosschainNativeQiStablecoin__factory.d.ts +0 -52
  24. package/dist/src/contracts/factories/CrosschainQiStablecoinSlimV2__factory.d.ts +0 -52
  25. package/dist/src/contracts/factories/CrosschainQiStablecoinSlim__factory.d.ts +0 -52
  26. package/dist/src/contracts/factories/CrosschainQiStablecoinV2__factory.d.ts +0 -52
  27. package/dist/src/contracts/factories/CrosschainQiStablecoin__factory.d.ts +0 -52
  28. package/dist/src/contracts/factories/CrosschainQiStablecoinwbtc__factory.d.ts +0 -52
  29. package/dist/src/contracts/factories/Erc20QiStablecoincamwbtc__factory.d.ts +0 -52
  30. package/dist/src/contracts/factories/Erc20QiStablecoinwbtc__factory.d.ts +0 -52
  31. package/dist/src/contracts/factories/Erc20Stablecoin__factory.d.ts +0 -52
  32. package/dist/src/contracts/factories/StableQiVault__factory.d.ts +0 -46
  33. package/dist/src/contracts/factories/index.d.ts +0 -10
  34. package/dist/src/contracts/index.d.ts +0 -21
  35. package/dist/src/entities/currency.d.ts +0 -83
  36. package/dist/src/entities/fractions/currencyAmount.d.ts +0 -19
  37. package/dist/src/entities/fractions/fraction.d.ts +0 -19
  38. package/dist/src/entities/fractions/index.d.ts +0 -5
  39. package/dist/src/entities/fractions/percent.d.ts +0 -6
  40. package/dist/src/entities/fractions/price.d.ts +0 -17
  41. package/dist/src/entities/fractions/tokenAmount.d.ts +0 -9
  42. package/dist/src/entities/index.d.ts +0 -3
  43. package/dist/src/entities/token.d.ts +0 -62
  44. package/dist/src/errors.d.ts +0 -16
  45. package/dist/src/index.d.ts +0 -10
  46. package/dist/src/tokens.d.ts +0 -19
  47. package/dist/src/utils.d.ts +0 -7
  48. package/dist/src/vaultInfo.d.ts +0 -46
  49. package/dist/src/zapInfo.d.ts +0 -18
  50. package/dist/test/fraction.test.d.ts +0 -1
  51. package/dist/test/token.test.d.ts +0 -1
@@ -1,19 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh, Rounding } from '../../constants';
3
- export declare class Fraction {
4
- readonly numerator: JSBI;
5
- readonly denominator: JSBI;
6
- constructor(numerator: BigintIsh, denominator?: BigintIsh);
7
- get quotient(): JSBI;
8
- get remainder(): Fraction;
9
- invert(): Fraction;
10
- add(other: Fraction | BigintIsh): Fraction;
11
- subtract(other: Fraction | BigintIsh): Fraction;
12
- lessThan(other: Fraction | BigintIsh): boolean;
13
- equalTo(other: Fraction | BigintIsh): boolean;
14
- greaterThan(other: Fraction | BigintIsh): boolean;
15
- multiply(other: Fraction | BigintIsh): Fraction;
16
- divide(other: Fraction | BigintIsh): Fraction;
17
- toSignificant(significantDigits: number, format?: object, rounding?: Rounding): string;
18
- toFixed(decimalPlaces: number, format?: object, rounding?: Rounding): string;
19
- }
@@ -1,5 +0,0 @@
1
- export * from './fraction';
2
- export * from './percent';
3
- export * from './tokenAmount';
4
- export * from './currencyAmount';
5
- export * from './price';
@@ -1,6 +0,0 @@
1
- import { Rounding } from '../../constants';
2
- import { Fraction } from './fraction';
3
- export declare class Percent extends Fraction {
4
- toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
5
- toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
6
- }
@@ -1,17 +0,0 @@
1
- import { BigintIsh, Rounding } from '../../constants';
2
- import { Currency } from '../currency';
3
- import { Fraction } from './fraction';
4
- import { CurrencyAmount } from './currencyAmount';
5
- export declare class Price extends Fraction {
6
- readonly baseCurrency: Currency;
7
- readonly quoteCurrency: Currency;
8
- readonly scalar: Fraction;
9
- constructor(baseCurrency: Currency, quoteCurrency: Currency, denominator: BigintIsh, numerator: BigintIsh);
10
- get raw(): Fraction;
11
- get adjusted(): Fraction;
12
- invert(): Price;
13
- multiply(other: Price): Price;
14
- quote(currencyAmount: CurrencyAmount): CurrencyAmount;
15
- toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
16
- toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
17
- }
@@ -1,9 +0,0 @@
1
- import { CurrencyAmount } from './currencyAmount';
2
- import { Token } from '../token';
3
- import { BigintIsh } from '../../constants';
4
- export declare class TokenAmount extends CurrencyAmount {
5
- readonly token: Token;
6
- constructor(token: Token, amount: BigintIsh);
7
- add(other: TokenAmount): TokenAmount;
8
- subtract(other: TokenAmount): TokenAmount;
9
- }
@@ -1,3 +0,0 @@
1
- export * from './token';
2
- export * from './currency';
3
- export * from './fractions';
@@ -1,62 +0,0 @@
1
- import { ChainId } from '../constants';
2
- import { Currency } from './currency';
3
- /**
4
- * Represents an ERC20 token with a unique address and some metadata.
5
- */
6
- export declare class Token extends Currency {
7
- readonly chainId: ChainId;
8
- readonly address: string;
9
- constructor(chainId: ChainId, address: string, decimals: number, symbol?: string, name?: string);
10
- /**
11
- * Returns true if the two tokens are equivalent, i.e. have the same chainId and address.
12
- * @param other other token to compare
13
- */
14
- equals(other: Token): boolean;
15
- /**
16
- * Returns true if the address of this token sorts before the address of the other token
17
- * @param other other token to compare
18
- * @throws if the tokens have the same address
19
- * @throws if the tokens are on different chains
20
- */
21
- sortsBefore(other: Token): boolean;
22
- }
23
- /**
24
- * Compares two currencies for equality
25
- */
26
- export declare function currencyEquals(currencyA: Currency, currencyB: Currency): boolean;
27
- export declare const WNATIVE: {
28
- 1: Token;
29
- 3: Token;
30
- 4: Token;
31
- 5: Token;
32
- 42: Token;
33
- 250: Token;
34
- 4002: Token;
35
- 137: Token;
36
- 80001: Token;
37
- 100: Token;
38
- 56: Token;
39
- 97: Token;
40
- 42161: Token;
41
- 1287: Token;
42
- 43114: Token;
43
- 43113: Token;
44
- 128: Token;
45
- 256: Token;
46
- 1666600000: Token;
47
- 1666700000: Token;
48
- 1285: Token;
49
- 25: Token;
50
- 10: Token;
51
- 57: Token;
52
- 1088: Token;
53
- 1284: Token;
54
- 2001: Token;
55
- 2222: Token;
56
- 4689: Token;
57
- 8217: Token;
58
- 42220: Token;
59
- 1313161554: Token;
60
- 288: Token;
61
- 1818: Token;
62
- };
@@ -1,16 +0,0 @@
1
- /**
2
- * Indicates that the pair has insufficient reserves for a desired output amount. I.e. the amount of output cannot be
3
- * obtained by sending any amount of input.
4
- */
5
- export declare class InsufficientReservesError extends Error {
6
- readonly isInsufficientReservesError: true;
7
- constructor();
8
- }
9
- /**
10
- * Indicates that the input amount is too small to produce any amount of output. I.e. the amount of input sent is less
11
- * than the price of a single unit of output after fees.
12
- */
13
- export declare class InsufficientInputAmountError extends Error {
14
- readonly isInsufficientInputAmountError: true;
15
- constructor();
16
- }
@@ -1,10 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export { JSBI };
3
- export * from './constants';
4
- export * from './errors';
5
- export * from './entities';
6
- export * from './vaultInfo';
7
- export * from './zapInfo';
8
- export * from './ZapMeta';
9
- export * from './contracts';
10
- export * from './tokens';
@@ -1,19 +0,0 @@
1
- import { ChainId } from "./constants";
2
- import { Token } from "./entities";
3
- declare type ChainTokenMap = {
4
- readonly [chainId in ChainId]?: Token;
5
- };
6
- export declare const LDO: {
7
- readonly [chainId in ChainId]?: Token;
8
- };
9
- export declare const METIS: {
10
- readonly [chainId in ChainId]?: Token;
11
- };
12
- export declare const SD: {
13
- readonly [chainId in ChainId]?: Token;
14
- };
15
- export declare const QI: {
16
- readonly [chainId in ChainId]?: Token;
17
- };
18
- export declare const MAI: ChainTokenMap;
19
- export {};
@@ -1,7 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh, SolidityType } from './constants';
3
- export declare function validateSolidityTypeInstance(value: JSBI, solidityType: SolidityType): void;
4
- export declare function validateAndParseAddress(address: string): string;
5
- export declare function parseBigintIsh(bigintIsh: BigintIsh): JSBI;
6
- export declare function sqrt(y: JSBI): JSBI;
7
- export declare function sortedInsert<T>(items: T[], add: T, maxSize: number, comparator: (a: T, b: T) => number): T | null;
@@ -1,46 +0,0 @@
1
- import { Provider } from '@ethersproject/providers';
2
- import { Signer } from 'ethers';
3
- import { CrosschainNativeQiStablecoin, CrosschainQiStablecoin, CrosschainQiStablecoinSlim, CrosschainQiStablecoinSlimV2, CrosschainQiStablecoinSlimV2__factory, CrosschainQiStablecoinV2, CrosschainQiStablecoinSlim__factory, CrosschainQiStablecoinV2__factory, CrosschainQiStablecoinwbtc, CrosschainQiStablecoin__factory, Erc20QiStablecoincamwbtc, Erc20QiStablecoinwbtc, Erc20Stablecoin, StableQiVault, StableQiVault__factory, CrosschainNativeQiStablecoin__factory, CrosschainQiStablecoinwbtc__factory, Erc20Stablecoin__factory, Erc20QiStablecoinwbtc__factory, Erc20QiStablecoincamwbtc__factory } from './contracts';
4
- import { Token } from './entities';
5
- import { ChainId } from './constants';
6
- export declare type SnapshotCanonicalChoiceName = 'Wrapped MATIC (Polygon)' | 'WETH (Polygon)' | 'WBTC (Polygon)' | 'AAVE (Polygon)' | 'LINK (Polygon)' | 'xxLINK (Polygon)' | 'KNC (Polygon)' | 'CRV (Polygon)' | 'BAL (Polygon)' | 'GHST (Polygon)' | 'vGHST (Polygon)' | 'Frax Share (Polygon)' | 'SAND (Polygon)' | 'Compounding Aave MATIC (Polygon)' | 'Compounding Aave ETH (Polygon)' | 'Compounding Aave AAVE (Polygon)' | 'Compounding Aave WBTC (Polygon)' | 'WETH (Fantom)' | 'WFTM (Fantom)' | 'LINK (Fantom)' | 'WBTC (Fantom)' | 'SUSHI (Fantom)' | 'AAVE (Fantom)' | 'mooBIFI (Fantom)' | 'xBOO (Fantom)' | 'Yearn vault WFTM (Fantom)' | 'Yearn vault BTC (Fantom)' | 'Yearn vault ETH (Fantom)' | 'Yearn vault YFI (Fantom)' | 'WBTC (Avalanche)' | 'WETH (Avalanche)' | 'WAVAX (Avalanche)' | 'Beefy Aave AVAX (Avalanche)' | 'MOVR (Moonriver)' | 'WETH (Gnosis Chain)' | 'GNO (Gnosis Chain)' | 'WETH (Arbitrum)' | 'WBTC (Arbitrum)' | 'WETH (Optimism)' | 'WBTC (Optimism)' | 'OP (Optimism)' | 'Beefy Aave ETH (Optimism)' | 'Beefy Aave BTC (Optimism)' | 'CAKE (BNB)' | 'BNB (BNB)' | 'DODO (BNB)' | 'METIS (Metis)' | 'WETH (Metis)' | 'WBTC (Metis)' | 'm.WBTC (Metis)' | 'Yearn WETH (Ethereum)' | 'Yearn LINK (Ethereum)' | 'WBTC (Ethereum)' | 'WETH (Ethereum)' | 'StakeDAO Curve ETH/stETH (Eth)' | 'Yearn Curve ETH/stETH (Ethereum)' | 'MAI DAI Arrakis Polygon';
7
- export declare type VaultShortName = 'aave' | 'avax' | 'avaxweth' | 'avaxwbtc' | 'bal' | 'bal-old' | 'beefy-aave-avax' | 'beefy-aave-dai' | 'beefy-aave-weth' | 'beefy-aave-wbtc' | 'beefy-bifi' | 'beefy-scream-dai' | 'beefy-scream-eth' | 'beefy-scream-ftm' | 'beefy-scream-link' | 'beefy-scream-wbtc' | 'beefy-spooky-btc-ftm' | 'beefy-spooky-eth-ftm' | 'btc' | 'btc_old' | 'cake' | 'camaave' | 'camdai' | 'camwbtc' | 'camweth' | 'camwmatic' | 'crv' | 'cxada' | 'cxdoge' | 'cxeth' | 'dquick' | 'dquick-old' | 'eth' | 'ftm' | 'ftmweth' | 'fxs' | 'ghst' | 'gno' | 'link' | 'matic' | 'moo-solar-eth-usdc' | 'moo-solar-movr-usdc' | 'movr' | 'one' | 'sdam3crv' | 'sdav3crv' | 'sushi' | 'vghst' | 'wbtc' | 'wbnb' | 'weth' | 'weth-old' | 'yveth' | 'yvlink' | 'yvcrv-eth-steth' | 'yvwdai' | 'yvwftm' | 'yvwbtc' | 'yvyfi' | 'celsius' | 'sand' | 'stake-dao-crv-eth-steth' | 'wmatic' | 'xboo' | 'dodo' | 'xxdai' | 'xxlink' | 'op' | 'metis' | 'mwbtc' | 'knc' | 'xSMVT' | 'GLMVT' | 'LSMMVT' | 'STMMVT' | 'maidai';
8
- declare type VaultContractAbi = typeof Erc20Stablecoin__factory.abi | typeof Erc20QiStablecoinwbtc__factory.abi | typeof Erc20QiStablecoincamwbtc__factory.abi | typeof StableQiVault__factory.abi | typeof CrosschainQiStablecoin__factory.abi | typeof CrosschainNativeQiStablecoin__factory.abi | typeof CrosschainQiStablecoinV2__factory.abi | typeof CrosschainQiStablecoinSlim__factory.abi | typeof CrosschainQiStablecoinSlimV2__factory.abi | typeof CrosschainQiStablecoinwbtc__factory.abi;
9
- export declare enum FRONTEND {
10
- MAI = 0,
11
- MANHATTAN = 1,
12
- STELLASWAP = 2
13
- }
14
- export interface COLLATERAL {
15
- aaveId?: string;
16
- connect(address: string, signerOrProvider: Signer | Provider): Erc20Stablecoin | Erc20QiStablecoinwbtc | Erc20QiStablecoincamwbtc | StableQiVault | CrosschainQiStablecoin | CrosschainNativeQiStablecoin | CrosschainQiStablecoinV2 | CrosschainQiStablecoinSlim | CrosschainQiStablecoinSlimV2 | CrosschainQiStablecoinwbtc;
17
- chainId: ChainId;
18
- depreciated?: boolean;
19
- disabled?: boolean;
20
- infoUrl?: string;
21
- minimumCDR: number;
22
- native?: boolean;
23
- subgraph?: string;
24
- token: Token;
25
- vaultAddress: string;
26
- shortName: VaultShortName;
27
- contractAbi: VaultContractAbi;
28
- frontend: FRONTEND;
29
- version: 1;
30
- fallbackUnderlyingAddress?: string;
31
- }
32
- export interface GAUGE_VALID_COLLATERAL extends COLLATERAL {
33
- snapshotName: SnapshotCanonicalChoiceName;
34
- }
35
- export interface COLLATERAL_V2 extends Omit<COLLATERAL, 'version'> {
36
- version: 2;
37
- }
38
- export interface GAUGE_VALID_COLLATERAL_V2 extends COLLATERAL_V2 {
39
- snapshotName: SnapshotCanonicalChoiceName;
40
- }
41
- export declare function isV2QiVault(collateral: COLLATERAL | COLLATERAL_V2 | GAUGE_VALID_COLLATERAL | GAUGE_VALID_COLLATERAL_V2): collateral is COLLATERAL_V2 | GAUGE_VALID_COLLATERAL_V2;
42
- export declare function isGaugeValid(collateral: COLLATERAL | COLLATERAL_V2 | GAUGE_VALID_COLLATERAL | GAUGE_VALID_COLLATERAL_V2): collateral is GAUGE_VALID_COLLATERAL | GAUGE_VALID_COLLATERAL_V2;
43
- export declare const COLLATERALS: {
44
- [chainId in ChainId]?: (COLLATERAL | GAUGE_VALID_COLLATERAL | COLLATERAL_V2 | GAUGE_VALID_COLLATERAL_V2)[];
45
- };
46
- export {};
@@ -1,18 +0,0 @@
1
- import { BigNumber, Signer } from 'ethers';
2
- import { ChainId } from './constants';
3
- import ZapMeta, { CamMeta } from './ZapMeta';
4
- export declare function beefyZapToVault(signer: Signer, zapperAddress: string, assetAddress: string, mooAssetAddress: string, mooAssetVaultAddress: string, amount: BigNumber, vaultIndex: BigNumber): Promise<any>;
5
- export declare function beefyZapFromVault(signer: Signer, zapperAddress: string, assetAddress: string, mooAssetAddress: string, mooAssetVaultAddress: string, amount: BigNumber, vaultIndex: BigNumber): Promise<any>;
6
- export declare const ZAP_META: {
7
- [c in ChainId]?: {
8
- [s in string]: ZapMeta;
9
- };
10
- };
11
- export declare const CAMZAPPER_ADDRESS: {
12
- [chainId in ChainId]?: string;
13
- };
14
- export declare const CAM_META: {
15
- [c in ChainId]?: {
16
- [s in string]: CamMeta;
17
- };
18
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};