mantle-agent-kit-sdk 1.1.0 → 1.1.2
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/README.md +401 -0
- package/dist/index.cjs +247 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +629 -550
- package/dist/index.d.ts +629 -550
- package/dist/index.js +246 -50
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,377 @@ import { Hex, Address, WalletClient, Transport, Chain, PublicActions } from 'vie
|
|
|
3
3
|
import { PrivateKeyAccount, Address as Address$1 } from 'viem/accounts';
|
|
4
4
|
import { Erc7811Actions } from 'viem/experimental';
|
|
5
5
|
|
|
6
|
+
declare const PYTH_CONTRACT: {
|
|
7
|
+
readonly mainnet: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729";
|
|
8
|
+
readonly testnet: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603";
|
|
9
|
+
};
|
|
10
|
+
declare const HERMES_ENDPOINT: {
|
|
11
|
+
readonly mainnet: "https://hermes.pyth.network";
|
|
12
|
+
readonly testnet: "https://hermes.pyth.network";
|
|
13
|
+
};
|
|
14
|
+
declare const PYTH_PRICE_FEED_IDS: {
|
|
15
|
+
readonly "BTC/USD": "e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43";
|
|
16
|
+
readonly "ETH/USD": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace";
|
|
17
|
+
readonly "SOL/USD": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d";
|
|
18
|
+
readonly "BNB/USD": "2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f";
|
|
19
|
+
readonly "XRP/USD": "ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8";
|
|
20
|
+
readonly "ADA/USD": "2a01deaec9e51a579277b34b122399984d0bbf57e2458a7e42fecd2829867a0d";
|
|
21
|
+
readonly "DOGE/USD": "dcef50dd0a4cd2dcc17e45df1676dcb336a11a61c69df7a0299b0150c672d25c";
|
|
22
|
+
readonly "DOT/USD": "ca3eed9b267293f6595901c734c7525ce8ef49adafe8284571c8e17d6c926346";
|
|
23
|
+
readonly "AVAX/USD": "93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7";
|
|
24
|
+
readonly "MATIC/USD": "5de33440f6b7d0d7d70f0a7b2a6c0e0b8e5d2f7c8a9b0c1d2e3f4a5b6c7d8e9f";
|
|
25
|
+
readonly "LINK/USD": "8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221";
|
|
26
|
+
readonly "ATOM/USD": "b00b60f88b03a6a625a8d1c048c3f66653edf217439cb6a1cbab0c1c5e8c52bd";
|
|
27
|
+
readonly "LTC/USD": "6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54";
|
|
28
|
+
readonly "UNI/USD": "78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501";
|
|
29
|
+
readonly "NEAR/USD": "c415de8d2eba7db216527dff4b60e8f3a5311c740dadb233e13e12547e226750";
|
|
30
|
+
readonly "TRX/USD": "67aed5a24fdad045475e7195c98a98aea119c763f272d4523f5bac93a4f33c2b";
|
|
31
|
+
readonly "ARB/USD": "3fa4252848f9f0a1480be62745a4629d9eb1322aebab8a791e344b3b9c1adcf5";
|
|
32
|
+
readonly "OP/USD": "385f64d993f7b77d8182ed5003d97c60aa3361f3cecfe711544d2d59165e9bdf";
|
|
33
|
+
readonly "MNT/USD": "4e3037c822d852d79af3ac80e35eb420ee3b870dca49f9344a38ef4773fb0585";
|
|
34
|
+
readonly "IMX/USD": "941320a8989414a6d2c757c8c6c52b3e7e0b7e4e4c5bb8a3c8e7a0f3e0f0f0f0";
|
|
35
|
+
readonly "STRK/USD": "6a182399ff70ccf3e06024898942028204125a819e519a335ffa4579e66cd870";
|
|
36
|
+
readonly "AAVE/USD": "2b9ab1e972a281585084148ba1389800799bd4be63b957507db1349314e47445";
|
|
37
|
+
readonly "CRV/USD": "a19d04ac696c7a6616d291c7e5d1377cc8be437c327b75adb5dc1bad745fcae8";
|
|
38
|
+
readonly "MKR/USD": "9375299e31c0deb9c6bc378e6329aab44cb48ec655552a70d4b9050346a30378";
|
|
39
|
+
readonly "SNX/USD": "39d020f60982ed892abbcd4a06a276a9f9b7bfbce003204c110b6e488f502da3";
|
|
40
|
+
readonly "COMP/USD": "4a8e42861cabc5ecb50996f92e7cfa2bce3fd0a2423b0c44c9b423fb2bd25478";
|
|
41
|
+
readonly "LDO/USD": "c63e2a7f37a04e5e614c07238bedb25dcc38927e77a90a4b21a7a2e1d7f0d2e3";
|
|
42
|
+
readonly "1INCH/USD": "63f341689d98a12ef60a5cff1d7f85c70a9e17bf1575f0e7c0b2512d48b1c8b3";
|
|
43
|
+
readonly "SUSHI/USD": "26e4f737fde0263a9eea10ae63ac36dcedab2aaf629f1e31a28a28dd0e0d2b0c";
|
|
44
|
+
readonly "YFI/USD": "425f4b198ab2504936886c1e93511bb6720fbcf2045a4f3c0723bb213846022f";
|
|
45
|
+
readonly "BAL/USD": "07ad7b4a7662d19a6bc675f6b467172d2f3947fa653ca97555a9b20236406628";
|
|
46
|
+
readonly "CAKE/USD": "2356af9529a1064d1d2a2e3e4ab6d6e6f6e6f6e6f6e6f6e6f6e6f6e6f6e6f6e6";
|
|
47
|
+
readonly "GMX/USD": "b962539d0fcb272a494d65ea56f94851c2bcf8823935da05bd628916e2e9edbf";
|
|
48
|
+
readonly "PENDLE/USD": "9a4df90b25497f66b1afb012467e316e801ca3d839456db028892fe8c70c8016";
|
|
49
|
+
readonly "JOE/USD": "1e8a156c8a23c1e56f2d9d7f0e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e";
|
|
50
|
+
readonly "USDC/USD": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a";
|
|
51
|
+
readonly "USDT/USD": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b";
|
|
52
|
+
readonly "DAI/USD": "b0948a5e5313200c632b51bb5ca32f6de0d36e9950a942d19751e833f70dabfd";
|
|
53
|
+
readonly "FRAX/USD": "c3d5d8d6d0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0";
|
|
54
|
+
readonly "BUSD/USD": "5bc91f13e412c07599167bae86f07543f076a638962b8d6017ec19dab4a82814";
|
|
55
|
+
readonly "TUSD/USD": "433faaa801ecda2c0bbfa8f4e2d85fd4c310e2c1e5f8f8e6e5f5f5f5f5f5f5f5";
|
|
56
|
+
readonly "LUSD/USD": "d892ae586f4e0fbeee4d64f29ed6e89b1b3e2e2e2e2e2e2e2e2e2e2e2e2e2e2e";
|
|
57
|
+
readonly "WETH/USD": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace";
|
|
58
|
+
readonly "WBTC/USD": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33";
|
|
59
|
+
readonly "stETH/USD": "846ae1bdb6300b817cee5fdee2a6da192775030db5615b94a465f53bd40850b5";
|
|
60
|
+
readonly "cbETH/USD": "15ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce5717";
|
|
61
|
+
readonly "rETH/USD": "a0255134973f4fdf2f8f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f";
|
|
62
|
+
readonly "mETH/USD": "4c9c6f9f0cde13fced52dc1927c8c06a91b1a65ab77b9e1ec1c614963ce90dd4";
|
|
63
|
+
readonly "wstETH/USD": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784";
|
|
64
|
+
readonly "SHIB/USD": "f0d57deca57b3da2fe63a493f4c25925fdfd8edf834b20f93e1f84dbd1504d4a";
|
|
65
|
+
readonly "PEPE/USD": "d69731a2e74ac1ce884fc3890f7ee324b6deb66147055249568869ed700882e4";
|
|
66
|
+
readonly "FLOKI/USD": "6b1381ce7e874dc5410b197ac8348162c0dd6c0d4c9cd6322c28a6f7f4d1a2d2";
|
|
67
|
+
readonly "BONK/USD": "72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419";
|
|
68
|
+
readonly "WIF/USD": "4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc";
|
|
69
|
+
readonly "AXS/USD": "b0d8f5e3f3a7c0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0";
|
|
70
|
+
readonly "SAND/USD": "f4040ec3e5b71c241a7e1a9a1e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e";
|
|
71
|
+
readonly "MANA/USD": "2b15e4bded7f5e5d5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a";
|
|
72
|
+
readonly "GALA/USD": "e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3";
|
|
73
|
+
readonly "APE/USD": "15add95022ae13563a11992e727c91bdb6b55bc183d9d747436c80a483d8c864";
|
|
74
|
+
readonly "ENJ/USD": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a";
|
|
75
|
+
readonly "FIL/USD": "150ac9b959aee0051e4091f0ef5216d941f590e1c5e7f91cf7635b5c11628c0e";
|
|
76
|
+
readonly "GRT/USD": "4d1f8dae0d96236fb98e8f47571a70f41c8b8f2f6d6c0e0e0e0e0e0e0e0e0e0e";
|
|
77
|
+
readonly "RNDR/USD": "ab7347771135fc733f8f38db462ba085ed3309955f42554a14fa13e855ac0e2f";
|
|
78
|
+
readonly "INJ/USD": "7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff592";
|
|
79
|
+
readonly "AR/USD": "8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c";
|
|
80
|
+
readonly "THETA/USD": "4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a";
|
|
81
|
+
readonly "PYTH/USD": "0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff";
|
|
82
|
+
readonly "FET/USD": "b49ee9d8ccf9b6e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0";
|
|
83
|
+
readonly "OCEAN/USD": "2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d";
|
|
84
|
+
readonly "TAO/USD": "410f41de235f2dbdf41f1a808c1e15f6a9e7d6a7b8c9d0e1f2a3b4c5d6e7f8a9";
|
|
85
|
+
readonly "FTT/USD": "6c75e52531ec5fd3ef253f6062956a8508a2f03fa0a209fb7dbc0d0f3d6f6f6f";
|
|
86
|
+
readonly "CRO/USD": "b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7";
|
|
87
|
+
readonly "OKB/USD": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744";
|
|
88
|
+
readonly "EUR/USD": "a995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b";
|
|
89
|
+
readonly "GBP/USD": "84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1";
|
|
90
|
+
readonly "JPY/USD": "ef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52";
|
|
91
|
+
readonly "AUD/USD": "67a6f93030f4217f2e8f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f";
|
|
92
|
+
readonly "CAD/USD": "9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a";
|
|
93
|
+
readonly "XAU/USD": "765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2";
|
|
94
|
+
readonly "XAG/USD": "f2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e";
|
|
95
|
+
readonly "WTI/USD": "c9c8e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9";
|
|
96
|
+
readonly "BRENT/USD": "d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8";
|
|
97
|
+
readonly "AAPL/USD": "49f6b65cb1de6b10eaf75e7c03ca029c306d0357e91b5311b175084a5ad55688";
|
|
98
|
+
readonly "NVDA/USD": "b1073854ed24cbc755dc527418f52b7d271f6cc967bbf8d8129112b18860a593";
|
|
99
|
+
readonly "TSLA/USD": "16dad506d7db8da01c87581c87ca897a012a153557d4d578c3b9c9e1bc0632f1";
|
|
100
|
+
readonly "GOOGL/USD": "b7e3904c08ddd9c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0";
|
|
101
|
+
readonly "AMZN/USD": "c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6";
|
|
102
|
+
readonly "MSFT/USD": "d0ca23c1cc005e004ccf1db5bf76aeb6a49218f43dac3d4b275e92de12ea4b77";
|
|
103
|
+
readonly "META/USD": "a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4";
|
|
104
|
+
readonly "COIN/USD": "9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b";
|
|
105
|
+
readonly "SPY/USD": "19e09bb805456ada3979a7d1cbb4b6d63babc3a0f8e8a9b3c4d5e6f7a8b9c0d1";
|
|
106
|
+
readonly "QQQ/USD": "2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e";
|
|
107
|
+
};
|
|
108
|
+
declare const PYTH_ABI: readonly [{
|
|
109
|
+
readonly inputs: readonly [{
|
|
110
|
+
readonly name: "id";
|
|
111
|
+
readonly type: "bytes32";
|
|
112
|
+
}];
|
|
113
|
+
readonly name: "getPrice";
|
|
114
|
+
readonly outputs: readonly [{
|
|
115
|
+
readonly components: readonly [{
|
|
116
|
+
readonly name: "price";
|
|
117
|
+
readonly type: "int64";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "conf";
|
|
120
|
+
readonly type: "uint64";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "expo";
|
|
123
|
+
readonly type: "int32";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "publishTime";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
}];
|
|
128
|
+
readonly name: "";
|
|
129
|
+
readonly type: "tuple";
|
|
130
|
+
}];
|
|
131
|
+
readonly stateMutability: "view";
|
|
132
|
+
readonly type: "function";
|
|
133
|
+
}, {
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly name: "id";
|
|
136
|
+
readonly type: "bytes32";
|
|
137
|
+
}];
|
|
138
|
+
readonly name: "getPriceNoOlderThan";
|
|
139
|
+
readonly outputs: readonly [{
|
|
140
|
+
readonly components: readonly [{
|
|
141
|
+
readonly name: "price";
|
|
142
|
+
readonly type: "int64";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "conf";
|
|
145
|
+
readonly type: "uint64";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "expo";
|
|
148
|
+
readonly type: "int32";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "publishTime";
|
|
151
|
+
readonly type: "uint256";
|
|
152
|
+
}];
|
|
153
|
+
readonly name: "";
|
|
154
|
+
readonly type: "tuple";
|
|
155
|
+
}];
|
|
156
|
+
readonly stateMutability: "view";
|
|
157
|
+
readonly type: "function";
|
|
158
|
+
}, {
|
|
159
|
+
readonly inputs: readonly [{
|
|
160
|
+
readonly name: "id";
|
|
161
|
+
readonly type: "bytes32";
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "age";
|
|
164
|
+
readonly type: "uint256";
|
|
165
|
+
}];
|
|
166
|
+
readonly name: "getPriceNoOlderThan";
|
|
167
|
+
readonly outputs: readonly [{
|
|
168
|
+
readonly components: readonly [{
|
|
169
|
+
readonly name: "price";
|
|
170
|
+
readonly type: "int64";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "conf";
|
|
173
|
+
readonly type: "uint64";
|
|
174
|
+
}, {
|
|
175
|
+
readonly name: "expo";
|
|
176
|
+
readonly type: "int32";
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "publishTime";
|
|
179
|
+
readonly type: "uint256";
|
|
180
|
+
}];
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly type: "tuple";
|
|
183
|
+
}];
|
|
184
|
+
readonly stateMutability: "view";
|
|
185
|
+
readonly type: "function";
|
|
186
|
+
}, {
|
|
187
|
+
readonly inputs: readonly [{
|
|
188
|
+
readonly name: "id";
|
|
189
|
+
readonly type: "bytes32";
|
|
190
|
+
}];
|
|
191
|
+
readonly name: "getPriceUnsafe";
|
|
192
|
+
readonly outputs: readonly [{
|
|
193
|
+
readonly components: readonly [{
|
|
194
|
+
readonly name: "price";
|
|
195
|
+
readonly type: "int64";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "conf";
|
|
198
|
+
readonly type: "uint64";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "expo";
|
|
201
|
+
readonly type: "int32";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "publishTime";
|
|
204
|
+
readonly type: "uint256";
|
|
205
|
+
}];
|
|
206
|
+
readonly name: "";
|
|
207
|
+
readonly type: "tuple";
|
|
208
|
+
}];
|
|
209
|
+
readonly stateMutability: "view";
|
|
210
|
+
readonly type: "function";
|
|
211
|
+
}, {
|
|
212
|
+
readonly inputs: readonly [{
|
|
213
|
+
readonly name: "id";
|
|
214
|
+
readonly type: "bytes32";
|
|
215
|
+
}];
|
|
216
|
+
readonly name: "getEmaPrice";
|
|
217
|
+
readonly outputs: readonly [{
|
|
218
|
+
readonly components: readonly [{
|
|
219
|
+
readonly name: "price";
|
|
220
|
+
readonly type: "int64";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "conf";
|
|
223
|
+
readonly type: "uint64";
|
|
224
|
+
}, {
|
|
225
|
+
readonly name: "expo";
|
|
226
|
+
readonly type: "int32";
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "publishTime";
|
|
229
|
+
readonly type: "uint256";
|
|
230
|
+
}];
|
|
231
|
+
readonly name: "";
|
|
232
|
+
readonly type: "tuple";
|
|
233
|
+
}];
|
|
234
|
+
readonly stateMutability: "view";
|
|
235
|
+
readonly type: "function";
|
|
236
|
+
}, {
|
|
237
|
+
readonly inputs: readonly [{
|
|
238
|
+
readonly name: "updateData";
|
|
239
|
+
readonly type: "bytes[]";
|
|
240
|
+
}];
|
|
241
|
+
readonly name: "updatePriceFeeds";
|
|
242
|
+
readonly outputs: readonly [];
|
|
243
|
+
readonly stateMutability: "payable";
|
|
244
|
+
readonly type: "function";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [{
|
|
247
|
+
readonly name: "updateData";
|
|
248
|
+
readonly type: "bytes[]";
|
|
249
|
+
}];
|
|
250
|
+
readonly name: "getUpdateFee";
|
|
251
|
+
readonly outputs: readonly [{
|
|
252
|
+
readonly name: "feeAmount";
|
|
253
|
+
readonly type: "uint256";
|
|
254
|
+
}];
|
|
255
|
+
readonly stateMutability: "view";
|
|
256
|
+
readonly type: "function";
|
|
257
|
+
}, {
|
|
258
|
+
readonly inputs: readonly [{
|
|
259
|
+
readonly name: "id";
|
|
260
|
+
readonly type: "bytes32";
|
|
261
|
+
}];
|
|
262
|
+
readonly name: "priceFeedExists";
|
|
263
|
+
readonly outputs: readonly [{
|
|
264
|
+
readonly name: "";
|
|
265
|
+
readonly type: "bool";
|
|
266
|
+
}];
|
|
267
|
+
readonly stateMutability: "view";
|
|
268
|
+
readonly type: "function";
|
|
269
|
+
}, {
|
|
270
|
+
readonly inputs: readonly [{
|
|
271
|
+
readonly name: "updateData";
|
|
272
|
+
readonly type: "bytes[]";
|
|
273
|
+
}, {
|
|
274
|
+
readonly name: "priceIds";
|
|
275
|
+
readonly type: "bytes32[]";
|
|
276
|
+
}, {
|
|
277
|
+
readonly name: "minPublishTime";
|
|
278
|
+
readonly type: "uint64";
|
|
279
|
+
}, {
|
|
280
|
+
readonly name: "maxPublishTime";
|
|
281
|
+
readonly type: "uint64";
|
|
282
|
+
}];
|
|
283
|
+
readonly name: "parsePriceFeedUpdates";
|
|
284
|
+
readonly outputs: readonly [{
|
|
285
|
+
readonly components: readonly [{
|
|
286
|
+
readonly name: "id";
|
|
287
|
+
readonly type: "bytes32";
|
|
288
|
+
}, {
|
|
289
|
+
readonly components: readonly [{
|
|
290
|
+
readonly name: "price";
|
|
291
|
+
readonly type: "int64";
|
|
292
|
+
}, {
|
|
293
|
+
readonly name: "conf";
|
|
294
|
+
readonly type: "uint64";
|
|
295
|
+
}, {
|
|
296
|
+
readonly name: "expo";
|
|
297
|
+
readonly type: "int32";
|
|
298
|
+
}, {
|
|
299
|
+
readonly name: "publishTime";
|
|
300
|
+
readonly type: "uint256";
|
|
301
|
+
}];
|
|
302
|
+
readonly name: "price";
|
|
303
|
+
readonly type: "tuple";
|
|
304
|
+
}, {
|
|
305
|
+
readonly components: readonly [{
|
|
306
|
+
readonly name: "price";
|
|
307
|
+
readonly type: "int64";
|
|
308
|
+
}, {
|
|
309
|
+
readonly name: "conf";
|
|
310
|
+
readonly type: "uint64";
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "expo";
|
|
313
|
+
readonly type: "int32";
|
|
314
|
+
}, {
|
|
315
|
+
readonly name: "publishTime";
|
|
316
|
+
readonly type: "uint256";
|
|
317
|
+
}];
|
|
318
|
+
readonly name: "emaPrice";
|
|
319
|
+
readonly type: "tuple";
|
|
320
|
+
}];
|
|
321
|
+
readonly name: "";
|
|
322
|
+
readonly type: "tuple[]";
|
|
323
|
+
}];
|
|
324
|
+
readonly stateMutability: "payable";
|
|
325
|
+
readonly type: "function";
|
|
326
|
+
}];
|
|
327
|
+
interface PythPriceData {
|
|
328
|
+
price: bigint;
|
|
329
|
+
conf: bigint;
|
|
330
|
+
expo: number;
|
|
331
|
+
publishTime: bigint;
|
|
332
|
+
}
|
|
333
|
+
interface PythPriceResponse {
|
|
334
|
+
priceFeedId: string;
|
|
335
|
+
pair: string;
|
|
336
|
+
price: string;
|
|
337
|
+
confidence: string;
|
|
338
|
+
exponent: number;
|
|
339
|
+
publishTime: number;
|
|
340
|
+
formattedPrice: string;
|
|
341
|
+
}
|
|
342
|
+
interface PythTokenPriceResponse {
|
|
343
|
+
tokenAddress: string;
|
|
344
|
+
tokenSymbol: string;
|
|
345
|
+
pair: string;
|
|
346
|
+
priceFeedId: string;
|
|
347
|
+
priceUsd: string;
|
|
348
|
+
confidence: string;
|
|
349
|
+
exponent: number;
|
|
350
|
+
publishTime: number;
|
|
351
|
+
lastUpdated: string;
|
|
352
|
+
}
|
|
353
|
+
declare const TOKEN_ADDRESS_TO_PRICE_FEED: Record<string, {
|
|
354
|
+
pair: string;
|
|
355
|
+
feedId: string;
|
|
356
|
+
}>;
|
|
357
|
+
declare function isTokenAddress(input: string): boolean;
|
|
358
|
+
declare function resolvePriceFeedInput(input: string): {
|
|
359
|
+
pair: string;
|
|
360
|
+
feedId: string;
|
|
361
|
+
} | null;
|
|
362
|
+
|
|
363
|
+
declare const index$c_HERMES_ENDPOINT: typeof HERMES_ENDPOINT;
|
|
364
|
+
declare const index$c_PYTH_ABI: typeof PYTH_ABI;
|
|
365
|
+
declare const index$c_PYTH_CONTRACT: typeof PYTH_CONTRACT;
|
|
366
|
+
declare const index$c_PYTH_PRICE_FEED_IDS: typeof PYTH_PRICE_FEED_IDS;
|
|
367
|
+
type index$c_PythPriceData = PythPriceData;
|
|
368
|
+
type index$c_PythPriceResponse = PythPriceResponse;
|
|
369
|
+
type index$c_PythTokenPriceResponse = PythTokenPriceResponse;
|
|
370
|
+
declare const index$c_TOKEN_ADDRESS_TO_PRICE_FEED: typeof TOKEN_ADDRESS_TO_PRICE_FEED;
|
|
371
|
+
declare const index$c_isTokenAddress: typeof isTokenAddress;
|
|
372
|
+
declare const index$c_resolvePriceFeedInput: typeof resolvePriceFeedInput;
|
|
373
|
+
declare namespace index$c {
|
|
374
|
+
export { index$c_HERMES_ENDPOINT as HERMES_ENDPOINT, index$c_PYTH_ABI as PYTH_ABI, index$c_PYTH_CONTRACT as PYTH_CONTRACT, index$c_PYTH_PRICE_FEED_IDS as PYTH_PRICE_FEED_IDS, type index$c_PythPriceData as PythPriceData, type index$c_PythPriceResponse as PythPriceResponse, type index$c_PythTokenPriceResponse as PythTokenPriceResponse, index$c_TOKEN_ADDRESS_TO_PRICE_FEED as TOKEN_ADDRESS_TO_PRICE_FEED, index$c_isTokenAddress as isTokenAddress, index$c_resolvePriceFeedInput as resolvePriceFeedInput };
|
|
375
|
+
}
|
|
376
|
+
|
|
6
377
|
interface OpenPositionResult$1 {
|
|
7
378
|
positionId: bigint;
|
|
8
379
|
txHash: Hex;
|
|
@@ -201,12 +572,12 @@ declare const FEE_TIERS$1: {
|
|
|
201
572
|
};
|
|
202
573
|
declare const DEFAULT_POOL_FEE: 3000;
|
|
203
574
|
|
|
204
|
-
declare const index$
|
|
205
|
-
declare const index$
|
|
206
|
-
declare const index$
|
|
207
|
-
declare const index$
|
|
208
|
-
declare namespace index$
|
|
209
|
-
export { index$
|
|
575
|
+
declare const index$b_DEFAULT_POOL_FEE: typeof DEFAULT_POOL_FEE;
|
|
576
|
+
declare const index$b_FACTORY_ADDRESS: typeof FACTORY_ADDRESS;
|
|
577
|
+
declare const index$b_QUOTER_V2_ADDRESS: typeof QUOTER_V2_ADDRESS;
|
|
578
|
+
declare const index$b_SWAP_ROUTER_ADDRESS: typeof SWAP_ROUTER_ADDRESS;
|
|
579
|
+
declare namespace index$b {
|
|
580
|
+
export { index$b_DEFAULT_POOL_FEE as DEFAULT_POOL_FEE, index$b_FACTORY_ADDRESS as FACTORY_ADDRESS, FEE_TIERS$1 as FEE_TIERS, NATIVE_TOKEN_ADDRESS$3 as NATIVE_TOKEN_ADDRESS, index$b_QUOTER_V2_ADDRESS as QUOTER_V2_ADDRESS, index$b_SWAP_ROUTER_ADDRESS as SWAP_ROUTER_ADDRESS, WMNT_ADDRESS$1 as WMNT_ADDRESS };
|
|
210
581
|
}
|
|
211
582
|
|
|
212
583
|
interface UniswapQuoteResult {
|
|
@@ -326,623 +697,291 @@ interface LendlePosition {
|
|
|
326
697
|
symbol: string;
|
|
327
698
|
supplied: bigint;
|
|
328
699
|
stableDebt: bigint;
|
|
329
|
-
variableDebt: bigint;
|
|
330
|
-
totalDebt: bigint;
|
|
331
|
-
liquidityRate: bigint;
|
|
332
|
-
stableBorrowRate: bigint;
|
|
333
|
-
usageAsCollateralEnabled: boolean;
|
|
334
|
-
}
|
|
335
|
-
interface LendlePositionsResult {
|
|
336
|
-
positions: LendlePosition[];
|
|
337
|
-
totalSupplied: bigint;
|
|
338
|
-
totalDebt: bigint;
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Get all Lendle positions for a user
|
|
342
|
-
* Returns per-token supply and borrow amounts
|
|
343
|
-
* @param agent - MNTAgentKit instance
|
|
344
|
-
* @param userAddress - User wallet address (optional, defaults to agent account)
|
|
345
|
-
* @returns Array of positions with supply/borrow amounts per asset
|
|
346
|
-
*/
|
|
347
|
-
declare function lendleGetPositions(agent: MNTAgentKit, userAddress?: Address): Promise<LendlePositionsResult>;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Swap tokens on Agni Finance DEX
|
|
351
|
-
* @param agent - MNTAgentKit instance
|
|
352
|
-
* @param tokenIn - Input token address
|
|
353
|
-
* @param tokenOut - Output token address
|
|
354
|
-
* @param amountIn - Amount to swap (in smallest units)
|
|
355
|
-
* @param slippagePercent - Slippage tolerance (default: 0.5%)
|
|
356
|
-
* @param feeTier - Pool fee tier (default: MEDIUM = 0.3%)
|
|
357
|
-
* @returns Transaction hash
|
|
358
|
-
*/
|
|
359
|
-
declare function agniSwap(agent: MNTAgentKit, tokenIn: Address, tokenOut: Address, amountIn: string, slippagePercent?: number, feeTier?: number): Promise<Hex>;
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Swap tokens on Merchant Moe DEX
|
|
363
|
-
* @param agent - MNTAgentKit instance
|
|
364
|
-
* @param tokenIn - Input token address
|
|
365
|
-
* @param tokenOut - Output token address
|
|
366
|
-
* @param amountIn - Amount to swap (in smallest units)
|
|
367
|
-
* @param slippagePercent - Slippage tolerance (default: 0.5%)
|
|
368
|
-
* @returns Transaction hash
|
|
369
|
-
*/
|
|
370
|
-
declare function merchantMoeSwap(agent: MNTAgentKit, tokenIn: Address, tokenOut: Address, amountIn: string, slippagePercent?: number): Promise<Hex>;
|
|
371
|
-
|
|
372
|
-
declare const METH_TOKEN: {
|
|
373
|
-
readonly mainnet: "0xcDA86A272531e8640cD7F1a92c01839911B90bb0";
|
|
374
|
-
readonly testnet: "0x0000000000000000000000000000000000000000";
|
|
375
|
-
};
|
|
376
|
-
declare const WETH_TOKEN: {
|
|
377
|
-
readonly mainnet: "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111";
|
|
378
|
-
readonly testnet: "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111";
|
|
379
|
-
};
|
|
380
|
-
declare const WMNT_TOKEN: {
|
|
381
|
-
readonly mainnet: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8";
|
|
382
|
-
readonly testnet: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8";
|
|
383
|
-
};
|
|
384
|
-
declare const NATIVE_MNT_ADDRESS: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
385
|
-
declare const METH_ABI: readonly [{
|
|
386
|
-
readonly inputs: readonly [{
|
|
387
|
-
readonly name: "account";
|
|
388
|
-
readonly type: "address";
|
|
389
|
-
}];
|
|
390
|
-
readonly name: "balanceOf";
|
|
391
|
-
readonly outputs: readonly [{
|
|
392
|
-
readonly name: "";
|
|
393
|
-
readonly type: "uint256";
|
|
394
|
-
}];
|
|
395
|
-
readonly stateMutability: "view";
|
|
396
|
-
readonly type: "function";
|
|
397
|
-
}, {
|
|
398
|
-
readonly inputs: readonly [];
|
|
399
|
-
readonly name: "totalSupply";
|
|
400
|
-
readonly outputs: readonly [{
|
|
401
|
-
readonly name: "";
|
|
402
|
-
readonly type: "uint256";
|
|
403
|
-
}];
|
|
404
|
-
readonly stateMutability: "view";
|
|
405
|
-
readonly type: "function";
|
|
406
|
-
}, {
|
|
407
|
-
readonly inputs: readonly [];
|
|
408
|
-
readonly name: "decimals";
|
|
409
|
-
readonly outputs: readonly [{
|
|
410
|
-
readonly name: "";
|
|
411
|
-
readonly type: "uint8";
|
|
412
|
-
}];
|
|
413
|
-
readonly stateMutability: "view";
|
|
414
|
-
readonly type: "function";
|
|
415
|
-
}, {
|
|
416
|
-
readonly inputs: readonly [];
|
|
417
|
-
readonly name: "symbol";
|
|
418
|
-
readonly outputs: readonly [{
|
|
419
|
-
readonly name: "";
|
|
420
|
-
readonly type: "string";
|
|
421
|
-
}];
|
|
422
|
-
readonly stateMutability: "view";
|
|
423
|
-
readonly type: "function";
|
|
424
|
-
}, {
|
|
425
|
-
readonly inputs: readonly [{
|
|
426
|
-
readonly name: "spender";
|
|
427
|
-
readonly type: "address";
|
|
428
|
-
}, {
|
|
429
|
-
readonly name: "amount";
|
|
430
|
-
readonly type: "uint256";
|
|
431
|
-
}];
|
|
432
|
-
readonly name: "approve";
|
|
433
|
-
readonly outputs: readonly [{
|
|
434
|
-
readonly name: "";
|
|
435
|
-
readonly type: "bool";
|
|
436
|
-
}];
|
|
437
|
-
readonly stateMutability: "nonpayable";
|
|
438
|
-
readonly type: "function";
|
|
439
|
-
}, {
|
|
440
|
-
readonly inputs: readonly [{
|
|
441
|
-
readonly name: "owner";
|
|
442
|
-
readonly type: "address";
|
|
443
|
-
}, {
|
|
444
|
-
readonly name: "spender";
|
|
445
|
-
readonly type: "address";
|
|
446
|
-
}];
|
|
447
|
-
readonly name: "allowance";
|
|
448
|
-
readonly outputs: readonly [{
|
|
449
|
-
readonly name: "";
|
|
450
|
-
readonly type: "uint256";
|
|
451
|
-
}];
|
|
452
|
-
readonly stateMutability: "view";
|
|
453
|
-
readonly type: "function";
|
|
454
|
-
}];
|
|
455
|
-
|
|
456
|
-
declare const index$b_METH_ABI: typeof METH_ABI;
|
|
457
|
-
declare const index$b_METH_TOKEN: typeof METH_TOKEN;
|
|
458
|
-
declare const index$b_NATIVE_MNT_ADDRESS: typeof NATIVE_MNT_ADDRESS;
|
|
459
|
-
declare const index$b_WETH_TOKEN: typeof WETH_TOKEN;
|
|
460
|
-
declare const index$b_WMNT_TOKEN: typeof WMNT_TOKEN;
|
|
461
|
-
declare namespace index$b {
|
|
462
|
-
export { index$b_METH_ABI as METH_ABI, index$b_METH_TOKEN as METH_TOKEN, index$b_NATIVE_MNT_ADDRESS as NATIVE_MNT_ADDRESS, index$b_WETH_TOKEN as WETH_TOKEN, index$b_WMNT_TOKEN as WMNT_TOKEN };
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
interface MethPosition {
|
|
466
|
-
methBalance: bigint;
|
|
467
|
-
wethBalance: bigint;
|
|
468
|
-
wmntBalance: bigint;
|
|
469
|
-
methTokenAddress: Address;
|
|
470
|
-
wethTokenAddress: Address;
|
|
471
|
-
wmntTokenAddress: Address;
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Get mETH position for a user
|
|
475
|
-
* Returns mETH balance, WETH balance (for swaps), and WMNT balance
|
|
476
|
-
* @param agent - MNTAgentKit instance
|
|
477
|
-
* @param userAddress - User wallet address (optional, defaults to agent account)
|
|
478
|
-
* @returns mETH position with balances
|
|
479
|
-
*/
|
|
480
|
-
declare function methGetPosition(agent: MNTAgentKit, userAddress?: Address): Promise<MethPosition>;
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Swap WETH to mETH using DEX aggregator
|
|
484
|
-
* This is the L2 way to acquire mETH - swap via DEX
|
|
485
|
-
* @param agent - MNTAgentKit instance
|
|
486
|
-
* @param amount - Amount of WETH to swap (in wei as string)
|
|
487
|
-
* @param slippage - Slippage tolerance percentage (default 0.5%)
|
|
488
|
-
* @returns Transaction hash
|
|
489
|
-
*/
|
|
490
|
-
declare function swapToMeth(agent: MNTAgentKit, amount: string, slippage?: number): Promise<Hex>;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Swap mETH to WETH using DEX aggregator
|
|
494
|
-
* This is the L2 way to exit mETH position - swap via DEX
|
|
495
|
-
* @param agent - MNTAgentKit instance
|
|
496
|
-
* @param amount - Amount of mETH to swap (in wei as string)
|
|
497
|
-
* @param slippage - Slippage tolerance percentage (default 0.5%)
|
|
498
|
-
* @returns Transaction hash
|
|
499
|
-
*/
|
|
500
|
-
declare function swapFromMeth(agent: MNTAgentKit, amount: string, slippage?: number): Promise<Hex>;
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Close an existing position on PikePerps
|
|
504
|
-
* @param agent - MNTAgentKit instance
|
|
505
|
-
* @param positionId - Position ID to close
|
|
506
|
-
* @returns Transaction hash
|
|
507
|
-
*/
|
|
508
|
-
declare function pikeperpsClosePosition(agent: MNTAgentKit, positionId: bigint): Promise<Hex>;
|
|
509
|
-
|
|
510
|
-
interface PikePerpsPosition {
|
|
511
|
-
positionId: bigint;
|
|
512
|
-
token: Address;
|
|
513
|
-
isLong: boolean;
|
|
514
|
-
size: bigint;
|
|
515
|
-
margin: bigint;
|
|
516
|
-
leverage: number;
|
|
517
|
-
entryPrice: bigint;
|
|
518
|
-
entryTime: bigint;
|
|
519
|
-
currentPrice: bigint;
|
|
520
|
-
pnl: bigint;
|
|
521
|
-
isProfit: boolean;
|
|
522
|
-
liquidationPrice: bigint;
|
|
523
|
-
isOpen: boolean;
|
|
700
|
+
variableDebt: bigint;
|
|
701
|
+
totalDebt: bigint;
|
|
702
|
+
liquidityRate: bigint;
|
|
703
|
+
stableBorrowRate: bigint;
|
|
704
|
+
usageAsCollateralEnabled: boolean;
|
|
705
|
+
}
|
|
706
|
+
interface LendlePositionsResult {
|
|
707
|
+
positions: LendlePosition[];
|
|
708
|
+
totalSupplied: bigint;
|
|
709
|
+
totalDebt: bigint;
|
|
524
710
|
}
|
|
525
711
|
/**
|
|
526
|
-
* Get all positions for a user
|
|
527
|
-
* Returns
|
|
712
|
+
* Get all Lendle positions for a user
|
|
713
|
+
* Returns per-token supply and borrow amounts
|
|
528
714
|
* @param agent - MNTAgentKit instance
|
|
529
715
|
* @param userAddress - User wallet address (optional, defaults to agent account)
|
|
530
|
-
* @returns Array of positions with
|
|
716
|
+
* @returns Array of positions with supply/borrow amounts per asset
|
|
531
717
|
*/
|
|
532
|
-
declare function
|
|
718
|
+
declare function lendleGetPositions(agent: MNTAgentKit, userAddress?: Address): Promise<LendlePositionsResult>;
|
|
533
719
|
|
|
534
|
-
interface PikePerpsTrade {
|
|
535
|
-
positionId: bigint;
|
|
536
|
-
trader: Address;
|
|
537
|
-
token: Address;
|
|
538
|
-
isLong: boolean;
|
|
539
|
-
size: bigint;
|
|
540
|
-
margin: bigint;
|
|
541
|
-
leverage: bigint;
|
|
542
|
-
entryPrice: bigint;
|
|
543
|
-
timestamp: number;
|
|
544
|
-
txHash: Hex;
|
|
545
|
-
blockNumber: bigint;
|
|
546
|
-
}
|
|
547
|
-
interface PikePerpsMarketData {
|
|
548
|
-
token: Address;
|
|
549
|
-
currentPrice: bigint;
|
|
550
|
-
hasPrice: boolean;
|
|
551
|
-
isListed: boolean;
|
|
552
|
-
curveProgress: bigint;
|
|
553
|
-
recentTrades: PikePerpsTrade[];
|
|
554
|
-
}
|
|
555
720
|
/**
|
|
556
|
-
*
|
|
557
|
-
* Returns current price and recent trades
|
|
721
|
+
* Swap tokens on Agni Finance DEX
|
|
558
722
|
* @param agent - MNTAgentKit instance
|
|
559
|
-
* @param
|
|
560
|
-
* @param
|
|
561
|
-
* @
|
|
723
|
+
* @param tokenIn - Input token address
|
|
724
|
+
* @param tokenOut - Output token address
|
|
725
|
+
* @param amountIn - Amount to swap (in smallest units)
|
|
726
|
+
* @param slippagePercent - Slippage tolerance (default: 0.5%)
|
|
727
|
+
* @param feeTier - Pool fee tier (default: MEDIUM = 0.3%)
|
|
728
|
+
* @returns Transaction hash
|
|
562
729
|
*/
|
|
563
|
-
declare function
|
|
730
|
+
declare function agniSwap(agent: MNTAgentKit, tokenIn: Address, tokenOut: Address, amountIn: string, slippagePercent?: number, feeTier?: number): Promise<Hex>;
|
|
564
731
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
732
|
+
/**
|
|
733
|
+
* Swap tokens on Merchant Moe DEX
|
|
734
|
+
* @param agent - MNTAgentKit instance
|
|
735
|
+
* @param tokenIn - Input token address
|
|
736
|
+
* @param tokenOut - Output token address
|
|
737
|
+
* @param amountIn - Amount to swap (in smallest units)
|
|
738
|
+
* @param slippagePercent - Slippage tolerance (default: 0.5%)
|
|
739
|
+
* @returns Transaction hash
|
|
740
|
+
*/
|
|
741
|
+
declare function merchantMoeSwap(agent: MNTAgentKit, tokenIn: Address, tokenOut: Address, amountIn: string, slippagePercent?: number): Promise<Hex>;
|
|
742
|
+
|
|
743
|
+
declare const METH_TOKEN: {
|
|
744
|
+
readonly mainnet: "0xcDA86A272531e8640cD7F1a92c01839911B90bb0";
|
|
745
|
+
readonly testnet: "0x0000000000000000000000000000000000000000";
|
|
568
746
|
};
|
|
569
|
-
declare const
|
|
570
|
-
readonly mainnet: "
|
|
571
|
-
readonly testnet: "
|
|
747
|
+
declare const WETH_TOKEN: {
|
|
748
|
+
readonly mainnet: "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111";
|
|
749
|
+
readonly testnet: "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111";
|
|
572
750
|
};
|
|
573
|
-
declare const
|
|
574
|
-
readonly
|
|
575
|
-
readonly
|
|
576
|
-
readonly "SOL/USD": "ef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d";
|
|
577
|
-
readonly "BNB/USD": "2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f";
|
|
578
|
-
readonly "XRP/USD": "ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8";
|
|
579
|
-
readonly "ADA/USD": "2a01deaec9e51a579277b34b122399984d0bbf57e2458a7e42fecd2829867a0d";
|
|
580
|
-
readonly "DOGE/USD": "dcef50dd0a4cd2dcc17e45df1676dcb336a11a61c69df7a0299b0150c672d25c";
|
|
581
|
-
readonly "DOT/USD": "ca3eed9b267293f6595901c734c7525ce8ef49adafe8284571c8e17d6c926346";
|
|
582
|
-
readonly "AVAX/USD": "93da3352f9f1d105fdfe4971cfa80e9dd777bfc5d0f683ebb6e1294b92137bb7";
|
|
583
|
-
readonly "MATIC/USD": "5de33440f6b7d0d7d70f0a7b2a6c0e0b8e5d2f7c8a9b0c1d2e3f4a5b6c7d8e9f";
|
|
584
|
-
readonly "LINK/USD": "8ac0c70fff57e9aefdf5edf44b51d62c2d433653cbb2cf5cc06bb115af04d221";
|
|
585
|
-
readonly "ATOM/USD": "b00b60f88b03a6a625a8d1c048c3f66653edf217439cb6a1cbab0c1c5e8c52bd";
|
|
586
|
-
readonly "LTC/USD": "6e3f3fa8253588df9326580180233eb791e03b443a3ba7a1d892e73874e19a54";
|
|
587
|
-
readonly "UNI/USD": "78d185a741d07edb3412b09008b7c5cfb9bbbd7d568bf00ba737b456ba171501";
|
|
588
|
-
readonly "NEAR/USD": "c415de8d2eba7db216527dff4b60e8f3a5311c740dadb233e13e12547e226750";
|
|
589
|
-
readonly "TRX/USD": "67aed5a24fdad045475e7195c98a98aea119c763f272d4523f5bac93a4f33c2b";
|
|
590
|
-
readonly "ARB/USD": "3fa4252848f9f0a1480be62745a4629d9eb1322aebab8a791e344b3b9c1adcf5";
|
|
591
|
-
readonly "OP/USD": "385f64d993f7b77d8182ed5003d97c60aa3361f3cecfe711544d2d59165e9bdf";
|
|
592
|
-
readonly "MNT/USD": "4e3037c822d852d79af3ac80e35eb420ee3b870dca49f9344a38ef4773fb0585";
|
|
593
|
-
readonly "IMX/USD": "941320a8989414a6d2c757c8c6c52b3e7e0b7e4e4c5bb8a3c8e7a0f3e0f0f0f0";
|
|
594
|
-
readonly "STRK/USD": "6a182399ff70ccf3e06024898942028204125a819e519a335ffa4579e66cd870";
|
|
595
|
-
readonly "AAVE/USD": "2b9ab1e972a281585084148ba1389800799bd4be63b957507db1349314e47445";
|
|
596
|
-
readonly "CRV/USD": "a19d04ac696c7a6616d291c7e5d1377cc8be437c327b75adb5dc1bad745fcae8";
|
|
597
|
-
readonly "MKR/USD": "9375299e31c0deb9c6bc378e6329aab44cb48ec655552a70d4b9050346a30378";
|
|
598
|
-
readonly "SNX/USD": "39d020f60982ed892abbcd4a06a276a9f9b7bfbce003204c110b6e488f502da3";
|
|
599
|
-
readonly "COMP/USD": "4a8e42861cabc5ecb50996f92e7cfa2bce3fd0a2423b0c44c9b423fb2bd25478";
|
|
600
|
-
readonly "LDO/USD": "c63e2a7f37a04e5e614c07238bedb25dcc38927e77a90a4b21a7a2e1d7f0d2e3";
|
|
601
|
-
readonly "1INCH/USD": "63f341689d98a12ef60a5cff1d7f85c70a9e17bf1575f0e7c0b2512d48b1c8b3";
|
|
602
|
-
readonly "SUSHI/USD": "26e4f737fde0263a9eea10ae63ac36dcedab2aaf629f1e31a28a28dd0e0d2b0c";
|
|
603
|
-
readonly "YFI/USD": "425f4b198ab2504936886c1e93511bb6720fbcf2045a4f3c0723bb213846022f";
|
|
604
|
-
readonly "BAL/USD": "07ad7b4a7662d19a6bc675f6b467172d2f3947fa653ca97555a9b20236406628";
|
|
605
|
-
readonly "CAKE/USD": "2356af9529a1064d1d2a2e3e4ab6d6e6f6e6f6e6f6e6f6e6f6e6f6e6f6e6f6e6";
|
|
606
|
-
readonly "GMX/USD": "b962539d0fcb272a494d65ea56f94851c2bcf8823935da05bd628916e2e9edbf";
|
|
607
|
-
readonly "PENDLE/USD": "9a4df90b25497f66b1afb012467e316e801ca3d839456db028892fe8c70c8016";
|
|
608
|
-
readonly "JOE/USD": "1e8a156c8a23c1e56f2d9d7f0e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e";
|
|
609
|
-
readonly "USDC/USD": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a";
|
|
610
|
-
readonly "USDT/USD": "2b89b9dc8fdf9f34709a5b106b472f0f39bb6ca9ce04b0fd7f2e971688e2e53b";
|
|
611
|
-
readonly "DAI/USD": "b0948a5e5313200c632b51bb5ca32f6de0d36e9950a942d19751e833f70dabfd";
|
|
612
|
-
readonly "FRAX/USD": "c3d5d8d6d0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0";
|
|
613
|
-
readonly "BUSD/USD": "5bc91f13e412c07599167bae86f07543f076a638962b8d6017ec19dab4a82814";
|
|
614
|
-
readonly "TUSD/USD": "433faaa801ecda2c0bbfa8f4e2d85fd4c310e2c1e5f8f8e6e5f5f5f5f5f5f5f5";
|
|
615
|
-
readonly "LUSD/USD": "d892ae586f4e0fbeee4d64f29ed6e89b1b3e2e2e2e2e2e2e2e2e2e2e2e2e2e2e";
|
|
616
|
-
readonly "WETH/USD": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace";
|
|
617
|
-
readonly "WBTC/USD": "c9d8b075a5c69303365ae23633d4e085199bf5c520a3b90fed1322a0342ffc33";
|
|
618
|
-
readonly "stETH/USD": "846ae1bdb6300b817cee5fdee2a6da192775030db5615b94a465f53bd40850b5";
|
|
619
|
-
readonly "cbETH/USD": "15ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce5717";
|
|
620
|
-
readonly "rETH/USD": "a0255134973f4fdf2f8f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f";
|
|
621
|
-
readonly "mETH/USD": "4c9c6f9f0cde13fced52dc1927c8c06a91b1a65ab77b9e1ec1c614963ce90dd4";
|
|
622
|
-
readonly "wstETH/USD": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784";
|
|
623
|
-
readonly "SHIB/USD": "f0d57deca57b3da2fe63a493f4c25925fdfd8edf834b20f93e1f84dbd1504d4a";
|
|
624
|
-
readonly "PEPE/USD": "d69731a2e74ac1ce884fc3890f7ee324b6deb66147055249568869ed700882e4";
|
|
625
|
-
readonly "FLOKI/USD": "6b1381ce7e874dc5410b197ac8348162c0dd6c0d4c9cd6322c28a6f7f4d1a2d2";
|
|
626
|
-
readonly "BONK/USD": "72b021217ca3fe68922a19aaf990109cb9d84e9ad004b4d2025ad6f529314419";
|
|
627
|
-
readonly "WIF/USD": "4ca4beeca86f0d164160323817a4e42b10010a724c2217c6ee41b54cd4cc61fc";
|
|
628
|
-
readonly "AXS/USD": "b0d8f5e3f3a7c0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0";
|
|
629
|
-
readonly "SAND/USD": "f4040ec3e5b71c241a7e1a9a1e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e";
|
|
630
|
-
readonly "MANA/USD": "2b15e4bded7f5e5d5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a";
|
|
631
|
-
readonly "GALA/USD": "e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3e3";
|
|
632
|
-
readonly "APE/USD": "15add95022ae13563a11992e727c91bdb6b55bc183d9d747436c80a483d8c864";
|
|
633
|
-
readonly "ENJ/USD": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a";
|
|
634
|
-
readonly "FIL/USD": "150ac9b959aee0051e4091f0ef5216d941f590e1c5e7f91cf7635b5c11628c0e";
|
|
635
|
-
readonly "GRT/USD": "4d1f8dae0d96236fb98e8f47571a70f41c8b8f2f6d6c0e0e0e0e0e0e0e0e0e0e";
|
|
636
|
-
readonly "RNDR/USD": "ab7347771135fc733f8f38db462ba085ed3309955f42554a14fa13e855ac0e2f";
|
|
637
|
-
readonly "INJ/USD": "7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff592";
|
|
638
|
-
readonly "AR/USD": "8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c";
|
|
639
|
-
readonly "THETA/USD": "4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a";
|
|
640
|
-
readonly "PYTH/USD": "0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff";
|
|
641
|
-
readonly "FET/USD": "b49ee9d8ccf9b6e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0";
|
|
642
|
-
readonly "OCEAN/USD": "2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d";
|
|
643
|
-
readonly "TAO/USD": "410f41de235f2dbdf41f1a808c1e15f6a9e7d6a7b8c9d0e1f2a3b4c5d6e7f8a9";
|
|
644
|
-
readonly "FTT/USD": "6c75e52531ec5fd3ef253f6062956a8508a2f03fa0a209fb7dbc0d0f3d6f6f6f";
|
|
645
|
-
readonly "CRO/USD": "b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7";
|
|
646
|
-
readonly "OKB/USD": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744";
|
|
647
|
-
readonly "EUR/USD": "a995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b";
|
|
648
|
-
readonly "GBP/USD": "84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1";
|
|
649
|
-
readonly "JPY/USD": "ef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52";
|
|
650
|
-
readonly "AUD/USD": "67a6f93030f4217f2e8f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f";
|
|
651
|
-
readonly "CAD/USD": "9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a9a";
|
|
652
|
-
readonly "XAU/USD": "765d2ba906dbc32ca17cc11f5310a89e9ee1f6420508c63861f2f8ba4ee34bb2";
|
|
653
|
-
readonly "XAG/USD": "f2fb02c32b055c805e7238d628e5e9dadef274376114eb1f012337cabe93871e";
|
|
654
|
-
readonly "WTI/USD": "c9c8e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9";
|
|
655
|
-
readonly "BRENT/USD": "d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8";
|
|
656
|
-
readonly "AAPL/USD": "49f6b65cb1de6b10eaf75e7c03ca029c306d0357e91b5311b175084a5ad55688";
|
|
657
|
-
readonly "NVDA/USD": "b1073854ed24cbc755dc527418f52b7d271f6cc967bbf8d8129112b18860a593";
|
|
658
|
-
readonly "TSLA/USD": "16dad506d7db8da01c87581c87ca897a012a153557d4d578c3b9c9e1bc0632f1";
|
|
659
|
-
readonly "GOOGL/USD": "b7e3904c08ddd9c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0";
|
|
660
|
-
readonly "AMZN/USD": "c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6c6";
|
|
661
|
-
readonly "MSFT/USD": "d0ca23c1cc005e004ccf1db5bf76aeb6a49218f43dac3d4b275e92de12ea4b77";
|
|
662
|
-
readonly "META/USD": "a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4a4";
|
|
663
|
-
readonly "COIN/USD": "9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b9b";
|
|
664
|
-
readonly "SPY/USD": "19e09bb805456ada3979a7d1cbb4b6d63babc3a0f8e8a9b3c4d5e6f7a8b9c0d1";
|
|
665
|
-
readonly "QQQ/USD": "2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e2e";
|
|
751
|
+
declare const WMNT_TOKEN: {
|
|
752
|
+
readonly mainnet: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8";
|
|
753
|
+
readonly testnet: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8";
|
|
666
754
|
};
|
|
667
|
-
declare const
|
|
668
|
-
|
|
669
|
-
readonly name: "id";
|
|
670
|
-
readonly type: "bytes32";
|
|
671
|
-
}];
|
|
672
|
-
readonly name: "getPrice";
|
|
673
|
-
readonly outputs: readonly [{
|
|
674
|
-
readonly components: readonly [{
|
|
675
|
-
readonly name: "price";
|
|
676
|
-
readonly type: "int64";
|
|
677
|
-
}, {
|
|
678
|
-
readonly name: "conf";
|
|
679
|
-
readonly type: "uint64";
|
|
680
|
-
}, {
|
|
681
|
-
readonly name: "expo";
|
|
682
|
-
readonly type: "int32";
|
|
683
|
-
}, {
|
|
684
|
-
readonly name: "publishTime";
|
|
685
|
-
readonly type: "uint256";
|
|
686
|
-
}];
|
|
687
|
-
readonly name: "";
|
|
688
|
-
readonly type: "tuple";
|
|
689
|
-
}];
|
|
690
|
-
readonly stateMutability: "view";
|
|
691
|
-
readonly type: "function";
|
|
692
|
-
}, {
|
|
693
|
-
readonly inputs: readonly [{
|
|
694
|
-
readonly name: "id";
|
|
695
|
-
readonly type: "bytes32";
|
|
696
|
-
}];
|
|
697
|
-
readonly name: "getPriceNoOlderThan";
|
|
698
|
-
readonly outputs: readonly [{
|
|
699
|
-
readonly components: readonly [{
|
|
700
|
-
readonly name: "price";
|
|
701
|
-
readonly type: "int64";
|
|
702
|
-
}, {
|
|
703
|
-
readonly name: "conf";
|
|
704
|
-
readonly type: "uint64";
|
|
705
|
-
}, {
|
|
706
|
-
readonly name: "expo";
|
|
707
|
-
readonly type: "int32";
|
|
708
|
-
}, {
|
|
709
|
-
readonly name: "publishTime";
|
|
710
|
-
readonly type: "uint256";
|
|
711
|
-
}];
|
|
712
|
-
readonly name: "";
|
|
713
|
-
readonly type: "tuple";
|
|
714
|
-
}];
|
|
715
|
-
readonly stateMutability: "view";
|
|
716
|
-
readonly type: "function";
|
|
717
|
-
}, {
|
|
718
|
-
readonly inputs: readonly [{
|
|
719
|
-
readonly name: "id";
|
|
720
|
-
readonly type: "bytes32";
|
|
721
|
-
}, {
|
|
722
|
-
readonly name: "age";
|
|
723
|
-
readonly type: "uint256";
|
|
724
|
-
}];
|
|
725
|
-
readonly name: "getPriceNoOlderThan";
|
|
726
|
-
readonly outputs: readonly [{
|
|
727
|
-
readonly components: readonly [{
|
|
728
|
-
readonly name: "price";
|
|
729
|
-
readonly type: "int64";
|
|
730
|
-
}, {
|
|
731
|
-
readonly name: "conf";
|
|
732
|
-
readonly type: "uint64";
|
|
733
|
-
}, {
|
|
734
|
-
readonly name: "expo";
|
|
735
|
-
readonly type: "int32";
|
|
736
|
-
}, {
|
|
737
|
-
readonly name: "publishTime";
|
|
738
|
-
readonly type: "uint256";
|
|
739
|
-
}];
|
|
740
|
-
readonly name: "";
|
|
741
|
-
readonly type: "tuple";
|
|
742
|
-
}];
|
|
743
|
-
readonly stateMutability: "view";
|
|
744
|
-
readonly type: "function";
|
|
745
|
-
}, {
|
|
755
|
+
declare const NATIVE_MNT_ADDRESS: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
756
|
+
declare const METH_ABI: readonly [{
|
|
746
757
|
readonly inputs: readonly [{
|
|
747
|
-
readonly name: "
|
|
748
|
-
readonly type: "
|
|
758
|
+
readonly name: "account";
|
|
759
|
+
readonly type: "address";
|
|
749
760
|
}];
|
|
750
|
-
readonly name: "
|
|
761
|
+
readonly name: "balanceOf";
|
|
751
762
|
readonly outputs: readonly [{
|
|
752
|
-
readonly components: readonly [{
|
|
753
|
-
readonly name: "price";
|
|
754
|
-
readonly type: "int64";
|
|
755
|
-
}, {
|
|
756
|
-
readonly name: "conf";
|
|
757
|
-
readonly type: "uint64";
|
|
758
|
-
}, {
|
|
759
|
-
readonly name: "expo";
|
|
760
|
-
readonly type: "int32";
|
|
761
|
-
}, {
|
|
762
|
-
readonly name: "publishTime";
|
|
763
|
-
readonly type: "uint256";
|
|
764
|
-
}];
|
|
765
763
|
readonly name: "";
|
|
766
|
-
readonly type: "
|
|
764
|
+
readonly type: "uint256";
|
|
767
765
|
}];
|
|
768
766
|
readonly stateMutability: "view";
|
|
769
767
|
readonly type: "function";
|
|
770
768
|
}, {
|
|
771
|
-
readonly inputs: readonly [
|
|
772
|
-
|
|
773
|
-
readonly type: "bytes32";
|
|
774
|
-
}];
|
|
775
|
-
readonly name: "getEmaPrice";
|
|
769
|
+
readonly inputs: readonly [];
|
|
770
|
+
readonly name: "totalSupply";
|
|
776
771
|
readonly outputs: readonly [{
|
|
777
|
-
readonly components: readonly [{
|
|
778
|
-
readonly name: "price";
|
|
779
|
-
readonly type: "int64";
|
|
780
|
-
}, {
|
|
781
|
-
readonly name: "conf";
|
|
782
|
-
readonly type: "uint64";
|
|
783
|
-
}, {
|
|
784
|
-
readonly name: "expo";
|
|
785
|
-
readonly type: "int32";
|
|
786
|
-
}, {
|
|
787
|
-
readonly name: "publishTime";
|
|
788
|
-
readonly type: "uint256";
|
|
789
|
-
}];
|
|
790
772
|
readonly name: "";
|
|
791
|
-
readonly type: "
|
|
773
|
+
readonly type: "uint256";
|
|
792
774
|
}];
|
|
793
775
|
readonly stateMutability: "view";
|
|
794
776
|
readonly type: "function";
|
|
795
777
|
}, {
|
|
796
|
-
readonly inputs: readonly [
|
|
797
|
-
|
|
798
|
-
|
|
778
|
+
readonly inputs: readonly [];
|
|
779
|
+
readonly name: "decimals";
|
|
780
|
+
readonly outputs: readonly [{
|
|
781
|
+
readonly name: "";
|
|
782
|
+
readonly type: "uint8";
|
|
799
783
|
}];
|
|
800
|
-
readonly
|
|
801
|
-
readonly outputs: readonly [];
|
|
802
|
-
readonly stateMutability: "payable";
|
|
784
|
+
readonly stateMutability: "view";
|
|
803
785
|
readonly type: "function";
|
|
804
786
|
}, {
|
|
805
|
-
readonly inputs: readonly [
|
|
806
|
-
|
|
807
|
-
readonly type: "bytes[]";
|
|
808
|
-
}];
|
|
809
|
-
readonly name: "getUpdateFee";
|
|
787
|
+
readonly inputs: readonly [];
|
|
788
|
+
readonly name: "symbol";
|
|
810
789
|
readonly outputs: readonly [{
|
|
811
|
-
readonly name: "
|
|
812
|
-
readonly type: "
|
|
790
|
+
readonly name: "";
|
|
791
|
+
readonly type: "string";
|
|
813
792
|
}];
|
|
814
793
|
readonly stateMutability: "view";
|
|
815
794
|
readonly type: "function";
|
|
816
795
|
}, {
|
|
817
796
|
readonly inputs: readonly [{
|
|
818
|
-
readonly name: "
|
|
819
|
-
readonly type: "
|
|
797
|
+
readonly name: "spender";
|
|
798
|
+
readonly type: "address";
|
|
799
|
+
}, {
|
|
800
|
+
readonly name: "amount";
|
|
801
|
+
readonly type: "uint256";
|
|
820
802
|
}];
|
|
821
|
-
readonly name: "
|
|
803
|
+
readonly name: "approve";
|
|
822
804
|
readonly outputs: readonly [{
|
|
823
805
|
readonly name: "";
|
|
824
806
|
readonly type: "bool";
|
|
825
807
|
}];
|
|
826
|
-
readonly stateMutability: "
|
|
808
|
+
readonly stateMutability: "nonpayable";
|
|
827
809
|
readonly type: "function";
|
|
828
810
|
}, {
|
|
829
811
|
readonly inputs: readonly [{
|
|
830
|
-
readonly name: "
|
|
831
|
-
readonly type: "
|
|
832
|
-
}, {
|
|
833
|
-
readonly name: "priceIds";
|
|
834
|
-
readonly type: "bytes32[]";
|
|
835
|
-
}, {
|
|
836
|
-
readonly name: "minPublishTime";
|
|
837
|
-
readonly type: "uint64";
|
|
812
|
+
readonly name: "owner";
|
|
813
|
+
readonly type: "address";
|
|
838
814
|
}, {
|
|
839
|
-
readonly name: "
|
|
840
|
-
readonly type: "
|
|
815
|
+
readonly name: "spender";
|
|
816
|
+
readonly type: "address";
|
|
841
817
|
}];
|
|
842
|
-
readonly name: "
|
|
818
|
+
readonly name: "allowance";
|
|
843
819
|
readonly outputs: readonly [{
|
|
844
|
-
readonly components: readonly [{
|
|
845
|
-
readonly name: "id";
|
|
846
|
-
readonly type: "bytes32";
|
|
847
|
-
}, {
|
|
848
|
-
readonly components: readonly [{
|
|
849
|
-
readonly name: "price";
|
|
850
|
-
readonly type: "int64";
|
|
851
|
-
}, {
|
|
852
|
-
readonly name: "conf";
|
|
853
|
-
readonly type: "uint64";
|
|
854
|
-
}, {
|
|
855
|
-
readonly name: "expo";
|
|
856
|
-
readonly type: "int32";
|
|
857
|
-
}, {
|
|
858
|
-
readonly name: "publishTime";
|
|
859
|
-
readonly type: "uint256";
|
|
860
|
-
}];
|
|
861
|
-
readonly name: "price";
|
|
862
|
-
readonly type: "tuple";
|
|
863
|
-
}, {
|
|
864
|
-
readonly components: readonly [{
|
|
865
|
-
readonly name: "price";
|
|
866
|
-
readonly type: "int64";
|
|
867
|
-
}, {
|
|
868
|
-
readonly name: "conf";
|
|
869
|
-
readonly type: "uint64";
|
|
870
|
-
}, {
|
|
871
|
-
readonly name: "expo";
|
|
872
|
-
readonly type: "int32";
|
|
873
|
-
}, {
|
|
874
|
-
readonly name: "publishTime";
|
|
875
|
-
readonly type: "uint256";
|
|
876
|
-
}];
|
|
877
|
-
readonly name: "emaPrice";
|
|
878
|
-
readonly type: "tuple";
|
|
879
|
-
}];
|
|
880
820
|
readonly name: "";
|
|
881
|
-
readonly type: "
|
|
821
|
+
readonly type: "uint256";
|
|
882
822
|
}];
|
|
883
|
-
readonly stateMutability: "
|
|
823
|
+
readonly stateMutability: "view";
|
|
884
824
|
readonly type: "function";
|
|
885
825
|
}];
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
826
|
+
|
|
827
|
+
declare const index$a_METH_ABI: typeof METH_ABI;
|
|
828
|
+
declare const index$a_METH_TOKEN: typeof METH_TOKEN;
|
|
829
|
+
declare const index$a_NATIVE_MNT_ADDRESS: typeof NATIVE_MNT_ADDRESS;
|
|
830
|
+
declare const index$a_WETH_TOKEN: typeof WETH_TOKEN;
|
|
831
|
+
declare const index$a_WMNT_TOKEN: typeof WMNT_TOKEN;
|
|
832
|
+
declare namespace index$a {
|
|
833
|
+
export { index$a_METH_ABI as METH_ABI, index$a_METH_TOKEN as METH_TOKEN, index$a_NATIVE_MNT_ADDRESS as NATIVE_MNT_ADDRESS, index$a_WETH_TOKEN as WETH_TOKEN, index$a_WMNT_TOKEN as WMNT_TOKEN };
|
|
891
834
|
}
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
835
|
+
|
|
836
|
+
interface MethPosition {
|
|
837
|
+
methBalance: bigint;
|
|
838
|
+
wethBalance: bigint;
|
|
839
|
+
wmntBalance: bigint;
|
|
840
|
+
methTokenAddress: Address;
|
|
841
|
+
wethTokenAddress: Address;
|
|
842
|
+
wmntTokenAddress: Address;
|
|
900
843
|
}
|
|
844
|
+
/**
|
|
845
|
+
* Get mETH position for a user
|
|
846
|
+
* Returns mETH balance, WETH balance (for swaps), and WMNT balance
|
|
847
|
+
* @param agent - MNTAgentKit instance
|
|
848
|
+
* @param userAddress - User wallet address (optional, defaults to agent account)
|
|
849
|
+
* @returns mETH position with balances
|
|
850
|
+
*/
|
|
851
|
+
declare function methGetPosition(agent: MNTAgentKit, userAddress?: Address): Promise<MethPosition>;
|
|
901
852
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
853
|
+
/**
|
|
854
|
+
* Swap WETH to mETH using DEX aggregator
|
|
855
|
+
* This is the L2 way to acquire mETH - swap via DEX
|
|
856
|
+
* @param agent - MNTAgentKit instance
|
|
857
|
+
* @param amount - Amount of WETH to swap (in wei as string)
|
|
858
|
+
* @param slippage - Slippage tolerance percentage (default 0.5%)
|
|
859
|
+
* @returns Transaction hash
|
|
860
|
+
*/
|
|
861
|
+
declare function swapToMeth(agent: MNTAgentKit, amount: string, slippage?: number): Promise<Hex>;
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Swap mETH to WETH using DEX aggregator
|
|
865
|
+
* This is the L2 way to exit mETH position - swap via DEX
|
|
866
|
+
* @param agent - MNTAgentKit instance
|
|
867
|
+
* @param amount - Amount of mETH to swap (in wei as string)
|
|
868
|
+
* @param slippage - Slippage tolerance percentage (default 0.5%)
|
|
869
|
+
* @returns Transaction hash
|
|
870
|
+
*/
|
|
871
|
+
declare function swapFromMeth(agent: MNTAgentKit, amount: string, slippage?: number): Promise<Hex>;
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Close an existing position on PikePerps
|
|
875
|
+
* @param agent - MNTAgentKit instance
|
|
876
|
+
* @param positionId - Position ID to close
|
|
877
|
+
* @returns Transaction hash
|
|
878
|
+
*/
|
|
879
|
+
declare function pikeperpsClosePosition(agent: MNTAgentKit, positionId: bigint): Promise<Hex>;
|
|
880
|
+
|
|
881
|
+
interface PikePerpsPosition {
|
|
882
|
+
positionId: bigint;
|
|
883
|
+
token: Address;
|
|
884
|
+
isLong: boolean;
|
|
885
|
+
size: bigint;
|
|
886
|
+
margin: bigint;
|
|
887
|
+
leverage: number;
|
|
888
|
+
entryPrice: bigint;
|
|
889
|
+
entryTime: bigint;
|
|
890
|
+
currentPrice: bigint;
|
|
891
|
+
pnl: bigint;
|
|
892
|
+
isProfit: boolean;
|
|
893
|
+
liquidationPrice: bigint;
|
|
894
|
+
isOpen: boolean;
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Get all positions for a user on PikePerps
|
|
898
|
+
* Returns detailed position data including PnL and liquidation prices
|
|
899
|
+
* @param agent - MNTAgentKit instance
|
|
900
|
+
* @param userAddress - User wallet address (optional, defaults to agent account)
|
|
901
|
+
* @returns Array of positions with PnL and liquidation data
|
|
902
|
+
*/
|
|
903
|
+
declare function pikeperpsGetPositions(agent: MNTAgentKit, userAddress?: Address): Promise<PikePerpsPosition[]>;
|
|
904
|
+
|
|
905
|
+
interface PikePerpsTrade {
|
|
906
|
+
positionId: bigint;
|
|
907
|
+
trader: Address;
|
|
908
|
+
token: Address;
|
|
909
|
+
isLong: boolean;
|
|
910
|
+
size: bigint;
|
|
911
|
+
margin: bigint;
|
|
912
|
+
leverage: bigint;
|
|
913
|
+
entryPrice: bigint;
|
|
914
|
+
timestamp: number;
|
|
915
|
+
txHash: Hex;
|
|
916
|
+
blockNumber: bigint;
|
|
917
|
+
}
|
|
918
|
+
interface PikePerpsMarketData {
|
|
919
|
+
token: Address;
|
|
920
|
+
currentPrice: bigint;
|
|
921
|
+
hasPrice: boolean;
|
|
922
|
+
isListed: boolean;
|
|
923
|
+
curveProgress: bigint;
|
|
924
|
+
recentTrades: PikePerpsTrade[];
|
|
910
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* Get market data for a token on PikePerps
|
|
928
|
+
* Returns current price and recent trades
|
|
929
|
+
* @param agent - MNTAgentKit instance
|
|
930
|
+
* @param tokenAddress - Token address to get market data for
|
|
931
|
+
* @param limit - Maximum number of recent trades to return (default 20)
|
|
932
|
+
* @returns Market data with price and recent trades
|
|
933
|
+
*/
|
|
934
|
+
declare function pikeperpsGetMarketData(agent: MNTAgentKit, tokenAddress: Address, limit?: number): Promise<PikePerpsMarketData>;
|
|
911
935
|
|
|
912
936
|
/**
|
|
913
937
|
* Get price data from Pyth Network for a specific price feed
|
|
914
938
|
* @param agent - MNTAgentKit instance
|
|
915
|
-
* @param
|
|
939
|
+
* @param input - Token address, price feed ID (hex string), or pair name like "ETH/USD"
|
|
916
940
|
* @returns Price data with formatted price
|
|
917
941
|
*/
|
|
918
|
-
declare function pythGetPrice(agent: MNTAgentKit,
|
|
942
|
+
declare function pythGetPrice(agent: MNTAgentKit, input: string): Promise<PythPriceResponse>;
|
|
919
943
|
/**
|
|
920
944
|
* Get EMA (Exponential Moving Average) price from Pyth
|
|
921
945
|
* @param agent - MNTAgentKit instance
|
|
922
|
-
* @param
|
|
946
|
+
* @param input - Token address, price feed ID, or pair name
|
|
923
947
|
* @returns EMA price data
|
|
924
948
|
*/
|
|
925
|
-
declare function pythGetEmaPrice(agent: MNTAgentKit,
|
|
949
|
+
declare function pythGetEmaPrice(agent: MNTAgentKit, input: string): Promise<PythPriceResponse>;
|
|
950
|
+
/**
|
|
951
|
+
* Get price for a token by its contract address
|
|
952
|
+
* @param agent - MNTAgentKit instance
|
|
953
|
+
* @param tokenAddress - Token contract address on Mantle (e.g., "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2" for USDC)
|
|
954
|
+
* @returns Token price details including address, symbol, and USD price
|
|
955
|
+
* @example
|
|
956
|
+
* const price = await pythGetTokenPrice(agent, "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2");
|
|
957
|
+
* // Returns: { tokenAddress: "0x09Bc...", tokenSymbol: "USDC", priceUsd: "1.00", ... }
|
|
958
|
+
*/
|
|
959
|
+
declare function pythGetTokenPrice(agent: MNTAgentKit, tokenAddress: string): Promise<PythTokenPriceResponse>;
|
|
926
960
|
|
|
927
961
|
/**
|
|
928
962
|
* Get multiple prices from Pyth in a single call
|
|
929
963
|
* @param agent - MNTAgentKit instance
|
|
930
|
-
* @param
|
|
964
|
+
* @param inputs - Array of token addresses, pair names, or price feed IDs
|
|
931
965
|
* @returns Array of price responses
|
|
932
966
|
*/
|
|
933
|
-
declare function pythGetMultiplePrices(agent: MNTAgentKit,
|
|
967
|
+
declare function pythGetMultiplePrices(agent: MNTAgentKit, inputs: string[]): Promise<PythPriceResponse[]>;
|
|
934
968
|
/**
|
|
935
969
|
* Get all supported Pyth price feed IDs
|
|
936
970
|
* @returns Object mapping pair names to price feed IDs
|
|
937
971
|
*/
|
|
938
972
|
declare function pythGetSupportedPriceFeeds(): Record<string, string>;
|
|
973
|
+
/**
|
|
974
|
+
* Get all supported token addresses that can be used for price lookups
|
|
975
|
+
* @returns Object mapping token addresses to their pair names
|
|
976
|
+
*/
|
|
977
|
+
declare function pythGetSupportedTokenAddresses(): Record<string, string>;
|
|
939
978
|
/**
|
|
940
979
|
* Check if a price feed exists on Pyth
|
|
941
980
|
* @param agent - MNTAgentKit instance
|
|
942
|
-
* @param
|
|
981
|
+
* @param input - Token address, price feed ID, or pair name
|
|
943
982
|
* @returns Boolean indicating if feed exists
|
|
944
983
|
*/
|
|
945
|
-
declare function pythPriceFeedExists(agent: MNTAgentKit,
|
|
984
|
+
declare function pythPriceFeedExists(agent: MNTAgentKit, input: string): Promise<boolean>;
|
|
946
985
|
|
|
947
986
|
declare const ERC20_ABI: readonly [{
|
|
948
987
|
readonly inputs: readonly [];
|
|
@@ -1672,33 +1711,73 @@ declare class MNTAgentKit {
|
|
|
1672
1711
|
pikeperpsGetMarketData(tokenAddress: Address$1, limit?: number): Promise<PikePerpsMarketData>;
|
|
1673
1712
|
/**
|
|
1674
1713
|
* Get real-time price from Pyth Network
|
|
1675
|
-
*
|
|
1714
|
+
* Accepts token address, pair name, or price feed ID
|
|
1715
|
+
* @param input - Token address (e.g., "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2" for USDC),
|
|
1716
|
+
* pair name (e.g., "ETH/USD"), or price feed ID (hex string)
|
|
1676
1717
|
* @returns Price data with formatted price
|
|
1718
|
+
* @example
|
|
1719
|
+
* // Using pair name
|
|
1720
|
+
* await agent.pythGetPrice("ETH/USD");
|
|
1721
|
+
* // Using token address (USDC on Mantle)
|
|
1722
|
+
* await agent.pythGetPrice("0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2");
|
|
1677
1723
|
*/
|
|
1678
|
-
pythGetPrice(
|
|
1724
|
+
pythGetPrice(input: string): Promise<PythPriceResponse>;
|
|
1679
1725
|
/**
|
|
1680
1726
|
* Get EMA (Exponential Moving Average) price from Pyth
|
|
1681
|
-
*
|
|
1727
|
+
* Accepts token address, pair name, or price feed ID
|
|
1728
|
+
* @param input - Token address, pair name, or price feed ID
|
|
1682
1729
|
* @returns EMA price data
|
|
1683
1730
|
*/
|
|
1684
|
-
pythGetEmaPrice(
|
|
1731
|
+
pythGetEmaPrice(input: string): Promise<PythPriceResponse>;
|
|
1732
|
+
/**
|
|
1733
|
+
* Get price for a token by its contract address
|
|
1734
|
+
* Pass any supported token address and get the USD price with full details
|
|
1735
|
+
* @param tokenAddress - Token contract address on Mantle
|
|
1736
|
+
* @returns Token price details including symbol, USD price, and timestamp
|
|
1737
|
+
* @example
|
|
1738
|
+
* const price = await agent.pythGetTokenPrice("0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2");
|
|
1739
|
+
* // Returns: {
|
|
1740
|
+
* // tokenAddress: "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2",
|
|
1741
|
+
* // tokenSymbol: "USDC",
|
|
1742
|
+
* // pair: "USDC/USD",
|
|
1743
|
+
* // priceUsd: "1.00",
|
|
1744
|
+
* // lastUpdated: "2024-01-08T12:00:00.000Z"
|
|
1745
|
+
* // }
|
|
1746
|
+
*/
|
|
1747
|
+
pythGetTokenPrice(tokenAddress: string): Promise<PythTokenPriceResponse>;
|
|
1685
1748
|
/**
|
|
1686
1749
|
* Get multiple prices from Pyth in a single call
|
|
1687
|
-
*
|
|
1750
|
+
* Accepts token addresses, pair names, or price feed IDs
|
|
1751
|
+
* @param inputs - Array of token addresses, pair names, or price feed IDs
|
|
1688
1752
|
* @returns Array of price responses
|
|
1753
|
+
* @example
|
|
1754
|
+
* await agent.pythGetMultiplePrices([
|
|
1755
|
+
* "ETH/USD", // pair name
|
|
1756
|
+
* "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2", // USDC address
|
|
1757
|
+
* "0xcDA86A272531e8640cD7F1a92c01839911B90bb0", // mETH address
|
|
1758
|
+
* ]);
|
|
1689
1759
|
*/
|
|
1690
|
-
pythGetMultiplePrices(
|
|
1760
|
+
pythGetMultiplePrices(inputs: string[]): Promise<PythPriceResponse[]>;
|
|
1691
1761
|
/**
|
|
1692
1762
|
* Get all supported Pyth price feed IDs
|
|
1693
1763
|
* @returns Object mapping pair names to price feed IDs
|
|
1694
1764
|
*/
|
|
1695
1765
|
pythGetSupportedPriceFeeds(): Record<string, string>;
|
|
1766
|
+
/**
|
|
1767
|
+
* Get all supported token addresses for Pyth price lookups on Mantle
|
|
1768
|
+
* @returns Object mapping token addresses to their pair names
|
|
1769
|
+
* @example
|
|
1770
|
+
* const addresses = agent.pythGetSupportedTokenAddresses();
|
|
1771
|
+
* // Returns: { "0x09Bc4E0D10C81b3a3766c49F0f98a8aaa7adA8D2": "USDC/USD", ... }
|
|
1772
|
+
*/
|
|
1773
|
+
pythGetSupportedTokenAddresses(): Record<string, string>;
|
|
1696
1774
|
/**
|
|
1697
1775
|
* Check if a price feed exists on Pyth
|
|
1698
|
-
*
|
|
1776
|
+
* Accepts token address, pair name, or price feed ID
|
|
1777
|
+
* @param input - Token address, pair name, or price feed ID
|
|
1699
1778
|
* @returns Boolean indicating if feed exists
|
|
1700
1779
|
*/
|
|
1701
|
-
pythPriceFeedExists(
|
|
1780
|
+
pythPriceFeedExists(input: string): Promise<boolean>;
|
|
1702
1781
|
/**
|
|
1703
1782
|
* Deploy a new token (ERC20 or RWA) - supply minted to your address
|
|
1704
1783
|
* @param name - Token name
|
|
@@ -2701,4 +2780,4 @@ interface UserAccountData {
|
|
|
2701
2780
|
healthFactor: bigint;
|
|
2702
2781
|
}
|
|
2703
2782
|
|
|
2704
|
-
export { index$7 as AgniConstants, index$6 as LendleConstants, type LendlePosition, type LendlePositionsResult, METH_TOKEN, MNTAgentKit, index$5 as MerchantMoeConstants, index$
|
|
2783
|
+
export { index$7 as AgniConstants, index$6 as LendleConstants, type LendlePosition, type LendlePositionsResult, METH_TOKEN, MNTAgentKit, index$5 as MerchantMoeConstants, index$a as MethConstants, type MethPosition, type NFTCollectionConfig, type NFTCollectionDeploymentResult, type NFTCollectionInfo, index$8 as NFTLaunchpadConstants, type NFTMintResult, type NFTTokenInfo, index$4 as OKXConstants, index$3 as OneInchConstants, index$2 as OpenOceanConstants, index as PikePerpsConstants, type PikePerpsMarketData, type PikePerpsPosition, type PikePerpsTrade, type ProjectConfig, index$c as PythConstants, type PythPriceData, type PythPriceResponse, index$1 as SquidConstants, type TokenConfig, type TokenDeploymentResult, type TokenInfo, index$9 as TokenLaunchpadConstants, type TokenType, index$b as UniswapConstants, type UserAccountData, agniSwap, approveNFT, approveToken, batchMintNFT, crossChainSwapViaSquid, deployNFTCollection, deployNFTCollectionWithPreset, deployRWAToken, deployStandardToken, deployToken, executeSwap, get1inchQuote, getNFTBalance, getNFTCollectionInfo, getNFTTokenInfo, getOpenOceanQuote, getProjectConfig, getSquidRoute, getTokenBalance, getTokenInfo, getUniswapQuote, initializePlatform, isNFTOwner, lendleBorrow, lendleGetPositions, lendleRepay, lendleSupply, lendleWithdraw, merchantMoeSwap, methGetPosition, mintNFT, pikeperpsClosePosition, pikeperpsGetMarketData, pikeperpsGetPositions, pikeperpsOpenLong, pikeperpsOpenShort, pythGetEmaPrice, pythGetMultiplePrices, pythGetPrice, pythGetSupportedPriceFeeds, pythGetSupportedTokenAddresses, pythGetTokenPrice, pythPriceFeedExists, safeTransferNFT, sendTransaction, setApprovalForAllNFT, swapFromMeth, swapOn1inch, swapOnOpenOcean, swapOnUniswap, swapToMeth, transferNFT, transferToken };
|