@curvefi/api 2.66.29 → 2.66.31

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 (81) hide show
  1. package/lib/boosting.d.ts +33 -32
  2. package/lib/boosting.js +320 -252
  3. package/lib/cached.d.ts +4 -3
  4. package/lib/cached.js +63 -19
  5. package/lib/constants/utils.d.ts +14 -1
  6. package/lib/constants/utils.js +21 -6
  7. package/lib/curve.d.ts +5 -5
  8. package/lib/curve.js +21 -38
  9. package/lib/dao.d.ts +32 -31
  10. package/lib/dao.js +420 -350
  11. package/lib/external-api.d.ts +1 -1
  12. package/lib/external-api.js +2 -2
  13. package/lib/factory/common.d.ts +2 -1
  14. package/lib/factory/common.js +1 -1
  15. package/lib/factory/deploy.d.ts +46 -45
  16. package/lib/factory/deploy.js +630 -551
  17. package/lib/factory/factory-api.d.ts +3 -2
  18. package/lib/factory/factory-api.js +22 -23
  19. package/lib/factory/factory-crypto.d.ts +1 -1
  20. package/lib/factory/factory-crypto.js +12 -15
  21. package/lib/factory/factory-tricrypto.d.ts +1 -1
  22. package/lib/factory/factory-tricrypto.js +14 -15
  23. package/lib/factory/factory-twocrypto.d.ts +1 -1
  24. package/lib/factory/factory-twocrypto.js +12 -13
  25. package/lib/factory/factory.d.ts +4 -3
  26. package/lib/factory/factory.js +21 -24
  27. package/lib/index.d.ts +413 -104
  28. package/lib/index.js +253 -257
  29. package/lib/interfaces.d.ts +2 -0
  30. package/lib/pools/PoolTemplate.d.ts +13 -12
  31. package/lib/pools/PoolTemplate.js +279 -285
  32. package/lib/pools/mixins/common.js +2 -2
  33. package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +12 -4
  34. package/lib/pools/mixins/depositBalancedAmountsMixins.js +1 -15
  35. package/lib/pools/mixins/depositMixins.d.ts +25 -5
  36. package/lib/pools/mixins/depositMixins.js +38 -76
  37. package/lib/pools/mixins/depositWrappedMixins.d.ts +10 -2
  38. package/lib/pools/mixins/depositWrappedMixins.js +17 -33
  39. package/lib/pools/mixins/poolBalancesMixin.d.ts +6 -2
  40. package/lib/pools/mixins/poolBalancesMixin.js +3 -5
  41. package/lib/pools/mixins/swapMixins.d.ts +20 -4
  42. package/lib/pools/mixins/swapMixins.js +36 -70
  43. package/lib/pools/mixins/swapWrappedMixins.d.ts +19 -4
  44. package/lib/pools/mixins/swapWrappedMixins.js +32 -60
  45. package/lib/pools/mixins/withdrawExpectedMixins.d.ts +12 -4
  46. package/lib/pools/mixins/withdrawExpectedMixins.js +6 -11
  47. package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +20 -4
  48. package/lib/pools/mixins/withdrawImbalanceMixins.js +26 -53
  49. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +10 -2
  50. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +12 -27
  51. package/lib/pools/mixins/withdrawMixins.d.ts +25 -5
  52. package/lib/pools/mixins/withdrawMixins.js +33 -67
  53. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +12 -4
  54. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +8 -13
  55. package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +25 -5
  56. package/lib/pools/mixins/withdrawOneCoinMixins.js +32 -66
  57. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +6 -2
  58. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +4 -7
  59. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +10 -2
  60. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +13 -29
  61. package/lib/pools/mixins/withdrawWrappedMixins.d.ts +10 -2
  62. package/lib/pools/mixins/withdrawWrappedMixins.js +14 -28
  63. package/lib/pools/poolConstructor.d.ts +2 -1
  64. package/lib/pools/poolConstructor.js +27 -28
  65. package/lib/pools/subClasses/corePool.d.ts +4 -1
  66. package/lib/pools/subClasses/corePool.js +5 -7
  67. package/lib/pools/subClasses/gaugePool.d.ts +5 -3
  68. package/lib/pools/subClasses/gaugePool.js +19 -18
  69. package/lib/pools/subClasses/statsPool.d.ts +2 -0
  70. package/lib/pools/subClasses/statsPool.js +22 -10
  71. package/lib/pools/subClasses/walletPool.d.ts +2 -1
  72. package/lib/pools/subClasses/walletPool.js +6 -6
  73. package/lib/pools/utils.d.ts +7 -6
  74. package/lib/pools/utils.js +316 -297
  75. package/lib/route-graph.worker.d.ts +2 -2
  76. package/lib/route-graph.worker.js +4 -6
  77. package/lib/router.d.ts +12 -11
  78. package/lib/router.js +331 -295
  79. package/lib/utils.d.ts +34 -33
  80. package/lib/utils.js +481 -435
  81. package/package.json +1 -1
