@truecarry/mcp 0.1.3 → 0.1.5

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.
Files changed (70) hide show
  1. package/dist/cli.js +654 -1579
  2. package/dist/factory.d.ts +35 -21
  3. package/dist/factory.d.ts.map +1 -1
  4. package/dist/index.cjs +781 -4180
  5. package/dist/index.d.ts +5 -16
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +781 -4167
  8. package/dist/services/McpWalletService.d.ts +74 -133
  9. package/dist/services/McpWalletService.d.ts.map +1 -1
  10. package/dist/tools/balance-tools.d.ts +61 -0
  11. package/dist/tools/balance-tools.d.ts.map +1 -0
  12. package/dist/tools/index.d.ts +5 -7
  13. package/dist/tools/index.d.ts.map +1 -1
  14. package/dist/tools/known-jettons-tools.d.ts +44 -0
  15. package/dist/tools/known-jettons-tools.d.ts.map +1 -0
  16. package/dist/tools/nft-tools.d.ts +85 -0
  17. package/dist/tools/nft-tools.d.ts.map +1 -0
  18. package/dist/tools/swap-tools.d.ts +49 -0
  19. package/dist/tools/swap-tools.d.ts.map +1 -0
  20. package/dist/tools/transfer-tools.d.ts +159 -0
  21. package/dist/tools/transfer-tools.d.ts.map +1 -0
  22. package/dist/tools/types.d.ts +21 -0
  23. package/dist/tools/types.d.ts.map +1 -0
  24. package/dist/types/config.d.ts +12 -36
  25. package/dist/types/config.d.ts.map +1 -1
  26. package/dist/types/index.d.ts +1 -4
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/adapters/InMemoryStorageAdapter.d.ts +0 -49
  30. package/dist/adapters/InMemoryStorageAdapter.d.ts.map +0 -1
  31. package/dist/adapters/LocalSignerAdapter.d.ts +0 -107
  32. package/dist/adapters/LocalSignerAdapter.d.ts.map +0 -1
  33. package/dist/adapters/SqliteSignerAdapter.d.ts +0 -119
  34. package/dist/adapters/SqliteSignerAdapter.d.ts.map +0 -1
  35. package/dist/adapters/SqliteStorageAdapter.d.ts +0 -81
  36. package/dist/adapters/SqliteStorageAdapter.d.ts.map +0 -1
  37. package/dist/adapters/TelegramUserContextProvider.d.ts +0 -70
  38. package/dist/adapters/TelegramUserContextProvider.d.ts.map +0 -1
  39. package/dist/adapters/index.d.ts +0 -19
  40. package/dist/adapters/index.d.ts.map +0 -1
  41. package/dist/core/LimitsManager.d.ts +0 -59
  42. package/dist/core/LimitsManager.d.ts.map +0 -1
  43. package/dist/core/PendingTransactionManager.d.ts +0 -122
  44. package/dist/core/PendingTransactionManager.d.ts.map +0 -1
  45. package/dist/core/UserScopedSigner.d.ts +0 -96
  46. package/dist/core/UserScopedSigner.d.ts.map +0 -1
  47. package/dist/core/UserScopedStorage.d.ts +0 -59
  48. package/dist/core/UserScopedStorage.d.ts.map +0 -1
  49. package/dist/core/index.d.ts +0 -15
  50. package/dist/core/index.d.ts.map +0 -1
  51. package/dist/services/WalletService.d.ts +0 -144
  52. package/dist/services/WalletService.d.ts.map +0 -1
  53. package/dist/storage/SecureStorage.d.ts +0 -79
  54. package/dist/storage/SecureStorage.d.ts.map +0 -1
  55. package/dist/tools/balance.d.ts +0 -167
  56. package/dist/tools/balance.d.ts.map +0 -1
  57. package/dist/tools/mcp-tools.d.ts +0 -439
  58. package/dist/tools/mcp-tools.d.ts.map +0 -1
  59. package/dist/tools/swap.d.ts +0 -110
  60. package/dist/tools/swap.d.ts.map +0 -1
  61. package/dist/tools/transfer.d.ts +0 -146
  62. package/dist/tools/transfer.d.ts.map +0 -1
  63. package/dist/tools/wallet.d.ts +0 -138
  64. package/dist/tools/wallet.d.ts.map +0 -1
  65. package/dist/types/signer.d.ts +0 -120
  66. package/dist/types/signer.d.ts.map +0 -1
  67. package/dist/types/storage.d.ts +0 -41
  68. package/dist/types/storage.d.ts.map +0 -1
  69. package/dist/types/user-context.d.ts +0 -48
  70. package/dist/types/user-context.d.ts.map +0 -1
