@truecarry/mcp 0.1.4 → 0.1.6
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/cli.js +447 -82
- package/dist/factory.d.ts.map +1 -1
- package/dist/index.cjs +447 -82
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +447 -82
- package/dist/services/McpWalletService.d.ts +66 -13
- package/dist/services/McpWalletService.d.ts.map +1 -1
- package/dist/tools/dns-tools.d.ts +49 -0
- package/dist/tools/dns-tools.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/known-jettons-tools.d.ts +44 -0
- package/dist/tools/known-jettons-tools.d.ts.map +1 -0
- package/dist/tools/nft-tools.d.ts +85 -0
- package/dist/tools/nft-tools.d.ts.map +1 -0
- package/dist/tools/swap-tools.d.ts +0 -18
- package/dist/tools/swap-tools.d.ts.map +1 -1
- package/dist/tools/transfer-tools.d.ts +80 -0
- package/dist/tools/transfer-tools.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { WalletAdapter } from '@ton/walletkit';
|
|
9
9
|
import type { IContactResolver } from '../types/contacts.js';
|
|
10
10
|
/**
|
|
11
11
|
* Jetton information
|
|
@@ -17,6 +17,27 @@ export interface JettonInfoResult {
|
|
|
17
17
|
symbol?: string;
|
|
18
18
|
decimals?: number;
|
|
19
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
|
+
}
|
|
20
41
|
/**
|
|
21
42
|
* Transaction info (from events API)
|
|
22
43
|
*/
|
|
@@ -46,10 +67,9 @@ export interface TransferResult {
|
|
|
46
67
|
message: string;
|
|
47
68
|
}
|
|
48
69
|
/**
|
|
49
|
-
* Swap quote result
|
|
70
|
+
* Swap quote result with transaction params
|
|
50
71
|
*/
|
|
51
72
|
export interface SwapQuoteResult {
|
|
52
|
-
quote: SwapQuote;
|
|
53
73
|
fromToken: string;
|
|
54
74
|
toToken: string;
|
|
55
75
|
fromAmount: string;
|
|
@@ -57,13 +77,16 @@ export interface SwapQuoteResult {
|
|
|
57
77
|
minReceived: string;
|
|
58
78
|
provider: string;
|
|
59
79
|
expiresAt?: number;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
+
};
|
|
67
90
|
}
|
|
68
91
|
/**
|
|
69
92
|
* Network configuration with optional API key
|
|
@@ -130,17 +153,47 @@ export declare class McpWalletService {
|
|
|
130
153
|
*/
|
|
131
154
|
sendJetton(toAddress: string, jettonAddress: string, amountRaw: string, comment?: string): Promise<TransferResult>;
|
|
132
155
|
/**
|
|
133
|
-
*
|
|
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
|
|
134
171
|
*/
|
|
135
172
|
getSwapQuote(fromToken: string, toToken: string, amount: string, slippageBps?: number): Promise<SwapQuoteResult>;
|
|
136
173
|
/**
|
|
137
|
-
*
|
|
174
|
+
* Get all NFTs
|
|
138
175
|
*/
|
|
139
|
-
|
|
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>;
|
|
140
185
|
/**
|
|
141
186
|
* Resolve contact name to address
|
|
142
187
|
*/
|
|
143
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>;
|
|
144
197
|
/**
|
|
145
198
|
* Close and cleanup
|
|
146
199
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpWalletService.d.ts","sourceRoot":"","sources":["../../src/services/McpWalletService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"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,CAAC;YACd,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,OAAO,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC,CAAC;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,cAAc,CAAC;IAgB3B;;OAEG;IACG,YAAY,CACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,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,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"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -8,4 +8,6 @@
|
|
|
8
8
|
export { createMcpBalanceTools } from './balance-tools.js';
|
|
9
9
|
export { createMcpTransferTools } from './transfer-tools.js';
|
|
10
10
|
export { createMcpSwapTools } from './swap-tools.js';
|
|
11
|
+
export { createMcpKnownJettonsTools, KNOWN_JETTONS } from './known-jettons-tools.js';
|
|
12
|
+
export { createMcpNftTools } from './nft-tools.js';
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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"}
|
|
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"}
|
|
@@ -24,13 +24,6 @@ export declare const getSwapQuoteSchema: z.ZodObject<{
|
|
|
24
24
|
amount: string;
|
|
25
25
|
slippageBps?: number | undefined;
|
|
26
26
|
}>;
|
|
27
|
-
export declare const executeSwapSchema: z.ZodObject<{
|
|
28
|
-
quoteId: z.ZodString;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
quoteId: string;
|
|
31
|
-
}, {
|
|
32
|
-
quoteId: string;
|
|
33
|
-
}>;
|
|
34
27
|
export declare function createMcpSwapTools(service: McpWalletService): {
|
|
35
28
|
get_swap_quote: {
|
|
36
29
|
description: string;
|
|
@@ -52,16 +45,5 @@ export declare function createMcpSwapTools(service: McpWalletService): {
|
|
|
52
45
|
}>;
|
|
53
46
|
handler: (args: z.infer<typeof getSwapQuoteSchema>) => Promise<ToolResponse>;
|
|
54
47
|
};
|
|
55
|
-
execute_swap: {
|
|
56
|
-
description: string;
|
|
57
|
-
inputSchema: z.ZodObject<{
|
|
58
|
-
quoteId: z.ZodString;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
quoteId: string;
|
|
61
|
-
}, {
|
|
62
|
-
quoteId: string;
|
|
63
|
-
}>;
|
|
64
|
-
handler: (args: z.infer<typeof executeSwapSchema>) => Promise<ToolResponse>;
|
|
65
|
-
};
|
|
66
48
|
};
|
|
67
49
|
//# sourceMappingURL=swap-tools.d.ts.map
|
|
@@ -1 +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;
|
|
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"}
|
|
@@ -37,6 +37,44 @@ export declare const sendJettonSchema: z.ZodObject<{
|
|
|
37
37
|
amount: string;
|
|
38
38
|
comment?: string | undefined;
|
|
39
39
|
}>;
|
|
40
|
+
export declare const sendRawTransactionSchema: z.ZodObject<{
|
|
41
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
42
|
+
address: z.ZodString;
|
|
43
|
+
amount: z.ZodString;
|
|
44
|
+
stateInit: z.ZodOptional<z.ZodString>;
|
|
45
|
+
payload: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
address: string;
|
|
48
|
+
amount: string;
|
|
49
|
+
stateInit?: string | undefined;
|
|
50
|
+
payload?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
address: string;
|
|
53
|
+
amount: string;
|
|
54
|
+
stateInit?: string | undefined;
|
|
55
|
+
payload?: string | undefined;
|
|
56
|
+
}>, "many">;
|
|
57
|
+
validUntil: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
fromAddress: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
messages: {
|
|
61
|
+
address: string;
|
|
62
|
+
amount: string;
|
|
63
|
+
stateInit?: string | undefined;
|
|
64
|
+
payload?: string | undefined;
|
|
65
|
+
}[];
|
|
66
|
+
validUntil?: number | undefined;
|
|
67
|
+
fromAddress?: string | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
messages: {
|
|
70
|
+
address: string;
|
|
71
|
+
amount: string;
|
|
72
|
+
stateInit?: string | undefined;
|
|
73
|
+
payload?: string | undefined;
|
|
74
|
+
}[];
|
|
75
|
+
validUntil?: number | undefined;
|
|
76
|
+
fromAddress?: string | undefined;
|
|
77
|
+
}>;
|
|
40
78
|
export declare function createMcpTransferTools(service: McpWalletService): {
|
|
41
79
|
send_ton: {
|
|
42
80
|
description: string;
|
|
@@ -75,5 +113,47 @@ export declare function createMcpTransferTools(service: McpWalletService): {
|
|
|
75
113
|
}>;
|
|
76
114
|
handler: (args: z.infer<typeof sendJettonSchema>) => Promise<ToolResponse>;
|
|
77
115
|
};
|
|
116
|
+
send_raw_transaction: {
|
|
117
|
+
description: string;
|
|
118
|
+
inputSchema: z.ZodObject<{
|
|
119
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
120
|
+
address: z.ZodString;
|
|
121
|
+
amount: z.ZodString;
|
|
122
|
+
stateInit: z.ZodOptional<z.ZodString>;
|
|
123
|
+
payload: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
address: string;
|
|
126
|
+
amount: string;
|
|
127
|
+
stateInit?: string | undefined;
|
|
128
|
+
payload?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
address: string;
|
|
131
|
+
amount: string;
|
|
132
|
+
stateInit?: string | undefined;
|
|
133
|
+
payload?: string | undefined;
|
|
134
|
+
}>, "many">;
|
|
135
|
+
validUntil: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
fromAddress: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
messages: {
|
|
139
|
+
address: string;
|
|
140
|
+
amount: string;
|
|
141
|
+
stateInit?: string | undefined;
|
|
142
|
+
payload?: string | undefined;
|
|
143
|
+
}[];
|
|
144
|
+
validUntil?: number | undefined;
|
|
145
|
+
fromAddress?: string | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
messages: {
|
|
148
|
+
address: string;
|
|
149
|
+
amount: string;
|
|
150
|
+
stateInit?: string | undefined;
|
|
151
|
+
payload?: string | undefined;
|
|
152
|
+
}[];
|
|
153
|
+
validUntil?: number | undefined;
|
|
154
|
+
fromAddress?: string | undefined;
|
|
155
|
+
}>;
|
|
156
|
+
handler: (args: z.infer<typeof sendRawTransactionSchema>) => Promise<ToolResponse>;
|
|
157
|
+
};
|
|
78
158
|
};
|
|
79
159
|
//# sourceMappingURL=transfer-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-tools.d.ts","sourceRoot":"","sources":["../../src/tools/transfer-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,aAAa;;;;;;;;;;;;EAIxB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAK3B,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;wBAK9B,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;wBA8CrD,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;
|
|
1
|
+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