@qidao/sdk 5.1.1 → 5.1.4

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 (124) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.modern.mjs +1 -1
  4. package/dist/index.modern.mjs.map +1 -1
  5. package/dist/index.module.js +1 -1
  6. package/dist/index.module.js.map +1 -1
  7. package/dist/index.umd.js +1 -1
  8. package/dist/index.umd.js.map +1 -1
  9. package/dist/src/{src/constants.d.ts → constants.d.ts} +0 -0
  10. package/dist/src/{src/contracts → contracts}/CrosschainNativeQiStablecoin.d.ts +0 -0
  11. package/dist/src/{src/contracts → contracts}/CrosschainQiStablecoin.d.ts +0 -0
  12. package/dist/src/{src/contracts → contracts}/CrosschainQiStablecoinSlim.d.ts +0 -0
  13. package/dist/src/{src/contracts → contracts}/CrosschainQiStablecoinSlimV2.d.ts +0 -0
  14. package/dist/src/{src/contracts → contracts}/CrosschainQiStablecoinV2.d.ts +0 -0
  15. package/dist/src/{src/contracts → contracts}/CrosschainQiStablecoinwbtc.d.ts +0 -0
  16. package/dist/src/{src/contracts → contracts}/Erc20QiStablecoincamwbtc.d.ts +0 -0
  17. package/dist/src/{src/contracts → contracts}/Erc20QiStablecoinwbtc.d.ts +0 -0
  18. package/dist/src/{src/contracts → contracts}/Erc20Stablecoin.d.ts +0 -0
  19. package/dist/src/{src/contracts → contracts}/StableQiVault.d.ts +0 -0
  20. package/dist/src/{src/contracts → contracts}/common.d.ts +0 -0
  21. package/dist/src/{src/contracts → contracts}/factories/CrosschainNativeQiStablecoin__factory.d.ts +0 -0
  22. package/dist/src/{src/contracts → contracts}/factories/CrosschainQiStablecoinSlimV2__factory.d.ts +0 -0
  23. package/dist/src/{src/contracts → contracts}/factories/CrosschainQiStablecoinSlim__factory.d.ts +0 -0
  24. package/dist/src/{src/contracts → contracts}/factories/CrosschainQiStablecoinV2__factory.d.ts +0 -0
  25. package/dist/src/{src/contracts → contracts}/factories/CrosschainQiStablecoin__factory.d.ts +0 -0
  26. package/dist/src/{src/contracts → contracts}/factories/CrosschainQiStablecoinwbtc__factory.d.ts +0 -0
  27. package/dist/src/{src/contracts → contracts}/factories/Erc20QiStablecoincamwbtc__factory.d.ts +0 -0
  28. package/dist/src/{src/contracts → contracts}/factories/Erc20QiStablecoinwbtc__factory.d.ts +0 -0
  29. package/dist/src/{src/contracts → contracts}/factories/Erc20Stablecoin__factory.d.ts +0 -0
  30. package/dist/src/{src/contracts → contracts}/factories/StableQiVault__factory.d.ts +0 -0
  31. package/dist/src/{src/contracts → contracts}/factories/index.d.ts +0 -0
  32. package/dist/src/{src/contracts → contracts}/index.d.ts +0 -0
  33. package/dist/src/{src/entities → entities}/currency.d.ts +0 -0
  34. package/dist/src/{src/entities → entities}/fractions/currencyAmount.d.ts +0 -0
  35. package/dist/src/{src/entities → entities}/fractions/fraction.d.ts +0 -0
  36. package/dist/src/{src/entities → entities}/fractions/index.d.ts +0 -0
  37. package/dist/src/{src/entities → entities}/fractions/percent.d.ts +0 -0
  38. package/dist/src/{src/entities → entities}/fractions/price.d.ts +0 -0
  39. package/dist/src/{src/entities → entities}/fractions/tokenAmount.d.ts +0 -0
  40. package/dist/src/{src/entities → entities}/index.d.ts +0 -0
  41. package/dist/src/{src/entities → entities}/token.d.ts +1 -1
  42. package/dist/{errors.d.ts → src/errors.d.ts} +0 -0
  43. package/dist/src/{src/index.d.ts → index.d.ts} +0 -0
  44. package/dist/src/{src/utils.d.ts → utils.d.ts} +0 -0
  45. package/dist/src/{src/vaultInfo.d.ts → vaultInfo.d.ts} +2 -0
  46. package/dist/{src/test → test}/fraction.test.d.ts +0 -0
  47. package/dist/{src/test → test}/token.test.d.ts +0 -0
  48. package/package.json +6 -4
  49. package/dist/constants/addresses.d.ts +0 -31
  50. package/dist/constants/index.d.ts +0 -20
  51. package/dist/constants/kashi.d.ts +0 -29
  52. package/dist/constants/natives.d.ts +0 -30
  53. package/dist/constants/numbers.d.ts +0 -11
  54. package/dist/constants/tokens.d.ts +0 -5
  55. package/dist/entities/AbstractCurrency.d.ts +0 -53
  56. package/dist/entities/ConstantProductPool.d.ts +0 -43
  57. package/dist/entities/Currency.d.ts +0 -3
  58. package/dist/entities/CurrencyAmount.d.ts +0 -38
  59. package/dist/entities/Fraction.d.ts +0 -25
  60. package/dist/entities/MultiRouter.d.ts +0 -59
  61. package/dist/entities/Native/Avalanche.d.ts +0 -10
  62. package/dist/entities/Native/Binance.d.ts +0 -10
  63. package/dist/entities/Native/Celo.d.ts +0 -10
  64. package/dist/entities/Native/Ether.d.ts +0 -13
  65. package/dist/entities/Native/Fantom.d.ts +0 -10
  66. package/dist/entities/Native/Fuse.d.ts +0 -10
  67. package/dist/entities/Native/Harmony.d.ts +0 -10
  68. package/dist/entities/Native/Heco.d.ts +0 -10
  69. package/dist/entities/Native/Matic.d.ts +0 -10
  70. package/dist/entities/Native/Movr.d.ts +0 -10
  71. package/dist/entities/Native/Okex.d.ts +0 -10
  72. package/dist/entities/Native/Palm.d.ts +0 -10
  73. package/dist/entities/Native/Telos.d.ts +0 -10
  74. package/dist/entities/Native/index.d.ts +0 -14
  75. package/dist/entities/Native/xDai.d.ts +0 -10
  76. package/dist/entities/NativeCurrency.d.ts +0 -8
  77. package/dist/entities/Pair.d.ts +0 -41
  78. package/dist/entities/Percent.d.ts +0 -15
  79. package/dist/entities/Price.d.ts +0 -39
  80. package/dist/entities/Route.d.ts +0 -14
  81. package/dist/entities/Token.d.ts +0 -33
  82. package/dist/entities/Trade.d.ts +0 -107
  83. package/dist/entities/eip712.d.ts +0 -78
  84. package/dist/entities/index.d.ts +0 -14
  85. package/dist/enums/ChainId.d.ts +0 -32
  86. package/dist/enums/Fee.d.ts +0 -3
  87. package/dist/enums/KashiAction.d.ts +0 -18
  88. package/dist/enums/OrderStatus.d.ts +0 -6
  89. package/dist/enums/Rounding.d.ts +0 -5
  90. package/dist/enums/TradeType.d.ts +0 -4
  91. package/dist/enums/index.d.ts +0 -6
  92. package/dist/functions/bentobox.d.ts +0 -3
  93. package/dist/functions/computeConstantProductPoolAddress.d.ts +0 -9
  94. package/dist/functions/computePairAddress.d.ts +0 -6
  95. package/dist/functions/computePoolInitCodeHash.d.ts +0 -5
  96. package/dist/functions/computePriceImpact.d.ts +0 -11
  97. package/dist/functions/index.d.ts +0 -8
  98. package/dist/functions/kashi.d.ts +0 -9
  99. package/dist/functions/rebase.d.ts +0 -4
  100. package/dist/functions/sortedInsert.d.ts +0 -1
  101. package/dist/functions/sqrt.d.ts +0 -7
  102. package/dist/functions/validateAndParseAddress.d.ts +0 -1
  103. package/dist/functions/validateSolidityTypeInstance.d.ts +0 -3
  104. package/dist/index.d.ts +0 -12
  105. package/dist/interfaces/AccrueInfo.d.ts +0 -6
  106. package/dist/interfaces/Rebase.d.ts +0 -5
  107. package/dist/interfaces/index.d.ts +0 -2
  108. package/dist/limitorder.d.ts +0 -115
  109. package/dist/router.d.ts +0 -68
  110. package/dist/sdk.cjs.development.js +0 -5301
  111. package/dist/sdk.cjs.development.js.map +0 -1
  112. package/dist/sdk.cjs.production.min.js +0 -2
  113. package/dist/sdk.cjs.production.min.js.map +0 -1
  114. package/dist/sdk.esm.js +0 -5162
  115. package/dist/sdk.esm.js.map +0 -1
  116. package/dist/src/src/errors.d.ts +0 -16
  117. package/dist/types/AddressMap.d.ts +0 -3
  118. package/dist/types/BigIntIsh.d.ts +0 -2
  119. package/dist/types/ChainTokenMap.d.ts +0 -5
  120. package/dist/types/LimitOrderTypes.d.ts +0 -21
  121. package/dist/types/MultiRouterTypes.d.ts +0 -97
  122. package/dist/types/TokenMap.d.ts +0 -4
  123. package/dist/types/index.d.ts +0 -4
  124. package/dist/utils/MultiRouterMath.d.ts +0 -15