package/lib/boosting.d.ts CHANGED
@@ -1,40 +1,41 @@
1
- import { IDict, IChainId } from "./interfaces";
2
- export declare const getCrv: (...addresses: string[] | string[][]) => Promise<IDict<string> | string>;
3
- export declare const getLockedAmountAndUnlockTime: (...addresses: string[] | string[][]) => Promise<IDict<{
1
+ import { type Curve } from "./curve.js";
2
+ import { IChainId, IDict } from "./interfaces";
3
+ export declare function getCrv(this: Curve, ...addresses: string[] | string[][]): Promise<IDict<string> | string>;
4
+ export declare function getLockedAmountAndUnlockTime(this: Curve, ...addresses: string[] | string[][]): Promise<IDict<{
4
5
  lockedAmount: string;
5
6
  unlockTime: number;
6
7
  }> | {
7
8
  lockedAmount: string;
8
9
  unlockTime: number;
9
10
  }>;
10
- export declare const getVeCrv: (...addresses: string[] | string[][]) => Promise<IDict<string> | string>;
11
- export declare const getVeCrvPct: (...addresses: string[] | string[][]) => Promise<IDict<string> | string>;
12
- export declare const isApproved: (amount: number | string) => Promise<boolean>;
13
- export declare const approveEstimateGas: (amount: number | string) => Promise<number | number[]>;
14
- export declare const approve: (amount: number | string) => Promise<string[]>;
15
- export declare const createLockEstimateGas: (amount: number | string, days: number) => Promise<number>;
11
+ export declare function getVeCrv(this: Curve, ...addresses: string[] | string[][]): Promise<IDict<string> | string>;
12
+ export declare function getVeCrvPct(this: Curve, ...addresses: string[] | string[][]): Promise<IDict<string> | string>;
13
+ export declare function isApproved(this: Curve, amount: number | string): Promise<boolean>;
14
+ export declare function approveEstimateGas(this: Curve, amount: number | string): Promise<number | number[]>;
15
+ export declare function approve(this: Curve, amount: number | string): Promise<string[]>;
16
+ export declare function createLockEstimateGas(this: Curve, amount: number | string, days: number): Promise<number>;
16
17
  export declare const calcUnlockTime: (days: number, start?: number) => number;
17
18
  export declare const calculateVeCrv: (amount: number | string, unlockTimestamp: number) => number;
18
- export declare const createLock: (amount: number | string, days: number) => Promise<string>;
19
- export declare const increaseAmountEstimateGas: (amount: number | string) => Promise<number>;
20
- export declare const increaseAmount: (amount: number | string) => Promise<string>;
21
- export declare const increaseUnlockTimeEstimateGas: (days: number) => Promise<number>;
22
- export declare const increaseUnlockTime: (days: number) => Promise<string>;
23
- export declare const withdrawLockedCrvEstimateGas: () => Promise<number>;
24
- export declare const withdrawLockedCrv: () => Promise<string>;
25
- export declare const claimableFees: (address?: string) => Promise<string>;
26
- export declare const claimFeesEstimateGas: (address?: string) => Promise<number>;
27
- export declare const claimFees: (address?: string) => Promise<string>;
28
- export declare const claimableFeesCrvUSD: (address?: string) => Promise<string>;
29
- export declare const claimFeesCrvUSDEstimateGas: (address?: string) => Promise<number>;
30
- export declare const claimFeesCrvUSD: (address?: string) => Promise<string>;
31
- export declare const lastEthBlock: () => Promise<number>;
32
- export declare const getAnycallBalance: () => Promise<string>;
33
- export declare const topUpAnycallEstimateGas: (amount?: number | string) => Promise<number>;
34
- export declare const topUpAnycall: (amount?: number | string) => Promise<string>;
35
- export declare const lastBlockSent: (chainId: IChainId) => Promise<number>;
36
- export declare const blockToSend: () => Promise<number>;
37
- export declare const sendBlockhashEstimateGas: (block: number, chainId: IChainId) => Promise<number>;
38
- export declare const sendBlockhash: (block: number, chainId: IChainId) => Promise<string>;
39
- export declare const submitProofEstimateGas: (block: number, address?: string) => Promise<number>;
40
- export declare const submitProof: (block: number, address?: string) => Promise<string>;
19
+ export declare function createLock(this: Curve, amount: number | string, days: number): Promise<string>;
20
+ export declare function increaseAmountEstimateGas(this: Curve, amount: number | string): Promise<number>;
21
+ export declare function increaseAmount(this: Curve, amount: number | string): Promise<string>;
22
+ export declare function increaseUnlockTimeEstimateGas(this: Curve, days: number): Promise<number>;
23
+ export declare function increaseUnlockTime(this: Curve, days: number): Promise<string>;
24
+ export declare function withdrawLockedCrvEstimateGas(this: Curve): Promise<number>;
25
+ export declare function withdrawLockedCrv(this: Curve): Promise<string>;
26
+ export declare function claimableFees(this: Curve, address?: string): Promise<string>;
27
+ export declare function claimFeesEstimateGas(this: Curve, address?: string): Promise<number>;
28
+ export declare function claimFees(this: Curve, address?: string): Promise<string>;
29
+ export declare function claimableFeesCrvUSD(this: Curve, address?: string): Promise<string>;
30
+ export declare function claimFeesCrvUSDEstimateGas(this: Curve, address?: string): Promise<number>;
31
+ export declare function claimFeesCrvUSD(this: Curve, address?: string): Promise<string>;
32
+ export declare function lastEthBlock(this: Curve): Promise<number>;
33
+ export declare function getAnycallBalance(this: Curve): Promise<string>;
34
+ export declare function topUpAnycallEstimateGas(this: Curve, amount?: number | string): Promise<number>;
35
+ export declare function topUpAnycall(this: Curve, amount?: number | string): Promise<string>;
36
+ export declare function lastBlockSent(this: Curve, chainId: IChainId): Promise<number>;
37
+ export declare function blockToSend(this: Curve): Promise<number>;
38
+ export declare function sendBlockhashEstimateGas(this: Curve, block: number, chainId: IChainId): Promise<number>;
39
+ export declare function sendBlockhash(this: Curve, block: number, chainId: IChainId): Promise<string>;
40
+ export declare function submitProofEstimateGas(this: Curve, block: number, address?: string): Promise<number>;
41
+ export declare function submitProof(this: Curve, block: number, address?: string): Promise<string>;