@@ -1,79 +0,0 @@
1
- /**
2
- * Copyright (c) TonTech.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- export interface WalletData {
9
- name: string;
10
- address: string;
11
- mnemonic: string[];
12
- network: 'mainnet' | 'testnet';
13
- version: 'v5r1' | 'v4r2';
14
- createdAt: string;
15
- }
16
- export interface StorageFile {
17
- version: number;
18
- wallets: WalletData[];
19
- }
20
- /**
21
- * Storage provider interface - allows swapping plaintext for encrypted storage
22
- */
23
- export interface StorageProvider {
24
- save(data: StorageFile): Promise<void>;
25
- load(): Promise<StorageFile>;
26
- }
27
- /**
28
- * Plaintext storage provider - stores data as JSON
29
- * TODO: Replace with EncryptedStorageProvider for production use
30
- */
31
- export declare class PlaintextStorageProvider implements StorageProvider {
32
- private filePath;
33
- constructor(filePath: string);
34
- save(data: StorageFile): Promise<void>;
35
- load(): Promise<StorageFile>;
36
- }
37
- /**
38
- * SecureStorage class - manages wallet data with pluggable storage providers
39
- */
40
- export declare class SecureStorage {
41
- private provider;
42
- private cache;
43
- constructor(provider?: StorageProvider);
44
- /**
45
- * Get all stored wallets
46
- */
47
- getWallets(): Promise<WalletData[]>;
48
- /**
49
- * Get a wallet by name
50
- */
51
- getWallet(name: string): Promise<WalletData | undefined>;
52
- /**
53
- * Get a wallet by address
54
- */
55
- getWalletByAddress(address: string): Promise<WalletData | undefined>;
56
- /**
57
- * Get wallet ID (network:address format, matching @ton/walletkit pattern)
58
- */
59
- getWalletId(wallet: WalletData): string;
60
- /**
61
- * Add a new wallet
62
- */
63
- addWallet(wallet: WalletData): Promise<void>;
64
- /**
65
- * Remove a wallet by name
66
- */
67
- removeWallet(name: string): Promise<boolean>;
68
- /**
69
- * Update a wallet
70
- */
71
- updateWallet(name: string, updates: Partial<Omit<WalletData, 'name'>>): Promise<boolean>;
72
- /**
73
- * Clear all wallets
74
- */
75
- clearAll(): Promise<void>;
76
- private loadData;
77
- private saveData;
78
- }
79
- //# sourceMappingURL=SecureStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Sec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AAM;IAIvC;;OAEG;IACG,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBlD;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAalD;;OAEG;IACG,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAa9F;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YAIjB,QAAQ;YAOR,QAAQ;CAIzB"}
@@ -1,167 +0,0 @@
1
- /**
2
- * Copyright (c) TonTech.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /**
9
- * Balance query MCP tools
10
- *
11
- * All balance responses include both raw and human-readable amounts:
12
- * - rawBalance: The balance in smallest units (nanoTON for TON, raw units for jettons)
13
- * - balance: Human-readable amount with proper decimal formatting
14
- */
15
- import { z } from 'zod';
16
- import type { WalletService } from '../services/WalletService.js';
17
- /**
18
- * Converts raw units to human-readable amount.
19
- *
20
- * @param rawAmount - Raw amount as string (e.g., "1500000000")
21
- * @param decimals - Number of decimal places for the token
22
- * @returns Human-readable amount as string (e.g., "1.5")
23
- *
24
- * @example
25
- * fromRawAmount("1500000000", 9) // "1.5" (1.5 TON)
26
- * fromRawAmount("1000", 6) // "0.001" (0.001 USDT)
27
- * fromRawAmount("100000000000", 9) // "100" (100 TON)
28
- */
29
- declare function fromRawAmount(rawAmount: string, decimals: number): string;
30
- /** TON has 9 decimal places (1 TON = 1,000,000,000 nanoTON) */
31
- declare const TON_DECIMALS = 9;
32
- export declare const getBalanceSchema: z.ZodObject<{
33
- wallet: z.ZodString;
34
- }, "strip", z.ZodTypeAny, {
35
- wallet: string;
36
- }, {
37
- wallet: string;
38
- }>;
39
- export declare const getJettonBalanceSchema: z.ZodObject<{
40
- wallet: z.ZodString;
41
- jettonAddress: z.ZodString;
42
- }, "strip", z.ZodTypeAny, {
43
- wallet: string;
44
- jettonAddress: string;
45
- }, {
46
- wallet: string;
47
- jettonAddress: string;
48
- }>;
49
- export declare const getJettonsSchema: z.ZodObject<{
50
- wallet: z.ZodString;
51
- }, "strip", z.ZodTypeAny, {
52
- wallet: string;
53
- }, {
54
- wallet: string;
55
- }>;
56
- export declare const getTransactionsSchema: z.ZodObject<{
57
- wallet: z.ZodString;
58
- limit: z.ZodOptional<z.ZodNumber>;
59
- }, "strip", z.ZodTypeAny, {
60
- wallet: string;
61
- limit?: number | undefined;
62
- }, {
63
- wallet: string;
64
- limit?: number | undefined;
65
- }>;
66
- export declare function createBalanceTools(walletService: WalletService): {
67
- get_balance: {
68
- description: string;
69
- inputSchema: z.ZodObject<{
70
- wallet: z.ZodString;
71
- }, "strip", z.ZodTypeAny, {
72
- wallet: string;
73
- }, {
74
- wallet: string;
75
- }>;
76
- handler: (args: z.infer<typeof getBalanceSchema>) => Promise<{
77
- content: {
78
- type: "text";
79
- text: string;
80
- }[];
81
- isError?: undefined;
82
- } | {
83
- content: {
84
- type: "text";
85
- text: string;
86
- }[];
87
- isError: boolean;
88
- }>;
89
- };
90
- get_jetton_balance: {
91
- description: string;
92
- inputSchema: z.ZodObject<{
93
- wallet: z.ZodString;
94
- jettonAddress: z.ZodString;
95
- }, "strip", z.ZodTypeAny, {
96
- wallet: string;
97
- jettonAddress: string;
98
- }, {
99
- wallet: string;
100
- jettonAddress: string;
101
- }>;
102
- handler: (args: z.infer<typeof getJettonBalanceSchema>) => Promise<{
103
- content: {
104
- type: "text";
105
- text: string;
106
- }[];
107
- isError: boolean;
108
- } | {
109
- content: {
110
- type: "text";
111
- text: string;
112
- }[];
113
- isError?: undefined;
114
- }>;
115
- };
116
- get_jettons: {
117
- description: string;
118
- inputSchema: z.ZodObject<{
119
- wallet: z.ZodString;
120
- }, "strip", z.ZodTypeAny, {
121
- wallet: string;
122
- }, {
123
- wallet: string;
124
- }>;
125
- handler: (args: z.infer<typeof getJettonsSchema>) => Promise<{
126
- content: {
127
- type: "text";
128
- text: string;
129
- }[];
130
- isError?: undefined;
131
- } | {
132
- content: {
133
- type: "text";
134
- text: string;
135
- }[];
136
- isError: boolean;
137
- }>;
138
- };
139
- get_transactions: {
140
- description: string;
141
- inputSchema: z.ZodObject<{
142
- wallet: z.ZodString;
143
- limit: z.ZodOptional<z.ZodNumber>;
144
- }, "strip", z.ZodTypeAny, {
145
- wallet: string;
146
- limit?: number | undefined;
147
- }, {
148
- wallet: string;
149
- limit?: number | undefined;
150
- }>;
151
- handler: (args: z.infer<typeof getTransactionsSchema>) => Promise<{
152
- content: {
153
- type: "text";
154
- text: string;
155
- }[];
156
- isError?: undefined;
157
- } | {
158
- content: {
159
- type: "text";
160
- text: string;
161
- }[];
162
- isError: boolean;
163
- }>;
164
- };
165
- };
166
- export { fromRawAmount, TON_DECIMALS };
167
- //# sourceMappingURL=balance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../src/tools/balance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE;;;;;;;;;;;GAWG;AACH,iBAAS,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQlE;AAED,+DAA+D;AAC/D,QAAA,MAAM,YAAY,IAAI,CAAC;AAEvB,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAQhC,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,aAAa;;;;;;;;;;wBAM7B,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6ChC,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;wBA8FtC,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuDhC,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;;;;;;;;;;;;;;EA0EtE;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC"}
@@ -1,439 +0,0 @@
1
- /**
2
- * Copyright (c) TonTech.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
- /**
9
- * MCP tools for multi-user deployments with authentication
10
- *
11
- * These tools wrap the McpWalletService with user isolation.
12
- * They are used by the createTonWalletMCP factory.
13
- */
14
- import { z } from 'zod';
15
- import type { McpWalletService } from '../services/McpWalletService.js';
16
- interface ToolResponse {
17
- [key: string]: unknown;
18
- content: Array<{
19
- type: 'text';
20
- text: string;
21
- }>;
22
- isError?: boolean;
23
- }
24
- type AuthenticatedHandlerWrapper = <TArgs, TResult>(handler: (args: TArgs, userId: string, service: McpWalletService) => Promise<TResult>) => (args: TArgs, extra: unknown) => Promise<TResult>;
25
- export declare const createWalletSchema: z.ZodObject<{
26
- name: z.ZodString;
27
- version: z.ZodOptional<z.ZodEnum<["v5r1", "v4r2"]>>;
28
- network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
29
- }, "strip", z.ZodTypeAny, {
30
- name: string;
31
- version?: "v5r1" | "v4r2" | undefined;
32
- network?: "mainnet" | "testnet" | undefined;
33
- }, {
34
- name: string;
35
- version?: "v5r1" | "v4r2" | undefined;
36
- network?: "mainnet" | "testnet" | undefined;
37
- }>;
38
- export declare const importWalletSchema: z.ZodObject<{
39
- name: z.ZodString;
40
- mnemonic: z.ZodString;
41
- version: z.ZodOptional<z.ZodEnum<["v5r1", "v4r2"]>>;
42
- network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
43
- }, "strip", z.ZodTypeAny, {
44
- name: string;
45
- mnemonic: string;
46
- version?: "v5r1" | "v4r2" | undefined;
47
- network?: "mainnet" | "testnet" | undefined;
48
- }, {
49
- name: string;
50
- mnemonic: string;
51
- version?: "v5r1" | "v4r2" | undefined;
52
- network?: "mainnet" | "testnet" | undefined;
53
- }>;
54
- export declare const removeWalletSchema: z.ZodObject<{
55
- name: z.ZodString;
56
- }, "strip", z.ZodTypeAny, {
57
- name: string;
58
- }, {
59
- name: string;
60
- }>;
61
- export declare function createMcpWalletTools(_walletService: McpWalletService, wrapHandler: AuthenticatedHandlerWrapper): {
62
- create_wallet: {
63
- description: string;
64
- inputSchema: z.ZodObject<{
65
- name: z.ZodString;
66
- version: z.ZodOptional<z.ZodEnum<["v5r1", "v4r2"]>>;
67
- network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
68
- }, "strip", z.ZodTypeAny, {
69
- name: string;
70
- version?: "v5r1" | "v4r2" | undefined;
71
- network?: "mainnet" | "testnet" | undefined;
72
- }, {
73
- name: string;
74
- version?: "v5r1" | "v4r2" | undefined;
75
- network?: "mainnet" | "testnet" | undefined;
76
- }>;
77
- handler: (args: {
78
- name: string;
79
- version?: "v5r1" | "v4r2" | undefined;
80
- network?: "mainnet" | "testnet" | undefined;
81
- }, extra: unknown) => Promise<ToolResponse>;
82
- };
83
- import_wallet: {
84
- description: string;
85
- inputSchema: z.ZodObject<{
86
- name: z.ZodString;
87
- mnemonic: z.ZodString;
88
- version: z.ZodOptional<z.ZodEnum<["v5r1", "v4r2"]>>;
89
- network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
90
- }, "strip", z.ZodTypeAny, {
91
- name: string;
92
- mnemonic: string;
93
- version?: "v5r1" | "v4r2" | undefined;
94
- network?: "mainnet" | "testnet" | undefined;
95
- }, {
96
- name: string;
97
- mnemonic: string;
98
- version?: "v5r1" | "v4r2" | undefined;
99
- network?: "mainnet" | "testnet" | undefined;
100
- }>;
101
- handler: (args: {
102
- name: string;
103
- mnemonic: string;
104
- version?: "v5r1" | "v4r2" | undefined;
105
- network?: "mainnet" | "testnet" | undefined;
106
- }, extra: unknown) => Promise<ToolResponse>;
107
- };
108
- list_wallets: {
109
- description: string;
110
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
111
- handler: (args: Record<string, never>, extra: unknown) => Promise<ToolResponse>;
112
- };
113
- remove_wallet: {
114
- description: string;
115
- inputSchema: z.ZodObject<{
116
- name: z.ZodString;
117
- }, "strip", z.ZodTypeAny, {
118
- name: string;
119
- }, {
120
- name: string;
121
- }>;
122
- handler: (args: {
123
- name: string;
124
- }, extra: unknown) => Promise<ToolResponse>;
125
- };
126
- };
127
- export declare const getBalanceSchema: z.ZodObject<{
128
- wallet: z.ZodString;
129
- }, "strip", z.ZodTypeAny, {
130
- wallet: string;
131
- }, {
132
- wallet: string;
133
- }>;
134
- export declare const getJettonBalanceSchema: z.ZodObject<{
135
- wallet: z.ZodString;
136
- jettonAddress: z.ZodString;
137
- }, "strip", z.ZodTypeAny, {
138
- wallet: string;
139
- jettonAddress: string;
140
- }, {
141
- wallet: string;
142
- jettonAddress: string;
143
- }>;
144
- export declare const getJettonsSchema: z.ZodObject<{
145
- wallet: z.ZodString;
146
- }, "strip", z.ZodTypeAny, {
147
- wallet: string;
148
- }, {
149
- wallet: string;
150
- }>;
151
- export declare const getTransactionsSchema: z.ZodObject<{
152
- wallet: z.ZodString;
153
- limit: z.ZodOptional<z.ZodNumber>;
154
- }, "strip", z.ZodTypeAny, {
155
- wallet: string;
156
- limit?: number | undefined;
157
- }, {
158
- wallet: string;
159
- limit?: number | undefined;
160
- }>;
161
- export declare function createMcpBalanceTools(_walletService: McpWalletService, wrapHandler: AuthenticatedHandlerWrapper): {
162
- get_balance: {
163
- description: string;
164
- inputSchema: z.ZodObject<{
165
- wallet: z.ZodString;
166
- }, "strip", z.ZodTypeAny, {
167
- wallet: string;
168
- }, {
169
- wallet: string;
170
- }>;
171
- handler: (args: {
172
- wallet: string;
173
- }, extra: unknown) => Promise<ToolResponse>;
174
- };
175
- get_jetton_balance: {
176
- description: string;
177
- inputSchema: z.ZodObject<{
178
- wallet: z.ZodString;
179
- jettonAddress: z.ZodString;
180
- }, "strip", z.ZodTypeAny, {
181
- wallet: string;
182
- jettonAddress: string;
183
- }, {
184
- wallet: string;
185
- jettonAddress: string;
186
- }>;
187
- handler: (args: {
188
- wallet: string;
189
- jettonAddress: string;
190
- }, extra: unknown) => Promise<ToolResponse>;
191
- };
192
- get_jettons: {
193
- description: string;
194
- inputSchema: z.ZodObject<{
195
- wallet: z.ZodString;
196
- }, "strip", z.ZodTypeAny, {
197
- wallet: string;
198
- }, {
199
- wallet: string;
200
- }>;
201
- handler: (args: {
202
- wallet: string;
203
- }, extra: unknown) => Promise<ToolResponse>;
204
- };
205
- get_transactions: {
206
- description: string;
207
- inputSchema: z.ZodObject<{
208
- wallet: z.ZodString;
209
- limit: z.ZodOptional<z.ZodNumber>;
210
- }, "strip", z.ZodTypeAny, {
211
- wallet: string;
212
- limit?: number | undefined;
213
- }, {
214
- wallet: string;
215
- limit?: number | undefined;
216
- }>;
217
- handler: (args: {
218
- wallet: string;
219
- limit?: number | undefined;
220
- }, extra: unknown) => Promise<ToolResponse>;
221
- };
222
- };
223
- export declare const sendTonSchema: z.ZodObject<{
224
- wallet: z.ZodString;
225
- toAddress: z.ZodString;
226
- amount: z.ZodString;
227
- comment: z.ZodOptional<z.ZodString>;
228
- }, "strip", z.ZodTypeAny, {
229
- wallet: string;
230
- toAddress: string;
231
- amount: string;
232
- comment?: string | undefined;
233
- }, {
234
- wallet: string;
235
- toAddress: string;
236
- amount: string;
237
- comment?: string | undefined;
238
- }>;
239
- export declare const sendJettonSchema: z.ZodObject<{
240
- wallet: z.ZodString;
241
- toAddress: z.ZodString;
242
- jettonAddress: z.ZodString;
243
- amount: z.ZodString;
244
- comment: z.ZodOptional<z.ZodString>;
245
- }, "strip", z.ZodTypeAny, {
246
- wallet: string;
247
- jettonAddress: string;
248
- toAddress: string;
249
- amount: string;
250
- comment?: string | undefined;
251
- }, {
252
- wallet: string;
253
- jettonAddress: string;
254
- toAddress: string;
255
- amount: string;
256
- comment?: string | undefined;
257
- }>;
258
- export declare function createMcpTransferTools(_walletService: McpWalletService, wrapHandler: AuthenticatedHandlerWrapper): {
259
- send_ton: {
260
- description: string;
261
- inputSchema: z.ZodObject<{
262
- wallet: z.ZodString;
263
- toAddress: z.ZodString;
264
- amount: z.ZodString;
265
- comment: z.ZodOptional<z.ZodString>;
266
- }, "strip", z.ZodTypeAny, {
267
- wallet: string;
268
- toAddress: string;
269
- amount: string;
270
- comment?: string | undefined;
271
- }, {
272
- wallet: string;
273
- toAddress: string;
274
- amount: string;
275
- comment?: string | undefined;
276
- }>;
277
- handler: (args: {
278
- wallet: string;
279
- toAddress: string;
280
- amount: string;
281
- comment?: string | undefined;
282
- }, extra: unknown) => Promise<ToolResponse>;
283
- };
284
- send_jetton: {
285
- description: string;
286
- inputSchema: z.ZodObject<{
287
- wallet: z.ZodString;
288
- toAddress: z.ZodString;
289
- jettonAddress: z.ZodString;
290
- amount: z.ZodString;
291
- comment: z.ZodOptional<z.ZodString>;
292
- }, "strip", z.ZodTypeAny, {
293
- wallet: string;
294
- jettonAddress: string;
295
- toAddress: string;
296
- amount: string;
297
- comment?: string | undefined;
298
- }, {
299
- wallet: string;
300
- jettonAddress: string;
301
- toAddress: string;
302
- amount: string;
303
- comment?: string | undefined;
304
- }>;
305
- handler: (args: {
306
- wallet: string;
307
- jettonAddress: string;
308
- toAddress: string;
309
- amount: string;
310
- comment?: string | undefined;
311
- }, extra: unknown) => Promise<ToolResponse>;
312
- };
313
- };
314
- export declare const getSwapQuoteSchema: z.ZodObject<{
315
- wallet: z.ZodString;
316
- fromToken: z.ZodString;
317
- toToken: z.ZodString;
318
- amount: z.ZodString;
319
- slippageBps: z.ZodOptional<z.ZodNumber>;
320
- }, "strip", z.ZodTypeAny, {
321
- fromToken: string;
322
- toToken: string;
323
- wallet: string;
324
- amount: string;
325
- slippageBps?: number | undefined;
326
- }, {
327
- fromToken: string;
328
- toToken: string;
329
- wallet: string;
330
- amount: string;
331
- slippageBps?: number | undefined;
332
- }>;
333
- export declare const executeSwapSchema: z.ZodObject<{
334
- wallet: z.ZodString;
335
- quoteId: z.ZodString;
336
- }, "strip", z.ZodTypeAny, {
337
- wallet: string;
338
- quoteId: string;
339
- }, {
340
- wallet: string;
341
- quoteId: string;
342
- }>;
343
- export declare function createMcpSwapTools(_walletService: McpWalletService, wrapHandler: AuthenticatedHandlerWrapper): {
344
- get_swap_quote: {
345
- description: string;
346
- inputSchema: z.ZodObject<{
347
- wallet: z.ZodString;
348
- fromToken: z.ZodString;
349
- toToken: z.ZodString;
350
- amount: z.ZodString;
351
- slippageBps: z.ZodOptional<z.ZodNumber>;
352
- }, "strip", z.ZodTypeAny, {
353
- fromToken: string;
354
- toToken: string;
355
- wallet: string;
356
- amount: string;
357
- slippageBps?: number | undefined;
358
- }, {
359
- fromToken: string;
360
- toToken: string;
361
- wallet: string;
362
- amount: string;
363
- slippageBps?: number | undefined;
364
- }>;
365
- handler: (args: {
366
- fromToken: string;
367
- toToken: string;
368
- wallet: string;
369
- amount: string;
370
- slippageBps?: number | undefined;
371
- }, extra: unknown) => Promise<ToolResponse>;
372
- };
373
- execute_swap: {
374
- description: string;
375
- inputSchema: z.ZodObject<{
376
- wallet: z.ZodString;
377
- quoteId: z.ZodString;
378
- }, "strip", z.ZodTypeAny, {
379
- wallet: string;
380
- quoteId: string;
381
- }, {
382
- wallet: string;
383
- quoteId: string;
384
- }>;
385
- handler: (args: {
386
- wallet: string;
387
- quoteId: string;
388
- }, extra: unknown) => Promise<ToolResponse>;
389
- };
390
- };
391
- export declare const confirmTransactionSchema: z.ZodObject<{
392
- transactionId: z.ZodString;
393
- }, "strip", z.ZodTypeAny, {
394
- transactionId: string;
395
- }, {
396
- transactionId: string;
397
- }>;
398
- export declare const cancelTransactionSchema: z.ZodObject<{
399
- transactionId: z.ZodString;
400
- }, "strip", z.ZodTypeAny, {
401
- transactionId: string;
402
- }, {
403
- transactionId: string;
404
- }>;
405
- export declare function createMcpPendingTools(_walletService: McpWalletService, wrapHandler: AuthenticatedHandlerWrapper): {
406
- confirm_transaction: {
407
- description: string;
408
- inputSchema: z.ZodObject<{
409
- transactionId: z.ZodString;
410
- }, "strip", z.ZodTypeAny, {
411
- transactionId: string;
412
- }, {
413
- transactionId: string;
414
- }>;
415
- handler: (args: {
416
- transactionId: string;
417
- }, extra: unknown) => Promise<ToolResponse>;
418
- };
419
- cancel_transaction: {
420
- description: string;
421
- inputSchema: z.ZodObject<{
422
- transactionId: z.ZodString;
423
- }, "strip", z.ZodTypeAny, {
424
- transactionId: string;
425
- }, {
426
- transactionId: string;
427
- }>;
428
- handler: (args: {
429
- transactionId: string;
430
- }, extra: unknown) => Promise<ToolResponse>;
431
- };
432
- list_pending_transactions: {
433
- description: string;
434
- inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
435
- handler: (args: Record<string, never>, extra: unknown) => Promise<ToolResponse>;
436
- };
437
- };
438
- export {};
439
- //# sourceMappingURL=mcp-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-tools.d.ts","sourceRoot":"","sources":["../../src/tools/mcp-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,UAAU,YAAY;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAA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