@curvefi/api 2.66.30 → 2.67.0

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 (94) 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/coins/hyperliquid.d.ts +2 -0
  6. package/lib/constants/coins/hyperliquid.js +5 -0
  7. package/lib/constants/coins/index.d.ts +2 -1
  8. package/lib/constants/coins/index.js +2 -1
  9. package/lib/constants/factory/crypto.d.ts +5 -0
  10. package/lib/constants/factory/crypto.js +8 -0
  11. package/lib/constants/factory/stable.js +3 -0
  12. package/lib/constants/network_constants.js +37 -11
  13. package/lib/constants/pools/hyperliquid.d.ts +2 -0
  14. package/lib/constants/pools/hyperliquid.js +2 -0
  15. package/lib/constants/pools/index.d.ts +2 -1
  16. package/lib/constants/pools/index.js +2 -1
  17. package/lib/constants/utils.d.ts +14 -1
  18. package/lib/constants/utils.js +21 -6
  19. package/lib/constants/volumeNetworks.js +1 -1
  20. package/lib/curve.d.ts +5 -5
  21. package/lib/curve.js +21 -38
  22. package/lib/dao.d.ts +32 -31
  23. package/lib/dao.js +420 -350
  24. package/lib/external-api.d.ts +1 -1
  25. package/lib/external-api.js +2 -2
  26. package/lib/factory/common.d.ts +2 -1
  27. package/lib/factory/common.js +1 -1
  28. package/lib/factory/deploy.d.ts +46 -45
  29. package/lib/factory/deploy.js +630 -551
  30. package/lib/factory/factory-api.d.ts +3 -2
  31. package/lib/factory/factory-api.js +22 -23
  32. package/lib/factory/factory-crypto.d.ts +1 -1
  33. package/lib/factory/factory-crypto.js +12 -15
  34. package/lib/factory/factory-tricrypto.d.ts +1 -1
  35. package/lib/factory/factory-tricrypto.js +14 -15
  36. package/lib/factory/factory-twocrypto.d.ts +1 -1
  37. package/lib/factory/factory-twocrypto.js +12 -13
  38. package/lib/factory/factory.d.ts +4 -3
  39. package/lib/factory/factory.js +21 -24
  40. package/lib/index.d.ts +413 -104
  41. package/lib/index.js +253 -257
  42. package/lib/interfaces.d.ts +2 -0
  43. package/lib/pools/PoolTemplate.d.ts +13 -12
  44. package/lib/pools/PoolTemplate.js +279 -285
  45. package/lib/pools/mixins/common.js +2 -2
  46. package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +12 -4
  47. package/lib/pools/mixins/depositBalancedAmountsMixins.js +1 -15
  48. package/lib/pools/mixins/depositMixins.d.ts +25 -5
  49. package/lib/pools/mixins/depositMixins.js +38 -76
  50. package/lib/pools/mixins/depositWrappedMixins.d.ts +10 -2
  51. package/lib/pools/mixins/depositWrappedMixins.js +17 -33
  52. package/lib/pools/mixins/poolBalancesMixin.d.ts +6 -2
  53. package/lib/pools/mixins/poolBalancesMixin.js +3 -5
  54. package/lib/pools/mixins/swapMixins.d.ts +20 -4
  55. package/lib/pools/mixins/swapMixins.js +36 -70
  56. package/lib/pools/mixins/swapWrappedMixins.d.ts +19 -4
  57. package/lib/pools/mixins/swapWrappedMixins.js +32 -60
  58. package/lib/pools/mixins/withdrawExpectedMixins.d.ts +12 -4
  59. package/lib/pools/mixins/withdrawExpectedMixins.js +6 -11
  60. package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +20 -4
  61. package/lib/pools/mixins/withdrawImbalanceMixins.js +26 -53
  62. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +10 -2
  63. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +12 -27
  64. package/lib/pools/mixins/withdrawMixins.d.ts +25 -5
  65. package/lib/pools/mixins/withdrawMixins.js +33 -67
  66. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +12 -4
  67. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +8 -13
  68. package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +25 -5
  69. package/lib/pools/mixins/withdrawOneCoinMixins.js +32 -66
  70. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +6 -2
  71. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +4 -7
  72. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +10 -2
  73. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +13 -29
  74. package/lib/pools/mixins/withdrawWrappedMixins.d.ts +10 -2
  75. package/lib/pools/mixins/withdrawWrappedMixins.js +14 -28
  76. package/lib/pools/poolConstructor.d.ts +2 -1
  77. package/lib/pools/poolConstructor.js +27 -28
  78. package/lib/pools/subClasses/corePool.d.ts +4 -1
  79. package/lib/pools/subClasses/corePool.js +5 -7
  80. package/lib/pools/subClasses/gaugePool.d.ts +5 -3
  81. package/lib/pools/subClasses/gaugePool.js +19 -18
  82. package/lib/pools/subClasses/statsPool.d.ts +2 -0
  83. package/lib/pools/subClasses/statsPool.js +22 -10
  84. package/lib/pools/subClasses/walletPool.d.ts +2 -1
  85. package/lib/pools/subClasses/walletPool.js +6 -6
  86. package/lib/pools/utils.d.ts +7 -6
  87. package/lib/pools/utils.js +316 -297
  88. package/lib/route-graph.worker.d.ts +2 -2
  89. package/lib/route-graph.worker.js +4 -6
  90. package/lib/router.d.ts +12 -11
  91. package/lib/router.js +331 -295
  92. package/lib/utils.d.ts +34 -33
  93. package/lib/utils.js +483 -435
  94. package/package.json +2 -2
