@mangrove-ai/sdk 0.2.0 → 0.3.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/dist/index.cjs +434 -2
- package/dist/index.d.cts +467 -1
- package/dist/index.d.ts +467 -1
- package/dist/index.js +430 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -278,6 +278,455 @@ declare class DexService {
|
|
|
278
278
|
supportedPairs(venueId: string): Promise<ToolCallResult>;
|
|
279
279
|
}
|
|
280
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'). */
|
|
297
|
+
name: string;
|
|
298
|
+
}
|
|
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'). */
|
|
319
|
+
name: string;
|
|
320
|
+
/** Token decimal places. */
|
|
321
|
+
decimals: number;
|
|
322
|
+
/** URL to the token logo image. */
|
|
323
|
+
logoURI: string;
|
|
324
|
+
}
|
|
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 {
|
|
460
|
+
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
|
+
}
|
|
502
|
+
/** Result from wallet_transactions (stub -- NOT_IMPLEMENTED). */
|
|
503
|
+
interface TransactionHistoryResult {
|
|
504
|
+
address: string;
|
|
505
|
+
chain: string;
|
|
506
|
+
transactions: unknown[];
|
|
507
|
+
}
|
|
508
|
+
/** Parameters for wallet_chain_info. */
|
|
509
|
+
interface ChainInfoParams {
|
|
510
|
+
/** Chain family: 'xrpl', 'evm', or 'solana'. Defaults to 'xrpl'. */
|
|
511
|
+
chain?: string;
|
|
512
|
+
}
|
|
513
|
+
/** Parameters for wallet_create. */
|
|
514
|
+
interface CreateWalletParams {
|
|
515
|
+
/** Chain family: 'xrpl', 'evm', or 'solana'. Defaults to 'xrpl'. */
|
|
516
|
+
chain?: string;
|
|
517
|
+
/** XRPL network: 'testnet', 'devnet', or 'mainnet'. Defaults to 'testnet'. */
|
|
518
|
+
network?: string;
|
|
519
|
+
/** EVM chain ID (1=Ethereum, 8453=Base, 42161=Arbitrum). Defaults to 1. */
|
|
520
|
+
chainId?: number;
|
|
521
|
+
}
|
|
522
|
+
/** Parameters for wallet_balance. */
|
|
523
|
+
interface BalanceParams {
|
|
524
|
+
/** Wallet address to check. */
|
|
525
|
+
address: string;
|
|
526
|
+
/** Chain family: 'xrpl', 'evm', or 'solana'. Defaults to 'xrpl'. */
|
|
527
|
+
chain?: string;
|
|
528
|
+
/** EVM chain ID (required for EVM chains). */
|
|
529
|
+
chainId?: number;
|
|
530
|
+
}
|
|
531
|
+
/** Parameters for wallet_transactions. */
|
|
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. */
|
|
540
|
+
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;
|
|
639
|
+
category?: string;
|
|
640
|
+
minPrice?: number;
|
|
641
|
+
maxPrice?: number;
|
|
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;
|
|
672
|
+
}
|
|
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>;
|
|
728
|
+
}
|
|
729
|
+
|
|
281
730
|
/** Combined DEX API surface exposing both low-level tools and high-level swap(). */
|
|
282
731
|
interface DexClientApi extends DexService {
|
|
283
732
|
swap(params: SwapParams): Promise<SwapResult>;
|
|
@@ -289,6 +738,9 @@ interface DexClientApi extends DexService {
|
|
|
289
738
|
declare class MangroveClient {
|
|
290
739
|
private transport;
|
|
291
740
|
private _dex;
|
|
741
|
+
private _oneinch;
|
|
742
|
+
private _wallet;
|
|
743
|
+
private _marketplace;
|
|
292
744
|
private _swapOrchestrator?;
|
|
293
745
|
private config;
|
|
294
746
|
/**
|
|
@@ -302,6 +754,20 @@ declare class MangroveClient {
|
|
|
302
754
|
* Calling swap() requires a Signer in the config.
|
|
303
755
|
*/
|
|
304
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;
|
|
305
771
|
/** Open the transport connection. Must be called before making any tool calls. */
|
|
306
772
|
connect(): Promise<void>;
|
|
307
773
|
/** Close the transport connection and release resources. */
|
|
@@ -368,4 +834,4 @@ declare class RestTransport implements Transport {
|
|
|
368
834
|
disconnect(): Promise<void>;
|
|
369
835
|
}
|
|
370
836
|
|
|
371
|
-
export { type ApproveParams, type BillingMode, type BroadcastParams, type BroadcastResult, DexService, EthersSigner, MangroveClient, type MangroveConfig, McpTransport, type Quote, type QuoteParams, RestTransport, type Signer, type SwapParams, type SwapResult, type SwapStatusParams, type ToolCallResult, type TransactionStatus, type Transport, type UnsignedTransaction };
|
|
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 };
|