@curvefi/api 1.17.2 → 1.20.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 (43) hide show
  1. package/README.md +57 -0
  2. package/lib/constants/abis/abis-ethereum.js +6 -6
  3. package/lib/constants/abis/json/factory-crypto/factory-crypto-pool-2.json +1112 -0
  4. package/lib/constants/abis/json/factory-crypto.json +635 -0
  5. package/lib/constants/abis/json/factory-v2/DepositZapMetaBtcPolygon.json +197 -0
  6. package/lib/constants/abis/json/factory-v2/DepositZapMetaUsdPolygon.json +197 -0
  7. package/lib/constants/abis/json/factory-v2/MetaBTC.json +919 -0
  8. package/lib/constants/abis/json/factory-v2/MetaBTCBalances.json +932 -0
  9. package/lib/constants/abis/json/factory-v2/MetaBTCBalancesRen.json +932 -0
  10. package/lib/constants/abis/json/factory-v2/MetaBTCRen.json +919 -0
  11. package/lib/constants/abis/json/factory-v2/MetaUSD.json +919 -0
  12. package/lib/constants/abis/json/factory-v2/MetaUSDBalances.json +932 -0
  13. package/lib/constants/abis/json/factory-v2/Plain2Balances.json +845 -0
  14. package/lib/constants/abis/json/factory-v2/Plain2Basic.json +845 -0
  15. package/lib/constants/abis/json/factory-v2/Plain2ETH.json +845 -0
  16. package/lib/constants/abis/json/factory-v2/Plain2Optimized.json +844 -0
  17. package/lib/constants/abis/json/factory-v2/Plain3Balances.json +845 -0
  18. package/lib/constants/abis/json/factory-v2/Plain3Basic.json +845 -0
  19. package/lib/constants/abis/json/factory-v2/Plain3ETH.json +845 -0
  20. package/lib/constants/abis/json/factory-v2/Plain3Optimized.json +845 -0
  21. package/lib/constants/abis/json/factory-v2/Plain4Balances.json +845 -0
  22. package/lib/constants/abis/json/factory-v2/Plain4Basic.json +845 -0
  23. package/lib/constants/abis/json/factory-v2/Plain4ETH.json +845 -0
  24. package/lib/constants/abis/json/factory-v2/Plain4Optimized.json +845 -0
  25. package/lib/constants/abis/json/factory.json +1063 -0
  26. package/lib/constants/abis/json/registry_exchange.json +207 -84
  27. package/lib/constants/aliases.d.ts +4 -0
  28. package/lib/constants/aliases.js +4 -0
  29. package/lib/constants/coins-polygon.js +3 -2
  30. package/lib/curve.d.ts +5 -0
  31. package/lib/curve.js +62 -0
  32. package/lib/factory-crypto.d.ts +32 -0
  33. package/lib/factory-crypto.js +377 -0
  34. package/lib/factory.d.ts +32 -0
  35. package/lib/factory.js +607 -0
  36. package/lib/index.d.ts +7 -0
  37. package/lib/index.js +28 -0
  38. package/lib/interfaces.d.ts +28 -1
  39. package/lib/pools.d.ts +5 -0
  40. package/lib/pools.js +359 -159
  41. package/lib/utils.d.ts +8 -1
  42. package/lib/utils.js +111 -8
  43. package/package.json +4 -2
