@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.cjs
CHANGED
|
@@ -23,8 +23,11 @@ __export(index_exports, {
|
|
|
23
23
|
DexService: () => DexService,
|
|
24
24
|
EthersSigner: () => EthersSigner,
|
|
25
25
|
MangroveClient: () => MangroveClient,
|
|
26
|
+
MarketplaceService: () => MarketplaceService,
|
|
26
27
|
McpTransport: () => McpTransport,
|
|
27
|
-
|
|
28
|
+
OneInchService: () => OneInchService,
|
|
29
|
+
RestTransport: () => RestTransport,
|
|
30
|
+
WalletService: () => WalletService
|
|
28
31
|
});
|
|
29
32
|
module.exports = __toCommonJS(index_exports);
|
|
30
33
|
|
|
@@ -175,6 +178,65 @@ function normalizeTransactionStatus(raw) {
|
|
|
175
178
|
...raw.gas_used != null || raw.gasUsed != null ? { gasUsed: String(raw.gas_used ?? raw.gasUsed) } : {}
|
|
176
179
|
};
|
|
177
180
|
}
|
|
181
|
+
function normalizeTokenBalance(raw) {
|
|
182
|
+
return {
|
|
183
|
+
address: raw.address ?? "",
|
|
184
|
+
balance: String(raw.balance ?? "0"),
|
|
185
|
+
decimals: raw.decimals ?? 0,
|
|
186
|
+
symbol: raw.symbol ?? "",
|
|
187
|
+
name: raw.name ?? ""
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function normalizeGasPrice(raw) {
|
|
191
|
+
return {
|
|
192
|
+
baseFee: String(raw.baseFee ?? raw.base_fee ?? "0"),
|
|
193
|
+
maxPriorityFeePerGas: String(raw.maxPriorityFeePerGas ?? raw.max_priority_fee_per_gas ?? "0"),
|
|
194
|
+
maxFeePerGas: String(raw.maxFeePerGas ?? raw.max_fee_per_gas ?? "0")
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function normalizeTokenInfo(raw) {
|
|
198
|
+
return {
|
|
199
|
+
address: raw.address ?? "",
|
|
200
|
+
symbol: raw.symbol ?? "",
|
|
201
|
+
name: raw.name ?? "",
|
|
202
|
+
decimals: raw.decimals ?? 0,
|
|
203
|
+
logoURI: raw.logoURI ?? raw.logo_uri ?? raw.logoUrl ?? raw.logo_url ?? ""
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
function normalizeCreateListingResult(raw) {
|
|
207
|
+
return {
|
|
208
|
+
listingId: raw.listing_id ?? raw.listingId,
|
|
209
|
+
status: raw.status ?? "active",
|
|
210
|
+
createdAt: raw.created_at ?? raw.createdAt ?? ""
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
function normalizeListing(raw) {
|
|
214
|
+
return {
|
|
215
|
+
listingId: raw.listing_id ?? raw.listingId,
|
|
216
|
+
sellerAddress: raw.seller_address ?? raw.sellerAddress,
|
|
217
|
+
title: raw.title ?? "",
|
|
218
|
+
description: raw.description ?? "",
|
|
219
|
+
category: raw.category ?? "other",
|
|
220
|
+
subcategory: raw.subcategory ?? null,
|
|
221
|
+
priceXrp: raw.price_xrp ?? raw.priceXrp ?? 0,
|
|
222
|
+
listingType: raw.listing_type ?? raw.listingType ?? "static",
|
|
223
|
+
status: raw.status ?? "active",
|
|
224
|
+
tags: raw.tags ?? [],
|
|
225
|
+
storageUri: raw.storage_uri ?? raw.storageUri ?? null,
|
|
226
|
+
contentHash: raw.content_hash ?? raw.contentHash ?? null,
|
|
227
|
+
createdAt: raw.created_at ?? raw.createdAt ?? "",
|
|
228
|
+
updatedAt: raw.updated_at ?? raw.updatedAt ?? "",
|
|
229
|
+
expiresAt: raw.expires_at ?? raw.expiresAt ?? null
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function normalizeSearchResult(raw) {
|
|
233
|
+
const rawListings = raw.listings ?? [];
|
|
234
|
+
return {
|
|
235
|
+
listings: rawListings.map(normalizeListing),
|
|
236
|
+
totalCount: raw.total_count ?? raw.totalCount ?? 0,
|
|
237
|
+
nextCursor: raw.next_cursor ?? raw.nextCursor ?? null
|
|
238
|
+
};
|
|
239
|
+
}
|
|
178
240
|
|
|
179
241
|
// src/dex/service.ts
|
|
180
242
|
var DexService = class {
|
|
@@ -378,6 +440,350 @@ var SwapOrchestrator = class {
|
|
|
378
440
|
}
|
|
379
441
|
};
|
|
380
442
|
|
|
443
|
+
// src/oneinch/service.ts
|
|
444
|
+
var OneInchService = class {
|
|
445
|
+
constructor(transport) {
|
|
446
|
+
this.transport = transport;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Get ERC-20 token balances for a wallet.
|
|
450
|
+
* @param params - Chain ID and wallet address.
|
|
451
|
+
* @returns Array of token balances with symbol, decimals, and name.
|
|
452
|
+
*/
|
|
453
|
+
async getBalances(params) {
|
|
454
|
+
const result = await this.transport.callTool("oneinch_balances", {
|
|
455
|
+
chain_id: params.chainId,
|
|
456
|
+
wallet: params.wallet
|
|
457
|
+
});
|
|
458
|
+
const raw = result;
|
|
459
|
+
const balances = raw.balances;
|
|
460
|
+
if (Array.isArray(balances)) {
|
|
461
|
+
return balances.map((b) => normalizeTokenBalance(b));
|
|
462
|
+
}
|
|
463
|
+
if (balances && typeof balances === "object") {
|
|
464
|
+
return Object.entries(balances).map(
|
|
465
|
+
([address, balance]) => normalizeTokenBalance({ address, balance: String(balance) })
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
return [];
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Get ERC-20 token allowances for a wallet and spender.
|
|
472
|
+
* @param params - Chain ID, wallet address, and spender identifier.
|
|
473
|
+
* @returns Token address to allowance mapping.
|
|
474
|
+
*/
|
|
475
|
+
async getAllowances(params) {
|
|
476
|
+
return this.transport.callTool("oneinch_allowances", {
|
|
477
|
+
chain_id: params.chainId,
|
|
478
|
+
wallet: params.wallet,
|
|
479
|
+
spender: params.spender
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Get current spot prices for one or more tokens.
|
|
484
|
+
* @param params - Chain ID and comma-separated token addresses.
|
|
485
|
+
* @returns Token address to USD price mapping.
|
|
486
|
+
*/
|
|
487
|
+
async getSpotPrice(params) {
|
|
488
|
+
return this.transport.callTool("oneinch_spot_price", {
|
|
489
|
+
chain_id: params.chainId,
|
|
490
|
+
tokens: params.tokens
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Get current gas price estimates for a chain.
|
|
495
|
+
* @param params - Chain ID.
|
|
496
|
+
* @returns Typed gas price data (baseFee, maxPriorityFeePerGas, maxFeePerGas).
|
|
497
|
+
*/
|
|
498
|
+
async getGasPrice(params) {
|
|
499
|
+
const result = await this.transport.callTool("oneinch_gas_price", {
|
|
500
|
+
chain_id: params.chainId
|
|
501
|
+
});
|
|
502
|
+
return normalizeGasPrice(result);
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Search for tokens by name or symbol on a given chain.
|
|
506
|
+
* @param params - Chain ID and search query string.
|
|
507
|
+
* @returns Matching token metadata.
|
|
508
|
+
*/
|
|
509
|
+
async searchTokens(params) {
|
|
510
|
+
return this.transport.callTool("oneinch_token_search", {
|
|
511
|
+
chain_id: params.chainId,
|
|
512
|
+
query: params.query
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Get detailed metadata for a specific token.
|
|
517
|
+
* @param params - Chain ID and token contract address.
|
|
518
|
+
* @returns Typed token info (address, symbol, name, decimals, logoURI).
|
|
519
|
+
*/
|
|
520
|
+
async getTokenInfo(params) {
|
|
521
|
+
const result = await this.transport.callTool("oneinch_token_info", {
|
|
522
|
+
chain_id: params.chainId,
|
|
523
|
+
address: params.address
|
|
524
|
+
});
|
|
525
|
+
return normalizeTokenInfo(result);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Get total portfolio value in USD for one or more wallet addresses.
|
|
529
|
+
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
530
|
+
* @returns Aggregated portfolio value.
|
|
531
|
+
*/
|
|
532
|
+
async getPortfolioValue(params) {
|
|
533
|
+
return this.transport.callTool("oneinch_portfolio_value", {
|
|
534
|
+
addresses: params.addresses,
|
|
535
|
+
...params.chainId ? { chain_id: params.chainId } : {}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Get profit and loss data for a portfolio.
|
|
540
|
+
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
541
|
+
* @returns PnL breakdown by token and chain.
|
|
542
|
+
*/
|
|
543
|
+
async getPortfolioPnl(params) {
|
|
544
|
+
return this.transport.callTool("oneinch_portfolio_pnl", {
|
|
545
|
+
addresses: params.addresses,
|
|
546
|
+
...params.chainId ? { chain_id: params.chainId } : {}
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Get token holdings breakdown for a portfolio.
|
|
551
|
+
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
552
|
+
* @returns Per-token balances and values.
|
|
553
|
+
*/
|
|
554
|
+
async getPortfolioTokens(params) {
|
|
555
|
+
return this.transport.callTool("oneinch_portfolio_tokens", {
|
|
556
|
+
addresses: params.addresses,
|
|
557
|
+
...params.chainId ? { chain_id: params.chainId } : {}
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Get DeFi protocol positions for a portfolio.
|
|
562
|
+
* @param params - Comma-separated wallet addresses and optional chain ID filter.
|
|
563
|
+
* @returns DeFi positions by protocol.
|
|
564
|
+
*/
|
|
565
|
+
async getPortfolioDefi(params) {
|
|
566
|
+
return this.transport.callTool("oneinch_portfolio_defi", {
|
|
567
|
+
addresses: params.addresses,
|
|
568
|
+
...params.chainId ? { chain_id: params.chainId } : {}
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Get portfolio value chart data over time.
|
|
573
|
+
* @param params - Chain ID, wallet address, and optional time range (default '1month').
|
|
574
|
+
* @returns Time-series chart data points.
|
|
575
|
+
*/
|
|
576
|
+
async getChart(params) {
|
|
577
|
+
return this.transport.callTool("oneinch_chart", {
|
|
578
|
+
chain_id: params.chainId,
|
|
579
|
+
address: params.address,
|
|
580
|
+
timerange: params.timerange || "1month"
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Get transaction history for a wallet address.
|
|
585
|
+
* @param params - Wallet address and optional result limit (default 50).
|
|
586
|
+
* @returns Recent transaction records.
|
|
587
|
+
*/
|
|
588
|
+
async getHistory(params) {
|
|
589
|
+
return this.transport.callTool("oneinch_history", {
|
|
590
|
+
address: params.address,
|
|
591
|
+
limit: params.limit || 50
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
// src/wallet/service.ts
|
|
597
|
+
var WalletService = class {
|
|
598
|
+
constructor(transport) {
|
|
599
|
+
this.transport = transport;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Get chain configuration: supported networks, RPC URLs, native token info.
|
|
603
|
+
* Call this before creating a wallet to understand chain requirements.
|
|
604
|
+
* @param params - Optional chain family filter (defaults to 'xrpl').
|
|
605
|
+
*/
|
|
606
|
+
async chainInfo(params = {}) {
|
|
607
|
+
const result = await this.transport.callTool("wallet_chain_info", {
|
|
608
|
+
chain: params.chain ?? "xrpl"
|
|
609
|
+
});
|
|
610
|
+
return normalizeChainInfo(result);
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Create a new wallet. XRPL wallets are funded via testnet/devnet faucet.
|
|
614
|
+
* EVM wallets generate a random keypair. Solana is Phase 3.
|
|
615
|
+
* @param params - Chain, network, and optional chain ID.
|
|
616
|
+
*/
|
|
617
|
+
async create(params = {}) {
|
|
618
|
+
const toolParams = {
|
|
619
|
+
chain: params.chain ?? "xrpl",
|
|
620
|
+
network: params.network ?? "testnet"
|
|
621
|
+
};
|
|
622
|
+
if (params.chainId !== void 0) {
|
|
623
|
+
toolParams.chain_id = params.chainId;
|
|
624
|
+
}
|
|
625
|
+
const result = await this.transport.callTool("wallet_create", toolParams);
|
|
626
|
+
return normalizeCreateResult(result);
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Check wallet balance. Currently returns NOT_IMPLEMENTED from the server.
|
|
630
|
+
* @param params - Address, chain, and optional chain ID.
|
|
631
|
+
*/
|
|
632
|
+
async balance(params) {
|
|
633
|
+
const toolParams = {
|
|
634
|
+
address: params.address,
|
|
635
|
+
chain: params.chain ?? "xrpl"
|
|
636
|
+
};
|
|
637
|
+
if (params.chainId !== void 0) {
|
|
638
|
+
toolParams.chain_id = params.chainId;
|
|
639
|
+
}
|
|
640
|
+
return this.transport.callTool("wallet_balance", toolParams);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* List recent transactions for an address. Currently returns NOT_IMPLEMENTED from the server.
|
|
644
|
+
* @param params - Address, chain, optional chain ID and limit.
|
|
645
|
+
*/
|
|
646
|
+
async transactions(params) {
|
|
647
|
+
const toolParams = {
|
|
648
|
+
address: params.address,
|
|
649
|
+
chain: params.chain ?? "xrpl",
|
|
650
|
+
limit: params.limit ?? 20
|
|
651
|
+
};
|
|
652
|
+
if (params.chainId !== void 0) {
|
|
653
|
+
toolParams.chain_id = params.chainId;
|
|
654
|
+
}
|
|
655
|
+
return this.transport.callTool("wallet_transactions", toolParams);
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
function normalizeChainInfo(raw) {
|
|
659
|
+
return {
|
|
660
|
+
chain: raw.chain,
|
|
661
|
+
chainFamily: raw.chain_family ?? raw.chainFamily,
|
|
662
|
+
nativeToken: raw.native_token ?? raw.nativeToken,
|
|
663
|
+
walletCreation: raw.wallet_creation ?? raw.walletCreation,
|
|
664
|
+
networks: raw.networks,
|
|
665
|
+
supportedChainIds: raw.supported_chain_ids ?? raw.supportedChainIds,
|
|
666
|
+
sdkMethod: raw.sdk_method ?? raw.sdkMethod
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
function normalizeCreateResult(raw) {
|
|
670
|
+
return {
|
|
671
|
+
address: raw.address,
|
|
672
|
+
chain: raw.chain,
|
|
673
|
+
network: raw.network,
|
|
674
|
+
isFunded: raw.is_funded ?? raw.isFunded ?? false,
|
|
675
|
+
warnings: raw.warnings ?? [],
|
|
676
|
+
secret: raw.secret,
|
|
677
|
+
seedPhrase: raw.seed_phrase ?? raw.seedPhrase,
|
|
678
|
+
privateKey: raw.private_key ?? raw.privateKey,
|
|
679
|
+
chainId: raw.chain_id ?? raw.chainId
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
// src/marketplace/service.ts
|
|
684
|
+
var MarketplaceService = class {
|
|
685
|
+
constructor(transport) {
|
|
686
|
+
this.transport = transport;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Create a new listing on the Mangrove Marketplace.
|
|
690
|
+
* @param params - Listing details (seller address, title, category, price, etc.).
|
|
691
|
+
* @returns Compact result with listing ID, status, and creation timestamp.
|
|
692
|
+
*/
|
|
693
|
+
async createListing(params) {
|
|
694
|
+
const result = await this.transport.callTool("marketplace_create_listing", {
|
|
695
|
+
seller_address: params.sellerAddress,
|
|
696
|
+
title: params.title,
|
|
697
|
+
description: params.description,
|
|
698
|
+
category: params.category,
|
|
699
|
+
price_xrp: params.priceXrp,
|
|
700
|
+
...params.listingType ? { listing_type: params.listingType } : {},
|
|
701
|
+
...params.storageUri ? { storage_uri: params.storageUri } : {},
|
|
702
|
+
...params.contentHash ? { content_hash: params.contentHash } : {},
|
|
703
|
+
...params.subcategory ? { subcategory: params.subcategory } : {},
|
|
704
|
+
...params.tags ? { tags: params.tags } : {}
|
|
705
|
+
});
|
|
706
|
+
return normalizeCreateListingResult(result);
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Search the Mangrove Marketplace for listings.
|
|
710
|
+
* @param params - Optional filters (query, category, price range, type, limit).
|
|
711
|
+
* @returns Paginated search results with listings and total count.
|
|
712
|
+
*/
|
|
713
|
+
async search(params = {}) {
|
|
714
|
+
const result = await this.transport.callTool("marketplace_search", {
|
|
715
|
+
...params.query != null ? { query: params.query } : {},
|
|
716
|
+
...params.category != null ? { category: params.category } : {},
|
|
717
|
+
...params.minPrice != null ? { min_price: params.minPrice } : {},
|
|
718
|
+
...params.maxPrice != null ? { max_price: params.maxPrice } : {},
|
|
719
|
+
...params.listingType != null ? { listing_type: params.listingType } : {},
|
|
720
|
+
...params.limit != null ? { limit: params.limit } : {}
|
|
721
|
+
});
|
|
722
|
+
return normalizeSearchResult(result);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Get full details of a specific listing by ID.
|
|
726
|
+
* @param listingId - The listing's unique identifier.
|
|
727
|
+
* @returns Full listing details.
|
|
728
|
+
*/
|
|
729
|
+
async getListing(listingId) {
|
|
730
|
+
const result = await this.transport.callTool("marketplace_get_listing", {
|
|
731
|
+
listing_id: listingId
|
|
732
|
+
});
|
|
733
|
+
return normalizeListing(result);
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Make an offer on a marketplace listing.
|
|
737
|
+
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
738
|
+
* @param params - Listing ID and buyer address.
|
|
739
|
+
* @returns Raw server response.
|
|
740
|
+
*/
|
|
741
|
+
async makeOffer(params) {
|
|
742
|
+
return this.transport.callTool("marketplace_make_offer", {
|
|
743
|
+
listing_id: params.listingId,
|
|
744
|
+
buyer_address: params.buyerAddress
|
|
745
|
+
});
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Accept an offer, creating XRPL escrow.
|
|
749
|
+
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
750
|
+
* @param params - Offer ID and seller address.
|
|
751
|
+
* @returns Raw server response.
|
|
752
|
+
*/
|
|
753
|
+
async acceptOffer(params) {
|
|
754
|
+
return this.transport.callTool("marketplace_accept_offer", {
|
|
755
|
+
offer_id: params.offerId,
|
|
756
|
+
seller_address: params.sellerAddress
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Confirm delivery and release escrow to seller.
|
|
761
|
+
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
762
|
+
* @param params - Offer ID and buyer address.
|
|
763
|
+
* @returns Raw server response.
|
|
764
|
+
*/
|
|
765
|
+
async confirmDelivery(params) {
|
|
766
|
+
return this.transport.callTool("marketplace_confirm_delivery", {
|
|
767
|
+
offer_id: params.offerId,
|
|
768
|
+
buyer_address: params.buyerAddress
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Rate a completed marketplace transaction.
|
|
773
|
+
* Note: This tool is a stub on the server (returns NOT_IMPLEMENTED).
|
|
774
|
+
* @param params - Offer ID, rater address, score (1-5), optional comment.
|
|
775
|
+
* @returns Raw server response.
|
|
776
|
+
*/
|
|
777
|
+
async rate(params) {
|
|
778
|
+
return this.transport.callTool("marketplace_rate", {
|
|
779
|
+
offer_id: params.offerId,
|
|
780
|
+
rater_address: params.raterAddress,
|
|
781
|
+
score: params.score,
|
|
782
|
+
...params.comment != null ? { comment: params.comment } : {}
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
|
|
381
787
|
// src/client.ts
|
|
382
788
|
var MangroveClient = class {
|
|
383
789
|
/**
|
|
@@ -392,6 +798,9 @@ var MangroveClient = class {
|
|
|
392
798
|
this.transport = new McpTransport(config.url, config.apiKey);
|
|
393
799
|
}
|
|
394
800
|
this._dex = new DexService(this.transport);
|
|
801
|
+
this._oneinch = new OneInchService(this.transport);
|
|
802
|
+
this._wallet = new WalletService(this.transport);
|
|
803
|
+
this._marketplace = new MarketplaceService(this.transport);
|
|
395
804
|
if (config.signer) {
|
|
396
805
|
this._swapOrchestrator = new SwapOrchestrator(this._dex, config.signer, this.transport);
|
|
397
806
|
}
|
|
@@ -417,6 +826,26 @@ var MangroveClient = class {
|
|
|
417
826
|
}
|
|
418
827
|
});
|
|
419
828
|
}
|
|
829
|
+
/**
|
|
830
|
+
* Access 1inch ancillary operations: balances, gas prices, token info,
|
|
831
|
+
* portfolio data, charts, and history.
|
|
832
|
+
*/
|
|
833
|
+
get oneinch() {
|
|
834
|
+
return this._oneinch;
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Access wallet operations: chain info, wallet creation, balance, and transaction history.
|
|
838
|
+
*/
|
|
839
|
+
get wallet() {
|
|
840
|
+
return this._wallet;
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Access marketplace operations: create listings, search, get details,
|
|
844
|
+
* make offers, accept offers, confirm delivery, and rate transactions.
|
|
845
|
+
*/
|
|
846
|
+
get marketplace() {
|
|
847
|
+
return this._marketplace;
|
|
848
|
+
}
|
|
420
849
|
/** Open the transport connection. Must be called before making any tool calls. */
|
|
421
850
|
async connect() {
|
|
422
851
|
await this.transport.connect();
|
|
@@ -466,6 +895,9 @@ var EthersSigner = class {
|
|
|
466
895
|
DexService,
|
|
467
896
|
EthersSigner,
|
|
468
897
|
MangroveClient,
|
|
898
|
+
MarketplaceService,
|
|
469
899
|
McpTransport,
|
|
470
|
-
|
|
900
|
+
OneInchService,
|
|
901
|
+
RestTransport,
|
|
902
|
+
WalletService
|
|
471
903
|
});
|