@mangrove-ai/sdk 0.3.0 → 1.0.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 +198 -194
- package/dist/contract.generated.d.ts +7140 -0
- package/dist/contract.generated.js +2595 -0
- package/dist/contract.generated.js.map +1 -0
- package/dist/index.d.ts +89 -821
- package/dist/index.js +452 -848
- package/dist/index.js.map +1 -0
- package/package.json +16 -53
- package/dist/index.cjs +0 -903
- package/dist/index.d.cts +0 -837
package/dist/index.d.ts
CHANGED
|
@@ -1,837 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
type BillingMode = 'standard' | 'x402';
|
|
5
|
-
/**
|
|
6
|
-
* Server-issued swap quote with pricing, fees, and expiry.
|
|
7
|
-
*/
|
|
8
|
-
interface Quote {
|
|
9
|
-
/** Unique quote identifier, valid until expiresAt. */
|
|
10
|
-
quoteId: string;
|
|
11
|
-
/** DEX venue that will execute the swap (e.g. '1inch'). */
|
|
12
|
-
venueId: string;
|
|
13
|
-
/** Contract address of the token being sold. */
|
|
14
|
-
inputToken: string;
|
|
15
|
-
/** Contract address of the token being bought. */
|
|
16
|
-
outputToken: string;
|
|
17
|
-
/** Amount of input token in smallest unit (wei). */
|
|
18
|
-
inputAmount: string;
|
|
19
|
-
/** Expected amount of output token in smallest unit (wei). */
|
|
20
|
-
outputAmount: string;
|
|
21
|
-
/** Mangrove fee amount in smallest unit of input token. */
|
|
22
|
-
mangroveFee: string;
|
|
23
|
-
/** EVM chain ID where the swap will execute. */
|
|
24
|
-
chainId: number;
|
|
25
|
-
/** Billing mode used for this quote. */
|
|
26
|
-
billingMode: BillingMode;
|
|
27
|
-
/** Ordered list of DEX routes the aggregator will use. */
|
|
28
|
-
routes: string[];
|
|
29
|
-
/** ISO 8601 timestamp after which this quote is no longer valid. */
|
|
30
|
-
expiresAt: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Chain-agnostic unsigned transaction calldata. Agent signs locally.
|
|
34
|
-
*/
|
|
35
|
-
interface UnsignedTransaction {
|
|
36
|
-
/** EVM chain ID for the transaction. */
|
|
37
|
-
chainId: number;
|
|
38
|
-
/** Target contract address. */
|
|
39
|
-
to: string;
|
|
40
|
-
/** ABI-encoded calldata. */
|
|
41
|
-
data: string;
|
|
42
|
-
/** Native token value to send (wei). */
|
|
43
|
-
value: string;
|
|
44
|
-
/** Gas limit for the transaction. */
|
|
45
|
-
gas: string;
|
|
46
|
-
/** Transaction nonce (sequence number). */
|
|
47
|
-
nonce?: number;
|
|
48
|
-
/** Legacy gas price (wei). Mutually exclusive with EIP-1559 fields. */
|
|
49
|
-
gasPrice?: string;
|
|
50
|
-
/** EIP-1559 max fee per gas (wei). */
|
|
51
|
-
maxFeePerGas?: string;
|
|
52
|
-
/** EIP-1559 max priority fee per gas (wei). */
|
|
53
|
-
maxPriorityFeePerGas?: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Result returned after broadcasting a signed transaction.
|
|
57
|
-
*/
|
|
58
|
-
interface BroadcastResult {
|
|
59
|
-
/** Transaction hash of the broadcasted transaction. */
|
|
60
|
-
txHash: string;
|
|
61
|
-
/** Chain ID the transaction was broadcast on. */
|
|
62
|
-
chainId: number;
|
|
63
|
-
/** Method used to broadcast (e.g. 'public', 'flashbots'). */
|
|
64
|
-
broadcastMethod: string;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Current status of an on-chain transaction.
|
|
68
|
-
*/
|
|
69
|
-
interface TransactionStatus {
|
|
70
|
-
/** Transaction hash being tracked. */
|
|
71
|
-
txHash: string;
|
|
72
|
-
/** Chain ID the transaction is on. */
|
|
73
|
-
chainId: number;
|
|
74
|
-
/** Current transaction status. */
|
|
75
|
-
status: 'pending' | 'confirmed' | 'failed';
|
|
76
|
-
/** Block number the transaction was included in, if confirmed. */
|
|
77
|
-
blockNumber?: number;
|
|
78
|
-
/** Gas consumed by the transaction, if confirmed. */
|
|
79
|
-
gasUsed?: string;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Final result of a completed swap operation.
|
|
83
|
-
*/
|
|
84
|
-
interface SwapResult {
|
|
85
|
-
/** Transaction hash of the swap. */
|
|
86
|
-
txHash: string;
|
|
87
|
-
/** Chain ID the swap executed on. */
|
|
88
|
-
chainId: number;
|
|
89
|
-
/** Final transaction status. */
|
|
90
|
-
status: 'confirmed' | 'failed';
|
|
91
|
-
/** Gas consumed by the swap transaction. */
|
|
92
|
-
gasUsed: string;
|
|
93
|
-
/** Contract address of the token sold. */
|
|
94
|
-
inputToken: string;
|
|
95
|
-
/** Contract address of the token bought. */
|
|
96
|
-
outputToken: string;
|
|
97
|
-
/** Amount of input token swapped (smallest unit). */
|
|
98
|
-
inputAmount: string;
|
|
99
|
-
/** Amount of output token received (smallest unit). */
|
|
100
|
-
outputAmount: string;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Parameters for requesting a swap quote.
|
|
104
|
-
*/
|
|
105
|
-
interface QuoteParams {
|
|
106
|
-
/** Source token contract address. */
|
|
107
|
-
src: string;
|
|
108
|
-
/** Destination token contract address. */
|
|
109
|
-
dst: string;
|
|
110
|
-
/** Amount of source token in smallest unit (wei). */
|
|
111
|
-
amount: string;
|
|
112
|
-
/** EVM chain ID to get the quote on. */
|
|
113
|
-
chainId: number;
|
|
114
|
-
/** Fee billing mode. Defaults to 'standard'. */
|
|
115
|
-
mode?: BillingMode;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Parameters for executing a full swap (quote through confirmation).
|
|
119
|
-
*/
|
|
120
|
-
interface SwapParams {
|
|
121
|
-
/** Source token contract address. */
|
|
122
|
-
src: string;
|
|
123
|
-
/** Destination token contract address. */
|
|
124
|
-
dst: string;
|
|
125
|
-
/** Amount of source token in smallest unit (wei). */
|
|
126
|
-
amount: string;
|
|
127
|
-
/** EVM chain ID to execute the swap on. */
|
|
128
|
-
chainId: number;
|
|
129
|
-
/** Maximum acceptable slippage percentage (e.g. 0.5 = 0.5%). Defaults to 0.5. */
|
|
130
|
-
slippage?: number;
|
|
131
|
-
/** Whether to use Flashbots or similar MEV protection. Defaults to false. */
|
|
132
|
-
mevProtection?: boolean;
|
|
133
|
-
/** Fee billing mode. Defaults to 'standard'. */
|
|
134
|
-
mode?: BillingMode;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Parameters for generating an ERC-20 token approval transaction.
|
|
138
|
-
*/
|
|
139
|
-
interface ApproveParams {
|
|
140
|
-
/** ERC-20 token contract address to approve. */
|
|
141
|
-
tokenAddress: string;
|
|
142
|
-
/** EVM chain ID. */
|
|
143
|
-
chainId: number;
|
|
144
|
-
/** The agent's public wallet address. */
|
|
145
|
-
walletAddress: string;
|
|
146
|
-
/** Specific approval amount (wei). Omit for unlimited approval. */
|
|
147
|
-
amount?: string;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Parameters for broadcasting a signed transaction.
|
|
151
|
-
*/
|
|
152
|
-
interface BroadcastParams {
|
|
153
|
-
/** EVM chain ID to broadcast on. */
|
|
154
|
-
chainId: number;
|
|
155
|
-
/** Raw signed transaction hex string. */
|
|
156
|
-
signedTx: string;
|
|
157
|
-
/** Whether to use MEV protection for broadcast. Defaults to false. */
|
|
158
|
-
mevProtection?: boolean;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Parameters for checking the status of a swap transaction.
|
|
162
|
-
*/
|
|
163
|
-
interface SwapStatusParams {
|
|
164
|
-
/** Transaction hash to check. */
|
|
165
|
-
txHash: string;
|
|
166
|
-
/** EVM chain ID the transaction is on. */
|
|
167
|
-
chainId: number;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Interface for transaction signing. The SDK never sees private keys -- it passes
|
|
172
|
-
* unsigned calldata to the Signer and gets signed bytes back.
|
|
173
|
-
*/
|
|
174
|
-
interface Signer {
|
|
175
|
-
/** Return the signer's public address (checksummed hex for EVM). */
|
|
176
|
-
getAddress(): Promise<string>;
|
|
177
|
-
/**
|
|
178
|
-
* Sign an unsigned transaction and return the raw signed hex string.
|
|
179
|
-
* @param tx - Chain-agnostic unsigned transaction to sign.
|
|
180
|
-
* @returns Raw signed transaction as a hex string.
|
|
181
|
-
*/
|
|
182
|
-
signTransaction(tx: UnsignedTransaction): Promise<string>;
|
|
183
|
-
/** Return the list of chain IDs this signer can sign for. */
|
|
184
|
-
getSupportedChainIds(): Promise<number[]>;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Configuration for creating a MangroveClient instance.
|
|
189
|
-
*/
|
|
190
|
-
interface MangroveConfig {
|
|
191
|
-
/** MCP server URL (e.g. 'https://mangrovemarkets.com/mcp' or 'https://mangrovemarkets.com'). */
|
|
192
|
-
url: string;
|
|
193
|
-
/** Optional Signer for transaction signing. Required for swap() operations. */
|
|
194
|
-
signer?: Signer;
|
|
195
|
-
/** Transport type. 'mcp' (default) uses MCP protocol; 'rest' uses FastAPI REST endpoints. */
|
|
196
|
-
transport?: 'mcp' | 'rest';
|
|
197
|
-
/** Optional Bearer token for authenticated endpoints. */
|
|
198
|
-
apiKey?: string;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Raw parsed JSON response from a tool call.
|
|
203
|
-
*/
|
|
204
|
-
interface ToolCallResult {
|
|
205
|
-
[key: string]: unknown;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Interface for communicating with the MangroveMarkets MCP server.
|
|
209
|
-
* Implementations: McpTransport (primary), RestTransport (fallback).
|
|
210
|
-
*/
|
|
211
|
-
interface Transport {
|
|
212
|
-
/**
|
|
213
|
-
* Invoke an MCP tool by name with parameters. Returns parsed JSON response.
|
|
214
|
-
* @param name - Tool name (e.g. 'dex_get_quote', 'oneinch_balances').
|
|
215
|
-
* @param params - Tool parameters as key-value pairs.
|
|
216
|
-
* @returns Parsed JSON response from the server.
|
|
217
|
-
*/
|
|
218
|
-
callTool(name: string, params: Record<string, unknown>): Promise<ToolCallResult>;
|
|
219
|
-
/** Open the transport connection to the server. */
|
|
220
|
-
connect(): Promise<void>;
|
|
221
|
-
/** Close the transport connection and release resources. */
|
|
222
|
-
disconnect(): Promise<void>;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Low-level DEX service wrapping individual dex_* MCP tools.
|
|
227
|
-
* For high-level swap orchestration, use SwapOrchestrator or MangroveClient.dex.swap().
|
|
228
|
-
*/
|
|
229
|
-
declare class DexService {
|
|
230
|
-
private transport;
|
|
231
|
-
constructor(transport: Transport);
|
|
232
|
-
/**
|
|
233
|
-
* Request a swap quote from the DEX aggregator.
|
|
234
|
-
* @param params - Quote parameters (src, dst, amount, chainId, mode).
|
|
235
|
-
* @returns A server-issued Quote with pricing and expiry.
|
|
236
|
-
*/
|
|
237
|
-
getQuote(params: QuoteParams): Promise<Quote>;
|
|
238
|
-
/**
|
|
239
|
-
* Convert a quote into unsigned swap calldata ready for signing.
|
|
240
|
-
* @param quoteId - ID from a previously obtained Quote.
|
|
241
|
-
* @param slippage - Maximum slippage percentage (default 0.5%).
|
|
242
|
-
* @returns Unsigned transaction calldata for the swap.
|
|
243
|
-
*/
|
|
244
|
-
prepareSwap(params: {
|
|
245
|
-
quoteId: string;
|
|
246
|
-
walletAddress: string;
|
|
247
|
-
slippage?: number;
|
|
248
|
-
}): Promise<UnsignedTransaction>;
|
|
249
|
-
/**
|
|
250
|
-
* Generate an unsigned ERC-20 approval transaction for the DEX router.
|
|
251
|
-
* @param params - Token address, chain ID, and optional specific amount.
|
|
252
|
-
* @returns Unsigned approval transaction calldata.
|
|
253
|
-
*/
|
|
254
|
-
approveToken(params: ApproveParams): Promise<UnsignedTransaction>;
|
|
255
|
-
/**
|
|
256
|
-
* Broadcast a signed transaction to the network.
|
|
257
|
-
* @param params - Chain ID, signed transaction hex, and MEV protection flag.
|
|
258
|
-
* @returns Broadcast result with transaction hash.
|
|
259
|
-
*/
|
|
260
|
-
broadcast(params: BroadcastParams): Promise<BroadcastResult>;
|
|
261
|
-
/**
|
|
262
|
-
* Check the on-chain status of a transaction.
|
|
263
|
-
* @param params - Transaction hash and chain ID.
|
|
264
|
-
* @returns Current transaction status (pending, confirmed, or failed).
|
|
265
|
-
*/
|
|
266
|
-
txStatus(params: SwapStatusParams): Promise<TransactionStatus>;
|
|
267
|
-
/**
|
|
268
|
-
* List all venues supported by the DEX aggregator.
|
|
269
|
-
* @returns Supported venue metadata.
|
|
270
|
-
*/
|
|
271
|
-
supportedVenues(): Promise<ToolCallResult>;
|
|
272
|
-
/**
|
|
273
|
-
* List supported trading pairs, optionally filtered by chain or venue.
|
|
274
|
-
* @param chainId - Optional chain ID filter.
|
|
275
|
-
* @param venue - Optional venue name filter (e.g. '1inch').
|
|
276
|
-
* @returns Supported trading pair metadata.
|
|
277
|
-
*/
|
|
278
|
-
supportedPairs(venueId: string): Promise<ToolCallResult>;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Typed response interfaces for 1inch ancillary API methods.
|
|
283
|
-
*/
|
|
284
|
-
/**
|
|
285
|
-
* ERC-20 token balance for a single token in a wallet.
|
|
286
|
-
*/
|
|
287
|
-
interface TokenBalance {
|
|
288
|
-
/** Token contract address. */
|
|
289
|
-
address: string;
|
|
290
|
-
/** Raw balance in smallest unit (wei). */
|
|
291
|
-
balance: string;
|
|
292
|
-
/** Token decimal places. */
|
|
293
|
-
decimals: number;
|
|
294
|
-
/** Token ticker symbol (e.g. 'USDC'). */
|
|
295
|
-
symbol: string;
|
|
296
|
-
/** Human-readable token name (e.g. 'USD Coin'). */
|
|
1
|
+
import { type Operation, type Operations, type CoreModels } from './contract.generated.js';
|
|
2
|
+
export type { Operation, Operations, CoreModels, OracleModels, ExecutionConfiguration } from './contract.generated.js';
|
|
3
|
+
export declare class ConfigurationError extends Error {
|
|
297
4
|
name: string;
|
|
298
5
|
}
|
|
299
|
-
|
|
300
|
-
* Gas price estimates for an EVM chain.
|
|
301
|
-
*/
|
|
302
|
-
interface GasPrice {
|
|
303
|
-
/** Base fee in gwei. */
|
|
304
|
-
baseFee: string;
|
|
305
|
-
/** Recommended max priority fee per gas in gwei. */
|
|
306
|
-
maxPriorityFeePerGas: string;
|
|
307
|
-
/** Recommended max fee per gas in gwei. */
|
|
308
|
-
maxFeePerGas: string;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Metadata for an ERC-20 token.
|
|
312
|
-
*/
|
|
313
|
-
interface TokenInfo {
|
|
314
|
-
/** Token contract address. */
|
|
315
|
-
address: string;
|
|
316
|
-
/** Token ticker symbol (e.g. 'USDC'). */
|
|
317
|
-
symbol: string;
|
|
318
|
-
/** Human-readable token name (e.g. 'USD Coin'). */
|
|
6
|
+
export declare class MalformedResponseError extends Error {
|
|
319
7
|
name: string;
|
|
320
|
-
/** Token decimal places. */
|
|
321
|
-
decimals: number;
|
|
322
|
-
/** URL to the token logo image. */
|
|
323
|
-
logoURI: string;
|
|
324
8
|
}
|
|
325
|
-
|
|
326
|
-
* Aggregated portfolio value for one or more wallets.
|
|
327
|
-
*/
|
|
328
|
-
interface PortfolioValue {
|
|
329
|
-
/** Total portfolio value in USD. */
|
|
330
|
-
total_usd: string;
|
|
331
|
-
/** Value breakdown by chain. */
|
|
332
|
-
chains: Record<string, string>;
|
|
333
|
-
/** Value breakdown by token. */
|
|
334
|
-
tokens: Record<string, string>;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* 1inch ancillary API service. Provides balance, pricing, token, portfolio,
|
|
339
|
-
* chart, and history data via the MangroveMarkets MCP server.
|
|
340
|
-
*/
|
|
341
|
-
declare class OneInchService {
|
|
342
|
-
private transport;
|
|
343
|
-
constructor(transport: Transport);
|
|
344
|
-
/**
|
|
345
|
-
* Get ERC-20 token balances for a wallet.
|
|
346
|
-
* @param params - Chain ID and wallet address.
|
|
347
|
-
* @returns Array of token balances with symbol, decimals, and name.
|
|
348
|
-
*/
|
|
349
|
-
getBalances(params: {
|
|
350
|
-
chainId: number;
|
|
351
|
-
wallet: string;
|
|
352
|
-
}): Promise<TokenBalance[]>;
|
|
353
|
-
/**
|
|
354
|
-
* Get ERC-20 token allowances for a wallet and spender.
|
|
355
|
-
* @param params - Chain ID, wallet address, and spender identifier.
|
|
356
|
-
* @returns Token address to allowance mapping.
|
|
357
|
-
*/
|
|
358
|
-
getAllowances(params: {
|
|
359
|
-
chainId: number;
|
|
360
|
-
wallet: string;
|
|
361
|
-
spender: string;
|
|
362
|
-
}): Promise<ToolCallResult>;
|
|
363
|
-
/**
|
|
364
|
-
* Get current spot prices for one or more tokens.
|
|
365
|
-
* @param params - Chain ID and comma-separated token addresses.
|
|
366
|
-
* @returns Token address to USD price mapping.
|
|
367
|
-
*/
|
|
368
|
-
getSpotPrice(params: {
|
|
369
|
-
chainId: number;
|
|
370
|
-
tokens: string;
|
|
371
|
-
}): Promise<ToolCallResult>;
|
|
372
|
-
/**
|
|
373
|
-
* Get current gas price estimates for a chain.
|
|
374
|
-
* @param params - Chain ID.
|
|
375
|
-
* @returns Typed gas price data (baseFee, maxPriorityFeePerGas, maxFeePerGas).
|
|
376
|
-
*/
|
|
377
|
-
getGasPrice(params: {
|
|
378
|
-
chainId: number;
|
|
379
|
-
}): Promise<GasPrice>;
|
|
380
|
-
/**
|
|
381
|
-
* Search for tokens by name or symbol on a given chain.
|
|
382
|
-
* @param params - Chain ID and search query string.
|
|
383
|
-
* @returns Matching token metadata.
|
|
384
|
-
*/
|
|
385
|
-
searchTokens(params: {
|
|
386
|
-
chainId: number;
|
|
387
|
-
query: string;
|
|
388
|
-
}): Promise<ToolCallResult>;
|
|
389
|
-
/**
|
|
390
|
-
* Get detailed metadata for a specific token.
|
|
391
|
-
* @param params - Chain ID and token contract address.
|
|
392
|
-
* @returns Typed token info (address, symbol, name, decimals, logoURI).
|
|
393
|
-
*/
|
|
394
|
-
getTokenInfo(params: {
|
|
395
|
-
chainId: number;
|
|
396
|
-
address: string;
|
|
397
|
-
}): Promise<TokenInfo>;
|
|
398
|
-
/**
|
|
399
|
-
* Get total portfolio value in USD for one or more wallet addresses.
|
|
400
|
-
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
401
|
-
* @returns Aggregated portfolio value.
|
|
402
|
-
*/
|
|
403
|
-
getPortfolioValue(params: {
|
|
404
|
-
addresses: string;
|
|
405
|
-
chainId?: number;
|
|
406
|
-
}): Promise<ToolCallResult>;
|
|
407
|
-
/**
|
|
408
|
-
* Get profit and loss data for a portfolio.
|
|
409
|
-
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
410
|
-
* @returns PnL breakdown by token and chain.
|
|
411
|
-
*/
|
|
412
|
-
getPortfolioPnl(params: {
|
|
413
|
-
addresses: string;
|
|
414
|
-
chainId?: number;
|
|
415
|
-
}): Promise<ToolCallResult>;
|
|
416
|
-
/**
|
|
417
|
-
* Get token holdings breakdown for a portfolio.
|
|
418
|
-
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
419
|
-
* @returns Per-token balances and values.
|
|
420
|
-
*/
|
|
421
|
-
getPortfolioTokens(params: {
|
|
422
|
-
addresses: string;
|
|
423
|
-
chainId?: number;
|
|
424
|
-
}): Promise<ToolCallResult>;
|
|
425
|
-
/**
|
|
426
|
-
* Get DeFi protocol positions for a portfolio.
|
|
427
|
-
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
428
|
-
* @returns DeFi positions by protocol.
|
|
429
|
-
*/
|
|
430
|
-
getPortfolioDefi(params: {
|
|
431
|
-
addresses: string;
|
|
432
|
-
chainId?: number;
|
|
433
|
-
}): Promise<ToolCallResult>;
|
|
434
|
-
/**
|
|
435
|
-
* Get portfolio value chart data over time.
|
|
436
|
-
* @param params - Chain ID, wallet address, and optional time range (default '1month').
|
|
437
|
-
* @returns Time-series chart data points.
|
|
438
|
-
*/
|
|
439
|
-
getChart(params: {
|
|
440
|
-
chainId: number;
|
|
441
|
-
address: string;
|
|
442
|
-
timerange?: string;
|
|
443
|
-
}): Promise<ToolCallResult>;
|
|
444
|
-
/**
|
|
445
|
-
* Get transaction history for a wallet address.
|
|
446
|
-
* @param params - Wallet address and optional result limit (default 50).
|
|
447
|
-
* @returns Recent transaction records.
|
|
448
|
-
*/
|
|
449
|
-
getHistory(params: {
|
|
450
|
-
address: string;
|
|
451
|
-
limit?: number;
|
|
452
|
-
}): Promise<ToolCallResult>;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Wallet type definitions matching the MCP server's wallet_* tools.
|
|
457
|
-
*/
|
|
458
|
-
/** Network configuration within a chain. */
|
|
459
|
-
interface NetworkInfo {
|
|
9
|
+
export declare class RequestTimeoutError extends Error {
|
|
460
10
|
name: string;
|
|
461
|
-
rpcUrl?: string;
|
|
462
|
-
explorer?: string;
|
|
463
|
-
faucetUrl?: string;
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Chain configuration returned by wallet_chain_info.
|
|
467
|
-
* Shape varies by chain family (XRPL has faucets, EVM has chain IDs, etc.).
|
|
468
|
-
*/
|
|
469
|
-
interface ChainInfo {
|
|
470
|
-
chain: string;
|
|
471
|
-
chainFamily: string;
|
|
472
|
-
nativeToken: string;
|
|
473
|
-
walletCreation: string;
|
|
474
|
-
networks: Record<string, NetworkInfo>;
|
|
475
|
-
/** EVM-only: supported chain IDs. */
|
|
476
|
-
supportedChainIds?: number[];
|
|
477
|
-
/** EVM/Solana: SDK method hint for client-side wallet creation. */
|
|
478
|
-
sdkMethod?: string;
|
|
479
|
-
}
|
|
480
|
-
/** Result from wallet_create (XRPL faucet or EVM keypair). */
|
|
481
|
-
interface WalletCreateResult {
|
|
482
|
-
address: string;
|
|
483
|
-
chain: string;
|
|
484
|
-
network: string;
|
|
485
|
-
isFunded: boolean;
|
|
486
|
-
warnings: string[];
|
|
487
|
-
/** XRPL-only: wallet secret (seed). */
|
|
488
|
-
secret?: string;
|
|
489
|
-
/** XRPL-only: BIP-39 seed phrase. */
|
|
490
|
-
seedPhrase?: string | null;
|
|
491
|
-
/** EVM-only: private key hex. */
|
|
492
|
-
privateKey?: string;
|
|
493
|
-
/** EVM-only: chain ID. */
|
|
494
|
-
chainId?: number;
|
|
495
|
-
}
|
|
496
|
-
/** Result from wallet_balance (stub -- NOT_IMPLEMENTED). */
|
|
497
|
-
interface BalanceResult {
|
|
498
|
-
address: string;
|
|
499
|
-
chain: string;
|
|
500
|
-
balances: Record<string, string>;
|
|
501
11
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
address: string;
|
|
505
|
-
chain: string;
|
|
506
|
-
transactions: unknown[];
|
|
12
|
+
export declare class RequestAbortedError extends Error {
|
|
13
|
+
name: string;
|
|
507
14
|
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
/** Chain family: 'xrpl', 'evm', or 'solana'. Defaults to 'xrpl'. */
|
|
511
|
-
chain?: string;
|
|
15
|
+
export declare class NetworkError extends Error {
|
|
16
|
+
name: string;
|
|
512
17
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
18
|
+
export declare class APIError extends Error {
|
|
19
|
+
readonly status: number;
|
|
20
|
+
readonly code: string;
|
|
21
|
+
readonly correlationId?: string | undefined;
|
|
22
|
+
readonly retryAfter?: string | undefined;
|
|
23
|
+
name: string;
|
|
24
|
+
readonly response: unknown;
|
|
25
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
26
|
+
constructor(status: number, code: string, message: string, correlationId?: string | undefined, retryAfter?: string | undefined, response?: unknown, headers?: Readonly<Record<string, string>>);
|
|
27
|
+
toJSON(): Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
export interface ClientOptions {
|
|
30
|
+
apiKey?: string | undefined;
|
|
31
|
+
baseUrl?: string | undefined;
|
|
32
|
+
environment?: 'prod' | 'dev' | 'local';
|
|
33
|
+
timeoutMs?: number;
|
|
34
|
+
maxResponseBytes?: number;
|
|
35
|
+
fetch?: typeof globalThis.fetch;
|
|
36
|
+
}
|
|
37
|
+
export interface RequestControls {
|
|
38
|
+
signal?: AbortSignal;
|
|
39
|
+
timeoutMs?: number;
|
|
40
|
+
}
|
|
41
|
+
export type RequestOptions<K extends Operation> = Operations[K]['input'] & RequestControls;
|
|
42
|
+
export interface UsageMetrics {
|
|
43
|
+
conversations_count?: number | null;
|
|
44
|
+
messages_count?: number | null;
|
|
45
|
+
estimated_tokens?: number | null;
|
|
46
|
+
strategies_count?: number | null;
|
|
47
|
+
backtests_count?: number | null;
|
|
48
|
+
token_breakdown?: Record<string, unknown> | null;
|
|
49
|
+
tool_calls?: Record<string, unknown> | null;
|
|
50
|
+
[key: string]: unknown;
|
|
521
51
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
chainId?: number;
|
|
52
|
+
export interface Page<T> {
|
|
53
|
+
items: T[];
|
|
54
|
+
total: number;
|
|
55
|
+
offset: number;
|
|
56
|
+
limit: number;
|
|
57
|
+
hasMore: boolean;
|
|
58
|
+
nextOffset: number | null;
|
|
530
59
|
}
|
|
531
|
-
|
|
532
|
-
interface TransactionsParams {
|
|
533
|
-
/** Wallet address to query. */
|
|
534
|
-
address: string;
|
|
535
|
-
/** Chain family: 'xrpl', 'evm', or 'solana'. Defaults to 'xrpl'. */
|
|
536
|
-
chain?: string;
|
|
537
|
-
/** EVM chain ID (required for EVM chains). */
|
|
538
|
-
chainId?: number;
|
|
539
|
-
/** Max transactions to return. Defaults to 20. */
|
|
60
|
+
export interface SignalListOptions extends RequestControls {
|
|
540
61
|
limit?: number;
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Low-level wallet service wrapping the wallet_* MCP tools.
|
|
545
|
-
* Provides chain info, wallet creation, balance queries, and transaction history.
|
|
546
|
-
*/
|
|
547
|
-
declare class WalletService {
|
|
548
|
-
private transport;
|
|
549
|
-
constructor(transport: Transport);
|
|
550
|
-
/**
|
|
551
|
-
* Get chain configuration: supported networks, RPC URLs, native token info.
|
|
552
|
-
* Call this before creating a wallet to understand chain requirements.
|
|
553
|
-
* @param params - Optional chain family filter (defaults to 'xrpl').
|
|
554
|
-
*/
|
|
555
|
-
chainInfo(params?: ChainInfoParams): Promise<ChainInfo>;
|
|
556
|
-
/**
|
|
557
|
-
* Create a new wallet. XRPL wallets are funded via testnet/devnet faucet.
|
|
558
|
-
* EVM wallets generate a random keypair. Solana is Phase 3.
|
|
559
|
-
* @param params - Chain, network, and optional chain ID.
|
|
560
|
-
*/
|
|
561
|
-
create(params?: CreateWalletParams): Promise<WalletCreateResult>;
|
|
562
|
-
/**
|
|
563
|
-
* Check wallet balance. Currently returns NOT_IMPLEMENTED from the server.
|
|
564
|
-
* @param params - Address, chain, and optional chain ID.
|
|
565
|
-
*/
|
|
566
|
-
balance(params: BalanceParams): Promise<ToolCallResult>;
|
|
567
|
-
/**
|
|
568
|
-
* List recent transactions for an address. Currently returns NOT_IMPLEMENTED from the server.
|
|
569
|
-
* @param params - Address, chain, optional chain ID and limit.
|
|
570
|
-
*/
|
|
571
|
-
transactions(params: TransactionsParams): Promise<ToolCallResult>;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* TypeScript types for the Mangrove Marketplace domain.
|
|
576
|
-
*
|
|
577
|
-
* Maps to the Python server's marketplace models (Listing, Offer, Rating)
|
|
578
|
-
* with camelCase naming per TypeScript convention.
|
|
579
|
-
*/
|
|
580
|
-
type ListingType = 'static' | 'service';
|
|
581
|
-
type ListingStatus = 'draft' | 'active' | 'offered' | 'escrowed' | 'delivered' | 'completed' | 'rated' | 'cancelled';
|
|
582
|
-
type OfferStatus = 'pending' | 'accepted' | 'rejected' | 'cancelled' | 'expired';
|
|
583
|
-
type Category = 'data' | 'compute' | 'intelligence' | 'models' | 'apis' | 'storage' | 'identity' | 'media' | 'code' | 'other';
|
|
584
|
-
/** A marketplace listing as returned by the server. */
|
|
585
|
-
interface Listing {
|
|
586
|
-
listingId: string;
|
|
587
|
-
sellerAddress: string;
|
|
588
|
-
title: string;
|
|
589
|
-
description: string;
|
|
590
|
-
category: Category;
|
|
591
|
-
subcategory?: string | null;
|
|
592
|
-
priceXrp: number;
|
|
593
|
-
listingType: ListingType;
|
|
594
|
-
status: ListingStatus;
|
|
595
|
-
tags: string[];
|
|
596
|
-
storageUri?: string | null;
|
|
597
|
-
contentHash?: string | null;
|
|
598
|
-
createdAt: string;
|
|
599
|
-
updatedAt: string;
|
|
600
|
-
expiresAt?: string | null;
|
|
601
|
-
}
|
|
602
|
-
/** An offer on a marketplace listing. */
|
|
603
|
-
interface Offer {
|
|
604
|
-
id: string;
|
|
605
|
-
listingId: string;
|
|
606
|
-
buyerAddress: string;
|
|
607
|
-
amountXrp: number;
|
|
608
|
-
status: OfferStatus;
|
|
609
|
-
}
|
|
610
|
-
/** A rating for a completed marketplace transaction. */
|
|
611
|
-
interface Rating {
|
|
612
|
-
id: string;
|
|
613
|
-
listingId: string;
|
|
614
|
-
score: number;
|
|
615
|
-
comment?: string | null;
|
|
616
|
-
}
|
|
617
|
-
/** Paginated search results from marketplace_search. */
|
|
618
|
-
interface SearchResult {
|
|
619
|
-
listings: Listing[];
|
|
620
|
-
totalCount: number;
|
|
621
|
-
nextCursor: string | null;
|
|
622
|
-
}
|
|
623
|
-
/** Parameters for marketplace_create_listing. */
|
|
624
|
-
interface CreateListingParams {
|
|
625
|
-
sellerAddress: string;
|
|
626
|
-
title: string;
|
|
627
|
-
description: string;
|
|
628
|
-
category: string;
|
|
629
|
-
priceXrp: number;
|
|
630
|
-
listingType?: ListingType;
|
|
631
|
-
storageUri?: string;
|
|
632
|
-
contentHash?: string;
|
|
633
|
-
subcategory?: string;
|
|
634
|
-
tags?: string[];
|
|
635
|
-
}
|
|
636
|
-
/** Parameters for marketplace_search. */
|
|
637
|
-
interface SearchParams {
|
|
638
|
-
query?: string;
|
|
62
|
+
offset?: number;
|
|
639
63
|
category?: string;
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
listingType?: string;
|
|
643
|
-
limit?: number;
|
|
644
|
-
}
|
|
645
|
-
/** Parameters for marketplace_make_offer. */
|
|
646
|
-
interface MakeOfferParams {
|
|
647
|
-
listingId: string;
|
|
648
|
-
buyerAddress: string;
|
|
649
|
-
}
|
|
650
|
-
/** Parameters for marketplace_accept_offer. */
|
|
651
|
-
interface AcceptOfferParams {
|
|
652
|
-
offerId: string;
|
|
653
|
-
sellerAddress: string;
|
|
654
|
-
}
|
|
655
|
-
/** Parameters for marketplace_confirm_delivery. */
|
|
656
|
-
interface ConfirmDeliveryParams {
|
|
657
|
-
offerId: string;
|
|
658
|
-
buyerAddress: string;
|
|
659
|
-
}
|
|
660
|
-
/** Parameters for marketplace_rate. */
|
|
661
|
-
interface RateParams {
|
|
662
|
-
offerId: string;
|
|
663
|
-
raterAddress: string;
|
|
664
|
-
score: number;
|
|
665
|
-
comment?: string;
|
|
666
|
-
}
|
|
667
|
-
/** Compact create-listing response from the server. */
|
|
668
|
-
interface CreateListingResult {
|
|
669
|
-
listingId: string;
|
|
670
|
-
status: ListingStatus;
|
|
671
|
-
createdAt: string;
|
|
64
|
+
regime_direction?: string;
|
|
65
|
+
role?: string;
|
|
672
66
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
* Low-level Marketplace service wrapping the marketplace_* MCP tools.
|
|
676
|
-
* Each method maps 1:1 to a server tool, converting camelCase SDK params
|
|
677
|
-
* to the snake_case wire format expected by the Python server.
|
|
678
|
-
*/
|
|
679
|
-
declare class MarketplaceService {
|
|
680
|
-
private transport;
|
|
681
|
-
constructor(transport: Transport);
|
|
682
|
-
/**
|
|
683
|
-
* Create a new listing on the Mangrove Marketplace.
|
|
684
|
-
* @param params - Listing details (seller address, title, category, price, etc.).
|
|
685
|
-
* @returns Compact result with listing ID, status, and creation timestamp.
|
|
686
|
-
*/
|
|
687
|
-
createListing(params: CreateListingParams): Promise<CreateListingResult>;
|
|
688
|
-
/**
|
|
689
|
-
* Search the Mangrove Marketplace for listings.
|
|
690
|
-
* @param params - Optional filters (query, category, price range, type, limit).
|
|
691
|
-
* @returns Paginated search results with listings and total count.
|
|
692
|
-
*/
|
|
693
|
-
search(params?: SearchParams): Promise<SearchResult>;
|
|
694
|
-
/**
|
|
695
|
-
* Get full details of a specific listing by ID.
|
|
696
|
-
* @param listingId - The listing's unique identifier.
|
|
697
|
-
* @returns Full listing details.
|
|
698
|
-
*/
|
|
699
|
-
getListing(listingId: string): Promise<Listing>;
|
|
700
|
-
/**
|
|
701
|
-
* Make an offer on a marketplace listing.
|
|
702
|
-
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
703
|
-
* @param params - Listing ID and buyer address.
|
|
704
|
-
* @returns Raw server response.
|
|
705
|
-
*/
|
|
706
|
-
makeOffer(params: MakeOfferParams): Promise<ToolCallResult>;
|
|
707
|
-
/**
|
|
708
|
-
* Accept an offer, creating XRPL escrow.
|
|
709
|
-
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
710
|
-
* @param params - Offer ID and seller address.
|
|
711
|
-
* @returns Raw server response.
|
|
712
|
-
*/
|
|
713
|
-
acceptOffer(params: AcceptOfferParams): Promise<ToolCallResult>;
|
|
714
|
-
/**
|
|
715
|
-
* Confirm delivery and release escrow to seller.
|
|
716
|
-
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
717
|
-
* @param params - Offer ID and buyer address.
|
|
718
|
-
* @returns Raw server response.
|
|
719
|
-
*/
|
|
720
|
-
confirmDelivery(params: ConfirmDeliveryParams): Promise<ToolCallResult>;
|
|
721
|
-
/**
|
|
722
|
-
* Rate a completed marketplace transaction.
|
|
723
|
-
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
724
|
-
* @param params - Offer ID, rater address, score (1-5), optional comment.
|
|
725
|
-
* @returns Raw server response.
|
|
726
|
-
*/
|
|
727
|
-
rate(params: RateParams): Promise<ToolCallResult>;
|
|
67
|
+
export interface PollOptions extends RequestControls {
|
|
68
|
+
pollIntervalMs?: number;
|
|
728
69
|
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
}
|
|
734
|
-
/**
|
|
735
|
-
* Main entry point for the MangroveMarkets SDK. Provides access to DEX, marketplace,
|
|
736
|
-
* and wallet services through a pluggable transport layer.
|
|
737
|
-
*/
|
|
738
|
-
declare class MangroveClient {
|
|
739
|
-
private transport;
|
|
740
|
-
private _dex;
|
|
741
|
-
private _oneinch;
|
|
742
|
-
private _wallet;
|
|
743
|
-
private _marketplace;
|
|
744
|
-
private _swapOrchestrator?;
|
|
745
|
-
private config;
|
|
746
|
-
/**
|
|
747
|
-
* Create a MangroveClient. Uses MCP transport by default; pass transport: 'rest' for REST fallback.
|
|
748
|
-
* @param config - Client configuration (url, signer, transport, apiKey).
|
|
749
|
-
*/
|
|
750
|
-
constructor(config: MangroveConfig);
|
|
751
|
-
/**
|
|
752
|
-
* Access DEX operations. Includes low-level methods (getQuote, prepareSwap, approveToken,
|
|
753
|
-
* broadcast, txStatus) and high-level swap() orchestration.
|
|
754
|
-
* Calling swap() requires a Signer in the config.
|
|
755
|
-
*/
|
|
756
|
-
get dex(): DexClientApi;
|
|
757
|
-
/**
|
|
758
|
-
* Access 1inch ancillary operations: balances, gas prices, token info,
|
|
759
|
-
* portfolio data, charts, and history.
|
|
760
|
-
*/
|
|
761
|
-
get oneinch(): OneInchService;
|
|
762
|
-
/**
|
|
763
|
-
* Access wallet operations: chain info, wallet creation, balance, and transaction history.
|
|
764
|
-
*/
|
|
765
|
-
get wallet(): WalletService;
|
|
766
|
-
/**
|
|
767
|
-
* Access marketplace operations: create listings, search, get details,
|
|
768
|
-
* make offers, accept offers, confirm delivery, and rate transactions.
|
|
769
|
-
*/
|
|
770
|
-
get marketplace(): MarketplaceService;
|
|
771
|
-
/** Open the transport connection. Must be called before making any tool calls. */
|
|
772
|
-
connect(): Promise<void>;
|
|
773
|
-
/** Close the transport connection and release resources. */
|
|
774
|
-
disconnect(): Promise<void>;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
interface EthersWallet {
|
|
778
|
-
address: string;
|
|
779
|
-
signTransaction(tx: Record<string, unknown>): Promise<string>;
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Signer adapter for ethers.js Wallet. Maps UnsignedTransaction fields to
|
|
783
|
-
* ethers.js format (gas -> gasLimit, spreads EIP-1559 fields).
|
|
784
|
-
*/
|
|
785
|
-
declare class EthersSigner implements Signer {
|
|
786
|
-
private wallet;
|
|
787
|
-
private chainIds;
|
|
788
|
-
/**
|
|
789
|
-
* Create an EthersSigner from an ethers.js Wallet and list of supported chain IDs.
|
|
790
|
-
* @param wallet - An ethers.js Wallet instance (or any object matching EthersWallet).
|
|
791
|
-
* @param supportedChainIds - Chain IDs this wallet can sign transactions for.
|
|
792
|
-
*/
|
|
793
|
-
constructor(wallet: EthersWallet, supportedChainIds: number[]);
|
|
794
|
-
/** {@inheritDoc Signer.getAddress} */
|
|
795
|
-
getAddress(): Promise<string>;
|
|
796
|
-
/** {@inheritDoc Signer.signTransaction} */
|
|
797
|
-
signTransaction(tx: UnsignedTransaction): Promise<string>;
|
|
798
|
-
/** {@inheritDoc Signer.getSupportedChainIds} */
|
|
799
|
-
getSupportedChainIds(): Promise<number[]>;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* MCP protocol transport using Streamable HTTP. Primary transport for agent communication.
|
|
804
|
-
*/
|
|
805
|
-
declare class McpTransport implements Transport {
|
|
806
|
-
private url;
|
|
807
|
-
private apiKey?;
|
|
808
|
-
private client;
|
|
809
|
-
/**
|
|
810
|
-
* Create an MCP transport targeting the given server URL.
|
|
811
|
-
* @param url - MCP server endpoint URL.
|
|
812
|
-
* @param apiKey - Optional Bearer token for authenticated requests.
|
|
813
|
-
*/
|
|
814
|
-
constructor(url: string, apiKey?: string);
|
|
815
|
-
connect(): Promise<void>;
|
|
816
|
-
callTool(name: string, params: Record<string, unknown>): Promise<ToolCallResult>;
|
|
817
|
-
disconnect(): Promise<void>;
|
|
70
|
+
export interface BacktestStatus {
|
|
71
|
+
backtest_id: string;
|
|
72
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
73
|
+
[key: string]: unknown;
|
|
818
74
|
}
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
75
|
+
type WorkflowName = {
|
|
76
|
+
[K in Operation]: K extends `POST /api/v1/strategy-workflow/${infer N}` ? N : never;
|
|
77
|
+
}[Operation];
|
|
78
|
+
type WorkflowOperation<N extends WorkflowName> = Extract<Operation, `POST /api/v1/strategy-workflow/${N}`>;
|
|
79
|
+
type Camel<S extends string> = S extends `${infer A}_${infer B}` ? `${A}${Capitalize<Camel<B>>}` : S;
|
|
80
|
+
export type StrategyWorkflow = {
|
|
81
|
+
[N in WorkflowName as Camel<N>]: (options: RequestOptions<WorkflowOperation<N>>) => Promise<Operations[WorkflowOperation<N>]['output']>;
|
|
82
|
+
};
|
|
83
|
+
export declare class MangroveAI {
|
|
84
|
+
#private;
|
|
85
|
+
readonly baseUrl: string;
|
|
86
|
+
readonly timeoutMs: number;
|
|
87
|
+
private readonly fetcher;
|
|
88
|
+
private readonly maxResponseBytes;
|
|
89
|
+
constructor(options?: ClientOptions);
|
|
90
|
+
request<K extends Operation>(operation: K, options: RequestOptions<K>): Promise<Operations[K]['output']>;
|
|
91
|
+
readonly users: {
|
|
92
|
+
getMyMetrics: (controls?: RequestControls) => Promise<UsageMetrics>;
|
|
93
|
+
};
|
|
94
|
+
readonly signals: {
|
|
95
|
+
list: (options?: SignalListOptions) => Promise<Page<CoreModels["api1.Signal"]>>;
|
|
96
|
+
listIter: (options?: Omit<SignalListOptions, "offset">) => AsyncIterable<CoreModels["api1.Signal"]>;
|
|
97
|
+
};
|
|
98
|
+
readonly strategyWorkflow: StrategyWorkflow;
|
|
99
|
+
readonly backtesting: {
|
|
100
|
+
submit: (body: CoreModels["api2.BacktestRequest"], controls?: RequestControls) => Promise<BacktestStatus>;
|
|
101
|
+
getStatus: (backtestId: string, controls?: RequestControls) => Promise<BacktestStatus>;
|
|
102
|
+
wait: (backtestId: string, options?: PollOptions) => Promise<BacktestStatus>;
|
|
103
|
+
};
|
|
104
|
+
private backtestStatus;
|
|
835
105
|
}
|
|
836
|
-
|
|
837
|
-
export { type AcceptOfferParams, type ApproveParams, type BalanceParams, type BalanceResult, type BillingMode, type BroadcastParams, type BroadcastResult, type ChainInfo, type ChainInfoParams, type ConfirmDeliveryParams, type CreateListingParams, type CreateListingResult, type CreateWalletParams, DexService, EthersSigner, type GasPrice, type Listing, type MakeOfferParams, MangroveClient, type MangroveConfig, MarketplaceService, McpTransport, type Offer, OneInchService, type PortfolioValue, type Quote, type QuoteParams, type RateParams, type Rating, RestTransport, type SearchParams, type SearchResult, type Signer, type SwapParams, type SwapResult, type SwapStatusParams, type TokenBalance, type TokenInfo, type ToolCallResult, type TransactionHistoryResult, type TransactionStatus, type TransactionsParams, type Transport, type UnsignedTransaction, type WalletCreateResult, WalletService };
|