@@ -0,0 +1,197 @@
1
+ [
2
+ {
3
+ "stateMutability": "nonpayable",
4
+ "type": "constructor",
5
+ "inputs": [],
6
+ "outputs": []
7
+ },
8
+ {
9
+ "stateMutability": "nonpayable",
10
+ "type": "function",
11
+ "name": "add_liquidity",
12
+ "inputs": [
13
+ {
14
+ "name": "_pool",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "name": "_deposit_amounts",
19
+ "type": "uint256[3]"
20
+ },
21
+ {
22
+ "name": "_min_mint_amount",
23
+ "type": "uint256"
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "uint256"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "stateMutability": "nonpayable",
35
+ "type": "function",
36
+ "name": "remove_liquidity",
37
+ "inputs": [
38
+ {
39
+ "name": "_pool",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "name": "_burn_amount",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "name": "_min_amounts",
48
+ "type": "uint256[3]"
49
+ }
50
+ ],
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "uint256[3]"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "stateMutability": "nonpayable",
60
+ "type": "function",
61
+ "name": "remove_liquidity_one_coin",
62
+ "inputs": [
63
+ {
64
+ "name": "_pool",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "name": "_burn_amount",
69
+ "type": "uint256"
70
+ },
71
+ {
72
+ "name": "i",
73
+ "type": "int128"
74
+ },
75
+ {
76
+ "name": "_min_amount",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "outputs": [
81
+ {
82
+ "name": "",
83
+ "type": "uint256"
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "stateMutability": "nonpayable",
89
+ "type": "function",
90
+ "name": "remove_liquidity_imbalance",
91
+ "inputs": [
92
+ {
93
+ "name": "_pool",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "name": "_amounts",
98
+ "type": "uint256[3]"
99
+ },
100
+ {
101
+ "name": "_max_burn_amount",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "outputs": [
106
+ {
107
+ "name": "",
108
+ "type": "uint256"
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "stateMutability": "view",
114
+ "type": "function",
115
+ "name": "calc_withdraw_one_coin",
116
+ "inputs": [
117
+ {
118
+ "name": "_pool",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "name": "_token_amount",
123
+ "type": "uint256"
124
+ },
125
+ {
126
+ "name": "i",
127
+ "type": "int128"
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "gas": "5753"
137
+ },
138
+ {
139
+ "stateMutability": "view",
140
+ "type": "function",
141
+ "name": "calc_token_amount",
142
+ "inputs": [
143
+ {
144
+ "name": "_pool",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "name": "_amounts",
149
+ "type": "uint256[3]"
150
+ },
151
+ {
152
+ "name": "_is_deposit",
153
+ "type": "bool"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "",
159
+ "type": "uint256"
160
+ }
161
+ ],
162
+ "gas": "6289"
163
+ },
164
+ {
165
+ "stateMutability": "nonpayable",
166
+ "type": "function",
167
+ "name": "exchange_underlying",
168
+ "inputs": [
169
+ {
170
+ "name": "_pool",
171
+ "type": "address"
172
+ },
173
+ {
174
+ "name": "_i",
175
+ "type": "int128"
176
+ },
177
+ {
178
+ "name": "_j",
179
+ "type": "int128"
180
+ },
181
+ {
182
+ "name": "_dx",
183
+ "type": "uint256"
184
+ },
185
+ {
186
+ "name": "_min_dy",
187
+ "type": "uint256"
188
+ }
189
+ ],
190
+ "outputs": [
191
+ {
192
+ "name": "",
193
+ "type": "uint256"
194
+ }
195
+ ]
196
+ }
197
+ ]
@@ -0,0 +1,197 @@
1
+ [
2
+ {
3
+ "stateMutability": "nonpayable",
4
+ "type": "constructor",
5
+ "inputs": [],
6
+ "outputs": []
7
+ },
8
+ {
9
+ "stateMutability": "nonpayable",
10
+ "type": "function",
11
+ "name": "add_liquidity",
12
+ "inputs": [
13
+ {
14
+ "name": "_pool",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "name": "_deposit_amounts",
19
+ "type": "uint256[4]"
20
+ },
21
+ {
22
+ "name": "_min_mint_amount",
23
+ "type": "uint256"
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "uint256"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "stateMutability": "nonpayable",
35
+ "type": "function",
36
+ "name": "remove_liquidity",
37
+ "inputs": [
38
+ {
39
+ "name": "_pool",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "name": "_burn_amount",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "name": "_min_amounts",
48
+ "type": "uint256[4]"
49
+ }
50
+ ],
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "uint256[4]"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "stateMutability": "nonpayable",
60
+ "type": "function",
61
+ "name": "remove_liquidity_one_coin",
62
+ "inputs": [
63
+ {
64
+ "name": "_pool",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "name": "_burn_amount",
69
+ "type": "uint256"
70
+ },
71
+ {
72
+ "name": "i",
73
+ "type": "int128"
74
+ },
75
+ {
76
+ "name": "_min_amount",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "outputs": [
81
+ {
82
+ "name": "",
83
+ "type": "uint256"
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "stateMutability": "nonpayable",
89
+ "type": "function",
90
+ "name": "remove_liquidity_imbalance",
91
+ "inputs": [
92
+ {
93
+ "name": "_pool",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "name": "_amounts",
98
+ "type": "uint256[4]"
99
+ },
100
+ {
101
+ "name": "_max_burn_amount",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "outputs": [
106
+ {
107
+ "name": "",
108
+ "type": "uint256"
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "stateMutability": "view",
114
+ "type": "function",
115
+ "name": "calc_withdraw_one_coin",
116
+ "inputs": [
117
+ {
118
+ "name": "_pool",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "name": "_token_amount",
123
+ "type": "uint256"
124
+ },
125
+ {
126
+ "name": "i",
127
+ "type": "int128"
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "gas": "5753"
137
+ },
138
+ {
139
+ "stateMutability": "view",
140
+ "type": "function",
141
+ "name": "calc_token_amount",
142
+ "inputs": [
143
+ {
144
+ "name": "_pool",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "name": "_amounts",
149
+ "type": "uint256[4]"
150
+ },
151
+ {
152
+ "name": "_is_deposit",
153
+ "type": "bool"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "",
159
+ "type": "uint256"
160
+ }
161
+ ],
162
+ "gas": "6666"
163
+ },
164
+ {
165
+ "stateMutability": "nonpayable",
166
+ "type": "function",
167
+ "name": "exchange_underlying",
168
+ "inputs": [
169
+ {
170
+ "name": "_pool",
171
+ "type": "address"
172
+ },
173
+ {
174
+ "name": "_i",
175
+ "type": "int128"
176
+ },
177
+ {
178
+ "name": "_j",
179
+ "type": "int128"
180
+ },
181
+ {
182
+ "name": "_dx",
183
+ "type": "uint256"
184
+ },
185
+ {
186
+ "name": "_min_dy",
187
+ "type": "uint256"
188
+ }
189
+ ],
190
+ "outputs": [
191
+ {
192
+ "name": "",
193
+ "type": "uint256"
194
+ }
195
+ ]
196
+ }
197
+ ]