@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.
- package/dist/cli.js +654 -1579
- package/dist/factory.d.ts +35 -21
- package/dist/factory.d.ts.map +1 -1
- package/dist/index.cjs +781 -4180
- package/dist/index.d.ts +5 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +781 -4167
- package/dist/services/McpWalletService.d.ts +74 -133
- package/dist/services/McpWalletService.d.ts.map +1 -1
- package/dist/tools/balance-tools.d.ts +61 -0
- package/dist/tools/balance-tools.d.ts.map +1 -0
- package/dist/tools/index.d.ts +5 -7
- 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 +49 -0
- package/dist/tools/swap-tools.d.ts.map +1 -0
- package/dist/tools/transfer-tools.d.ts +159 -0
- package/dist/tools/transfer-tools.d.ts.map +1 -0
- package/dist/tools/types.d.ts +21 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/types/config.d.ts +12 -36
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -4
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/adapters/InMemoryStorageAdapter.d.ts +0 -49
- package/dist/adapters/InMemoryStorageAdapter.d.ts.map +0 -1
- package/dist/adapters/LocalSignerAdapter.d.ts +0 -107
- package/dist/adapters/LocalSignerAdapter.d.ts.map +0 -1
- package/dist/adapters/SqliteSignerAdapter.d.ts +0 -119
- package/dist/adapters/SqliteSignerAdapter.d.ts.map +0 -1
- package/dist/adapters/SqliteStorageAdapter.d.ts +0 -81
- package/dist/adapters/SqliteStorageAdapter.d.ts.map +0 -1
- package/dist/adapters/TelegramUserContextProvider.d.ts +0 -70
- package/dist/adapters/TelegramUserContextProvider.d.ts.map +0 -1
- package/dist/adapters/index.d.ts +0 -19
- package/dist/adapters/index.d.ts.map +0 -1
- package/dist/core/LimitsManager.d.ts +0 -59
- package/dist/core/LimitsManager.d.ts.map +0 -1
- package/dist/core/PendingTransactionManager.d.ts +0 -122
- package/dist/core/PendingTransactionManager.d.ts.map +0 -1
- package/dist/core/UserScopedSigner.d.ts +0 -96
- package/dist/core/UserScopedSigner.d.ts.map +0 -1
- package/dist/core/UserScopedStorage.d.ts +0 -59
- package/dist/core/UserScopedStorage.d.ts.map +0 -1
- package/dist/core/index.d.ts +0 -15
- package/dist/core/index.d.ts.map +0 -1
- package/dist/services/WalletService.d.ts +0 -144
- package/dist/services/WalletService.d.ts.map +0 -1
- package/dist/storage/SecureStorage.d.ts +0 -79
- package/dist/storage/SecureStorage.d.ts.map +0 -1
- package/dist/tools/balance.d.ts +0 -167
- package/dist/tools/balance.d.ts.map +0 -1
- package/dist/tools/mcp-tools.d.ts +0 -439
- package/dist/tools/mcp-tools.d.ts.map +0 -1
- package/dist/tools/swap.d.ts +0 -110
- package/dist/tools/swap.d.ts.map +0 -1
- package/dist/tools/transfer.d.ts +0 -146
- package/dist/tools/transfer.d.ts.map +0 -1
- package/dist/tools/wallet.d.ts +0 -138
- package/dist/tools/wallet.d.ts.map +0 -1
- package/dist/types/signer.d.ts +0 -120
- package/dist/types/signer.d.ts.map +0 -1
- package/dist/types/storage.d.ts +0 -41
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types/user-context.d.ts +0 -48
- package/dist/types/user-context.d.ts.map +0 -1
package/dist/factory.d.ts
CHANGED
|
@@ -9,42 +9,56 @@
|
|
|
9
9
|
* Factory function for creating configured MCP server instances
|
|
10
10
|
*/
|
|
11
11
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
12
|
+
import type { WalletAdapter } from '@ton/walletkit';
|
|
13
|
+
import type { IContactResolver } from './types/contacts.js';
|
|
14
|
+
import type { NetworkConfig } from './services/McpWalletService.js';
|
|
14
15
|
import { McpWalletService } from './services/McpWalletService.js';
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Configuration for createTonWalletMCP factory
|
|
17
18
|
*/
|
|
18
|
-
export interface
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
export interface TonMcpFactoryConfig {
|
|
20
|
+
/**
|
|
21
|
+
* Wallet instance to use for operations.
|
|
22
|
+
* Required.
|
|
23
|
+
*/
|
|
24
|
+
wallet: WalletAdapter;
|
|
25
|
+
/**
|
|
26
|
+
* Optional contact resolver for name-to-address resolution.
|
|
27
|
+
*/
|
|
28
|
+
contacts?: IContactResolver;
|
|
29
|
+
/**
|
|
30
|
+
* Network-specific configuration (API keys).
|
|
31
|
+
*/
|
|
32
|
+
networks?: {
|
|
33
|
+
mainnet?: NetworkConfig;
|
|
34
|
+
testnet?: NetworkConfig;
|
|
35
|
+
};
|
|
21
36
|
}
|
|
22
37
|
/**
|
|
23
38
|
* Create a configured TON Wallet MCP server
|
|
24
39
|
*
|
|
25
|
-
* @param config - Configuration with
|
|
40
|
+
* @param config - Configuration with wallet instance
|
|
26
41
|
* @returns Configured McpServer instance
|
|
27
42
|
*
|
|
28
43
|
* @example
|
|
29
44
|
* ```typescript
|
|
30
|
-
* import { createTonWalletMCP
|
|
45
|
+
* import { createTonWalletMCP } from '@ton/mcp';
|
|
46
|
+
* import { Signer, WalletV5R1Adapter, TonWalletKit, Network } from '@ton/walletkit';
|
|
31
47
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* limits: {
|
|
39
|
-
* maxTransactionTon: 100,
|
|
40
|
-
* dailyLimitTon: 1000,
|
|
41
|
-
* maxWalletsPerUser: 10,
|
|
42
|
-
* },
|
|
43
|
-
* requireConfirmation: true,
|
|
48
|
+
* // Create wallet adapter
|
|
49
|
+
* const kit = new TonWalletKit({ ... });
|
|
50
|
+
* const signer = await Signer.fromMnemonic(mnemonic, { type: 'ton' });
|
|
51
|
+
* const walletAdapter = await WalletV5R1Adapter.create(signer, {
|
|
52
|
+
* client: kit.getApiClient(Network.mainnet()),
|
|
53
|
+
* network: Network.mainnet(),
|
|
44
54
|
* });
|
|
55
|
+
* const wallet = await kit.addWallet(walletAdapter);
|
|
56
|
+
*
|
|
57
|
+
* // Create MCP server
|
|
58
|
+
* const server = createTonWalletMCP({ wallet });
|
|
45
59
|
* ```
|
|
46
60
|
*/
|
|
47
|
-
export declare function createTonWalletMCP(config:
|
|
61
|
+
export declare function createTonWalletMCP(config: TonMcpFactoryConfig): Promise<McpServer>;
|
|
48
62
|
/**
|
|
49
63
|
* Get the wallet service shutdown handler
|
|
50
64
|
* Call this to properly cleanup when shutting down
|
package/dist/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAOlE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,aAAa,CAAC;QACxB,OAAO,CAAC,EAAE,aAAa,CAAC;KAC3B,CAAC;CACL;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,CAkDxF;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,gBAAgB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAE1F"}
|