@t402/mcp 2.7.1 → 2.8.1
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/cjs/index.js +1652 -208
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/server/index.d.ts +41 -0
- package/dist/cjs/server/index.js +1652 -208
- package/dist/cjs/server/index.js.map +1 -1
- package/dist/cjs/tools/index.d.ts +1215 -217
- package/dist/cjs/tools/index.js +1847 -173
- package/dist/cjs/tools/index.js.map +1 -1
- package/dist/esm/{chunk-3PMBXSJ3.mjs → chunk-4DCBAKH2.mjs} +218 -2
- package/dist/esm/chunk-4DCBAKH2.mjs.map +1 -0
- package/dist/esm/{chunk-B7X7H6NV.mjs → chunk-OSPCSAZF.mjs} +1800 -174
- package/dist/esm/chunk-OSPCSAZF.mjs.map +1 -0
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/server/index.d.mts +41 -0
- package/dist/esm/server/index.mjs +2 -2
- package/dist/esm/tools/index.d.mts +1215 -217
- package/dist/esm/tools/index.mjs +94 -1
- package/package.json +15 -15
- package/dist/esm/chunk-3PMBXSJ3.mjs.map +0 -1
- package/dist/esm/chunk-B7X7H6NV.mjs.map +0 -1
|
@@ -82,18 +82,21 @@ declare const payInputSchema: z.ZodObject<{
|
|
|
82
82
|
token: z.ZodEnum<["USDC", "USDT", "USDT0"]>;
|
|
83
83
|
network: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche", "ink", "berachain", "unichain"]>;
|
|
84
84
|
memo: z.ZodOptional<z.ZodString>;
|
|
85
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
85
86
|
}, "strip", z.ZodTypeAny, {
|
|
86
87
|
to: string;
|
|
87
88
|
amount: string;
|
|
88
89
|
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
89
90
|
token: "USDC" | "USDT" | "USDT0";
|
|
90
91
|
memo?: string | undefined;
|
|
92
|
+
confirmed?: boolean | undefined;
|
|
91
93
|
}, {
|
|
92
94
|
to: string;
|
|
93
95
|
amount: string;
|
|
94
96
|
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
95
97
|
token: "USDC" | "USDT" | "USDT0";
|
|
96
98
|
memo?: string | undefined;
|
|
99
|
+
confirmed?: boolean | undefined;
|
|
97
100
|
}>;
|
|
98
101
|
type PayInput = z.infer<typeof payInputSchema>;
|
|
99
102
|
/**
|
|
@@ -110,7 +113,11 @@ interface PayOptions {
|
|
|
110
113
|
/**
|
|
111
114
|
* Execute pay tool
|
|
112
115
|
*/
|
|
113
|
-
declare function executePay(input: PayInput, options: PayOptions): Promise<PaymentResult
|
|
116
|
+
declare function executePay(input: PayInput, options: PayOptions): Promise<PaymentResult | {
|
|
117
|
+
needsConfirmation: true;
|
|
118
|
+
summary: string;
|
|
119
|
+
details: Record<string, string>;
|
|
120
|
+
}>;
|
|
114
121
|
/**
|
|
115
122
|
* Format payment result for display
|
|
116
123
|
*/
|
|
@@ -128,16 +135,19 @@ declare const payGaslessInputSchema: z.ZodObject<{
|
|
|
128
135
|
amount: z.ZodString;
|
|
129
136
|
token: z.ZodEnum<["USDC", "USDT", "USDT0"]>;
|
|
130
137
|
network: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche"]>;
|
|
138
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
131
139
|
}, "strip", z.ZodTypeAny, {
|
|
132
140
|
to: string;
|
|
133
141
|
amount: string;
|
|
134
142
|
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche";
|
|
135
143
|
token: "USDC" | "USDT" | "USDT0";
|
|
144
|
+
confirmed?: boolean | undefined;
|
|
136
145
|
}, {
|
|
137
146
|
to: string;
|
|
138
147
|
amount: string;
|
|
139
148
|
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche";
|
|
140
149
|
token: "USDC" | "USDT" | "USDT0";
|
|
150
|
+
confirmed?: boolean | undefined;
|
|
141
151
|
}>;
|
|
142
152
|
type PayGaslessInput = z.infer<typeof payGaslessInputSchema>;
|
|
143
153
|
/**
|
|
@@ -162,7 +172,11 @@ interface PayGaslessOptions {
|
|
|
162
172
|
/**
|
|
163
173
|
* Execute payGasless tool
|
|
164
174
|
*/
|
|
165
|
-
declare function executePayGasless(input: PayGaslessInput, options: PayGaslessOptions): Promise<GaslessPaymentResult
|
|
175
|
+
declare function executePayGasless(input: PayGaslessInput, options: PayGaslessOptions): Promise<GaslessPaymentResult | {
|
|
176
|
+
needsConfirmation: true;
|
|
177
|
+
summary: string;
|
|
178
|
+
details: Record<string, string>;
|
|
179
|
+
}>;
|
|
166
180
|
/**
|
|
167
181
|
* Format gasless payment result for display
|
|
168
182
|
*/
|
|
@@ -213,16 +227,19 @@ declare const bridgeInputSchema: z.ZodObject<{
|
|
|
213
227
|
toChain: z.ZodEnum<["ethereum", "arbitrum", "ink", "berachain", "unichain"]>;
|
|
214
228
|
amount: z.ZodString;
|
|
215
229
|
recipient: z.ZodString;
|
|
230
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
216
231
|
}, "strip", z.ZodTypeAny, {
|
|
217
232
|
amount: string;
|
|
218
233
|
fromChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
219
234
|
toChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
220
235
|
recipient: string;
|
|
236
|
+
confirmed?: boolean | undefined;
|
|
221
237
|
}, {
|
|
222
238
|
amount: string;
|
|
223
239
|
fromChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
224
240
|
toChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
225
241
|
recipient: string;
|
|
242
|
+
confirmed?: boolean | undefined;
|
|
226
243
|
}>;
|
|
227
244
|
type BridgeInput = z.infer<typeof bridgeInputSchema>;
|
|
228
245
|
/**
|
|
@@ -241,7 +258,11 @@ interface BridgeOptions {
|
|
|
241
258
|
/**
|
|
242
259
|
* Execute bridge tool
|
|
243
260
|
*/
|
|
244
|
-
declare function executeBridge(input: BridgeInput, options: BridgeOptions): Promise<BridgeResult
|
|
261
|
+
declare function executeBridge(input: BridgeInput, options: BridgeOptions): Promise<BridgeResult | {
|
|
262
|
+
needsConfirmation: true;
|
|
263
|
+
summary: string;
|
|
264
|
+
details: Record<string, string>;
|
|
265
|
+
}>;
|
|
245
266
|
/**
|
|
246
267
|
* Format bridge result for display
|
|
247
268
|
*/
|
|
@@ -352,16 +373,19 @@ declare const wdkTransferInputSchema: z.ZodObject<{
|
|
|
352
373
|
amount: z.ZodString;
|
|
353
374
|
token: z.ZodEnum<["USDC", "USDT", "USDT0"]>;
|
|
354
375
|
chain: z.ZodString;
|
|
376
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
355
377
|
}, "strip", z.ZodTypeAny, {
|
|
356
378
|
to: string;
|
|
357
379
|
amount: string;
|
|
358
380
|
chain: string;
|
|
359
381
|
token: "USDC" | "USDT" | "USDT0";
|
|
382
|
+
confirmed?: boolean | undefined;
|
|
360
383
|
}, {
|
|
361
384
|
to: string;
|
|
362
385
|
amount: string;
|
|
363
386
|
chain: string;
|
|
364
387
|
token: "USDC" | "USDT" | "USDT0";
|
|
388
|
+
confirmed?: boolean | undefined;
|
|
365
389
|
}>;
|
|
366
390
|
type WdkTransferInput = z.infer<typeof wdkTransferInputSchema>;
|
|
367
391
|
/**
|
|
@@ -388,14 +412,22 @@ interface WdkTransferResult {
|
|
|
388
412
|
* @param wdk - T402WDK instance
|
|
389
413
|
* @returns Transfer result
|
|
390
414
|
*/
|
|
391
|
-
declare function executeWdkTransfer(input: WdkTransferInput, wdk: T402WDK): Promise<WdkTransferResult
|
|
415
|
+
declare function executeWdkTransfer(input: WdkTransferInput, wdk: T402WDK): Promise<WdkTransferResult | {
|
|
416
|
+
needsConfirmation: true;
|
|
417
|
+
summary: string;
|
|
418
|
+
details: Record<string, string>;
|
|
419
|
+
}>;
|
|
392
420
|
/**
|
|
393
421
|
* Execute wdk/transfer in demo mode
|
|
394
422
|
*
|
|
395
423
|
* @param input - Transfer parameters
|
|
396
424
|
* @returns Demo transfer result
|
|
397
425
|
*/
|
|
398
|
-
declare function executeWdkTransferDemo(input: WdkTransferInput): WdkTransferResult
|
|
426
|
+
declare function executeWdkTransferDemo(input: WdkTransferInput): WdkTransferResult | {
|
|
427
|
+
needsConfirmation: true;
|
|
428
|
+
summary: string;
|
|
429
|
+
details: Record<string, string>;
|
|
430
|
+
};
|
|
399
431
|
/**
|
|
400
432
|
* Format transfer result for display
|
|
401
433
|
*
|
|
@@ -416,16 +448,19 @@ declare const wdkSwapInputSchema: z.ZodObject<{
|
|
|
416
448
|
toToken: z.ZodString;
|
|
417
449
|
amount: z.ZodString;
|
|
418
450
|
chain: z.ZodString;
|
|
451
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
419
452
|
}, "strip", z.ZodTypeAny, {
|
|
420
453
|
amount: string;
|
|
421
454
|
chain: string;
|
|
422
455
|
fromToken: string;
|
|
423
456
|
toToken: string;
|
|
457
|
+
confirmed?: boolean | undefined;
|
|
424
458
|
}, {
|
|
425
459
|
amount: string;
|
|
426
460
|
chain: string;
|
|
427
461
|
fromToken: string;
|
|
428
462
|
toToken: string;
|
|
463
|
+
confirmed?: boolean | undefined;
|
|
429
464
|
}>;
|
|
430
465
|
type WdkSwapInput = z.infer<typeof wdkSwapInputSchema>;
|
|
431
466
|
/**
|
|
@@ -452,14 +487,22 @@ interface WdkSwapResult {
|
|
|
452
487
|
* @param wdk - T402WDK instance
|
|
453
488
|
* @returns Swap result
|
|
454
489
|
*/
|
|
455
|
-
declare function executeWdkSwap(input: WdkSwapInput, wdk: T402WDK): Promise<WdkSwapResult
|
|
490
|
+
declare function executeWdkSwap(input: WdkSwapInput, wdk: T402WDK): Promise<WdkSwapResult | {
|
|
491
|
+
needsConfirmation: true;
|
|
492
|
+
summary: string;
|
|
493
|
+
details: Record<string, string>;
|
|
494
|
+
}>;
|
|
456
495
|
/**
|
|
457
496
|
* Execute wdk/swap in demo mode
|
|
458
497
|
*
|
|
459
498
|
* @param input - Swap parameters
|
|
460
499
|
* @returns Demo swap result
|
|
461
500
|
*/
|
|
462
|
-
declare function executeWdkSwapDemo(input: WdkSwapInput): WdkSwapResult
|
|
501
|
+
declare function executeWdkSwapDemo(input: WdkSwapInput): WdkSwapResult | {
|
|
502
|
+
needsConfirmation: true;
|
|
503
|
+
summary: string;
|
|
504
|
+
details: Record<string, string>;
|
|
505
|
+
};
|
|
463
506
|
/**
|
|
464
507
|
* Format swap result for display
|
|
465
508
|
*
|
|
@@ -482,12 +525,15 @@ declare const autoPayInputSchema: z.ZodObject<{
|
|
|
482
525
|
url: z.ZodString;
|
|
483
526
|
maxAmount: z.ZodOptional<z.ZodString>;
|
|
484
527
|
preferredChain: z.ZodOptional<z.ZodString>;
|
|
528
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
485
529
|
}, "strip", z.ZodTypeAny, {
|
|
486
530
|
url: string;
|
|
531
|
+
confirmed?: boolean | undefined;
|
|
487
532
|
maxAmount?: string | undefined;
|
|
488
533
|
preferredChain?: string | undefined;
|
|
489
534
|
}, {
|
|
490
535
|
url: string;
|
|
536
|
+
confirmed?: boolean | undefined;
|
|
491
537
|
maxAmount?: string | undefined;
|
|
492
538
|
preferredChain?: string | undefined;
|
|
493
539
|
}>;
|
|
@@ -521,14 +567,22 @@ interface AutoPayResult {
|
|
|
521
567
|
* @param wdk - T402WDK instance
|
|
522
568
|
* @returns AutoPay result
|
|
523
569
|
*/
|
|
524
|
-
declare function executeAutoPay(input: AutoPayInput, wdk: T402WDK): Promise<AutoPayResult
|
|
570
|
+
declare function executeAutoPay(input: AutoPayInput, wdk: T402WDK): Promise<AutoPayResult | {
|
|
571
|
+
needsConfirmation: true;
|
|
572
|
+
summary: string;
|
|
573
|
+
details: Record<string, string>;
|
|
574
|
+
}>;
|
|
525
575
|
/**
|
|
526
576
|
* Execute t402/autoPay in demo mode
|
|
527
577
|
*
|
|
528
578
|
* @param input - AutoPay parameters
|
|
529
579
|
* @returns Demo autopay result
|
|
530
580
|
*/
|
|
531
|
-
declare function executeAutoPayDemo(input: AutoPayInput): AutoPayResult
|
|
581
|
+
declare function executeAutoPayDemo(input: AutoPayInput): AutoPayResult | {
|
|
582
|
+
needsConfirmation: true;
|
|
583
|
+
summary: string;
|
|
584
|
+
details: Record<string, string>;
|
|
585
|
+
};
|
|
532
586
|
/**
|
|
533
587
|
* Format autopay result for display
|
|
534
588
|
*
|
|
@@ -634,281 +688,1032 @@ declare function executeErc8004VerifyWallet(input: Erc8004VerifyWalletInput, rpc
|
|
|
634
688
|
declare function formatErc8004VerifyWalletResult(result: Erc8004VerifyWalletResult): string;
|
|
635
689
|
|
|
636
690
|
/**
|
|
637
|
-
*
|
|
691
|
+
* Price Service - CoinGecko-based token price fetcher with in-memory cache
|
|
692
|
+
*/
|
|
693
|
+
/**
|
|
694
|
+
* Get token prices from CoinGecko with caching
|
|
638
695
|
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
696
|
+
* @param tokens - Token symbols to fetch prices for (e.g., ['ETH', 'MATIC'])
|
|
697
|
+
* @param currency - Target currency (default: 'usd')
|
|
698
|
+
* @returns Map of token symbol to price in target currency
|
|
699
|
+
*/
|
|
700
|
+
declare function getTokenPrices(tokens: string[], currency?: string): Promise<Record<string, number>>;
|
|
701
|
+
/**
|
|
702
|
+
* Get simulated token prices for demo mode
|
|
703
|
+
*/
|
|
704
|
+
declare function getTokenPricesDemo(tokens: string[]): Record<string, number>;
|
|
705
|
+
/**
|
|
706
|
+
* Clear the price cache (useful for testing)
|
|
641
707
|
*/
|
|
708
|
+
declare function clearPriceCache(): void;
|
|
642
709
|
|
|
643
710
|
/**
|
|
644
|
-
*
|
|
711
|
+
* t402/getTokenPrice - Get current token prices via CoinGecko
|
|
645
712
|
*/
|
|
646
|
-
|
|
647
|
-
/** WDK seed phrase for wallet management */
|
|
648
|
-
wdkSeedPhrase?: string;
|
|
649
|
-
/** Chain RPC configurations */
|
|
650
|
-
chains?: Record<string, string | string[]>;
|
|
651
|
-
/** Enable auto-pay mode (automatic balance check + bridge + pay) */
|
|
652
|
-
autoPayEnabled?: boolean;
|
|
653
|
-
}
|
|
713
|
+
|
|
654
714
|
/**
|
|
655
|
-
*
|
|
715
|
+
* Input schema for getTokenPrice tool
|
|
656
716
|
*/
|
|
657
|
-
declare const
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
preferredNetwork: z.ZodOptional<z.ZodString>;
|
|
717
|
+
declare const getTokenPriceInputSchema: z.ZodObject<{
|
|
718
|
+
tokens: z.ZodArray<z.ZodString, "many">;
|
|
719
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
661
720
|
}, "strip", z.ZodTypeAny, {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
preferredNetwork?: string | undefined;
|
|
721
|
+
tokens: string[];
|
|
722
|
+
currency?: string | undefined;
|
|
665
723
|
}, {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
preferredNetwork?: string | undefined;
|
|
724
|
+
tokens: string[];
|
|
725
|
+
currency?: string | undefined;
|
|
669
726
|
}>;
|
|
670
|
-
type
|
|
727
|
+
type GetTokenPriceInput = z.infer<typeof getTokenPriceInputSchema>;
|
|
671
728
|
/**
|
|
672
|
-
*
|
|
729
|
+
* Token price result
|
|
673
730
|
*/
|
|
674
|
-
interface
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
/** HTTP status code */
|
|
678
|
-
statusCode: number;
|
|
679
|
-
/** Response body (truncated if large) */
|
|
680
|
-
body: string;
|
|
681
|
-
/** Content type of the response */
|
|
682
|
-
contentType?: string;
|
|
683
|
-
/** Steps taken during smart payment */
|
|
684
|
-
steps: SmartPayStep[];
|
|
685
|
-
/** Payment details (if payment was made) */
|
|
686
|
-
payment?: {
|
|
687
|
-
network: string;
|
|
688
|
-
scheme: string;
|
|
689
|
-
amount: string;
|
|
690
|
-
payTo: string;
|
|
691
|
-
};
|
|
692
|
-
/** Error message (if failed) */
|
|
693
|
-
error?: string;
|
|
731
|
+
interface TokenPriceResult {
|
|
732
|
+
prices: Record<string, number>;
|
|
733
|
+
currency: string;
|
|
694
734
|
}
|
|
695
735
|
/**
|
|
696
|
-
*
|
|
736
|
+
* Execute getTokenPrice tool
|
|
697
737
|
*/
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
738
|
+
declare function executeGetTokenPrice(input: GetTokenPriceInput, options: {
|
|
739
|
+
demoMode?: boolean;
|
|
740
|
+
}): Promise<TokenPriceResult>;
|
|
741
|
+
/**
|
|
742
|
+
* Format token price result for display
|
|
743
|
+
*/
|
|
744
|
+
declare function formatTokenPriceResult(result: TokenPriceResult): string;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* t402/getGasPrice - Get current gas price for a network
|
|
748
|
+
*/
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Input schema for getGasPrice tool
|
|
752
|
+
*/
|
|
753
|
+
declare const getGasPriceInputSchema: z.ZodObject<{
|
|
754
|
+
network: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche", "ink", "berachain", "unichain"]>;
|
|
755
|
+
}, "strip", z.ZodTypeAny, {
|
|
756
|
+
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
757
|
+
}, {
|
|
758
|
+
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
759
|
+
}>;
|
|
760
|
+
type GetGasPriceInput = z.infer<typeof getGasPriceInputSchema>;
|
|
761
|
+
/**
|
|
762
|
+
* Gas price result
|
|
763
|
+
*/
|
|
764
|
+
interface GasPriceResult {
|
|
765
|
+
network: SupportedNetwork;
|
|
766
|
+
gasPriceWei: string;
|
|
767
|
+
gasPriceGwei: string;
|
|
768
|
+
nativeSymbol: string;
|
|
702
769
|
}
|
|
703
770
|
/**
|
|
704
|
-
*
|
|
771
|
+
* Execute getGasPrice tool
|
|
705
772
|
*/
|
|
706
|
-
declare
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
maxAmountRequired: z.ZodOptional<z.ZodString>;
|
|
727
|
-
resource: z.ZodOptional<z.ZodString>;
|
|
728
|
-
description: z.ZodOptional<z.ZodString>;
|
|
729
|
-
payTo: z.ZodOptional<z.ZodString>;
|
|
730
|
-
maxDeadline: z.ZodOptional<z.ZodNumber>;
|
|
731
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
773
|
+
declare function executeGetGasPrice(input: GetGasPriceInput, options: {
|
|
774
|
+
rpcUrl?: string;
|
|
775
|
+
demoMode?: boolean;
|
|
776
|
+
}): Promise<GasPriceResult>;
|
|
777
|
+
/**
|
|
778
|
+
* Format gas price result for display
|
|
779
|
+
*/
|
|
780
|
+
declare function formatGasPriceResult(result: GasPriceResult): string;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* t402/estimatePaymentFee - Estimate gas cost for a payment on a specific network
|
|
784
|
+
*/
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Input schema for estimatePaymentFee tool
|
|
788
|
+
*/
|
|
789
|
+
declare const estimatePaymentFeeInputSchema: z.ZodObject<{
|
|
790
|
+
network: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche", "ink", "berachain", "unichain"]>;
|
|
791
|
+
amount: z.ZodString;
|
|
792
|
+
token: z.ZodEnum<["USDC", "USDT", "USDT0"]>;
|
|
732
793
|
}, "strip", z.ZodTypeAny, {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
scheme?: string | undefined;
|
|
737
|
-
payTo?: string | undefined;
|
|
738
|
-
maxAmountRequired?: string | undefined;
|
|
739
|
-
resource?: string | undefined;
|
|
740
|
-
maxDeadline?: number | undefined;
|
|
741
|
-
} & {
|
|
742
|
-
[k: string]: unknown;
|
|
743
|
-
};
|
|
794
|
+
amount: string;
|
|
795
|
+
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
796
|
+
token: "USDC" | "USDT" | "USDT0";
|
|
744
797
|
}, {
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
scheme?: string | undefined;
|
|
749
|
-
payTo?: string | undefined;
|
|
750
|
-
maxAmountRequired?: string | undefined;
|
|
751
|
-
resource?: string | undefined;
|
|
752
|
-
maxDeadline?: number | undefined;
|
|
753
|
-
} & {
|
|
754
|
-
[k: string]: unknown;
|
|
755
|
-
};
|
|
798
|
+
amount: string;
|
|
799
|
+
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
800
|
+
token: "USDC" | "USDT" | "USDT0";
|
|
756
801
|
}>;
|
|
757
|
-
type
|
|
802
|
+
type EstimatePaymentFeeInput = z.infer<typeof estimatePaymentFeeInputSchema>;
|
|
758
803
|
/**
|
|
759
|
-
*
|
|
804
|
+
* Fee estimation result
|
|
760
805
|
*/
|
|
761
|
-
interface
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
/** Whether bridging is needed */
|
|
769
|
-
bridgeRequired: boolean;
|
|
770
|
-
/** Bridge details if needed */
|
|
771
|
-
bridgeDetails?: {
|
|
772
|
-
fromChain: string;
|
|
773
|
-
toChain: string;
|
|
774
|
-
amount: string;
|
|
775
|
-
estimatedFee: string;
|
|
776
|
-
};
|
|
777
|
-
/** Balances across all chains */
|
|
778
|
-
balances: Array<{
|
|
779
|
-
chain: string;
|
|
780
|
-
usdt0: string;
|
|
781
|
-
usdc: string;
|
|
782
|
-
}>;
|
|
783
|
-
/** Reason if not viable */
|
|
784
|
-
reason?: string;
|
|
806
|
+
interface PaymentFeeEstimate {
|
|
807
|
+
network: SupportedNetwork;
|
|
808
|
+
gasLimit: string;
|
|
809
|
+
gasPriceGwei: string;
|
|
810
|
+
nativeCost: string;
|
|
811
|
+
nativeSymbol: string;
|
|
812
|
+
usdCost: string;
|
|
785
813
|
}
|
|
786
814
|
/**
|
|
787
|
-
*
|
|
815
|
+
* Execute estimatePaymentFee tool
|
|
788
816
|
*/
|
|
789
|
-
declare
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
readonly inputSchema: {
|
|
794
|
-
readonly type: "object";
|
|
795
|
-
readonly properties: {
|
|
796
|
-
readonly url: {
|
|
797
|
-
readonly type: "string";
|
|
798
|
-
readonly description: "URL of the 402-protected resource";
|
|
799
|
-
};
|
|
800
|
-
readonly maxBridgeFee: {
|
|
801
|
-
readonly type: "string";
|
|
802
|
-
readonly description: "Maximum acceptable bridge fee in native token (optional)";
|
|
803
|
-
};
|
|
804
|
-
readonly preferredNetwork: {
|
|
805
|
-
readonly type: "string";
|
|
806
|
-
readonly description: "Preferred network for payment (optional)";
|
|
807
|
-
};
|
|
808
|
-
};
|
|
809
|
-
readonly required: readonly ["url"];
|
|
810
|
-
};
|
|
811
|
-
};
|
|
812
|
-
readonly 't402/paymentPlan': {
|
|
813
|
-
readonly name: "t402/paymentPlan";
|
|
814
|
-
readonly description: "Analyze a 402 response and create an optimal payment plan considering balances across all chains. Returns recommended network, bridge requirements, and balance overview.";
|
|
815
|
-
readonly inputSchema: {
|
|
816
|
-
readonly type: "object";
|
|
817
|
-
readonly properties: {
|
|
818
|
-
readonly paymentRequired: {
|
|
819
|
-
readonly type: "object";
|
|
820
|
-
readonly description: "The 402 PaymentRequired response";
|
|
821
|
-
};
|
|
822
|
-
};
|
|
823
|
-
readonly required: readonly ["paymentRequired"];
|
|
824
|
-
};
|
|
825
|
-
};
|
|
826
|
-
};
|
|
817
|
+
declare function executeEstimatePaymentFee(input: EstimatePaymentFeeInput, options: {
|
|
818
|
+
rpcUrl?: string;
|
|
819
|
+
demoMode?: boolean;
|
|
820
|
+
}): Promise<PaymentFeeEstimate>;
|
|
827
821
|
/**
|
|
828
|
-
*
|
|
822
|
+
* Format fee estimate result for display
|
|
829
823
|
*/
|
|
830
|
-
declare function
|
|
824
|
+
declare function formatPaymentFeeEstimate(result: PaymentFeeEstimate): string;
|
|
825
|
+
|
|
831
826
|
/**
|
|
832
|
-
*
|
|
827
|
+
* t402/compareNetworkFees - Compare payment fees across multiple networks
|
|
833
828
|
*/
|
|
834
|
-
|
|
829
|
+
|
|
835
830
|
/**
|
|
836
|
-
*
|
|
831
|
+
* Input schema for compareNetworkFees tool
|
|
837
832
|
*/
|
|
838
|
-
declare
|
|
833
|
+
declare const compareNetworkFeesInputSchema: z.ZodObject<{
|
|
834
|
+
amount: z.ZodString;
|
|
835
|
+
token: z.ZodEnum<["USDC", "USDT", "USDT0"]>;
|
|
836
|
+
networks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
837
|
+
}, "strip", z.ZodTypeAny, {
|
|
838
|
+
amount: string;
|
|
839
|
+
token: "USDC" | "USDT" | "USDT0";
|
|
840
|
+
networks?: string[] | undefined;
|
|
841
|
+
}, {
|
|
842
|
+
amount: string;
|
|
843
|
+
token: "USDC" | "USDT" | "USDT0";
|
|
844
|
+
networks?: string[] | undefined;
|
|
845
|
+
}>;
|
|
846
|
+
type CompareNetworkFeesInput = z.infer<typeof compareNetworkFeesInputSchema>;
|
|
839
847
|
/**
|
|
840
|
-
*
|
|
848
|
+
* Network fee comparison result
|
|
841
849
|
*/
|
|
842
|
-
|
|
850
|
+
interface NetworkFeeComparison {
|
|
851
|
+
token: string;
|
|
852
|
+
amount: string;
|
|
853
|
+
fees: PaymentFeeEstimate[];
|
|
854
|
+
cheapest: string;
|
|
855
|
+
}
|
|
843
856
|
/**
|
|
844
|
-
*
|
|
857
|
+
* Execute compareNetworkFees tool
|
|
845
858
|
*/
|
|
846
|
-
declare function
|
|
859
|
+
declare function executeCompareNetworkFees(input: CompareNetworkFeesInput, options: {
|
|
860
|
+
rpcUrls?: Partial<Record<SupportedNetwork, string>>;
|
|
861
|
+
demoMode?: boolean;
|
|
862
|
+
}): Promise<NetworkFeeComparison>;
|
|
847
863
|
/**
|
|
848
|
-
* Format
|
|
864
|
+
* Format network fee comparison result for display
|
|
849
865
|
*/
|
|
850
|
-
declare function
|
|
866
|
+
declare function formatNetworkFeeComparison(result: NetworkFeeComparison): string;
|
|
851
867
|
|
|
852
868
|
/**
|
|
853
|
-
* t402
|
|
869
|
+
* t402/signMessage - Sign a message using the configured wallet
|
|
854
870
|
*/
|
|
855
871
|
|
|
856
872
|
/**
|
|
857
|
-
*
|
|
873
|
+
* Input schema for signMessage tool
|
|
858
874
|
*/
|
|
859
|
-
declare const
|
|
860
|
-
|
|
875
|
+
declare const signMessageInputSchema: z.ZodObject<{
|
|
876
|
+
chain: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche", "ink", "berachain", "unichain"]>;
|
|
877
|
+
message: z.ZodString;
|
|
878
|
+
}, "strip", z.ZodTypeAny, {
|
|
879
|
+
message: string;
|
|
880
|
+
chain: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
881
|
+
}, {
|
|
882
|
+
message: string;
|
|
883
|
+
chain: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
884
|
+
}>;
|
|
885
|
+
type SignMessageInput = z.infer<typeof signMessageInputSchema>;
|
|
886
|
+
/**
|
|
887
|
+
* Sign message result
|
|
888
|
+
*/
|
|
889
|
+
interface SignMessageResult {
|
|
890
|
+
/** The original message that was signed */
|
|
891
|
+
message: string;
|
|
892
|
+
/** The produced signature (hex) */
|
|
893
|
+
signature: string;
|
|
894
|
+
/** The signer address */
|
|
895
|
+
address: string;
|
|
896
|
+
/** Network context */
|
|
897
|
+
network: SupportedNetwork;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* Execute signMessage tool
|
|
901
|
+
*
|
|
902
|
+
* Currently throws because wallet signing requires a configured private key.
|
|
903
|
+
* This will be implemented when the MCP server supports wallet configuration.
|
|
904
|
+
*/
|
|
905
|
+
declare function executeSignMessage(_input: SignMessageInput): Promise<SignMessageResult>;
|
|
906
|
+
/**
|
|
907
|
+
* Format sign message result for display
|
|
908
|
+
*/
|
|
909
|
+
declare function formatSignMessageResult(result: SignMessageResult): string;
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* t402/verifySignature - Verify an EIP-191 signed message
|
|
913
|
+
*/
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Input schema for verifySignature tool
|
|
917
|
+
*/
|
|
918
|
+
declare const verifySignatureInputSchema: z.ZodObject<{
|
|
919
|
+
chain: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche", "ink", "berachain", "unichain"]>;
|
|
920
|
+
message: z.ZodString;
|
|
921
|
+
signature: z.ZodString;
|
|
922
|
+
address: z.ZodString;
|
|
923
|
+
}, "strip", z.ZodTypeAny, {
|
|
924
|
+
address: string;
|
|
925
|
+
message: string;
|
|
926
|
+
chain: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
927
|
+
signature: string;
|
|
928
|
+
}, {
|
|
929
|
+
address: string;
|
|
930
|
+
message: string;
|
|
931
|
+
chain: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
932
|
+
signature: string;
|
|
933
|
+
}>;
|
|
934
|
+
type VerifySignatureInput = z.infer<typeof verifySignatureInputSchema>;
|
|
935
|
+
/**
|
|
936
|
+
* Signature verification result
|
|
937
|
+
*/
|
|
938
|
+
interface VerifySignatureResult {
|
|
939
|
+
/** Whether the signature is valid */
|
|
940
|
+
valid: boolean;
|
|
941
|
+
/** The expected signer address */
|
|
942
|
+
address: string;
|
|
943
|
+
/** The message that was verified */
|
|
944
|
+
message: string;
|
|
945
|
+
/** Network context */
|
|
946
|
+
network: SupportedNetwork;
|
|
947
|
+
/** Error message if verification failed */
|
|
948
|
+
error?: string;
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Execute verifySignature tool
|
|
952
|
+
*/
|
|
953
|
+
declare function executeVerifySignature(input: VerifySignatureInput): Promise<VerifySignatureResult>;
|
|
954
|
+
/**
|
|
955
|
+
* Format verification result for display
|
|
956
|
+
*/
|
|
957
|
+
declare function formatVerifySignatureResult(result: VerifySignatureResult): string;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* t402/getTransferHistory - Query recent ERC-20 Transfer events for an address
|
|
961
|
+
*/
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Input schema for getTransferHistory tool
|
|
965
|
+
*/
|
|
966
|
+
declare const getTransferHistoryInputSchema: z.ZodObject<{
|
|
967
|
+
network: z.ZodEnum<["ethereum", "base", "arbitrum", "optimism", "polygon", "avalanche", "ink", "berachain", "unichain"]>;
|
|
968
|
+
address: z.ZodString;
|
|
969
|
+
token: z.ZodOptional<z.ZodEnum<["USDC", "USDT", "USDT0"]>>;
|
|
970
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
971
|
+
}, "strip", z.ZodTypeAny, {
|
|
972
|
+
address: string;
|
|
973
|
+
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
974
|
+
token?: "USDC" | "USDT" | "USDT0" | undefined;
|
|
975
|
+
limit?: number | undefined;
|
|
976
|
+
}, {
|
|
977
|
+
address: string;
|
|
978
|
+
network: "ethereum" | "base" | "arbitrum" | "optimism" | "polygon" | "avalanche" | "ink" | "berachain" | "unichain";
|
|
979
|
+
token?: "USDC" | "USDT" | "USDT0" | undefined;
|
|
980
|
+
limit?: number | undefined;
|
|
981
|
+
}>;
|
|
982
|
+
type GetTransferHistoryInput = z.infer<typeof getTransferHistoryInputSchema>;
|
|
983
|
+
/**
|
|
984
|
+
* A single transfer event
|
|
985
|
+
*/
|
|
986
|
+
interface TransferEvent {
|
|
987
|
+
/** Transaction hash */
|
|
988
|
+
txHash: string;
|
|
989
|
+
/** Block number */
|
|
990
|
+
blockNumber: string;
|
|
991
|
+
/** Sender address */
|
|
992
|
+
from: string;
|
|
993
|
+
/** Recipient address */
|
|
994
|
+
to: string;
|
|
995
|
+
/** Transfer amount (formatted) */
|
|
996
|
+
amount: string;
|
|
997
|
+
/** Token symbol */
|
|
998
|
+
token: string;
|
|
999
|
+
/** Token contract address */
|
|
1000
|
+
tokenAddress: string;
|
|
1001
|
+
/** Whether this address sent (out) or received (in) */
|
|
1002
|
+
direction: 'in' | 'out';
|
|
1003
|
+
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Transfer history result
|
|
1006
|
+
*/
|
|
1007
|
+
interface TransferHistoryResult {
|
|
1008
|
+
/** Network queried */
|
|
1009
|
+
network: SupportedNetwork;
|
|
1010
|
+
/** Chain ID */
|
|
1011
|
+
chainId: number;
|
|
1012
|
+
/** Address queried */
|
|
1013
|
+
address: string;
|
|
1014
|
+
/** Transfer events (most recent first) */
|
|
1015
|
+
transfers: TransferEvent[];
|
|
1016
|
+
/** Explorer base URL */
|
|
1017
|
+
explorerUrl: string;
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* Execute getTransferHistory tool
|
|
1021
|
+
*/
|
|
1022
|
+
declare function executeGetTransferHistory(input: GetTransferHistoryInput, rpcUrls?: Partial<Record<SupportedNetwork, string>>): Promise<TransferHistoryResult>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Format transfer history result for display
|
|
1025
|
+
*/
|
|
1026
|
+
declare function formatTransferHistoryResult(result: TransferHistoryResult): string;
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* t402/getHistoricalPrice - Get historical price data from CoinGecko
|
|
1030
|
+
*/
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Input schema for getHistoricalPrice tool
|
|
1034
|
+
*/
|
|
1035
|
+
declare const getHistoricalPriceInputSchema: z.ZodObject<{
|
|
1036
|
+
token: z.ZodString;
|
|
1037
|
+
days: z.ZodOptional<z.ZodNumber>;
|
|
1038
|
+
}, "strip", z.ZodTypeAny, {
|
|
1039
|
+
token: string;
|
|
1040
|
+
days?: number | undefined;
|
|
1041
|
+
}, {
|
|
1042
|
+
token: string;
|
|
1043
|
+
days?: number | undefined;
|
|
1044
|
+
}>;
|
|
1045
|
+
type GetHistoricalPriceInput = z.infer<typeof getHistoricalPriceInputSchema>;
|
|
1046
|
+
/**
|
|
1047
|
+
* A single price data point
|
|
1048
|
+
*/
|
|
1049
|
+
interface PriceDataPoint {
|
|
1050
|
+
/** Unix timestamp in milliseconds */
|
|
1051
|
+
timestamp: number;
|
|
1052
|
+
/** ISO date string */
|
|
1053
|
+
date: string;
|
|
1054
|
+
/** Price in USD */
|
|
1055
|
+
price: number;
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Historical price result
|
|
1059
|
+
*/
|
|
1060
|
+
interface HistoricalPriceResult {
|
|
1061
|
+
/** Token symbol */
|
|
1062
|
+
token: string;
|
|
1063
|
+
/** CoinGecko ID used */
|
|
1064
|
+
coinId: string;
|
|
1065
|
+
/** Currency */
|
|
1066
|
+
currency: string;
|
|
1067
|
+
/** Number of days queried */
|
|
1068
|
+
days: number;
|
|
1069
|
+
/** Price data points */
|
|
1070
|
+
prices: PriceDataPoint[];
|
|
1071
|
+
/** Price change over the period */
|
|
1072
|
+
priceChange: {
|
|
1073
|
+
/** Absolute change */
|
|
1074
|
+
absolute: number;
|
|
1075
|
+
/** Percentage change */
|
|
1076
|
+
percentage: number;
|
|
1077
|
+
/** Highest price in period */
|
|
1078
|
+
high: number;
|
|
1079
|
+
/** Lowest price in period */
|
|
1080
|
+
low: number;
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* Execute getHistoricalPrice tool
|
|
1085
|
+
*/
|
|
1086
|
+
declare function executeGetHistoricalPrice(input: GetHistoricalPriceInput, options?: {
|
|
1087
|
+
demoMode?: boolean;
|
|
1088
|
+
}): Promise<HistoricalPriceResult>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Format historical price result for display
|
|
1091
|
+
*/
|
|
1092
|
+
declare function formatHistoricalPriceResult(result: HistoricalPriceResult): string;
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Quote Store - In-memory quote storage with TTL
|
|
1096
|
+
*/
|
|
1097
|
+
/** Quote data stored in the quote store */
|
|
1098
|
+
interface QuoteData {
|
|
1099
|
+
id: string;
|
|
1100
|
+
type: 'swap' | 'bridge';
|
|
1101
|
+
createdAt: number;
|
|
1102
|
+
expiresAt: number;
|
|
1103
|
+
data: Record<string, unknown>;
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Create a new quote and store it
|
|
1107
|
+
*
|
|
1108
|
+
* @param type - Quote type ('swap' or 'bridge')
|
|
1109
|
+
* @param data - Quote data to store
|
|
1110
|
+
* @param ttlMs - Time-to-live in milliseconds (default: 5 minutes)
|
|
1111
|
+
* @returns Quote ID (UUID)
|
|
1112
|
+
*/
|
|
1113
|
+
declare function createQuote(type: 'swap' | 'bridge', data: Record<string, unknown>, ttlMs?: number): string;
|
|
1114
|
+
/**
|
|
1115
|
+
* Get a quote by ID (returns null if expired or not found)
|
|
1116
|
+
*/
|
|
1117
|
+
declare function getQuote(quoteId: string): QuoteData | null;
|
|
1118
|
+
/**
|
|
1119
|
+
* Delete a quote by ID
|
|
1120
|
+
*/
|
|
1121
|
+
declare function deleteQuote(quoteId: string): void;
|
|
1122
|
+
/**
|
|
1123
|
+
* Clear all quotes (useful for testing)
|
|
1124
|
+
*/
|
|
1125
|
+
declare function clearQuoteStore(): void;
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* wdk/quoteSwap - Get a swap quote with a stored quoteId
|
|
1129
|
+
*/
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Input schema for wdk/quoteSwap tool
|
|
1133
|
+
*/
|
|
1134
|
+
declare const wdkQuoteSwapInputSchema: z.ZodObject<{
|
|
1135
|
+
fromToken: z.ZodString;
|
|
1136
|
+
toToken: z.ZodString;
|
|
1137
|
+
amount: z.ZodString;
|
|
1138
|
+
chain: z.ZodString;
|
|
1139
|
+
}, "strip", z.ZodTypeAny, {
|
|
1140
|
+
amount: string;
|
|
1141
|
+
chain: string;
|
|
1142
|
+
fromToken: string;
|
|
1143
|
+
toToken: string;
|
|
1144
|
+
}, {
|
|
1145
|
+
amount: string;
|
|
1146
|
+
chain: string;
|
|
1147
|
+
fromToken: string;
|
|
1148
|
+
toToken: string;
|
|
1149
|
+
}>;
|
|
1150
|
+
type WdkQuoteSwapInput = z.infer<typeof wdkQuoteSwapInputSchema>;
|
|
1151
|
+
/**
|
|
1152
|
+
* Swap quote result
|
|
1153
|
+
*/
|
|
1154
|
+
interface SwapQuoteResult {
|
|
1155
|
+
quoteId: string;
|
|
1156
|
+
fromToken: string;
|
|
1157
|
+
toToken: string;
|
|
1158
|
+
fromAmount: string;
|
|
1159
|
+
toAmount: string;
|
|
1160
|
+
exchangeRate: string;
|
|
1161
|
+
fee: string;
|
|
1162
|
+
priceImpact: string;
|
|
1163
|
+
expiresAt: string;
|
|
1164
|
+
chain: string;
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* Execute wdk/quoteSwap tool
|
|
1168
|
+
*/
|
|
1169
|
+
declare function executeWdkQuoteSwap(input: WdkQuoteSwapInput, wdk: T402WDK): Promise<SwapQuoteResult>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Execute wdk/quoteSwap in demo mode
|
|
1172
|
+
*/
|
|
1173
|
+
declare function executeWdkQuoteSwapDemo(input: WdkQuoteSwapInput): SwapQuoteResult;
|
|
1174
|
+
/**
|
|
1175
|
+
* Format swap quote result for display
|
|
1176
|
+
*/
|
|
1177
|
+
declare function formatSwapQuoteResult(result: SwapQuoteResult): string;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* wdk/executeSwap - Execute a swap from a stored quote
|
|
1181
|
+
*/
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Input schema for wdk/executeSwap tool
|
|
1185
|
+
*/
|
|
1186
|
+
declare const wdkExecuteSwapInputSchema: z.ZodObject<{
|
|
1187
|
+
quoteId: z.ZodString;
|
|
1188
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
1189
|
+
}, "strip", z.ZodTypeAny, {
|
|
1190
|
+
quoteId: string;
|
|
1191
|
+
confirmed?: boolean | undefined;
|
|
1192
|
+
}, {
|
|
1193
|
+
quoteId: string;
|
|
1194
|
+
confirmed?: boolean | undefined;
|
|
1195
|
+
}>;
|
|
1196
|
+
type WdkExecuteSwapInput = z.infer<typeof wdkExecuteSwapInputSchema>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Execute swap result
|
|
1199
|
+
*/
|
|
1200
|
+
interface ExecuteSwapResult {
|
|
1201
|
+
fromAmount: string;
|
|
1202
|
+
fromToken: string;
|
|
1203
|
+
toAmount: string;
|
|
1204
|
+
toToken: string;
|
|
1205
|
+
chain: string;
|
|
1206
|
+
txHash: string;
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Execute wdk/executeSwap tool
|
|
1210
|
+
*/
|
|
1211
|
+
declare function executeWdkExecuteSwap(input: WdkExecuteSwapInput, wdk: T402WDK): Promise<ExecuteSwapResult | {
|
|
1212
|
+
needsConfirmation: true;
|
|
1213
|
+
summary: string;
|
|
1214
|
+
details: Record<string, string>;
|
|
1215
|
+
}>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Execute wdk/executeSwap in demo mode
|
|
1218
|
+
*/
|
|
1219
|
+
declare function executeWdkExecuteSwapDemo(input: WdkExecuteSwapInput): ExecuteSwapResult | {
|
|
1220
|
+
needsConfirmation: true;
|
|
1221
|
+
summary: string;
|
|
1222
|
+
details: Record<string, string>;
|
|
1223
|
+
};
|
|
1224
|
+
/**
|
|
1225
|
+
* Format execute swap result for display
|
|
1226
|
+
*/
|
|
1227
|
+
declare function formatExecuteSwapResult(result: ExecuteSwapResult): string;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* t402/quoteBridge - Get a bridge fee quote with a stored quoteId
|
|
1231
|
+
*/
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Input schema for t402/quoteBridge tool (same as getBridgeFee)
|
|
1235
|
+
*/
|
|
1236
|
+
declare const quoteBridgeInputSchema: z.ZodObject<{
|
|
1237
|
+
fromChain: z.ZodEnum<["ethereum", "arbitrum", "ink", "berachain", "unichain"]>;
|
|
1238
|
+
toChain: z.ZodEnum<["ethereum", "arbitrum", "ink", "berachain", "unichain"]>;
|
|
1239
|
+
amount: z.ZodString;
|
|
1240
|
+
recipient: z.ZodString;
|
|
1241
|
+
}, "strip", z.ZodTypeAny, {
|
|
1242
|
+
amount: string;
|
|
1243
|
+
fromChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
1244
|
+
toChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
1245
|
+
recipient: string;
|
|
1246
|
+
}, {
|
|
1247
|
+
amount: string;
|
|
1248
|
+
fromChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
1249
|
+
toChain: "ethereum" | "arbitrum" | "ink" | "berachain" | "unichain";
|
|
1250
|
+
recipient: string;
|
|
1251
|
+
}>;
|
|
1252
|
+
type QuoteBridgeInput = z.infer<typeof quoteBridgeInputSchema>;
|
|
1253
|
+
/**
|
|
1254
|
+
* Bridge quote result
|
|
1255
|
+
*/
|
|
1256
|
+
interface BridgeQuoteResult {
|
|
1257
|
+
quoteId: string;
|
|
1258
|
+
fromChain: string;
|
|
1259
|
+
toChain: string;
|
|
1260
|
+
amount: string;
|
|
1261
|
+
recipient: string;
|
|
1262
|
+
nativeFee: string;
|
|
1263
|
+
nativeFeeFormatted: string;
|
|
1264
|
+
estimatedTime: number;
|
|
1265
|
+
expiresAt: string;
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* Execute t402/quoteBridge tool
|
|
1269
|
+
*/
|
|
1270
|
+
declare function executeQuoteBridge(input: QuoteBridgeInput, rpcUrls?: Partial<Record<SupportedNetwork, string>>): Promise<BridgeQuoteResult>;
|
|
1271
|
+
/**
|
|
1272
|
+
* Execute t402/quoteBridge in demo mode
|
|
1273
|
+
*/
|
|
1274
|
+
declare function executeQuoteBridgeDemo(input: QuoteBridgeInput): BridgeQuoteResult;
|
|
1275
|
+
/**
|
|
1276
|
+
* Format bridge quote result for display
|
|
1277
|
+
*/
|
|
1278
|
+
declare function formatBridgeQuoteResult(result: BridgeQuoteResult): string;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* t402/executeBridge (from quote) - Execute a bridge from a stored quote
|
|
1282
|
+
*/
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Input schema for t402/executeBridge tool
|
|
1286
|
+
*/
|
|
1287
|
+
declare const executeBridgeFromQuoteInputSchema: z.ZodObject<{
|
|
1288
|
+
quoteId: z.ZodString;
|
|
1289
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
1290
|
+
}, "strip", z.ZodTypeAny, {
|
|
1291
|
+
quoteId: string;
|
|
1292
|
+
confirmed?: boolean | undefined;
|
|
1293
|
+
}, {
|
|
1294
|
+
quoteId: string;
|
|
1295
|
+
confirmed?: boolean | undefined;
|
|
1296
|
+
}>;
|
|
1297
|
+
type ExecuteBridgeFromQuoteInput = z.infer<typeof executeBridgeFromQuoteInputSchema>;
|
|
1298
|
+
/**
|
|
1299
|
+
* Execute t402/executeBridge from quote tool
|
|
1300
|
+
*/
|
|
1301
|
+
declare function executeExecuteBridgeFromQuote(input: ExecuteBridgeFromQuoteInput, options: {
|
|
1302
|
+
privateKey: string;
|
|
1303
|
+
rpcUrl?: string;
|
|
1304
|
+
demoMode?: boolean;
|
|
1305
|
+
}): Promise<BridgeResult | {
|
|
1306
|
+
needsConfirmation: true;
|
|
1307
|
+
summary: string;
|
|
1308
|
+
details: Record<string, string>;
|
|
1309
|
+
}>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Execute t402/executeBridge from quote in demo mode
|
|
1312
|
+
*/
|
|
1313
|
+
declare function executeExecuteBridgeFromQuoteDemo(input: ExecuteBridgeFromQuoteInput): BridgeResult | {
|
|
1314
|
+
needsConfirmation: true;
|
|
1315
|
+
summary: string;
|
|
1316
|
+
details: Record<string, string>;
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* Unified MCP Toolkit - Combines WDK wallet tools with t402 payment tools.
|
|
1321
|
+
*
|
|
1322
|
+
* Agent workflow: check price -> check balance -> bridge if needed -> pay
|
|
1323
|
+
* All in one MCP session with a single server.
|
|
1324
|
+
*/
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Configuration for unified MCP mode
|
|
1328
|
+
*/
|
|
1329
|
+
interface UnifiedMcpConfig {
|
|
1330
|
+
/** WDK seed phrase for wallet management */
|
|
1331
|
+
wdkSeedPhrase?: string;
|
|
1332
|
+
/** Chain RPC configurations */
|
|
1333
|
+
chains?: Record<string, string | string[]>;
|
|
1334
|
+
/** Enable auto-pay mode (automatic balance check + bridge + pay) */
|
|
1335
|
+
autoPayEnabled?: boolean;
|
|
1336
|
+
}
|
|
1337
|
+
/**
|
|
1338
|
+
* SmartPay input schema
|
|
1339
|
+
*/
|
|
1340
|
+
declare const smartPayInputSchema: z.ZodObject<{
|
|
1341
|
+
url: z.ZodString;
|
|
1342
|
+
maxBridgeFee: z.ZodOptional<z.ZodString>;
|
|
1343
|
+
preferredNetwork: z.ZodOptional<z.ZodString>;
|
|
1344
|
+
confirmed: z.ZodOptional<z.ZodBoolean>;
|
|
1345
|
+
}, "strip", z.ZodTypeAny, {
|
|
1346
|
+
url: string;
|
|
1347
|
+
confirmed?: boolean | undefined;
|
|
1348
|
+
maxBridgeFee?: string | undefined;
|
|
1349
|
+
preferredNetwork?: string | undefined;
|
|
1350
|
+
}, {
|
|
1351
|
+
url: string;
|
|
1352
|
+
confirmed?: boolean | undefined;
|
|
1353
|
+
maxBridgeFee?: string | undefined;
|
|
1354
|
+
preferredNetwork?: string | undefined;
|
|
1355
|
+
}>;
|
|
1356
|
+
type SmartPayInput = z.infer<typeof smartPayInputSchema>;
|
|
1357
|
+
/**
|
|
1358
|
+
* SmartPay result
|
|
1359
|
+
*/
|
|
1360
|
+
interface SmartPayResult {
|
|
1361
|
+
/** Whether the resource was successfully accessed */
|
|
1362
|
+
success: boolean;
|
|
1363
|
+
/** HTTP status code */
|
|
1364
|
+
statusCode: number;
|
|
1365
|
+
/** Response body (truncated if large) */
|
|
1366
|
+
body: string;
|
|
1367
|
+
/** Content type of the response */
|
|
1368
|
+
contentType?: string;
|
|
1369
|
+
/** Steps taken during smart payment */
|
|
1370
|
+
steps: SmartPayStep[];
|
|
1371
|
+
/** Payment details (if payment was made) */
|
|
1372
|
+
payment?: {
|
|
1373
|
+
network: string;
|
|
1374
|
+
scheme: string;
|
|
1375
|
+
amount: string;
|
|
1376
|
+
payTo: string;
|
|
1377
|
+
};
|
|
1378
|
+
/** Error message (if failed) */
|
|
1379
|
+
error?: string;
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* A step in the smart payment flow
|
|
1383
|
+
*/
|
|
1384
|
+
interface SmartPayStep {
|
|
1385
|
+
action: 'check_price' | 'check_balance' | 'bridge' | 'pay' | 'fetch';
|
|
1386
|
+
status: 'success' | 'skipped' | 'failed';
|
|
1387
|
+
detail: string;
|
|
1388
|
+
}
|
|
1389
|
+
/**
|
|
1390
|
+
* PaymentPlan input schema
|
|
1391
|
+
*/
|
|
1392
|
+
declare const paymentPlanInputSchema: z.ZodObject<{
|
|
1393
|
+
paymentRequired: z.ZodObject<{
|
|
1394
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
1395
|
+
network: z.ZodOptional<z.ZodString>;
|
|
1396
|
+
maxAmountRequired: z.ZodOptional<z.ZodString>;
|
|
1397
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1398
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1399
|
+
payTo: z.ZodOptional<z.ZodString>;
|
|
1400
|
+
maxDeadline: z.ZodOptional<z.ZodNumber>;
|
|
1401
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1402
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
1403
|
+
network: z.ZodOptional<z.ZodString>;
|
|
1404
|
+
maxAmountRequired: z.ZodOptional<z.ZodString>;
|
|
1405
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1406
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1407
|
+
payTo: z.ZodOptional<z.ZodString>;
|
|
1408
|
+
maxDeadline: z.ZodOptional<z.ZodNumber>;
|
|
1409
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1410
|
+
scheme: z.ZodOptional<z.ZodString>;
|
|
1411
|
+
network: z.ZodOptional<z.ZodString>;
|
|
1412
|
+
maxAmountRequired: z.ZodOptional<z.ZodString>;
|
|
1413
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
1414
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1415
|
+
payTo: z.ZodOptional<z.ZodString>;
|
|
1416
|
+
maxDeadline: z.ZodOptional<z.ZodNumber>;
|
|
1417
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
1418
|
+
}, "strip", z.ZodTypeAny, {
|
|
1419
|
+
paymentRequired: {
|
|
1420
|
+
network?: string | undefined;
|
|
1421
|
+
description?: string | undefined;
|
|
1422
|
+
scheme?: string | undefined;
|
|
1423
|
+
payTo?: string | undefined;
|
|
1424
|
+
maxAmountRequired?: string | undefined;
|
|
1425
|
+
resource?: string | undefined;
|
|
1426
|
+
maxDeadline?: number | undefined;
|
|
1427
|
+
} & {
|
|
1428
|
+
[k: string]: unknown;
|
|
1429
|
+
};
|
|
1430
|
+
}, {
|
|
1431
|
+
paymentRequired: {
|
|
1432
|
+
network?: string | undefined;
|
|
1433
|
+
description?: string | undefined;
|
|
1434
|
+
scheme?: string | undefined;
|
|
1435
|
+
payTo?: string | undefined;
|
|
1436
|
+
maxAmountRequired?: string | undefined;
|
|
1437
|
+
resource?: string | undefined;
|
|
1438
|
+
maxDeadline?: number | undefined;
|
|
1439
|
+
} & {
|
|
1440
|
+
[k: string]: unknown;
|
|
1441
|
+
};
|
|
1442
|
+
}>;
|
|
1443
|
+
type PaymentPlanInput = z.infer<typeof paymentPlanInputSchema>;
|
|
1444
|
+
/**
|
|
1445
|
+
* Payment plan result
|
|
1446
|
+
*/
|
|
1447
|
+
interface PaymentPlanResult {
|
|
1448
|
+
/** Whether a viable plan was found */
|
|
1449
|
+
viable: boolean;
|
|
1450
|
+
/** Recommended network to pay on */
|
|
1451
|
+
recommendedNetwork?: string;
|
|
1452
|
+
/** Available balance on that network */
|
|
1453
|
+
availableBalance?: string;
|
|
1454
|
+
/** Whether bridging is needed */
|
|
1455
|
+
bridgeRequired: boolean;
|
|
1456
|
+
/** Bridge details if needed */
|
|
1457
|
+
bridgeDetails?: {
|
|
1458
|
+
fromChain: string;
|
|
1459
|
+
toChain: string;
|
|
1460
|
+
amount: string;
|
|
1461
|
+
estimatedFee: string;
|
|
1462
|
+
};
|
|
1463
|
+
/** Balances across all chains */
|
|
1464
|
+
balances: Array<{
|
|
1465
|
+
chain: string;
|
|
1466
|
+
usdt0: string;
|
|
1467
|
+
usdc: string;
|
|
1468
|
+
}>;
|
|
1469
|
+
/** Reason if not viable */
|
|
1470
|
+
reason?: string;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* Unified tool definitions (additional tools beyond base + WDK)
|
|
1474
|
+
*/
|
|
1475
|
+
declare const UNIFIED_TOOL_DEFINITIONS: {
|
|
1476
|
+
readonly 't402/smartPay': {
|
|
1477
|
+
readonly name: "t402/smartPay";
|
|
1478
|
+
readonly description: "Intelligent payment that automatically checks balance, bridges if needed, and pays. Handles the entire payment flow for 402-protected resources.";
|
|
1479
|
+
readonly inputSchema: {
|
|
1480
|
+
readonly type: "object";
|
|
1481
|
+
readonly properties: {
|
|
1482
|
+
readonly url: {
|
|
1483
|
+
readonly type: "string";
|
|
1484
|
+
readonly description: "URL of the 402-protected resource";
|
|
1485
|
+
};
|
|
1486
|
+
readonly maxBridgeFee: {
|
|
1487
|
+
readonly type: "string";
|
|
1488
|
+
readonly description: "Maximum acceptable bridge fee in native token (optional)";
|
|
1489
|
+
};
|
|
1490
|
+
readonly preferredNetwork: {
|
|
1491
|
+
readonly type: "string";
|
|
1492
|
+
readonly description: "Preferred network for payment (optional)";
|
|
1493
|
+
};
|
|
1494
|
+
readonly confirmed: {
|
|
1495
|
+
readonly type: "boolean";
|
|
1496
|
+
readonly description: "Set to true to confirm and execute. Omit for a preview/confirmation prompt.";
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1499
|
+
readonly required: readonly ["url"];
|
|
1500
|
+
};
|
|
1501
|
+
};
|
|
1502
|
+
readonly 't402/paymentPlan': {
|
|
1503
|
+
readonly name: "t402/paymentPlan";
|
|
1504
|
+
readonly description: "Analyze a 402 response and create an optimal payment plan considering balances across all chains. Returns recommended network, bridge requirements, and balance overview.";
|
|
1505
|
+
readonly inputSchema: {
|
|
1506
|
+
readonly type: "object";
|
|
1507
|
+
readonly properties: {
|
|
1508
|
+
readonly paymentRequired: {
|
|
1509
|
+
readonly type: "object";
|
|
1510
|
+
readonly description: "The 402 PaymentRequired response";
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
readonly required: readonly ["paymentRequired"];
|
|
1514
|
+
};
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
/**
|
|
1518
|
+
* Execute t402/smartPay tool
|
|
1519
|
+
*/
|
|
1520
|
+
declare function executeSmartPay(input: SmartPayInput, wdk: T402WDK): Promise<SmartPayResult | {
|
|
1521
|
+
needsConfirmation: true;
|
|
1522
|
+
summary: string;
|
|
1523
|
+
details: Record<string, string>;
|
|
1524
|
+
}>;
|
|
1525
|
+
/**
|
|
1526
|
+
* Execute t402/smartPay in demo mode
|
|
1527
|
+
*/
|
|
1528
|
+
declare function executeSmartPayDemo(input: SmartPayInput): SmartPayResult | {
|
|
1529
|
+
needsConfirmation: true;
|
|
1530
|
+
summary: string;
|
|
1531
|
+
details: Record<string, string>;
|
|
1532
|
+
};
|
|
1533
|
+
/**
|
|
1534
|
+
* Execute t402/paymentPlan tool
|
|
1535
|
+
*/
|
|
1536
|
+
declare function executePaymentPlan(input: PaymentPlanInput, wdk: T402WDK): Promise<PaymentPlanResult>;
|
|
1537
|
+
/**
|
|
1538
|
+
* Execute t402/paymentPlan in demo mode
|
|
1539
|
+
*/
|
|
1540
|
+
declare function executePaymentPlanDemo(_input: PaymentPlanInput): PaymentPlanResult;
|
|
1541
|
+
/**
|
|
1542
|
+
* Format smartPay result for display
|
|
1543
|
+
*/
|
|
1544
|
+
declare function formatSmartPayResult(result: SmartPayResult): string;
|
|
1545
|
+
/**
|
|
1546
|
+
* Format paymentPlan result for display
|
|
1547
|
+
*/
|
|
1548
|
+
declare function formatPaymentPlanResult(result: PaymentPlanResult): string;
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* t402 MCP Tools - Export all payment tools
|
|
1552
|
+
*/
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Base tool definitions (always available)
|
|
1556
|
+
*/
|
|
1557
|
+
declare const TOOL_DEFINITIONS: {
|
|
1558
|
+
't402/getBalance': {
|
|
1559
|
+
name: string;
|
|
1560
|
+
description: string;
|
|
1561
|
+
inputSchema: {
|
|
1562
|
+
type: "object";
|
|
1563
|
+
properties: {
|
|
1564
|
+
network: {
|
|
1565
|
+
type: string;
|
|
1566
|
+
enum: string[];
|
|
1567
|
+
description: string;
|
|
1568
|
+
};
|
|
1569
|
+
address: {
|
|
1570
|
+
type: string;
|
|
1571
|
+
pattern: string;
|
|
1572
|
+
description: string;
|
|
1573
|
+
};
|
|
1574
|
+
};
|
|
1575
|
+
required: string[];
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
't402/getAllBalances': {
|
|
1579
|
+
name: string;
|
|
1580
|
+
description: string;
|
|
1581
|
+
inputSchema: {
|
|
1582
|
+
type: "object";
|
|
1583
|
+
properties: {
|
|
1584
|
+
address: {
|
|
1585
|
+
type: string;
|
|
1586
|
+
pattern: string;
|
|
1587
|
+
description: string;
|
|
1588
|
+
};
|
|
1589
|
+
networks: {
|
|
1590
|
+
type: string;
|
|
1591
|
+
items: {
|
|
1592
|
+
type: string;
|
|
1593
|
+
enum: string[];
|
|
1594
|
+
};
|
|
1595
|
+
description: string;
|
|
1596
|
+
};
|
|
1597
|
+
};
|
|
1598
|
+
required: string[];
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
't402/pay': {
|
|
1602
|
+
name: string;
|
|
1603
|
+
description: string;
|
|
1604
|
+
inputSchema: {
|
|
1605
|
+
type: "object";
|
|
1606
|
+
properties: {
|
|
1607
|
+
to: {
|
|
1608
|
+
type: string;
|
|
1609
|
+
pattern: string;
|
|
1610
|
+
description: string;
|
|
1611
|
+
};
|
|
1612
|
+
amount: {
|
|
1613
|
+
type: string;
|
|
1614
|
+
pattern: string;
|
|
1615
|
+
description: string;
|
|
1616
|
+
};
|
|
1617
|
+
token: {
|
|
1618
|
+
type: string;
|
|
1619
|
+
enum: string[];
|
|
1620
|
+
description: string;
|
|
1621
|
+
};
|
|
1622
|
+
network: {
|
|
1623
|
+
type: string;
|
|
1624
|
+
enum: string[];
|
|
1625
|
+
description: string;
|
|
1626
|
+
};
|
|
1627
|
+
memo: {
|
|
1628
|
+
type: string;
|
|
1629
|
+
description: string;
|
|
1630
|
+
};
|
|
1631
|
+
confirmed: {
|
|
1632
|
+
type: string;
|
|
1633
|
+
description: string;
|
|
1634
|
+
};
|
|
1635
|
+
};
|
|
1636
|
+
required: string[];
|
|
1637
|
+
};
|
|
1638
|
+
};
|
|
1639
|
+
't402/payGasless': {
|
|
861
1640
|
name: string;
|
|
862
1641
|
description: string;
|
|
863
1642
|
inputSchema: {
|
|
864
1643
|
type: "object";
|
|
865
1644
|
properties: {
|
|
1645
|
+
to: {
|
|
1646
|
+
type: string;
|
|
1647
|
+
pattern: string;
|
|
1648
|
+
description: string;
|
|
1649
|
+
};
|
|
1650
|
+
amount: {
|
|
1651
|
+
type: string;
|
|
1652
|
+
pattern: string;
|
|
1653
|
+
description: string;
|
|
1654
|
+
};
|
|
1655
|
+
token: {
|
|
1656
|
+
type: string;
|
|
1657
|
+
enum: string[];
|
|
1658
|
+
description: string;
|
|
1659
|
+
};
|
|
866
1660
|
network: {
|
|
867
1661
|
type: string;
|
|
868
1662
|
enum: string[];
|
|
869
1663
|
description: string;
|
|
870
1664
|
};
|
|
871
|
-
|
|
1665
|
+
confirmed: {
|
|
872
1666
|
type: string;
|
|
873
|
-
pattern: string;
|
|
874
1667
|
description: string;
|
|
875
1668
|
};
|
|
876
1669
|
};
|
|
877
1670
|
required: string[];
|
|
878
1671
|
};
|
|
879
1672
|
};
|
|
880
|
-
't402/
|
|
1673
|
+
't402/getBridgeFee': {
|
|
881
1674
|
name: string;
|
|
882
1675
|
description: string;
|
|
883
1676
|
inputSchema: {
|
|
884
1677
|
type: "object";
|
|
885
1678
|
properties: {
|
|
886
|
-
|
|
1679
|
+
fromChain: {
|
|
1680
|
+
type: string;
|
|
1681
|
+
enum: string[];
|
|
1682
|
+
description: string;
|
|
1683
|
+
};
|
|
1684
|
+
toChain: {
|
|
1685
|
+
type: string;
|
|
1686
|
+
enum: string[];
|
|
1687
|
+
description: string;
|
|
1688
|
+
};
|
|
1689
|
+
amount: {
|
|
887
1690
|
type: string;
|
|
888
1691
|
pattern: string;
|
|
889
1692
|
description: string;
|
|
890
1693
|
};
|
|
891
|
-
|
|
1694
|
+
recipient: {
|
|
892
1695
|
type: string;
|
|
893
|
-
|
|
894
|
-
type: string;
|
|
895
|
-
enum: string[];
|
|
896
|
-
};
|
|
1696
|
+
pattern: string;
|
|
897
1697
|
description: string;
|
|
898
1698
|
};
|
|
899
1699
|
};
|
|
900
1700
|
required: string[];
|
|
901
1701
|
};
|
|
902
1702
|
};
|
|
903
|
-
't402/
|
|
1703
|
+
't402/bridge': {
|
|
904
1704
|
name: string;
|
|
905
1705
|
description: string;
|
|
906
1706
|
inputSchema: {
|
|
907
1707
|
type: "object";
|
|
908
1708
|
properties: {
|
|
909
|
-
|
|
1709
|
+
fromChain: {
|
|
910
1710
|
type: string;
|
|
911
|
-
|
|
1711
|
+
enum: string[];
|
|
1712
|
+
description: string;
|
|
1713
|
+
};
|
|
1714
|
+
toChain: {
|
|
1715
|
+
type: string;
|
|
1716
|
+
enum: string[];
|
|
912
1717
|
description: string;
|
|
913
1718
|
};
|
|
914
1719
|
amount: {
|
|
@@ -916,17 +1721,33 @@ declare const TOOL_DEFINITIONS: {
|
|
|
916
1721
|
pattern: string;
|
|
917
1722
|
description: string;
|
|
918
1723
|
};
|
|
919
|
-
|
|
1724
|
+
recipient: {
|
|
920
1725
|
type: string;
|
|
921
|
-
|
|
1726
|
+
pattern: string;
|
|
922
1727
|
description: string;
|
|
923
1728
|
};
|
|
924
|
-
|
|
1729
|
+
confirmed: {
|
|
925
1730
|
type: string;
|
|
926
|
-
enum: string[];
|
|
927
1731
|
description: string;
|
|
928
1732
|
};
|
|
929
|
-
|
|
1733
|
+
};
|
|
1734
|
+
required: string[];
|
|
1735
|
+
};
|
|
1736
|
+
};
|
|
1737
|
+
't402/getTokenPrice': {
|
|
1738
|
+
name: string;
|
|
1739
|
+
description: string;
|
|
1740
|
+
inputSchema: {
|
|
1741
|
+
type: "object";
|
|
1742
|
+
properties: {
|
|
1743
|
+
tokens: {
|
|
1744
|
+
type: string;
|
|
1745
|
+
items: {
|
|
1746
|
+
type: string;
|
|
1747
|
+
};
|
|
1748
|
+
description: string;
|
|
1749
|
+
};
|
|
1750
|
+
currency: {
|
|
930
1751
|
type: string;
|
|
931
1752
|
description: string;
|
|
932
1753
|
};
|
|
@@ -934,15 +1755,30 @@ declare const TOOL_DEFINITIONS: {
|
|
|
934
1755
|
required: string[];
|
|
935
1756
|
};
|
|
936
1757
|
};
|
|
937
|
-
't402/
|
|
1758
|
+
't402/getGasPrice': {
|
|
938
1759
|
name: string;
|
|
939
1760
|
description: string;
|
|
940
1761
|
inputSchema: {
|
|
941
1762
|
type: "object";
|
|
942
1763
|
properties: {
|
|
943
|
-
|
|
1764
|
+
network: {
|
|
944
1765
|
type: string;
|
|
945
|
-
|
|
1766
|
+
enum: string[];
|
|
1767
|
+
description: string;
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
required: string[];
|
|
1771
|
+
};
|
|
1772
|
+
};
|
|
1773
|
+
't402/estimatePaymentFee': {
|
|
1774
|
+
name: string;
|
|
1775
|
+
description: string;
|
|
1776
|
+
inputSchema: {
|
|
1777
|
+
type: "object";
|
|
1778
|
+
properties: {
|
|
1779
|
+
network: {
|
|
1780
|
+
type: string;
|
|
1781
|
+
enum: string[];
|
|
946
1782
|
description: string;
|
|
947
1783
|
};
|
|
948
1784
|
amount: {
|
|
@@ -955,16 +1791,38 @@ declare const TOOL_DEFINITIONS: {
|
|
|
955
1791
|
enum: string[];
|
|
956
1792
|
description: string;
|
|
957
1793
|
};
|
|
958
|
-
|
|
1794
|
+
};
|
|
1795
|
+
required: string[];
|
|
1796
|
+
};
|
|
1797
|
+
};
|
|
1798
|
+
't402/compareNetworkFees': {
|
|
1799
|
+
name: string;
|
|
1800
|
+
description: string;
|
|
1801
|
+
inputSchema: {
|
|
1802
|
+
type: "object";
|
|
1803
|
+
properties: {
|
|
1804
|
+
amount: {
|
|
1805
|
+
type: string;
|
|
1806
|
+
pattern: string;
|
|
1807
|
+
description: string;
|
|
1808
|
+
};
|
|
1809
|
+
token: {
|
|
959
1810
|
type: string;
|
|
960
1811
|
enum: string[];
|
|
961
1812
|
description: string;
|
|
962
1813
|
};
|
|
1814
|
+
networks: {
|
|
1815
|
+
type: string;
|
|
1816
|
+
items: {
|
|
1817
|
+
type: string;
|
|
1818
|
+
};
|
|
1819
|
+
description: string;
|
|
1820
|
+
};
|
|
963
1821
|
};
|
|
964
1822
|
required: string[];
|
|
965
1823
|
};
|
|
966
1824
|
};
|
|
967
|
-
't402/
|
|
1825
|
+
't402/quoteBridge': {
|
|
968
1826
|
name: string;
|
|
969
1827
|
description: string;
|
|
970
1828
|
inputSchema: {
|
|
@@ -994,32 +1852,115 @@ declare const TOOL_DEFINITIONS: {
|
|
|
994
1852
|
required: string[];
|
|
995
1853
|
};
|
|
996
1854
|
};
|
|
997
|
-
't402/
|
|
1855
|
+
't402/executeBridgeQuote': {
|
|
998
1856
|
name: string;
|
|
999
1857
|
description: string;
|
|
1000
1858
|
inputSchema: {
|
|
1001
1859
|
type: "object";
|
|
1002
1860
|
properties: {
|
|
1003
|
-
|
|
1861
|
+
quoteId: {
|
|
1862
|
+
type: string;
|
|
1863
|
+
description: string;
|
|
1864
|
+
};
|
|
1865
|
+
confirmed: {
|
|
1866
|
+
type: string;
|
|
1867
|
+
description: string;
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
required: string[];
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
't402/signMessage': {
|
|
1874
|
+
name: string;
|
|
1875
|
+
description: string;
|
|
1876
|
+
inputSchema: {
|
|
1877
|
+
type: "object";
|
|
1878
|
+
properties: {
|
|
1879
|
+
chain: {
|
|
1004
1880
|
type: string;
|
|
1005
1881
|
enum: string[];
|
|
1006
1882
|
description: string;
|
|
1007
1883
|
};
|
|
1008
|
-
|
|
1884
|
+
message: {
|
|
1885
|
+
type: string;
|
|
1886
|
+
description: string;
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
required: string[];
|
|
1890
|
+
};
|
|
1891
|
+
};
|
|
1892
|
+
't402/verifySignature': {
|
|
1893
|
+
name: string;
|
|
1894
|
+
description: string;
|
|
1895
|
+
inputSchema: {
|
|
1896
|
+
type: "object";
|
|
1897
|
+
properties: {
|
|
1898
|
+
chain: {
|
|
1009
1899
|
type: string;
|
|
1010
1900
|
enum: string[];
|
|
1011
1901
|
description: string;
|
|
1012
1902
|
};
|
|
1013
|
-
|
|
1903
|
+
message: {
|
|
1904
|
+
type: string;
|
|
1905
|
+
description: string;
|
|
1906
|
+
};
|
|
1907
|
+
signature: {
|
|
1014
1908
|
type: string;
|
|
1015
1909
|
pattern: string;
|
|
1016
1910
|
description: string;
|
|
1017
1911
|
};
|
|
1018
|
-
|
|
1912
|
+
address: {
|
|
1913
|
+
type: string;
|
|
1914
|
+
pattern: string;
|
|
1915
|
+
description: string;
|
|
1916
|
+
};
|
|
1917
|
+
};
|
|
1918
|
+
required: string[];
|
|
1919
|
+
};
|
|
1920
|
+
};
|
|
1921
|
+
't402/getTransferHistory': {
|
|
1922
|
+
name: string;
|
|
1923
|
+
description: string;
|
|
1924
|
+
inputSchema: {
|
|
1925
|
+
type: "object";
|
|
1926
|
+
properties: {
|
|
1927
|
+
network: {
|
|
1928
|
+
type: string;
|
|
1929
|
+
enum: string[];
|
|
1930
|
+
description: string;
|
|
1931
|
+
};
|
|
1932
|
+
address: {
|
|
1019
1933
|
type: string;
|
|
1020
1934
|
pattern: string;
|
|
1021
1935
|
description: string;
|
|
1022
1936
|
};
|
|
1937
|
+
token: {
|
|
1938
|
+
type: string;
|
|
1939
|
+
enum: string[];
|
|
1940
|
+
description: string;
|
|
1941
|
+
};
|
|
1942
|
+
limit: {
|
|
1943
|
+
type: string;
|
|
1944
|
+
description: string;
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
required: string[];
|
|
1948
|
+
};
|
|
1949
|
+
};
|
|
1950
|
+
't402/getHistoricalPrice': {
|
|
1951
|
+
name: string;
|
|
1952
|
+
description: string;
|
|
1953
|
+
inputSchema: {
|
|
1954
|
+
type: "object";
|
|
1955
|
+
properties: {
|
|
1956
|
+
token: {
|
|
1957
|
+
type: string;
|
|
1958
|
+
description: string;
|
|
1959
|
+
};
|
|
1960
|
+
days: {
|
|
1961
|
+
type: string;
|
|
1962
|
+
description: string;
|
|
1963
|
+
};
|
|
1023
1964
|
};
|
|
1024
1965
|
required: string[];
|
|
1025
1966
|
};
|
|
@@ -1079,6 +2020,10 @@ declare const WDK_TOOL_DEFINITIONS: {
|
|
|
1079
2020
|
type: string;
|
|
1080
2021
|
description: string;
|
|
1081
2022
|
};
|
|
2023
|
+
confirmed: {
|
|
2024
|
+
type: string;
|
|
2025
|
+
description: string;
|
|
2026
|
+
};
|
|
1082
2027
|
};
|
|
1083
2028
|
required: string[];
|
|
1084
2029
|
};
|
|
@@ -1106,6 +2051,10 @@ declare const WDK_TOOL_DEFINITIONS: {
|
|
|
1106
2051
|
type: string;
|
|
1107
2052
|
description: string;
|
|
1108
2053
|
};
|
|
2054
|
+
confirmed: {
|
|
2055
|
+
type: string;
|
|
2056
|
+
description: string;
|
|
2057
|
+
};
|
|
1109
2058
|
};
|
|
1110
2059
|
required: string[];
|
|
1111
2060
|
};
|
|
@@ -1129,6 +2078,55 @@ declare const WDK_TOOL_DEFINITIONS: {
|
|
|
1129
2078
|
type: string;
|
|
1130
2079
|
description: string;
|
|
1131
2080
|
};
|
|
2081
|
+
confirmed: {
|
|
2082
|
+
type: string;
|
|
2083
|
+
description: string;
|
|
2084
|
+
};
|
|
2085
|
+
};
|
|
2086
|
+
required: string[];
|
|
2087
|
+
};
|
|
2088
|
+
};
|
|
2089
|
+
'wdk/quoteSwap': {
|
|
2090
|
+
name: string;
|
|
2091
|
+
description: string;
|
|
2092
|
+
inputSchema: {
|
|
2093
|
+
type: "object";
|
|
2094
|
+
properties: {
|
|
2095
|
+
fromToken: {
|
|
2096
|
+
type: string;
|
|
2097
|
+
description: string;
|
|
2098
|
+
};
|
|
2099
|
+
toToken: {
|
|
2100
|
+
type: string;
|
|
2101
|
+
description: string;
|
|
2102
|
+
};
|
|
2103
|
+
amount: {
|
|
2104
|
+
type: string;
|
|
2105
|
+
pattern: string;
|
|
2106
|
+
description: string;
|
|
2107
|
+
};
|
|
2108
|
+
chain: {
|
|
2109
|
+
type: string;
|
|
2110
|
+
description: string;
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
required: string[];
|
|
2114
|
+
};
|
|
2115
|
+
};
|
|
2116
|
+
'wdk/executeSwap': {
|
|
2117
|
+
name: string;
|
|
2118
|
+
description: string;
|
|
2119
|
+
inputSchema: {
|
|
2120
|
+
type: "object";
|
|
2121
|
+
properties: {
|
|
2122
|
+
quoteId: {
|
|
2123
|
+
type: string;
|
|
2124
|
+
description: string;
|
|
2125
|
+
};
|
|
2126
|
+
confirmed: {
|
|
2127
|
+
type: string;
|
|
2128
|
+
description: string;
|
|
2129
|
+
};
|
|
1132
2130
|
};
|
|
1133
2131
|
required: string[];
|
|
1134
2132
|
};
|
|
@@ -1216,4 +2214,4 @@ declare const ERC8004_TOOL_DEFINITIONS: {
|
|
|
1216
2214
|
};
|
|
1217
2215
|
};
|
|
1218
2216
|
|
|
1219
|
-
export { type AllBalancesResult, type AutoPayInput, type AutoPayResult, type BridgeInput, type BridgeOptions, ERC8004_TOOL_DEFINITIONS, type Erc8004CheckReputationInput, type Erc8004ResolveAgentInput, type Erc8004VerifyWalletInput, type Erc8004VerifyWalletResult, GASLESS_SUPPORTED_NETWORKS, type GetAllBalancesInput, type GetBalanceInput, type GetBridgeFeeInput, type PayGaslessInput, type PayGaslessOptions, type PayInput, type PayOptions, type PaymentPlanInput, type PaymentPlanResult, type SmartPayInput, type SmartPayResult, type SmartPayStep, TOOL_DEFINITIONS, UNIFIED_TOOL_DEFINITIONS, type UnifiedMcpConfig, WDK_TOOL_DEFINITIONS, type WdkBalancesResult, type WdkGetBalancesInput, type WdkGetWalletInput, type WdkSwapInput, type WdkSwapResult, type WdkTransferInput, type WdkTransferResult, type WdkWalletInfo, autoPayInputSchema, bridgeInputSchema, erc8004CheckReputationInputSchema, erc8004ResolveAgentInputSchema, erc8004VerifyWalletInputSchema, executeAutoPay, executeAutoPayDemo, executeBridge, executeErc8004CheckReputation, executeErc8004ResolveAgent, executeErc8004VerifyWallet, executeGetAllBalances, executeGetBalance, executeGetBridgeFee, executePay, executePayGasless, executePaymentPlan, executePaymentPlanDemo, executeSmartPay, executeSmartPayDemo, executeWdkGetBalances, executeWdkGetBalancesDemo, executeWdkGetWallet, executeWdkGetWalletDemo, executeWdkSwap, executeWdkSwapDemo, executeWdkTransfer, executeWdkTransferDemo, formatAllBalancesResult, formatAutoPayResult, formatBalanceResult, formatBridgeFeeResult, formatBridgeResult, formatErc8004CheckReputationResult, formatErc8004ResolveAgentResult, formatErc8004VerifyWalletResult, formatGaslessPaymentResult, formatPaymentPlanResult, formatPaymentResult, formatSmartPayResult, formatWdkBalancesResult, formatWdkSwapResult, formatWdkTransferResult, formatWdkWalletResult, getAllBalancesInputSchema, getBalanceInputSchema, getBridgeFeeInputSchema, payGaslessInputSchema, payInputSchema, paymentPlanInputSchema, smartPayInputSchema, wdkGetBalancesInputSchema, wdkGetWalletInputSchema, wdkSwapInputSchema, wdkTransferInputSchema };
|
|
2217
|
+
export { type AllBalancesResult, type AutoPayInput, type AutoPayResult, type BridgeInput, type BridgeOptions, type BridgeQuoteResult, type CompareNetworkFeesInput, ERC8004_TOOL_DEFINITIONS, type Erc8004CheckReputationInput, type Erc8004ResolveAgentInput, type Erc8004VerifyWalletInput, type Erc8004VerifyWalletResult, type EstimatePaymentFeeInput, type ExecuteBridgeFromQuoteInput, type ExecuteSwapResult, GASLESS_SUPPORTED_NETWORKS, type GasPriceResult, type GetAllBalancesInput, type GetBalanceInput, type GetBridgeFeeInput, type GetGasPriceInput, type GetHistoricalPriceInput, type GetTokenPriceInput, type GetTransferHistoryInput, type HistoricalPriceResult, type NetworkFeeComparison, type PayGaslessInput, type PayGaslessOptions, type PayInput, type PayOptions, type PaymentFeeEstimate, type PaymentPlanInput, type PaymentPlanResult, type PriceDataPoint, type QuoteBridgeInput, type QuoteData, type SignMessageInput, type SignMessageResult, type SmartPayInput, type SmartPayResult, type SmartPayStep, type SwapQuoteResult, TOOL_DEFINITIONS, type TokenPriceResult, type TransferEvent, type TransferHistoryResult, UNIFIED_TOOL_DEFINITIONS, type UnifiedMcpConfig, type VerifySignatureInput, type VerifySignatureResult, WDK_TOOL_DEFINITIONS, type WdkBalancesResult, type WdkExecuteSwapInput, type WdkGetBalancesInput, type WdkGetWalletInput, type WdkQuoteSwapInput, type WdkSwapInput, type WdkSwapResult, type WdkTransferInput, type WdkTransferResult, type WdkWalletInfo, autoPayInputSchema, bridgeInputSchema, clearPriceCache, clearQuoteStore, compareNetworkFeesInputSchema, createQuote, deleteQuote, erc8004CheckReputationInputSchema, erc8004ResolveAgentInputSchema, erc8004VerifyWalletInputSchema, estimatePaymentFeeInputSchema, executeAutoPay, executeAutoPayDemo, executeBridge, executeBridgeFromQuoteInputSchema, executeCompareNetworkFees, executeErc8004CheckReputation, executeErc8004ResolveAgent, executeErc8004VerifyWallet, executeEstimatePaymentFee, executeExecuteBridgeFromQuote, executeExecuteBridgeFromQuoteDemo, executeGetAllBalances, executeGetBalance, executeGetBridgeFee, executeGetGasPrice, executeGetHistoricalPrice, executeGetTokenPrice, executeGetTransferHistory, executePay, executePayGasless, executePaymentPlan, executePaymentPlanDemo, executeQuoteBridge, executeQuoteBridgeDemo, executeSignMessage, executeSmartPay, executeSmartPayDemo, executeVerifySignature, executeWdkExecuteSwap, executeWdkExecuteSwapDemo, executeWdkGetBalances, executeWdkGetBalancesDemo, executeWdkGetWallet, executeWdkGetWalletDemo, executeWdkQuoteSwap, executeWdkQuoteSwapDemo, executeWdkSwap, executeWdkSwapDemo, executeWdkTransfer, executeWdkTransferDemo, formatAllBalancesResult, formatAutoPayResult, formatBalanceResult, formatBridgeFeeResult, formatBridgeQuoteResult, formatBridgeResult, formatErc8004CheckReputationResult, formatErc8004ResolveAgentResult, formatErc8004VerifyWalletResult, formatBridgeResult as formatExecuteBridgeFromQuoteResult, formatExecuteSwapResult, formatGasPriceResult, formatGaslessPaymentResult, formatHistoricalPriceResult, formatNetworkFeeComparison, formatPaymentFeeEstimate, formatPaymentPlanResult, formatPaymentResult, formatSignMessageResult, formatSmartPayResult, formatSwapQuoteResult, formatTokenPriceResult, formatTransferHistoryResult, formatVerifySignatureResult, formatWdkBalancesResult, formatWdkSwapResult, formatWdkTransferResult, formatWdkWalletResult, getAllBalancesInputSchema, getBalanceInputSchema, getBridgeFeeInputSchema, getGasPriceInputSchema, getHistoricalPriceInputSchema, getQuote, getTokenPriceInputSchema, getTokenPrices, getTokenPricesDemo, getTransferHistoryInputSchema, payGaslessInputSchema, payInputSchema, paymentPlanInputSchema, quoteBridgeInputSchema, signMessageInputSchema, smartPayInputSchema, verifySignatureInputSchema, wdkExecuteSwapInputSchema, wdkGetBalancesInputSchema, wdkGetWalletInputSchema, wdkQuoteSwapInputSchema, wdkSwapInputSchema, wdkTransferInputSchema };
|