@ton/mcp 0.1.10

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 (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +282 -0
  3. package/dist/cli.d.ts +9 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +89425 -0
  6. package/dist/contracts/w5_ownable/WalletOwnable.d.ts +87 -0
  7. package/dist/contracts/w5_ownable/WalletOwnable.d.ts.map +1 -0
  8. package/dist/contracts/w5_ownable/WalletOwnable.source.d.ts +11 -0
  9. package/dist/contracts/w5_ownable/WalletOwnable.source.d.ts.map +1 -0
  10. package/dist/contracts/w5_ownable/WalletOwnableAdapter.d.ts +111 -0
  11. package/dist/contracts/w5_ownable/WalletOwnableAdapter.d.ts.map +1 -0
  12. package/dist/contracts/w5_ownable/actions.d.ts +43 -0
  13. package/dist/contracts/w5_ownable/actions.d.ts.map +1 -0
  14. package/dist/contracts/w5_ownable/index.d.ts +12 -0
  15. package/dist/contracts/w5_ownable/index.d.ts.map +1 -0
  16. package/dist/factory.d.ts +67 -0
  17. package/dist/factory.d.ts.map +1 -0
  18. package/dist/index.cjs +89134 -0
  19. package/dist/index.d.ts +22 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +89131 -0
  22. package/dist/serverless.cjs +108356 -0
  23. package/dist/serverless.d.ts +38 -0
  24. package/dist/serverless.d.ts.map +1 -0
  25. package/dist/serverless.js +108355 -0
  26. package/dist/services/KeyManager.d.ts +57 -0
  27. package/dist/services/KeyManager.d.ts.map +1 -0
  28. package/dist/services/McpWalletService.d.ts +202 -0
  29. package/dist/services/McpWalletService.d.ts.map +1 -0
  30. package/dist/tools/balance-tools.d.ts +61 -0
  31. package/dist/tools/balance-tools.d.ts.map +1 -0
  32. package/dist/tools/dns-tools.d.ts +49 -0
  33. package/dist/tools/dns-tools.d.ts.map +1 -0
  34. package/dist/tools/index.d.ts +13 -0
  35. package/dist/tools/index.d.ts.map +1 -0
  36. package/dist/tools/known-jettons-tools.d.ts +44 -0
  37. package/dist/tools/known-jettons-tools.d.ts.map +1 -0
  38. package/dist/tools/nft-tools.d.ts +85 -0
  39. package/dist/tools/nft-tools.d.ts.map +1 -0
  40. package/dist/tools/swap-tools.d.ts +49 -0
  41. package/dist/tools/swap-tools.d.ts.map +1 -0
  42. package/dist/tools/transfer-tools.d.ts +159 -0
  43. package/dist/tools/transfer-tools.d.ts.map +1 -0
  44. package/dist/tools/types.d.ts +21 -0
  45. package/dist/tools/types.d.ts.map +1 -0
  46. package/dist/types/config.d.ts +41 -0
  47. package/dist/types/config.d.ts.map +1 -0
  48. package/dist/types/contacts.d.ts +61 -0
  49. package/dist/types/contacts.d.ts.map +1 -0
  50. package/dist/types/index.d.ts +13 -0
  51. package/dist/types/index.d.ts.map +1 -0
  52. package/llms.txt +114 -0
  53. package/package.json +86 -0
  54. package/skills/SKILL.md +67 -0
@@ -0,0 +1,57 @@
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 StoredKeyData {
9
+ /** User's wallet address that this keypair controls */
10
+ walletAddress: string;
11
+ /** Public key in hex format */
12
+ publicKey: string;
13
+ /** Private key (seed) in hex format */
14
+ privateKey: string;
15
+ /** Network: mainnet or testnet */
16
+ network: 'mainnet' | 'testnet';
17
+ /** Creation timestamp */
18
+ createdAt: string;
19
+ }
20
+ export interface KeyPairResult {
21
+ publicKey: Uint8Array;
22
+ secretKey: Uint8Array;
23
+ }
24
+ /**
25
+ * KeyManager handles creation and storage of keypairs for controlled wallets
26
+ */
27
+ export declare class KeyManager {
28
+ /**
29
+ * Check if a key file exists
30
+ */
31
+ static hasStoredKey(): Promise<boolean>;
32
+ /**
33
+ * Load stored key data from ~/.ton/key.json
34
+ */
35
+ static loadKey(): Promise<StoredKeyData | null>;
36
+ /**
37
+ * Generate a new keypair and store it
38
+ */
39
+ static generateAndStoreKey(walletAddress: string, network: 'mainnet' | 'testnet'): Promise<StoredKeyData>;
40
+ /**
41
+ * Save key data to ~/.ton/key.json
42
+ */
43
+ static saveKey(keyData: StoredKeyData): Promise<void>;
44
+ /**
45
+ * Get keypair from stored key data
46
+ */
47
+ static getKeyPair(keyData: StoredKeyData): KeyPairResult;
48
+ /**
49
+ * Get the path to the key file
50
+ */
51
+ static getKeyFilePath(): string;
52
+ /**
53
+ * Delete stored key
54
+ */
55
+ static deleteKey(): Promise<void>;
56
+ }
57
+ //# sourceMappingURL=KeyManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyManager.d.ts","sourceRoot":"","sources":["../../src/services/KeyManager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAeH,MAAM,WAAW,aAAa;IAC1B,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;CACzB;AAKD;;GAEG;AACH,qBAAa,UAAU;IACnB;;OAEG;WACU,YAAY,IAAI,OAAO,CAAC,OAAO,CAAC;IAI7C;;OAEG;WACU,OAAO,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAYrD;;OAEG;WACU,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;IAiB/G;;OAEG;WACU,OAAO,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3D;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;IASxD;;OAEG;IACH,MAAM,CAAC,cAAc,IAAI,MAAM;IAI/B;;OAEG;WACU,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAM1C"}
@@ -0,0 +1,202 @@
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
+ import type { WalletAdapter } from '@ton/walletkit';
9
+ import type { IContactResolver } from '../types/contacts.js';
10
+ /**
11
+ * Jetton information
12
+ */
13
+ export interface JettonInfoResult {
14
+ address: string;
15
+ balance: string;
16
+ name?: string;
17
+ symbol?: string;
18
+ decimals?: number;
19
+ }
20
+ /**
21
+ * NFT information
22
+ */
23
+ export interface NftInfoResult {
24
+ address: string;
25
+ name?: string;
26
+ description?: string;
27
+ image?: string;
28
+ collection?: {
29
+ address: string;
30
+ name?: string;
31
+ };
32
+ attributes?: Array<{
33
+ trait_type?: string;
34
+ value?: string;
35
+ }>;
36
+ ownerAddress?: string;
37
+ isOnSale?: boolean;
38
+ isSoulbound?: boolean;
39
+ saleContractAddress?: string;
40
+ }
41
+ /**
42
+ * Transaction info (from events API)
43
+ */
44
+ export interface TransactionInfo {
45
+ eventId: string;
46
+ timestamp: number;
47
+ type: 'TonTransfer' | 'JettonTransfer' | 'JettonSwap' | 'NftItemTransfer' | 'ContractDeploy' | 'SmartContractExec' | 'Unknown';
48
+ status: 'success' | 'failure';
49
+ from?: string;
50
+ to?: string;
51
+ amount?: string;
52
+ comment?: string;
53
+ jettonAddress?: string;
54
+ jettonSymbol?: string;
55
+ jettonAmount?: string;
56
+ dex?: string;
57
+ amountIn?: string;
58
+ amountOut?: string;
59
+ description?: string;
60
+ isScam: boolean;
61
+ }
62
+ /**
63
+ * Transfer result
64
+ */
65
+ export interface TransferResult {
66
+ success: boolean;
67
+ message: string;
68
+ }
69
+ /**
70
+ * Swap quote result with transaction params
71
+ */
72
+ export interface SwapQuoteResult {
73
+ fromToken: string;
74
+ toToken: string;
75
+ fromAmount: string;
76
+ toAmount: string;
77
+ minReceived: string;
78
+ provider: string;
79
+ expiresAt?: number;
80
+ /** Raw transaction params ready to send */
81
+ transaction: {
82
+ messages: Array<{
83
+ address: string;
84
+ amount: string;
85
+ stateInit?: string;
86
+ payload?: string;
87
+ }>;
88
+ validUntil?: number;
89
+ };
90
+ }
91
+ /**
92
+ * Network configuration with optional API key
93
+ */
94
+ export interface NetworkConfig {
95
+ /** TonCenter API key for this network */
96
+ apiKey?: string;
97
+ }
98
+ /**
99
+ * Configuration for McpWalletService
100
+ */
101
+ export interface McpWalletServiceConfig {
102
+ wallet: WalletAdapter;
103
+ contacts?: IContactResolver;
104
+ /** Network-specific configuration */
105
+ networks?: {
106
+ mainnet?: NetworkConfig;
107
+ testnet?: NetworkConfig;
108
+ };
109
+ }
110
+ /**
111
+ * McpWalletService manages wallet operations for a single wallet.
112
+ */
113
+ export declare class McpWalletService {
114
+ private readonly config;
115
+ private readonly wallet;
116
+ private kit;
117
+ private constructor();
118
+ static create(config: McpWalletServiceConfig): Promise<McpWalletService>;
119
+ /**
120
+ * Get wallet address
121
+ */
122
+ getAddress(): string;
123
+ /**
124
+ * Get wallet network
125
+ */
126
+ getNetwork(): 'mainnet' | 'testnet';
127
+ /**
128
+ * Initialize TonWalletKit (for swap operations)
129
+ */
130
+ private getKit;
131
+ /**
132
+ * Get TON balance
133
+ */
134
+ getBalance(): Promise<string>;
135
+ /**
136
+ * Get Jetton balance
137
+ */
138
+ getJettonBalance(jettonAddress: string): Promise<string>;
139
+ /**
140
+ * Get all Jettons
141
+ */
142
+ getJettons(): Promise<JettonInfoResult[]>;
143
+ /**
144
+ * Get transaction history using events API
145
+ */
146
+ getTransactions(limit?: number): Promise<TransactionInfo[]>;
147
+ /**
148
+ * Send TON
149
+ */
150
+ sendTon(toAddress: string, amountNano: string, comment?: string): Promise<TransferResult>;
151
+ /**
152
+ * Send Jetton
153
+ */
154
+ sendJetton(toAddress: string, jettonAddress: string, amountRaw: string, comment?: string): Promise<TransferResult>;
155
+ /**
156
+ * Send a raw transaction request directly
157
+ */
158
+ sendRawTransaction(request: {
159
+ messages: Array<{
160
+ address: string;
161
+ amount: string;
162
+ mode?: number;
163
+ stateInit?: string;
164
+ payload?: string;
165
+ }>;
166
+ validUntil?: number;
167
+ fromAddress?: string;
168
+ }): Promise<TransferResult>;
169
+ /**
170
+ * Get swap quote with transaction params ready to execute
171
+ */
172
+ getSwapQuote(fromToken: string, toToken: string, amount: string, slippageBps?: number): Promise<SwapQuoteResult>;
173
+ /**
174
+ * Get all NFTs
175
+ */
176
+ getNfts(limit?: number, offset?: number): Promise<NftInfoResult[]>;
177
+ /**
178
+ * Get a specific NFT by address
179
+ */
180
+ getNft(nftAddress: string): Promise<NftInfoResult | null>;
181
+ /**
182
+ * Send NFT
183
+ */
184
+ sendNft(nftAddress: string, toAddress: string, comment?: string): Promise<TransferResult>;
185
+ /**
186
+ * Resolve contact name to address
187
+ */
188
+ resolveContact(name: string): Promise<string | null>;
189
+ /**
190
+ * Resolve a TON DNS domain (e.g., "wallet.ton") to a wallet address
191
+ */
192
+ resolveDns(domain: string): Promise<string | null>;
193
+ /**
194
+ * Reverse resolve a wallet address to a TON DNS domain
195
+ */
196
+ backResolveDns(address: string): Promise<string | null>;
197
+ /**
198
+ * Close and cleanup
199
+ */
200
+ close(): Promise<void>;
201
+ }
202
+ //# sourceMappingURL=McpWalletService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"McpWalletService.d.ts","sourceRoot":"","sources":["../../src/services/McpWalletService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,OAAO,KAAK,EAKR,aAAa,EAEhB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IA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AM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,eAAe,CAAC;IAyC3B;;OAEG;IACG,OAAO,CAAC,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAyB/E;;OAEG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IA6B/D;;OAEG;IACG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAsB/F;;OAEG;IACG,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAO1D;;OAEG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAKxD;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK7D;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAM/B"}
@@ -0,0 +1,61 @@
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
+ import { z } from 'zod';
9
+ import type { McpWalletService } from '../services/McpWalletService.js';
10
+ import type { ToolResponse } from './types.js';
11
+ export declare const getBalanceSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
12
+ export declare const getJettonBalanceSchema: z.ZodObject<{
13
+ jettonAddress: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ jettonAddress: string;
16
+ }, {
17
+ jettonAddress: string;
18
+ }>;
19
+ export declare const getJettonsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
20
+ export declare const getTransactionsSchema: z.ZodObject<{
21
+ limit: z.ZodOptional<z.ZodNumber>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ limit?: number | undefined;
24
+ }, {
25
+ limit?: number | undefined;
26
+ }>;
27
+ export declare function createMcpBalanceTools(service: McpWalletService): {
28
+ get_balance: {
29
+ description: string;
30
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
31
+ handler: () => Promise<ToolResponse>;
32
+ };
33
+ get_jetton_balance: {
34
+ description: string;
35
+ inputSchema: z.ZodObject<{
36
+ jettonAddress: z.ZodString;
37
+ }, "strip", z.ZodTypeAny, {
38
+ jettonAddress: string;
39
+ }, {
40
+ jettonAddress: string;
41
+ }>;
42
+ handler: (args: z.infer<typeof getJettonBalanceSchema>) => Promise<ToolResponse>;
43
+ };
44
+ get_jettons: {
45
+ description: string;
46
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
47
+ handler: () => Promise<ToolResponse>;
48
+ };
49
+ get_transactions: {
50
+ description: string;
51
+ inputSchema: z.ZodObject<{
52
+ limit: z.ZodOptional<z.ZodNumber>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ limit?: number | undefined;
55
+ }, {
56
+ limit?: number | undefined;
57
+ }>;
58
+ handler: (args: z.infer<typeof getTransactionsSchema>) => Promise<ToolResponse>;
59
+ };
60
+ };
61
+ //# sourceMappingURL=balance-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"balance-tools.d.ts","sourceRoot":"","sources":["../../src/tools/balance-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,gBAAgB,gDAAe,CAAC;AAE7C,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC;AAEH,eAAO,MAAM,gBAAgB,gDAAe,CAAC;AAE7C,eAAO,MAAM,qBAAqB;;;;;;EAOhC,CAAC;AAEH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB;;;;uBAKhC,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBA0ClB,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;uBAwCjE,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAyClB,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAyE9F"}
@@ -0,0 +1,49 @@
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
+ import { z } from 'zod';
9
+ import type { McpWalletService } from '../services/McpWalletService.js';
10
+ import type { ToolResponse } from './types.js';
11
+ export declare const resolveDnsSchema: z.ZodObject<{
12
+ domain: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ domain: string;
15
+ }, {
16
+ domain: string;
17
+ }>;
18
+ export declare const backResolveDnsSchema: z.ZodObject<{
19
+ address: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ address: string;
22
+ }, {
23
+ address: string;
24
+ }>;
25
+ export declare function createMcpDnsTools(service: McpWalletService): {
26
+ resolve_dns: {
27
+ description: string;
28
+ inputSchema: z.ZodObject<{
29
+ domain: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ domain: string;
32
+ }, {
33
+ domain: string;
34
+ }>;
35
+ handler: (args: z.infer<typeof resolveDnsSchema>) => Promise<ToolResponse>;
36
+ };
37
+ back_resolve_dns: {
38
+ description: string;
39
+ inputSchema: z.ZodObject<{
40
+ address: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ address: string;
43
+ }, {
44
+ address: string;
45
+ }>;
46
+ handler: (args: z.infer<typeof backResolveDnsSchema>) => Promise<ToolResponse>;
47
+ };
48
+ };
49
+ //# sourceMappingURL=dns-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dns-tools.d.ts","sourceRoot":"","sources":["../../src/tools/dns-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;wBAMzB,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAwDxD,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAqD7F"}
@@ -0,0 +1,13 @@
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 { createMcpBalanceTools } from './balance-tools.js';
9
+ export { createMcpTransferTools } from './transfer-tools.js';
10
+ export { createMcpSwapTools } from './swap-tools.js';
11
+ export { createMcpKnownJettonsTools, KNOWN_JETTONS } from './known-jettons-tools.js';
12
+ export { createMcpNftTools } from './nft-tools.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,44 @@
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
+ import { z } from 'zod';
9
+ import type { ToolResponse } from './types.js';
10
+ export declare const getKnownJettonsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
11
+ export declare const KNOWN_JETTONS: readonly [{
12
+ readonly symbol: "USD₮";
13
+ readonly name: "Tether USD";
14
+ readonly address: "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs";
15
+ readonly decimals: 6;
16
+ }, {
17
+ readonly symbol: "NOT";
18
+ readonly name: "Notcoin";
19
+ readonly address: "EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT";
20
+ readonly decimals: 9;
21
+ }, {
22
+ readonly symbol: "DOGS";
23
+ readonly name: "Dogs";
24
+ readonly address: "EQCvxJy4eG8hyHBFsZ7eePxrRsUQSFE_jpptRAYBmcG_DOGS";
25
+ readonly decimals: 9;
26
+ }, {
27
+ readonly symbol: "DUST";
28
+ readonly name: "DeDust";
29
+ readonly address: "EQBlqsm144Dq6SjbPI4jjZvA1hqTIP3CvHovbIfW_t-SCALE";
30
+ readonly decimals: 9;
31
+ }, {
32
+ readonly symbol: "GRAM";
33
+ readonly name: "Gram";
34
+ readonly address: "EQC47093oX5Xhb0xuk2lCr2RhS8rj-vul61u4W2UH5ORmG_O";
35
+ readonly decimals: 9;
36
+ }];
37
+ export declare function createMcpKnownJettonsTools(): {
38
+ get_known_jettons: {
39
+ description: string;
40
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
41
+ handler: () => Promise<ToolResponse>;
42
+ };
43
+ };
44
+ //# sourceMappingURL=known-jettons-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-jettons-tools.d.ts","sourceRoot":"","sources":["../../src/tools/known-jettons-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,qBAAqB,gDAAe,CAAC;AAElD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;EA+BhB,CAAC;AAEX,wBAAgB,0BAA0B;;;;uBAMX,OAAO,CAAC,YAAY,CAAC;;EAoBnD"}
@@ -0,0 +1,85 @@
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
+ import { z } from 'zod';
9
+ import type { McpWalletService } from '../services/McpWalletService.js';
10
+ import type { ToolResponse } from './types.js';
11
+ export declare const getNftsSchema: z.ZodObject<{
12
+ limit: z.ZodOptional<z.ZodNumber>;
13
+ offset: z.ZodOptional<z.ZodNumber>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ limit?: number | undefined;
16
+ offset?: number | undefined;
17
+ }, {
18
+ limit?: number | undefined;
19
+ offset?: number | undefined;
20
+ }>;
21
+ export declare const getNftSchema: z.ZodObject<{
22
+ nftAddress: z.ZodString;
23
+ }, "strip", z.ZodTypeAny, {
24
+ nftAddress: string;
25
+ }, {
26
+ nftAddress: string;
27
+ }>;
28
+ export declare const sendNftSchema: z.ZodObject<{
29
+ nftAddress: z.ZodString;
30
+ toAddress: z.ZodString;
31
+ comment: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ toAddress: string;
34
+ nftAddress: string;
35
+ comment?: string | undefined;
36
+ }, {
37
+ toAddress: string;
38
+ nftAddress: string;
39
+ comment?: string | undefined;
40
+ }>;
41
+ export declare function createMcpNftTools(service: McpWalletService): {
42
+ get_nfts: {
43
+ description: string;
44
+ inputSchema: z.ZodObject<{
45
+ limit: z.ZodOptional<z.ZodNumber>;
46
+ offset: z.ZodOptional<z.ZodNumber>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ limit?: number | undefined;
49
+ offset?: number | undefined;
50
+ }, {
51
+ limit?: number | undefined;
52
+ offset?: number | undefined;
53
+ }>;
54
+ handler: (args: z.infer<typeof getNftsSchema>) => Promise<ToolResponse>;
55
+ };
56
+ get_nft: {
57
+ description: string;
58
+ inputSchema: z.ZodObject<{
59
+ nftAddress: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ nftAddress: string;
62
+ }, {
63
+ nftAddress: string;
64
+ }>;
65
+ handler: (args: z.infer<typeof getNftSchema>) => Promise<ToolResponse>;
66
+ };
67
+ send_nft: {
68
+ description: string;
69
+ inputSchema: z.ZodObject<{
70
+ nftAddress: z.ZodString;
71
+ toAddress: z.ZodString;
72
+ comment: z.ZodOptional<z.ZodString>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ toAddress: string;
75
+ nftAddress: string;
76
+ comment?: string | undefined;
77
+ }, {
78
+ toAddress: string;
79
+ nftAddress: string;
80
+ comment?: string | undefined;
81
+ }>;
82
+ handler: (args: z.infer<typeof sendNftSchema>) => Promise<ToolResponse>;
83
+ };
84
+ };
85
+ //# sourceMappingURL=nft-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nft-tools.d.ts","sourceRoot":"","sources":["../../src/tools/nft-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,aAAa;;;;;;;;;EAGxB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;EAEvB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;EAIxB,CAAC;AAEH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;wBAMzB,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAiDrD,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;wBAiEpD,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAuCtF"}
@@ -0,0 +1,49 @@
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
+ import { z } from 'zod';
9
+ import type { McpWalletService } from '../services/McpWalletService.js';
10
+ import type { ToolResponse } from './types.js';
11
+ export declare const getSwapQuoteSchema: z.ZodObject<{
12
+ fromToken: z.ZodString;
13
+ toToken: z.ZodString;
14
+ amount: z.ZodString;
15
+ slippageBps: z.ZodOptional<z.ZodNumber>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ fromToken: string;
18
+ toToken: string;
19
+ amount: string;
20
+ slippageBps?: number | undefined;
21
+ }, {
22
+ fromToken: string;
23
+ toToken: string;
24
+ amount: string;
25
+ slippageBps?: number | undefined;
26
+ }>;
27
+ export declare function createMcpSwapTools(service: McpWalletService): {
28
+ get_swap_quote: {
29
+ description: string;
30
+ inputSchema: z.ZodObject<{
31
+ fromToken: z.ZodString;
32
+ toToken: z.ZodString;
33
+ amount: z.ZodString;
34
+ slippageBps: z.ZodOptional<z.ZodNumber>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ fromToken: string;
37
+ toToken: string;
38
+ amount: string;
39
+ slippageBps?: number | undefined;
40
+ }, {
41
+ fromToken: string;
42
+ toToken: string;
43
+ amount: string;
44
+ slippageBps?: number | undefined;
45
+ }>;
46
+ handler: (args: z.infer<typeof getSwapQuoteSchema>) => Promise<ToolResponse>;
47
+ };
48
+ };
49
+ //# sourceMappingURL=swap-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swap-tools.d.ts","sourceRoot":"","sources":["../../src/tools/swap-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;wBAM1B,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAqD3F"}