package/lib/dao.d.ts CHANGED
@@ -1,47 +1,48 @@
1
- import { IGaugeUserVote, IVotingGauge, IDaoProposalListItem, IDaoProposalUserListItem, IDaoProposal, TVoteType } from './interfaces';
2
- export declare const crvSupplyStats: () => Promise<{
1
+ import { type Curve } from "./curve.js";
2
+ import { IDaoProposal, IDaoProposalListItem, IDaoProposalUserListItem, IGaugeUserVote, IVotingGauge, TVoteType } from './interfaces';
3
+ export declare function crvSupplyStats(this: Curve): Promise<{
3
4
  circulating: string;
4
5
  locked: string;
5
6
  total: string;
6
7
  veCrv: string;
7
8
  averageLockTime: string;
8
9
  }>;
9
- export declare const userCrv: (address?: string) => Promise<string>;
10
- export declare const userVeCrv: (address?: string) => Promise<{
10
+ export declare function userCrv(this: Curve, address?: string): Promise<string>;
11
+ export declare function userVeCrv(this: Curve, address?: string): Promise<{
11
12
  veCrv: string;
12
13
  veCrvPct: string;
13
14
  lockedCrv: string;
14
15
  unlockTime: number;
15
16
  }>;
16
- export declare const crvLockIsApproved: (amount: number | string) => Promise<boolean>;
17
- export declare const crvLockApproveEstimateGas: (amount: number | string) => Promise<number | number[]>;
18
- export declare const crvLockApprove: (amount: number | string) => Promise<string[]>;
17
+ export declare function crvLockIsApproved(this: Curve, amount: number | string): Promise<boolean>;
18
+ export declare function crvLockApproveEstimateGas(this: Curve, amount: number | string): Promise<number | number[]>;
19
+ export declare function crvLockApprove(this: Curve, amount: number | string): Promise<string[]>;
19
20
  export declare const calcCrvUnlockTime: (days: number | string, start?: number | string) => number;
20
- export declare const createCrvLockEstimateGas: (amount: number | string, days: number | string) => Promise<number | number[]>;
21
- export declare const createCrvLock: (amount: number | string, days: number | string) => Promise<string>;
22
- export declare const increaseCrvLockedAmountEstimateGas: (amount: number | string) => Promise<number | number[]>;
23
- export declare const increaseCrvLockedAmount: (amount: number | string) => Promise<string>;
24
- export declare const increaseCrvUnlockTimeEstimateGas: (days: number | string) => Promise<number | number[]>;
25
- export declare const increaseCrvUnlockTime: (days: number | string) => Promise<string>;
26
- export declare const withdrawLockedCrvEstimateGas: () => Promise<number | number[]>;
27
- export declare const withdrawLockedCrv: () => Promise<string>;
28
- export declare const claimableFees: (address?: string) => Promise<string>;
29
- export declare const claimFeesEstimateGas: (address?: string) => Promise<number | number[]>;
30
- export declare const claimFees: (address?: string) => Promise<string>;
31
- export declare const getVotingGaugeList: () => Promise<IVotingGauge[]>;
32
- export declare const userGaugeVotes: (address?: string) => Promise<{
21
+ export declare function createCrvLockEstimateGas(this: Curve, amount: number | string, days: number | string): Promise<number | number[]>;
22
+ export declare function createCrvLock(this: Curve, amount: number | string, days: number | string): Promise<string>;
23
+ export declare function increaseCrvLockedAmountEstimateGas(this: Curve, amount: number | string): Promise<number | number[]>;
24
+ export declare function increaseCrvLockedAmount(this: Curve, amount: number | string): Promise<string>;
25
+ export declare function increaseCrvUnlockTimeEstimateGas(this: Curve, days: number | string): Promise<number | number[]>;
26
+ export declare function increaseCrvUnlockTime(this: Curve, days: number | string): Promise<string>;
27
+ export declare function withdrawLockedCrvEstimateGas(this: Curve): Promise<number | number[]>;
28
+ export declare function withdrawLockedCrv(this: Curve): Promise<string>;
29
+ export declare function claimableFees(this: Curve, address?: string): Promise<string>;
30
+ export declare function claimFeesEstimateGas(this: Curve, address?: string): Promise<number | number[]>;
31
+ export declare function claimFees(this: Curve, address?: string): Promise<string>;
32
+ export declare function getVotingGaugeList(this: Curve): Promise<IVotingGauge[]>;
33
+ export declare function userGaugeVotes(this: Curve, address?: string): Promise<{
33
34
  gauges: IGaugeUserVote[];
34
35
  powerUsed: string;
35
36
  veCrvUsed: string;
36
37
  }>;
37
- export declare const voteForGaugeNextTime: (gauge: string) => Promise<number>;
38
- export declare const voteForGaugeEstimateGas: (gauge: string, power: number | string) => Promise<number | number[]>;
39
- export declare const voteForGauge: (gauge: string, power: number | string) => Promise<string>;
40
- export declare const getProposalList: () => Promise<IDaoProposalListItem[]>;
41
- export declare const getProposal: (type: "PARAMETER" | "OWNERSHIP", id: number) => Promise<IDaoProposal>;
42
- export declare const userProposalVotes: (address?: string) => Promise<IDaoProposalUserListItem[]>;
43
- export declare const voteForProposalEstimateGas: (type: TVoteType, id: number, support: boolean) => Promise<number | number[]>;
44
- export declare const voteForProposal: (type: TVoteType, id: number, support: boolean) => Promise<string>;
45
- export declare const executeVoteEstimateGas: (type: TVoteType, id: number) => Promise<number | number[]>;
46
- export declare const executeVote: (type: TVoteType, id: number) => Promise<string>;
47
- export declare const isCanVoteExecute: (type: TVoteType, id: number) => Promise<boolean>;
38
+ export declare function voteForGaugeNextTime(this: Curve, gauge: string): Promise<number>;
39
+ export declare function voteForGaugeEstimateGas(this: Curve, gauge: string, power: number | string): Promise<number | number[]>;
40
+ export declare function voteForGauge(this: Curve, gauge: string, power: number | string): Promise<string>;
41
+ export declare function getProposalList(this: Curve): Promise<IDaoProposalListItem[]>;
42
+ export declare function getProposal(this: Curve, type: "PARAMETER" | "OWNERSHIP", id: number): Promise<IDaoProposal>;
43
+ export declare function userProposalVotes(this: Curve, address?: string): Promise<IDaoProposalUserListItem[]>;
44
+ export declare function voteForProposalEstimateGas(this: Curve, type: TVoteType, id: number, support: boolean): Promise<number | number[]>;
45
+ export declare function voteForProposal(this: Curve, type: TVoteType, id: number, support: boolean): Promise<string>;
46
+ export declare function executeVoteEstimateGas(this: Curve, type: TVoteType, id: number): Promise<number | number[]>;
47
+ export declare function executeVote(this: Curve, type: TVoteType, id: number): Promise<string>;
48
+ export declare function isCanVoteExecute(this: Curve, type: TVoteType, id: number): Promise<boolean>;