@@ -1,115 +0,0 @@
1
- import { CurrencyAmount, Price, Token } from './entities';
2
- import { Message } from './entities';
3
- import { BigNumber } from '@ethersproject/bignumber';
4
- import { ChainId } from './enums';
5
- import { NonceManager } from '@ethersproject/experimental';
6
- import { Signer } from '@ethersproject/abstract-signer';
7
- import { Transaction } from '@ethersproject/transactions';
8
- import { Web3Provider } from '@ethersproject/providers';
9
- export interface ILimitOrderData {
10
- maker: string;
11
- tokenIn: string;
12
- tokenOut: string;
13
- tokenInDecimals: number;
14
- tokenOutDecimals: number;
15
- tokenInSymbol: string;
16
- tokenOutSymbol: string;
17
- amountIn: string;
18
- amountOut: string;
19
- recipient: string;
20
- startTime: string | number;
21
- endTime: string | number;
22
- stopPrice?: string;
23
- oracleAddress?: string;
24
- oracleData?: string;
25
- v: number;
26
- r: string;
27
- s: string;
28
- chainId: ChainId;
29
- orderTypeHash?: string;
30
- }
31
- export declare class LimitOrder {
32
- readonly maker: string;
33
- readonly amountIn: CurrencyAmount<Token>;
34
- readonly amountOut: CurrencyAmount<Token>;
35
- readonly recipient: string;
36
- readonly startTime: string;
37
- readonly endTime: string;
38
- readonly stopPrice: string;
39
- readonly oracleAddress: string;
40
- readonly oracleData: string;
41
- v: number;
42
- r: string;
43
- s: string;
44
- static getLimitOrder(data: ILimitOrderData): LimitOrder;
45
- constructor(maker: string, amountIn: CurrencyAmount<Token>, amountOut: CurrencyAmount<Token>, recipient: string, startTime: string | number, endTime: string | number, stopPrice?: string, oracleAddress?: string, oracleData?: string, v?: number, r?: string, s?: string);
46
- get amountInRaw(): string;
47
- get amountOutRaw(): string;
48
- get tokenInAddress(): string;
49
- get tokenOutAddress(): string;
50
- get tokenInDecimals(): number;
51
- get tokenOutDecimals(): number;
52
- get tokenInSymbol(): string;
53
- get tokenOutSymbol(): string;
54
- get chainId(): ChainId;
55
- usePrice(price: Price<Token, Token>): LimitOrder;
56
- signdOrderWithPrivatekey(chainId: ChainId, privateKey: string): {
57
- v: number;
58
- r: string;
59
- s: string;
60
- };
61
- signOrderWithProvider(chainId: ChainId, provider: Web3Provider): Promise<{
62
- v: number;
63
- r: string;
64
- s: string;
65
- }>;
66
- getTypedData(): {
67
- types: {
68
- EIP712Domain: {
69
- name: string;
70
- type: string;
71
- }[];
72
- LimitOrder: {
73
- name: string;
74
- type: string;
75
- }[];
76
- };
77
- primaryType: string;
78
- domain: import("./entities").Domain;
79
- message: Message;
80
- };
81
- getTypeHash(): string;
82
- send(): Promise<any>;
83
- }
84
- export declare class FillLimitOrder {
85
- readonly order: LimitOrder;
86
- readonly path: string[];
87
- readonly amountExternal: BigNumber;
88
- readonly amountToFill: BigNumber;
89
- readonly limitOrderReceiver: string;
90
- readonly to: string;
91
- readonly tokenIn: string;
92
- readonly tokenOut: string;
93
- readonly limitOrderReceiverData: string;
94
- constructor(order: LimitOrder, path: string[], amountExternal: BigNumber, amountToFill: BigNumber, limitOrderReceiver: string, to: string, keepTokenIn?: boolean);
95
- fillOrderOpen(signer: Signer, extra: {
96
- forceExecution?: boolean;
97
- gasPrice?: BigNumber;
98
- nonce?: number;
99
- debug?: boolean;
100
- open?: boolean;
101
- }): Promise<{
102
- executed: boolean;
103
- transaction?: Transaction | undefined;
104
- }>;
105
- fillOrder(signer: Signer | NonceManager, extra: {
106
- debug?: boolean;
107
- forceExecution?: boolean;
108
- gasPrice?: BigNumber;
109
- open?: boolean;
110
- nonce?: number;
111
- }): Promise<{
112
- executed: boolean;
113
- transaction?: Transaction;
114
- }>;
115
- }
package/dist/router.d.ts DELETED
@@ -1,68 +0,0 @@
1
- import { Currency } from './entities/Currency';
2
- import { CurrencyAmount } from './entities/CurrencyAmount';
3
- import { Percent } from './entities/Percent';
4
- import { Trade } from './entities/Trade';
5
- import { TradeType } from './enums/TradeType';
6
- /**
7
- * Options for producing the arguments to send call to the router.
8
- */
9
- export interface TradeOptions {
10
- /**
11
- * How much the execution price is allowed to move unfavorably from the trade execution price.
12
- */
13
- allowedSlippage: Percent;
14
- /**
15
- * How long the swap is valid until it expires, in seconds.
16
- * This will be used to produce a `deadline` parameter which is computed from when the swap call parameters
17
- * are generated.
18
- */
19
- ttl: number;
20
- /**
21
- * The account that should receive the output of the swap.
22
- */
23
- recipient: string;
24
- /**
25
- * Whether any of the tokens in the path are fee on transfer tokens, which should be handled with special methods
26
- */
27
- feeOnTransfer?: boolean;
28
- }
29
- export interface TradeOptionsDeadline extends Omit<TradeOptions, 'ttl'> {
30
- /**
31
- * When the transaction expires.
32
- * This is an atlernate to specifying the ttl, for when you do not want to use local time.
33
- */
34
- deadline: number;
35
- }
36
- /**
37
- * The parameters to use in the call to the Uniswap V2 Router to execute a trade.
38
- */
39
- export interface SwapParameters {
40
- /**
41
- * The method to call on the Uniswap V2 Router.
42
- */
43
- methodName: string;
44
- /**
45
- * The arguments to pass to the method, all hex encoded.
46
- */
47
- args: (string | string[])[];
48
- /**
49
- * The amount of wei to send in hex.
50
- */
51
- value: string;
52
- }
53
- export declare function toHex(currencyAmount: CurrencyAmount<Currency>): string;
54
- /**
55
- * Represents the Uniswap V2 Router, and has static methods for helping execute trades.
56
- */
57
- export declare abstract class Router {
58
- /**
59
- * Cannot be constructed.
60
- */
61
- private constructor();
62
- /**
63
- * Produces the on-chain method name to call and the hex encoded parameters to pass as arguments for a given trade.
64
- * @param trade to produce call parameters for
65
- * @param options options for the call parameters
66
- */
67
- static swapCallParameters(trade: Trade<Currency, Currency, TradeType>, options: TradeOptions | TradeOptionsDeadline): SwapParameters;
68
- }