recon-crypto-mcp 0.1.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.
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/abis/aave-pool.d.ts +174 -0
- package/dist/abis/aave-pool.js +101 -0
- package/dist/abis/aave-pool.js.map +1 -0
- package/dist/abis/aave-ui-pool-data-provider.d.ts +232 -0
- package/dist/abis/aave-ui-pool-data-provider.js +107 -0
- package/dist/abis/aave-ui-pool-data-provider.js.map +1 -0
- package/dist/abis/access-control.d.ts +94 -0
- package/dist/abis/access-control.js +51 -0
- package/dist/abis/access-control.js.map +1 -0
- package/dist/abis/compound-comet.d.ts +120 -0
- package/dist/abis/compound-comet.js +84 -0
- package/dist/abis/compound-comet.js.map +1 -0
- package/dist/abis/eigenlayer-delegation-manager.d.ts +23 -0
- package/dist/abis/eigenlayer-delegation-manager.js +18 -0
- package/dist/abis/eigenlayer-delegation-manager.js.map +1 -0
- package/dist/abis/eigenlayer-strategy-manager.d.ts +53 -0
- package/dist/abis/eigenlayer-strategy-manager.js +47 -0
- package/dist/abis/eigenlayer-strategy-manager.js.map +1 -0
- package/dist/abis/erc20.d.ts +78 -0
- package/dist/abis/erc20.js +10 -0
- package/dist/abis/erc20.js.map +1 -0
- package/dist/abis/lido.d.ts +80 -0
- package/dist/abis/lido.js +60 -0
- package/dist/abis/lido.js.map +1 -0
- package/dist/abis/morpho-blue.d.ts +321 -0
- package/dist/abis/morpho-blue.js +193 -0
- package/dist/abis/morpho-blue.js.map +1 -0
- package/dist/abis/uniswap-pool.d.ts +70 -0
- package/dist/abis/uniswap-pool.js +53 -0
- package/dist/abis/uniswap-pool.js.map +1 -0
- package/dist/abis/uniswap-position-manager.d.ts +71 -0
- package/dist/abis/uniswap-position-manager.js +41 -0
- package/dist/abis/uniswap-position-manager.js.map +1 -0
- package/dist/config/cache.d.ts +12 -0
- package/dist/config/cache.js +12 -0
- package/dist/config/cache.js.map +1 -0
- package/dist/config/chains.d.ts +24 -0
- package/dist/config/chains.js +158 -0
- package/dist/config/chains.js.map +1 -0
- package/dist/config/contracts.d.ts +107 -0
- package/dist/config/contracts.js +123 -0
- package/dist/config/contracts.js.map +1 -0
- package/dist/config/user-config.d.ts +15 -0
- package/dist/config/user-config.js +93 -0
- package/dist/config/user-config.js.map +1 -0
- package/dist/data/apis/etherscan.d.ts +30 -0
- package/dist/data/apis/etherscan.js +109 -0
- package/dist/data/apis/etherscan.js.map +1 -0
- package/dist/data/cache.d.ts +18 -0
- package/dist/data/cache.js +47 -0
- package/dist/data/cache.js.map +1 -0
- package/dist/data/format.d.ts +6 -0
- package/dist/data/format.js +44 -0
- package/dist/data/format.js.map +1 -0
- package/dist/data/prices.d.ts +12 -0
- package/dist/data/prices.js +81 -0
- package/dist/data/prices.js.map +1 -0
- package/dist/data/rpc.d.ts +17 -0
- package/dist/data/rpc.js +68 -0
- package/dist/data/rpc.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +344 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/balances/index.d.ts +20 -0
- package/dist/modules/balances/index.js +49 -0
- package/dist/modules/balances/index.js.map +1 -0
- package/dist/modules/balances/schemas.d.ts +32 -0
- package/dist/modules/balances/schemas.js +21 -0
- package/dist/modules/balances/schemas.js.map +1 -0
- package/dist/modules/bitcoin/index.d.ts +26 -0
- package/dist/modules/bitcoin/index.js +128 -0
- package/dist/modules/bitcoin/index.js.map +1 -0
- package/dist/modules/bitcoin/schemas.d.ts +49 -0
- package/dist/modules/bitcoin/schemas.js +51 -0
- package/dist/modules/bitcoin/schemas.js.map +1 -0
- package/dist/modules/bitcoin/send.d.ts +52 -0
- package/dist/modules/bitcoin/send.js +158 -0
- package/dist/modules/bitcoin/send.js.map +1 -0
- package/dist/modules/bitcoin/utxo.d.ts +99 -0
- package/dist/modules/bitcoin/utxo.js +116 -0
- package/dist/modules/bitcoin/utxo.js.map +1 -0
- package/dist/modules/compound/actions.d.ts +8 -0
- package/dist/modules/compound/actions.js +154 -0
- package/dist/modules/compound/actions.js.map +1 -0
- package/dist/modules/compound/index.d.ts +26 -0
- package/dist/modules/compound/index.js +141 -0
- package/dist/modules/compound/index.js.map +1 -0
- package/dist/modules/compound/schemas.d.ts +95 -0
- package/dist/modules/compound/schemas.js +37 -0
- package/dist/modules/compound/schemas.js.map +1 -0
- package/dist/modules/execution/index.d.ts +51 -0
- package/dist/modules/execution/index.js +271 -0
- package/dist/modules/execution/index.js.map +1 -0
- package/dist/modules/execution/schemas.d.ts +183 -0
- package/dist/modules/execution/schemas.js +88 -0
- package/dist/modules/execution/schemas.js.map +1 -0
- package/dist/modules/feedback/index.d.ts +28 -0
- package/dist/modules/feedback/index.js +161 -0
- package/dist/modules/feedback/index.js.map +1 -0
- package/dist/modules/feedback/rate-limit.d.ts +15 -0
- package/dist/modules/feedback/rate-limit.js +110 -0
- package/dist/modules/feedback/rate-limit.js.map +1 -0
- package/dist/modules/feedback/schemas.d.ts +41 -0
- package/dist/modules/feedback/schemas.js +40 -0
- package/dist/modules/feedback/schemas.js.map +1 -0
- package/dist/modules/morpho/actions.d.ts +8 -0
- package/dist/modules/morpho/actions.js +265 -0
- package/dist/modules/morpho/actions.js.map +1 -0
- package/dist/modules/morpho/index.d.ts +26 -0
- package/dist/modules/morpho/index.js +94 -0
- package/dist/modules/morpho/index.js.map +1 -0
- package/dist/modules/morpho/schemas.d.ts +130 -0
- package/dist/modules/morpho/schemas.js +34 -0
- package/dist/modules/morpho/schemas.js.map +1 -0
- package/dist/modules/portfolio/index.d.ts +3 -0
- package/dist/modules/portfolio/index.js +197 -0
- package/dist/modules/portfolio/index.js.map +1 -0
- package/dist/modules/portfolio/schemas.d.ts +20 -0
- package/dist/modules/portfolio/schemas.js +15 -0
- package/dist/modules/portfolio/schemas.js.map +1 -0
- package/dist/modules/positions/aave.d.ts +22 -0
- package/dist/modules/positions/aave.js +197 -0
- package/dist/modules/positions/aave.js.map +1 -0
- package/dist/modules/positions/actions.d.ts +18 -0
- package/dist/modules/positions/actions.js +205 -0
- package/dist/modules/positions/actions.js.map +1 -0
- package/dist/modules/positions/index.d.ts +37 -0
- package/dist/modules/positions/index.js +59 -0
- package/dist/modules/positions/index.js.map +1 -0
- package/dist/modules/positions/schemas.d.ts +55 -0
- package/dist/modules/positions/schemas.js +25 -0
- package/dist/modules/positions/schemas.js.map +1 -0
- package/dist/modules/positions/uniswap.d.ts +4 -0
- package/dist/modules/positions/uniswap.js +181 -0
- package/dist/modules/positions/uniswap.js.map +1 -0
- package/dist/modules/prices/index.d.ts +19 -0
- package/dist/modules/prices/index.js +22 -0
- package/dist/modules/prices/index.js.map +1 -0
- package/dist/modules/security/index.d.ts +26 -0
- package/dist/modules/security/index.js +13 -0
- package/dist/modules/security/index.js.map +1 -0
- package/dist/modules/security/permissions.d.ts +8 -0
- package/dist/modules/security/permissions.js +96 -0
- package/dist/modules/security/permissions.js.map +1 -0
- package/dist/modules/security/risk-score.d.ts +18 -0
- package/dist/modules/security/risk-score.js +116 -0
- package/dist/modules/security/risk-score.js.map +1 -0
- package/dist/modules/security/schemas.d.ts +31 -0
- package/dist/modules/security/schemas.js +16 -0
- package/dist/modules/security/schemas.js.map +1 -0
- package/dist/modules/security/verification.d.ts +4 -0
- package/dist/modules/security/verification.js +82 -0
- package/dist/modules/security/verification.js.map +1 -0
- package/dist/modules/shared/approval.d.ts +71 -0
- package/dist/modules/shared/approval.js +130 -0
- package/dist/modules/shared/approval.js.map +1 -0
- package/dist/modules/staking/actions.d.ts +22 -0
- package/dist/modules/staking/actions.js +100 -0
- package/dist/modules/staking/actions.js.map +1 -0
- package/dist/modules/staking/eigenlayer.d.ts +14 -0
- package/dist/modules/staking/eigenlayer.js +105 -0
- package/dist/modules/staking/eigenlayer.js.map +1 -0
- package/dist/modules/staking/index.d.ts +24 -0
- package/dist/modules/staking/index.js +59 -0
- package/dist/modules/staking/index.js.map +1 -0
- package/dist/modules/staking/lido.d.ts +14 -0
- package/dist/modules/staking/lido.js +113 -0
- package/dist/modules/staking/lido.js.map +1 -0
- package/dist/modules/staking/schemas.d.ts +34 -0
- package/dist/modules/staking/schemas.js +20 -0
- package/dist/modules/staking/schemas.js.map +1 -0
- package/dist/modules/swap/index.d.ts +47 -0
- package/dist/modules/swap/index.js +376 -0
- package/dist/modules/swap/index.js.map +1 -0
- package/dist/modules/swap/lifi.d.ts +17 -0
- package/dist/modules/swap/lifi.js +44 -0
- package/dist/modules/swap/lifi.js.map +1 -0
- package/dist/modules/swap/oneinch.d.ts +26 -0
- package/dist/modules/swap/oneinch.js +33 -0
- package/dist/modules/swap/oneinch.js.map +1 -0
- package/dist/modules/swap/schemas.d.ts +65 -0
- package/dist/modules/swap/schemas.js +46 -0
- package/dist/modules/swap/schemas.js.map +1 -0
- package/dist/setup.d.ts +2 -0
- package/dist/setup.js +257 -0
- package/dist/setup.js.map +1 -0
- package/dist/signing/pre-sign-check.d.ts +8 -0
- package/dist/signing/pre-sign-check.js +231 -0
- package/dist/signing/pre-sign-check.js.map +1 -0
- package/dist/signing/session.d.ts +28 -0
- package/dist/signing/session.js +26 -0
- package/dist/signing/session.js.map +1 -0
- package/dist/signing/tx-store.d.ts +29 -0
- package/dist/signing/tx-store.js +85 -0
- package/dist/signing/tx-store.js.map +1 -0
- package/dist/signing/walletconnect.d.ts +33 -0
- package/dist/signing/walletconnect.js +226 -0
- package/dist/signing/walletconnect.js.map +1 -0
- package/dist/types/index.d.ts +222 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +134 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/** Minimal Morpho Blue ABI — position reads + 6 primitive actions. */
|
|
2
|
+
export declare const morphoBlueAbi: readonly [{
|
|
3
|
+
readonly type: "function";
|
|
4
|
+
readonly name: "position";
|
|
5
|
+
readonly stateMutability: "view";
|
|
6
|
+
readonly inputs: readonly [{
|
|
7
|
+
readonly name: "id";
|
|
8
|
+
readonly type: "bytes32";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "user";
|
|
11
|
+
readonly type: "address";
|
|
12
|
+
}];
|
|
13
|
+
readonly outputs: readonly [{
|
|
14
|
+
readonly name: "supplyShares";
|
|
15
|
+
readonly type: "uint256";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "borrowShares";
|
|
18
|
+
readonly type: "uint128";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "collateral";
|
|
21
|
+
readonly type: "uint128";
|
|
22
|
+
}];
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly name: "market";
|
|
26
|
+
readonly stateMutability: "view";
|
|
27
|
+
readonly inputs: readonly [{
|
|
28
|
+
readonly name: "id";
|
|
29
|
+
readonly type: "bytes32";
|
|
30
|
+
}];
|
|
31
|
+
readonly outputs: readonly [{
|
|
32
|
+
readonly name: "totalSupplyAssets";
|
|
33
|
+
readonly type: "uint128";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "totalSupplyShares";
|
|
36
|
+
readonly type: "uint128";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "totalBorrowAssets";
|
|
39
|
+
readonly type: "uint128";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "totalBorrowShares";
|
|
42
|
+
readonly type: "uint128";
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "lastUpdate";
|
|
45
|
+
readonly type: "uint128";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "fee";
|
|
48
|
+
readonly type: "uint128";
|
|
49
|
+
}];
|
|
50
|
+
}, {
|
|
51
|
+
readonly type: "function";
|
|
52
|
+
readonly name: "idToMarketParams";
|
|
53
|
+
readonly stateMutability: "view";
|
|
54
|
+
readonly inputs: readonly [{
|
|
55
|
+
readonly name: "id";
|
|
56
|
+
readonly type: "bytes32";
|
|
57
|
+
}];
|
|
58
|
+
readonly outputs: readonly [{
|
|
59
|
+
readonly name: "loanToken";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "collateralToken";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "oracle";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
}, {
|
|
68
|
+
readonly name: "irm";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "lltv";
|
|
72
|
+
readonly type: "uint256";
|
|
73
|
+
}];
|
|
74
|
+
}, {
|
|
75
|
+
readonly type: "function";
|
|
76
|
+
readonly name: "supply";
|
|
77
|
+
readonly stateMutability: "nonpayable";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "marketParams";
|
|
80
|
+
readonly type: "tuple";
|
|
81
|
+
readonly components: readonly [{
|
|
82
|
+
readonly name: "loanToken";
|
|
83
|
+
readonly type: "address";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "collateralToken";
|
|
86
|
+
readonly type: "address";
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "oracle";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "irm";
|
|
92
|
+
readonly type: "address";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "lltv";
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
}];
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "assets";
|
|
99
|
+
readonly type: "uint256";
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "shares";
|
|
102
|
+
readonly type: "uint256";
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: "onBehalf";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "data";
|
|
108
|
+
readonly type: "bytes";
|
|
109
|
+
}];
|
|
110
|
+
readonly outputs: readonly [{
|
|
111
|
+
readonly name: "assetsSupplied";
|
|
112
|
+
readonly type: "uint256";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "sharesSupplied";
|
|
115
|
+
readonly type: "uint256";
|
|
116
|
+
}];
|
|
117
|
+
}, {
|
|
118
|
+
readonly type: "function";
|
|
119
|
+
readonly name: "withdraw";
|
|
120
|
+
readonly stateMutability: "nonpayable";
|
|
121
|
+
readonly inputs: readonly [{
|
|
122
|
+
readonly name: "marketParams";
|
|
123
|
+
readonly type: "tuple";
|
|
124
|
+
readonly components: readonly [{
|
|
125
|
+
readonly name: "loanToken";
|
|
126
|
+
readonly type: "address";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "collateralToken";
|
|
129
|
+
readonly type: "address";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "oracle";
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "irm";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "lltv";
|
|
138
|
+
readonly type: "uint256";
|
|
139
|
+
}];
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "assets";
|
|
142
|
+
readonly type: "uint256";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "shares";
|
|
145
|
+
readonly type: "uint256";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "onBehalf";
|
|
148
|
+
readonly type: "address";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "receiver";
|
|
151
|
+
readonly type: "address";
|
|
152
|
+
}];
|
|
153
|
+
readonly outputs: readonly [{
|
|
154
|
+
readonly name: "assetsWithdrawn";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
}, {
|
|
157
|
+
readonly name: "sharesWithdrawn";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}];
|
|
160
|
+
}, {
|
|
161
|
+
readonly type: "function";
|
|
162
|
+
readonly name: "borrow";
|
|
163
|
+
readonly stateMutability: "nonpayable";
|
|
164
|
+
readonly inputs: readonly [{
|
|
165
|
+
readonly name: "marketParams";
|
|
166
|
+
readonly type: "tuple";
|
|
167
|
+
readonly components: readonly [{
|
|
168
|
+
readonly name: "loanToken";
|
|
169
|
+
readonly type: "address";
|
|
170
|
+
}, {
|
|
171
|
+
readonly name: "collateralToken";
|
|
172
|
+
readonly type: "address";
|
|
173
|
+
}, {
|
|
174
|
+
readonly name: "oracle";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "irm";
|
|
178
|
+
readonly type: "address";
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "lltv";
|
|
181
|
+
readonly type: "uint256";
|
|
182
|
+
}];
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "assets";
|
|
185
|
+
readonly type: "uint256";
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "shares";
|
|
188
|
+
readonly type: "uint256";
|
|
189
|
+
}, {
|
|
190
|
+
readonly name: "onBehalf";
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "receiver";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
}];
|
|
196
|
+
readonly outputs: readonly [{
|
|
197
|
+
readonly name: "assetsBorrowed";
|
|
198
|
+
readonly type: "uint256";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "sharesBorrowed";
|
|
201
|
+
readonly type: "uint256";
|
|
202
|
+
}];
|
|
203
|
+
}, {
|
|
204
|
+
readonly type: "function";
|
|
205
|
+
readonly name: "repay";
|
|
206
|
+
readonly stateMutability: "nonpayable";
|
|
207
|
+
readonly inputs: readonly [{
|
|
208
|
+
readonly name: "marketParams";
|
|
209
|
+
readonly type: "tuple";
|
|
210
|
+
readonly components: readonly [{
|
|
211
|
+
readonly name: "loanToken";
|
|
212
|
+
readonly type: "address";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "collateralToken";
|
|
215
|
+
readonly type: "address";
|
|
216
|
+
}, {
|
|
217
|
+
readonly name: "oracle";
|
|
218
|
+
readonly type: "address";
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "irm";
|
|
221
|
+
readonly type: "address";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "lltv";
|
|
224
|
+
readonly type: "uint256";
|
|
225
|
+
}];
|
|
226
|
+
}, {
|
|
227
|
+
readonly name: "assets";
|
|
228
|
+
readonly type: "uint256";
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "shares";
|
|
231
|
+
readonly type: "uint256";
|
|
232
|
+
}, {
|
|
233
|
+
readonly name: "onBehalf";
|
|
234
|
+
readonly type: "address";
|
|
235
|
+
}, {
|
|
236
|
+
readonly name: "data";
|
|
237
|
+
readonly type: "bytes";
|
|
238
|
+
}];
|
|
239
|
+
readonly outputs: readonly [{
|
|
240
|
+
readonly name: "assetsRepaid";
|
|
241
|
+
readonly type: "uint256";
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "sharesRepaid";
|
|
244
|
+
readonly type: "uint256";
|
|
245
|
+
}];
|
|
246
|
+
}, {
|
|
247
|
+
readonly type: "function";
|
|
248
|
+
readonly name: "supplyCollateral";
|
|
249
|
+
readonly stateMutability: "nonpayable";
|
|
250
|
+
readonly inputs: readonly [{
|
|
251
|
+
readonly name: "marketParams";
|
|
252
|
+
readonly type: "tuple";
|
|
253
|
+
readonly components: readonly [{
|
|
254
|
+
readonly name: "loanToken";
|
|
255
|
+
readonly type: "address";
|
|
256
|
+
}, {
|
|
257
|
+
readonly name: "collateralToken";
|
|
258
|
+
readonly type: "address";
|
|
259
|
+
}, {
|
|
260
|
+
readonly name: "oracle";
|
|
261
|
+
readonly type: "address";
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "irm";
|
|
264
|
+
readonly type: "address";
|
|
265
|
+
}, {
|
|
266
|
+
readonly name: "lltv";
|
|
267
|
+
readonly type: "uint256";
|
|
268
|
+
}];
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "assets";
|
|
271
|
+
readonly type: "uint256";
|
|
272
|
+
}, {
|
|
273
|
+
readonly name: "onBehalf";
|
|
274
|
+
readonly type: "address";
|
|
275
|
+
}, {
|
|
276
|
+
readonly name: "data";
|
|
277
|
+
readonly type: "bytes";
|
|
278
|
+
}];
|
|
279
|
+
readonly outputs: readonly [];
|
|
280
|
+
}, {
|
|
281
|
+
readonly type: "function";
|
|
282
|
+
readonly name: "withdrawCollateral";
|
|
283
|
+
readonly stateMutability: "nonpayable";
|
|
284
|
+
readonly inputs: readonly [{
|
|
285
|
+
readonly name: "marketParams";
|
|
286
|
+
readonly type: "tuple";
|
|
287
|
+
readonly components: readonly [{
|
|
288
|
+
readonly name: "loanToken";
|
|
289
|
+
readonly type: "address";
|
|
290
|
+
}, {
|
|
291
|
+
readonly name: "collateralToken";
|
|
292
|
+
readonly type: "address";
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "oracle";
|
|
295
|
+
readonly type: "address";
|
|
296
|
+
}, {
|
|
297
|
+
readonly name: "irm";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
}, {
|
|
300
|
+
readonly name: "lltv";
|
|
301
|
+
readonly type: "uint256";
|
|
302
|
+
}];
|
|
303
|
+
}, {
|
|
304
|
+
readonly name: "assets";
|
|
305
|
+
readonly type: "uint256";
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "onBehalf";
|
|
308
|
+
readonly type: "address";
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "receiver";
|
|
311
|
+
readonly type: "address";
|
|
312
|
+
}];
|
|
313
|
+
readonly outputs: readonly [];
|
|
314
|
+
}];
|
|
315
|
+
export interface MorphoMarketParams {
|
|
316
|
+
loanToken: `0x${string}`;
|
|
317
|
+
collateralToken: `0x${string}`;
|
|
318
|
+
oracle: `0x${string}`;
|
|
319
|
+
irm: `0x${string}`;
|
|
320
|
+
lltv: bigint;
|
|
321
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/** Minimal Morpho Blue ABI — position reads + 6 primitive actions. */
|
|
2
|
+
export const morphoBlueAbi = [
|
|
3
|
+
{
|
|
4
|
+
type: "function",
|
|
5
|
+
name: "position",
|
|
6
|
+
stateMutability: "view",
|
|
7
|
+
inputs: [
|
|
8
|
+
{ name: "id", type: "bytes32" },
|
|
9
|
+
{ name: "user", type: "address" },
|
|
10
|
+
],
|
|
11
|
+
outputs: [
|
|
12
|
+
{ name: "supplyShares", type: "uint256" },
|
|
13
|
+
{ name: "borrowShares", type: "uint128" },
|
|
14
|
+
{ name: "collateral", type: "uint128" },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: "function",
|
|
19
|
+
name: "market",
|
|
20
|
+
stateMutability: "view",
|
|
21
|
+
inputs: [{ name: "id", type: "bytes32" }],
|
|
22
|
+
outputs: [
|
|
23
|
+
{ name: "totalSupplyAssets", type: "uint128" },
|
|
24
|
+
{ name: "totalSupplyShares", type: "uint128" },
|
|
25
|
+
{ name: "totalBorrowAssets", type: "uint128" },
|
|
26
|
+
{ name: "totalBorrowShares", type: "uint128" },
|
|
27
|
+
{ name: "lastUpdate", type: "uint128" },
|
|
28
|
+
{ name: "fee", type: "uint128" },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "function",
|
|
33
|
+
name: "idToMarketParams",
|
|
34
|
+
stateMutability: "view",
|
|
35
|
+
inputs: [{ name: "id", type: "bytes32" }],
|
|
36
|
+
outputs: [
|
|
37
|
+
{ name: "loanToken", type: "address" },
|
|
38
|
+
{ name: "collateralToken", type: "address" },
|
|
39
|
+
{ name: "oracle", type: "address" },
|
|
40
|
+
{ name: "irm", type: "address" },
|
|
41
|
+
{ name: "lltv", type: "uint256" },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: "function",
|
|
46
|
+
name: "supply",
|
|
47
|
+
stateMutability: "nonpayable",
|
|
48
|
+
inputs: [
|
|
49
|
+
{
|
|
50
|
+
name: "marketParams",
|
|
51
|
+
type: "tuple",
|
|
52
|
+
components: [
|
|
53
|
+
{ name: "loanToken", type: "address" },
|
|
54
|
+
{ name: "collateralToken", type: "address" },
|
|
55
|
+
{ name: "oracle", type: "address" },
|
|
56
|
+
{ name: "irm", type: "address" },
|
|
57
|
+
{ name: "lltv", type: "uint256" },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{ name: "assets", type: "uint256" },
|
|
61
|
+
{ name: "shares", type: "uint256" },
|
|
62
|
+
{ name: "onBehalf", type: "address" },
|
|
63
|
+
{ name: "data", type: "bytes" },
|
|
64
|
+
],
|
|
65
|
+
outputs: [
|
|
66
|
+
{ name: "assetsSupplied", type: "uint256" },
|
|
67
|
+
{ name: "sharesSupplied", type: "uint256" },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: "function",
|
|
72
|
+
name: "withdraw",
|
|
73
|
+
stateMutability: "nonpayable",
|
|
74
|
+
inputs: [
|
|
75
|
+
{
|
|
76
|
+
name: "marketParams",
|
|
77
|
+
type: "tuple",
|
|
78
|
+
components: [
|
|
79
|
+
{ name: "loanToken", type: "address" },
|
|
80
|
+
{ name: "collateralToken", type: "address" },
|
|
81
|
+
{ name: "oracle", type: "address" },
|
|
82
|
+
{ name: "irm", type: "address" },
|
|
83
|
+
{ name: "lltv", type: "uint256" },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{ name: "assets", type: "uint256" },
|
|
87
|
+
{ name: "shares", type: "uint256" },
|
|
88
|
+
{ name: "onBehalf", type: "address" },
|
|
89
|
+
{ name: "receiver", type: "address" },
|
|
90
|
+
],
|
|
91
|
+
outputs: [
|
|
92
|
+
{ name: "assetsWithdrawn", type: "uint256" },
|
|
93
|
+
{ name: "sharesWithdrawn", type: "uint256" },
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: "function",
|
|
98
|
+
name: "borrow",
|
|
99
|
+
stateMutability: "nonpayable",
|
|
100
|
+
inputs: [
|
|
101
|
+
{
|
|
102
|
+
name: "marketParams",
|
|
103
|
+
type: "tuple",
|
|
104
|
+
components: [
|
|
105
|
+
{ name: "loanToken", type: "address" },
|
|
106
|
+
{ name: "collateralToken", type: "address" },
|
|
107
|
+
{ name: "oracle", type: "address" },
|
|
108
|
+
{ name: "irm", type: "address" },
|
|
109
|
+
{ name: "lltv", type: "uint256" },
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{ name: "assets", type: "uint256" },
|
|
113
|
+
{ name: "shares", type: "uint256" },
|
|
114
|
+
{ name: "onBehalf", type: "address" },
|
|
115
|
+
{ name: "receiver", type: "address" },
|
|
116
|
+
],
|
|
117
|
+
outputs: [
|
|
118
|
+
{ name: "assetsBorrowed", type: "uint256" },
|
|
119
|
+
{ name: "sharesBorrowed", type: "uint256" },
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: "function",
|
|
124
|
+
name: "repay",
|
|
125
|
+
stateMutability: "nonpayable",
|
|
126
|
+
inputs: [
|
|
127
|
+
{
|
|
128
|
+
name: "marketParams",
|
|
129
|
+
type: "tuple",
|
|
130
|
+
components: [
|
|
131
|
+
{ name: "loanToken", type: "address" },
|
|
132
|
+
{ name: "collateralToken", type: "address" },
|
|
133
|
+
{ name: "oracle", type: "address" },
|
|
134
|
+
{ name: "irm", type: "address" },
|
|
135
|
+
{ name: "lltv", type: "uint256" },
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{ name: "assets", type: "uint256" },
|
|
139
|
+
{ name: "shares", type: "uint256" },
|
|
140
|
+
{ name: "onBehalf", type: "address" },
|
|
141
|
+
{ name: "data", type: "bytes" },
|
|
142
|
+
],
|
|
143
|
+
outputs: [
|
|
144
|
+
{ name: "assetsRepaid", type: "uint256" },
|
|
145
|
+
{ name: "sharesRepaid", type: "uint256" },
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: "function",
|
|
150
|
+
name: "supplyCollateral",
|
|
151
|
+
stateMutability: "nonpayable",
|
|
152
|
+
inputs: [
|
|
153
|
+
{
|
|
154
|
+
name: "marketParams",
|
|
155
|
+
type: "tuple",
|
|
156
|
+
components: [
|
|
157
|
+
{ name: "loanToken", type: "address" },
|
|
158
|
+
{ name: "collateralToken", type: "address" },
|
|
159
|
+
{ name: "oracle", type: "address" },
|
|
160
|
+
{ name: "irm", type: "address" },
|
|
161
|
+
{ name: "lltv", type: "uint256" },
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
{ name: "assets", type: "uint256" },
|
|
165
|
+
{ name: "onBehalf", type: "address" },
|
|
166
|
+
{ name: "data", type: "bytes" },
|
|
167
|
+
],
|
|
168
|
+
outputs: [],
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: "function",
|
|
172
|
+
name: "withdrawCollateral",
|
|
173
|
+
stateMutability: "nonpayable",
|
|
174
|
+
inputs: [
|
|
175
|
+
{
|
|
176
|
+
name: "marketParams",
|
|
177
|
+
type: "tuple",
|
|
178
|
+
components: [
|
|
179
|
+
{ name: "loanToken", type: "address" },
|
|
180
|
+
{ name: "collateralToken", type: "address" },
|
|
181
|
+
{ name: "oracle", type: "address" },
|
|
182
|
+
{ name: "irm", type: "address" },
|
|
183
|
+
{ name: "lltv", type: "uint256" },
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
{ name: "assets", type: "uint256" },
|
|
187
|
+
{ name: "onBehalf", type: "address" },
|
|
188
|
+
{ name: "receiver", type: "address" },
|
|
189
|
+
],
|
|
190
|
+
outputs: [],
|
|
191
|
+
},
|
|
192
|
+
];
|
|
193
|
+
//# sourceMappingURL=morpho-blue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morpho-blue.js","sourceRoot":"","sources":["../../src/abis/morpho-blue.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;YAC/B,EAA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EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;YACrC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;SACtC;QACD,OAAO,EAAE,EAAE;KACZ;CACO,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const uniswapFactoryAbi: readonly [{
|
|
2
|
+
readonly type: "function";
|
|
3
|
+
readonly name: "getPool";
|
|
4
|
+
readonly stateMutability: "view";
|
|
5
|
+
readonly inputs: readonly [{
|
|
6
|
+
readonly name: "tokenA";
|
|
7
|
+
readonly type: "address";
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "tokenB";
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "fee";
|
|
13
|
+
readonly type: "uint24";
|
|
14
|
+
}];
|
|
15
|
+
readonly outputs: readonly [{
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
}];
|
|
18
|
+
}];
|
|
19
|
+
export declare const uniswapPoolAbi: readonly [{
|
|
20
|
+
readonly type: "function";
|
|
21
|
+
readonly name: "slot0";
|
|
22
|
+
readonly stateMutability: "view";
|
|
23
|
+
readonly inputs: readonly [];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "sqrtPriceX96";
|
|
26
|
+
readonly type: "uint160";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "tick";
|
|
29
|
+
readonly type: "int24";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "observationIndex";
|
|
32
|
+
readonly type: "uint16";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "observationCardinality";
|
|
35
|
+
readonly type: "uint16";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "observationCardinalityNext";
|
|
38
|
+
readonly type: "uint16";
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "feeProtocol";
|
|
41
|
+
readonly type: "uint8";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "unlocked";
|
|
44
|
+
readonly type: "bool";
|
|
45
|
+
}];
|
|
46
|
+
}, {
|
|
47
|
+
readonly type: "function";
|
|
48
|
+
readonly name: "liquidity";
|
|
49
|
+
readonly stateMutability: "view";
|
|
50
|
+
readonly inputs: readonly [];
|
|
51
|
+
readonly outputs: readonly [{
|
|
52
|
+
readonly type: "uint128";
|
|
53
|
+
}];
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "function";
|
|
56
|
+
readonly name: "token0";
|
|
57
|
+
readonly stateMutability: "view";
|
|
58
|
+
readonly inputs: readonly [];
|
|
59
|
+
readonly outputs: readonly [{
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
}];
|
|
62
|
+
}, {
|
|
63
|
+
readonly type: "function";
|
|
64
|
+
readonly name: "token1";
|
|
65
|
+
readonly stateMutability: "view";
|
|
66
|
+
readonly inputs: readonly [];
|
|
67
|
+
readonly outputs: readonly [{
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
}];
|
|
70
|
+
}];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Uniswap V3 Pool + Factory — only what we need for deriving pool address and reading slot0.
|
|
2
|
+
export const uniswapFactoryAbi = [
|
|
3
|
+
{
|
|
4
|
+
type: "function",
|
|
5
|
+
name: "getPool",
|
|
6
|
+
stateMutability: "view",
|
|
7
|
+
inputs: [
|
|
8
|
+
{ name: "tokenA", type: "address" },
|
|
9
|
+
{ name: "tokenB", type: "address" },
|
|
10
|
+
{ name: "fee", type: "uint24" },
|
|
11
|
+
],
|
|
12
|
+
outputs: [{ type: "address" }],
|
|
13
|
+
},
|
|
14
|
+
];
|
|
15
|
+
export const uniswapPoolAbi = [
|
|
16
|
+
{
|
|
17
|
+
type: "function",
|
|
18
|
+
name: "slot0",
|
|
19
|
+
stateMutability: "view",
|
|
20
|
+
inputs: [],
|
|
21
|
+
outputs: [
|
|
22
|
+
{ name: "sqrtPriceX96", type: "uint160" },
|
|
23
|
+
{ name: "tick", type: "int24" },
|
|
24
|
+
{ name: "observationIndex", type: "uint16" },
|
|
25
|
+
{ name: "observationCardinality", type: "uint16" },
|
|
26
|
+
{ name: "observationCardinalityNext", type: "uint16" },
|
|
27
|
+
{ name: "feeProtocol", type: "uint8" },
|
|
28
|
+
{ name: "unlocked", type: "bool" },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "function",
|
|
33
|
+
name: "liquidity",
|
|
34
|
+
stateMutability: "view",
|
|
35
|
+
inputs: [],
|
|
36
|
+
outputs: [{ type: "uint128" }],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: "function",
|
|
40
|
+
name: "token0",
|
|
41
|
+
stateMutability: "view",
|
|
42
|
+
inputs: [],
|
|
43
|
+
outputs: [{ type: "address" }],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "function",
|
|
47
|
+
name: "token1",
|
|
48
|
+
stateMutability: "view",
|
|
49
|
+
inputs: [],
|
|
50
|
+
outputs: [{ type: "address" }],
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
//# sourceMappingURL=uniswap-pool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniswap-pool.js","sourceRoot":"","sources":["../../src/abis/uniswap-pool.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YACnC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;YACnC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE;SAChC;QACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KAC/B;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,cAA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