@ton/mcp 0.1.13 → 0.1.15-alpha.0

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 (72) hide show
  1. package/README.md +205 -20
  2. package/dist/cli.js +21208 -25445
  3. package/dist/contracts/agentic_wallet/AgenticWallet.source.d.ts +11 -0
  4. package/dist/contracts/agentic_wallet/AgenticWallet.source.d.ts.map +1 -0
  5. package/dist/contracts/agentic_wallet/AgenticWalletAdapter.d.ts +62 -0
  6. package/dist/contracts/agentic_wallet/AgenticWalletAdapter.d.ts.map +1 -0
  7. package/dist/contracts/agentic_wallet/actions.d.ts.map +1 -0
  8. package/dist/contracts/agentic_wallet/index.d.ts +10 -0
  9. package/dist/contracts/agentic_wallet/index.d.ts.map +1 -0
  10. package/dist/factory.d.ts +13 -34
  11. package/dist/factory.d.ts.map +1 -1
  12. package/dist/http-mode.d.ts +25 -0
  13. package/dist/http-mode.d.ts.map +1 -0
  14. package/dist/index.cjs +99024 -103135
  15. package/dist/index.d.ts +8 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +99021 -103136
  18. package/dist/registry/config.d.ts +202 -0
  19. package/dist/registry/config.d.ts.map +1 -0
  20. package/dist/runtime/wallet-runtime.d.ts +35 -0
  21. package/dist/runtime/wallet-runtime.d.ts.map +1 -0
  22. package/dist/serverless.cjs +19249 -23360
  23. package/dist/serverless.d.ts.map +1 -1
  24. package/dist/serverless.js +19250 -23361
  25. package/dist/services/AgenticOnboardingService.d.ts +51 -0
  26. package/dist/services/AgenticOnboardingService.d.ts.map +1 -0
  27. package/dist/services/AgenticSetupSessionManager.d.ts +82 -0
  28. package/dist/services/AgenticSetupSessionManager.d.ts.map +1 -0
  29. package/dist/services/McpWalletService.d.ts +64 -0
  30. package/dist/services/McpWalletService.d.ts.map +1 -1
  31. package/dist/services/WalletRegistryService.d.ts +99 -0
  32. package/dist/services/WalletRegistryService.d.ts.map +1 -0
  33. package/dist/tools/address-tools.d.ts +119 -0
  34. package/dist/tools/address-tools.d.ts.map +1 -0
  35. package/dist/tools/agentic-onboarding-tools.d.ts +120 -0
  36. package/dist/tools/agentic-onboarding-tools.d.ts.map +1 -0
  37. package/dist/tools/agentic-tools.d.ts +71 -0
  38. package/dist/tools/agentic-tools.d.ts.map +1 -0
  39. package/dist/tools/dns-tools.d.ts.map +1 -1
  40. package/dist/tools/index.d.ts +4 -0
  41. package/dist/tools/index.d.ts.map +1 -1
  42. package/dist/tools/sanitize.d.ts +44 -0
  43. package/dist/tools/sanitize.d.ts.map +1 -0
  44. package/dist/tools/transfer-tools.d.ts +8 -8
  45. package/dist/tools/transfer-tools.d.ts.map +1 -1
  46. package/dist/tools/wallet-management-tools.d.ts +249 -0
  47. package/dist/tools/wallet-management-tools.d.ts.map +1 -0
  48. package/dist/types/config.d.ts +3 -3
  49. package/dist/types/config.d.ts.map +1 -1
  50. package/dist/utils/address.d.ts +15 -0
  51. package/dist/utils/address.d.ts.map +1 -0
  52. package/dist/utils/agentic.d.ts +61 -0
  53. package/dist/utils/agentic.d.ts.map +1 -0
  54. package/dist/utils/math.d.ts +9 -0
  55. package/dist/utils/math.d.ts.map +1 -0
  56. package/dist/utils/private-key.d.ts +14 -0
  57. package/dist/utils/private-key.d.ts.map +1 -0
  58. package/dist/utils/ton-client.d.ts +14 -0
  59. package/dist/utils/ton-client.d.ts.map +1 -0
  60. package/llms.txt +141 -5
  61. package/package.json +2 -2
  62. package/skills/SKILL.md +59 -7
  63. package/dist/contracts/w5_ownable/WalletOwnable.d.ts +0 -87
  64. package/dist/contracts/w5_ownable/WalletOwnable.d.ts.map +0 -1
  65. package/dist/contracts/w5_ownable/WalletOwnable.source.d.ts +0 -11
  66. package/dist/contracts/w5_ownable/WalletOwnable.source.d.ts.map +0 -1
  67. package/dist/contracts/w5_ownable/WalletOwnableAdapter.d.ts +0 -111
  68. package/dist/contracts/w5_ownable/WalletOwnableAdapter.d.ts.map +0 -1
  69. package/dist/contracts/w5_ownable/actions.d.ts.map +0 -1
  70. package/dist/contracts/w5_ownable/index.d.ts +0 -12
  71. package/dist/contracts/w5_ownable/index.d.ts.map +0 -1
  72. /package/dist/contracts/{w5_ownable → agentic_wallet}/actions.d.ts +0 -0
@@ -0,0 +1,71 @@
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 deployAgenticSubwalletSchema: z.ZodObject<{
12
+ operatorPublicKey: z.ZodString;
13
+ metadata: z.ZodObject<{
14
+ name: z.ZodString;
15
+ }, "strip", z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.objectOutputType<{
16
+ name: z.ZodString;
17
+ }, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">, z.objectInputType<{
18
+ name: z.ZodString;
19
+ }, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">>;
20
+ amountTon: z.ZodOptional<z.ZodString>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ operatorPublicKey: string;
23
+ metadata: {
24
+ name: string;
25
+ } & {
26
+ [k: string]: string | number | boolean;
27
+ };
28
+ amountTon?: string | undefined;
29
+ }, {
30
+ operatorPublicKey: string;
31
+ metadata: {
32
+ name: string;
33
+ } & {
34
+ [k: string]: string | number | boolean;
35
+ };
36
+ amountTon?: string | undefined;
37
+ }>;
38
+ export declare function createMcpAgenticTools(service: McpWalletService): {
39
+ deploy_agentic_subwallet: {
40
+ description: string;
41
+ inputSchema: z.ZodObject<{
42
+ operatorPublicKey: z.ZodString;
43
+ metadata: z.ZodObject<{
44
+ name: z.ZodString;
45
+ }, "strip", z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.objectOutputType<{
46
+ name: z.ZodString;
47
+ }, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">, z.objectInputType<{
48
+ name: z.ZodString;
49
+ }, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "strip">>;
50
+ amountTon: z.ZodOptional<z.ZodString>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ operatorPublicKey: string;
53
+ metadata: {
54
+ name: string;
55
+ } & {
56
+ [k: string]: string | number | boolean;
57
+ };
58
+ amountTon?: string | undefined;
59
+ }, {
60
+ operatorPublicKey: string;
61
+ metadata: {
62
+ name: string;
63
+ } & {
64
+ [k: string]: string | number | boolean;
65
+ };
66
+ amountTon?: string | undefined;
67
+ }>;
68
+ handler: (args: z.infer<typeof deployAgenticSubwalletSchema>) => Promise<ToolResponse>;
69
+ };
70
+ };
71
+ //# sourceMappingURL=agentic-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentic-tools.d.ts","sourceRoot":"","sources":["../../src/tools/agentic-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;AAU/C,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;EAOvC,CAAC;AAEH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAM7B,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAuErG"}
@@ -1 +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"}
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;;;;;;EAO3B,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;;;;;;;;;;;wBAuDxD,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAqD7F"}
@@ -11,4 +11,8 @@ export { createMcpSwapTools } from './swap-tools.js';
11
11
  export { createMcpKnownJettonsTools, KNOWN_JETTONS } from './known-jettons-tools.js';
12
12
  export { createMcpNftTools } from './nft-tools.js';
13
13
  export { createMcpTransactionTools } from './transaction-tools.js';
14
+ export { createMcpAgenticTools } from './agentic-tools.js';
15
+ export { createMcpAddressTools } from './address-tools.js';
16
+ export { createMcpWalletManagementTools } from './wallet-management-tools.js';
17
+ export { createMcpAgenticOnboardingTools } from './agentic-onboarding-tools.js';
14
18
  //# 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;AACrD,OAAO,EAAE,0BAA0B,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,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;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,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 type { ConfigNetwork, PendingAgenticDeployment, PendingAgenticKeyRotation, StoredAgenticWallet, StoredStandardWallet, StoredWallet } from '../registry/config.js';
9
+ import type { AgenticRootWalletSetupStatus } from '../services/AgenticOnboardingService.js';
10
+ export type PublicStandardWallet = Omit<StoredStandardWallet, 'mnemonic' | 'private_key'> & {
11
+ has_mnemonic: boolean;
12
+ has_private_key: boolean;
13
+ };
14
+ export type PublicAgenticWallet = Omit<StoredAgenticWallet, 'operator_private_key'> & {
15
+ has_operator_private_key: boolean;
16
+ };
17
+ export type PublicStoredWallet = PublicStandardWallet | PublicAgenticWallet;
18
+ export interface PublicNetworkConfig {
19
+ has_toncenter_api_key: boolean;
20
+ agentic_collection_address?: string;
21
+ }
22
+ export type PublicPendingAgenticDeployment = Omit<PendingAgenticDeployment, 'operator_private_key'> & {
23
+ has_operator_private_key: boolean;
24
+ };
25
+ export type PublicPendingAgenticKeyRotation = Omit<PendingAgenticKeyRotation, 'operator_private_key'> & {
26
+ has_operator_private_key: boolean;
27
+ };
28
+ export interface PublicAgenticRootWalletSetupStatus extends Omit<AgenticRootWalletSetupStatus, 'pendingDeployment'> {
29
+ pendingDeployment: PublicPendingAgenticDeployment;
30
+ }
31
+ export declare function sanitizeStoredWallet(wallet: StoredWallet | null): PublicStoredWallet | null;
32
+ export declare function sanitizeStoredWallets(wallets: StoredWallet[]): PublicStoredWallet[];
33
+ export declare const sanitizeWallet: typeof sanitizeStoredWallet;
34
+ export declare const sanitizeWallets: typeof sanitizeStoredWallets;
35
+ export declare function sanitizeNetworkConfig(config: ConfigNetwork): PublicNetworkConfig;
36
+ export declare function sanitizePendingAgenticDeployment(deployment: PendingAgenticDeployment): PublicPendingAgenticDeployment;
37
+ export declare function sanitizePendingAgenticDeployments(deployments: PendingAgenticDeployment[]): PublicPendingAgenticDeployment[];
38
+ export declare function sanitizePendingAgenticKeyRotation(rotation: PendingAgenticKeyRotation): PublicPendingAgenticKeyRotation;
39
+ export declare function sanitizePendingAgenticKeyRotations(rotations: PendingAgenticKeyRotation[]): PublicPendingAgenticKeyRotation[];
40
+ export declare function sanitizeAgenticRootWalletSetupStatus(setup: AgenticRootWalletSetupStatus | null): PublicAgenticRootWalletSetupStatus | null;
41
+ export declare function sanitizeAgenticRootWalletSetupStatuses(setups: AgenticRootWalletSetupStatus[]): PublicAgenticRootWalletSetupStatus[];
42
+ export declare const sanitizeRootWalletSetup: typeof sanitizeAgenticRootWalletSetupStatus;
43
+ export declare const sanitizeRootWalletSetups: typeof sanitizeAgenticRootWalletSetupStatuses;
44
+ //# sourceMappingURL=sanitize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/tools/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACR,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAE5F,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,aAAa,CAAC,GAAG;IACxF,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG;IAClF,wBAAwB,EAAE,OAAO,CAAC;CACrC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,wBAAwB,EAAE,sBAAsB,CAAC,GAAG;IAClG,wBAAwB,EAAE,OAAO,CAAC;CACrC,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,GAAG;IACpG,wBAAwB,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,MAAM,WAAW,kCAAmC,SAAQ,IAAI,CAAC,4BAA4B,EAAE,mBAAmB,CAAC;IAC/G,iBAAiB,EAAE,8BAA8B,CAAC;CACrD;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,GAAG,kBAAkB,GAAG,IAAI,CAmB3F;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,kBAAkB,EAAE,CAInF;AAED,eAAO,MAAM,cAAc,6BAAuB,CAAC;AACnD,eAAO,MAAM,eAAe,8BAAwB,CAAC;AAErD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,mBAAmB,CAKhF;AAED,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,wBAAwB,GAAG,8BAA8B,CAMrH;AAED,wBAAgB,iCAAiC,CAC7C,WAAW,EAAE,wBAAwB,EAAE,GACxC,8BAA8B,EAAE,CAElC;AAED,wBAAgB,iCAAiC,CAC7C,QAAQ,EAAE,yBAAyB,GACpC,+BAA+B,CAMjC;AAED,wBAAgB,kCAAkC,CAC9C,SAAS,EAAE,yBAAyB,EAAE,GACvC,+BAA+B,EAAE,CAEnC;AAED,wBAAgB,oCAAoC,CAChD,KAAK,EAAE,4BAA4B,GAAG,IAAI,GAC3C,kCAAkC,GAAG,IAAI,CAS3C;AAED,wBAAgB,sCAAsC,CAClD,MAAM,EAAE,4BAA4B,EAAE,GACvC,kCAAkC,EAAE,CAItC;AAED,eAAO,MAAM,uBAAuB,6CAAuC,CAAC;AAC5E,eAAO,MAAM,wBAAwB,+CAAyC,CAAC"}
@@ -46,13 +46,13 @@ export declare const sendRawTransactionSchema: z.ZodObject<{
46
46
  }, "strip", z.ZodTypeAny, {
47
47
  address: string;
48
48
  amount: string;
49
- stateInit?: string | undefined;
50
49
  payload?: string | undefined;
50
+ stateInit?: string | undefined;
51
51
  }, {
52
52
  address: string;
53
53
  amount: string;
54
- stateInit?: string | undefined;
55
54
  payload?: string | undefined;
55
+ stateInit?: string | undefined;
56
56
  }>, "many">;
57
57
  validUntil: z.ZodOptional<z.ZodNumber>;
58
58
  fromAddress: z.ZodOptional<z.ZodString>;
@@ -60,8 +60,8 @@ export declare const sendRawTransactionSchema: z.ZodObject<{
60
60
  messages: {
61
61
  address: string;
62
62
  amount: string;
63
- stateInit?: string | undefined;
64
63
  payload?: string | undefined;
64
+ stateInit?: string | undefined;
65
65
  }[];
66
66
  validUntil?: number | undefined;
67
67
  fromAddress?: string | undefined;
@@ -69,8 +69,8 @@ export declare const sendRawTransactionSchema: z.ZodObject<{
69
69
  messages: {
70
70
  address: string;
71
71
  amount: string;
72
- stateInit?: string | undefined;
73
72
  payload?: string | undefined;
73
+ stateInit?: string | undefined;
74
74
  }[];
75
75
  validUntil?: number | undefined;
76
76
  fromAddress?: string | undefined;
@@ -124,13 +124,13 @@ export declare function createMcpTransferTools(service: McpWalletService): {
124
124
  }, "strip", z.ZodTypeAny, {
125
125
  address: string;
126
126
  amount: string;
127
- stateInit?: string | undefined;
128
127
  payload?: string | undefined;
128
+ stateInit?: string | undefined;
129
129
  }, {
130
130
  address: string;
131
131
  amount: string;
132
- stateInit?: string | undefined;
133
132
  payload?: string | undefined;
133
+ stateInit?: string | undefined;
134
134
  }>, "many">;
135
135
  validUntil: z.ZodOptional<z.ZodNumber>;
136
136
  fromAddress: z.ZodOptional<z.ZodString>;
@@ -138,8 +138,8 @@ export declare function createMcpTransferTools(service: McpWalletService): {
138
138
  messages: {
139
139
  address: string;
140
140
  amount: string;
141
- stateInit?: string | undefined;
142
141
  payload?: string | undefined;
142
+ stateInit?: string | undefined;
143
143
  }[];
144
144
  validUntil?: number | undefined;
145
145
  fromAddress?: string | undefined;
@@ -147,8 +147,8 @@ export declare function createMcpTransferTools(service: McpWalletService): {
147
147
  messages: {
148
148
  address: string;
149
149
  amount: string;
150
- stateInit?: string | undefined;
151
150
  payload?: string | undefined;
151
+ stateInit?: string | undefined;
152
152
  }[];
153
153
  validUntil?: number | undefined;
154
154
  fromAddress?: string | undefined;
@@ -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;AASH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAInC,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;wBAM9B,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;wBAgDrD,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0FxD,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAgDjG"}
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;AASH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAInC,CAAC;AAEH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB;;;;;;;;;;;;;;;;wBAM9B,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;wBAiDrD,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2FxD,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAiDjG"}
@@ -0,0 +1,249 @@
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 { WalletRegistryService } from '../services/WalletRegistryService.js';
10
+ import type { ToolResponse } from './types.js';
11
+ declare const setNetworkConfigSchema: z.ZodObject<{
12
+ network: z.ZodEnum<["mainnet", "testnet"]>;
13
+ toncenterApiKey: z.ZodOptional<z.ZodString>;
14
+ agenticCollectionAddress: z.ZodOptional<z.ZodString>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ network: "mainnet" | "testnet";
17
+ toncenterApiKey?: string | undefined;
18
+ agenticCollectionAddress?: string | undefined;
19
+ }, {
20
+ network: "mainnet" | "testnet";
21
+ toncenterApiKey?: string | undefined;
22
+ agenticCollectionAddress?: string | undefined;
23
+ }>;
24
+ declare const setActiveWalletSchema: z.ZodObject<{
25
+ walletSelector: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ walletSelector: string;
28
+ }, {
29
+ walletSelector: string;
30
+ }>;
31
+ declare const removeWalletSchema: z.ZodObject<{
32
+ walletSelector: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ walletSelector: string;
35
+ }, {
36
+ walletSelector: string;
37
+ }>;
38
+ declare const validateAgenticWalletSchema: z.ZodObject<{
39
+ address: z.ZodString;
40
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
41
+ collectionAddress: z.ZodOptional<z.ZodString>;
42
+ ownerAddress: z.ZodOptional<z.ZodString>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ address: string;
45
+ network?: "mainnet" | "testnet" | undefined;
46
+ ownerAddress?: string | undefined;
47
+ collectionAddress?: string | undefined;
48
+ }, {
49
+ address: string;
50
+ network?: "mainnet" | "testnet" | undefined;
51
+ ownerAddress?: string | undefined;
52
+ collectionAddress?: string | undefined;
53
+ }>;
54
+ declare const listAgenticWalletsByOwnerSchema: z.ZodObject<{
55
+ ownerAddress: z.ZodString;
56
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ ownerAddress: string;
59
+ network?: "mainnet" | "testnet" | undefined;
60
+ }, {
61
+ ownerAddress: string;
62
+ network?: "mainnet" | "testnet" | undefined;
63
+ }>;
64
+ declare const importAgenticWalletSchema: z.ZodObject<{
65
+ address: z.ZodString;
66
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
67
+ name: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ address: string;
70
+ network?: "mainnet" | "testnet" | undefined;
71
+ name?: string | undefined;
72
+ }, {
73
+ address: string;
74
+ network?: "mainnet" | "testnet" | undefined;
75
+ name?: string | undefined;
76
+ }>;
77
+ declare const rotateOperatorKeySchema: z.ZodObject<{
78
+ walletSelector: z.ZodOptional<z.ZodString>;
79
+ operatorPrivateKey: z.ZodOptional<z.ZodString>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ walletSelector?: string | undefined;
82
+ operatorPrivateKey?: string | undefined;
83
+ }, {
84
+ walletSelector?: string | undefined;
85
+ operatorPrivateKey?: string | undefined;
86
+ }>;
87
+ declare const pendingOperatorKeyRotationSchema: z.ZodObject<{
88
+ rotationId: z.ZodString;
89
+ }, "strip", z.ZodTypeAny, {
90
+ rotationId: string;
91
+ }, {
92
+ rotationId: string;
93
+ }>;
94
+ export declare function createMcpWalletManagementTools(registry: WalletRegistryService): {
95
+ list_wallets: {
96
+ description: string;
97
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
98
+ handler: () => Promise<ToolResponse>;
99
+ };
100
+ get_current_wallet: {
101
+ description: string;
102
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
103
+ handler: () => Promise<ToolResponse>;
104
+ };
105
+ set_active_wallet: {
106
+ description: string;
107
+ inputSchema: z.ZodObject<{
108
+ walletSelector: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ walletSelector: string;
111
+ }, {
112
+ walletSelector: string;
113
+ }>;
114
+ handler: (args: z.infer<typeof setActiveWalletSchema>) => Promise<ToolResponse>;
115
+ };
116
+ remove_wallet: {
117
+ description: string;
118
+ inputSchema: z.ZodObject<{
119
+ walletSelector: z.ZodString;
120
+ }, "strip", z.ZodTypeAny, {
121
+ walletSelector: string;
122
+ }, {
123
+ walletSelector: string;
124
+ }>;
125
+ handler: (args: z.infer<typeof removeWalletSchema>) => Promise<ToolResponse>;
126
+ };
127
+ set_network_config: {
128
+ description: string;
129
+ inputSchema: z.ZodObject<{
130
+ network: z.ZodEnum<["mainnet", "testnet"]>;
131
+ toncenterApiKey: z.ZodOptional<z.ZodString>;
132
+ agenticCollectionAddress: z.ZodOptional<z.ZodString>;
133
+ }, "strip", z.ZodTypeAny, {
134
+ network: "mainnet" | "testnet";
135
+ toncenterApiKey?: string | undefined;
136
+ agenticCollectionAddress?: string | undefined;
137
+ }, {
138
+ network: "mainnet" | "testnet";
139
+ toncenterApiKey?: string | undefined;
140
+ agenticCollectionAddress?: string | undefined;
141
+ }>;
142
+ handler: (args: z.infer<typeof setNetworkConfigSchema>) => Promise<ToolResponse>;
143
+ };
144
+ validate_agentic_wallet: {
145
+ description: string;
146
+ inputSchema: z.ZodObject<{
147
+ address: z.ZodString;
148
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
149
+ collectionAddress: z.ZodOptional<z.ZodString>;
150
+ ownerAddress: z.ZodOptional<z.ZodString>;
151
+ }, "strip", z.ZodTypeAny, {
152
+ address: string;
153
+ network?: "mainnet" | "testnet" | undefined;
154
+ ownerAddress?: string | undefined;
155
+ collectionAddress?: string | undefined;
156
+ }, {
157
+ address: string;
158
+ network?: "mainnet" | "testnet" | undefined;
159
+ ownerAddress?: string | undefined;
160
+ collectionAddress?: string | undefined;
161
+ }>;
162
+ handler: (args: z.infer<typeof validateAgenticWalletSchema>) => Promise<ToolResponse>;
163
+ };
164
+ list_agentic_wallets_by_owner: {
165
+ description: string;
166
+ inputSchema: z.ZodObject<{
167
+ ownerAddress: z.ZodString;
168
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ ownerAddress: string;
171
+ network?: "mainnet" | "testnet" | undefined;
172
+ }, {
173
+ ownerAddress: string;
174
+ network?: "mainnet" | "testnet" | undefined;
175
+ }>;
176
+ handler: (args: z.infer<typeof listAgenticWalletsByOwnerSchema>) => Promise<ToolResponse>;
177
+ };
178
+ import_agentic_wallet: {
179
+ description: string;
180
+ inputSchema: z.ZodObject<{
181
+ address: z.ZodString;
182
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
183
+ name: z.ZodOptional<z.ZodString>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ address: string;
186
+ network?: "mainnet" | "testnet" | undefined;
187
+ name?: string | undefined;
188
+ }, {
189
+ address: string;
190
+ network?: "mainnet" | "testnet" | undefined;
191
+ name?: string | undefined;
192
+ }>;
193
+ handler: (args: z.infer<typeof importAgenticWalletSchema>) => Promise<ToolResponse>;
194
+ };
195
+ rotate_operator_key: {
196
+ description: string;
197
+ inputSchema: z.ZodObject<{
198
+ walletSelector: z.ZodOptional<z.ZodString>;
199
+ operatorPrivateKey: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ walletSelector?: string | undefined;
202
+ operatorPrivateKey?: string | undefined;
203
+ }, {
204
+ walletSelector?: string | undefined;
205
+ operatorPrivateKey?: string | undefined;
206
+ }>;
207
+ handler: (args: z.infer<typeof rotateOperatorKeySchema>) => Promise<ToolResponse>;
208
+ };
209
+ list_pending_operator_key_rotations: {
210
+ description: string;
211
+ inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
212
+ handler: () => Promise<ToolResponse>;
213
+ };
214
+ get_pending_operator_key_rotation: {
215
+ description: string;
216
+ inputSchema: z.ZodObject<{
217
+ rotationId: z.ZodString;
218
+ }, "strip", z.ZodTypeAny, {
219
+ rotationId: string;
220
+ }, {
221
+ rotationId: string;
222
+ }>;
223
+ handler: (args: z.infer<typeof pendingOperatorKeyRotationSchema>) => Promise<ToolResponse>;
224
+ };
225
+ complete_rotate_operator_key: {
226
+ description: string;
227
+ inputSchema: z.ZodObject<{
228
+ rotationId: z.ZodString;
229
+ }, "strip", z.ZodTypeAny, {
230
+ rotationId: string;
231
+ }, {
232
+ rotationId: string;
233
+ }>;
234
+ handler: (args: z.infer<typeof pendingOperatorKeyRotationSchema>) => Promise<ToolResponse>;
235
+ };
236
+ cancel_rotate_operator_key: {
237
+ description: string;
238
+ inputSchema: z.ZodObject<{
239
+ rotationId: z.ZodString;
240
+ }, "strip", z.ZodTypeAny, {
241
+ rotationId: string;
242
+ }, {
243
+ rotationId: string;
244
+ }>;
245
+ handler: (args: z.infer<typeof pendingOperatorKeyRotationSchema>) => Promise<ToolResponse>;
246
+ };
247
+ };
248
+ export {};
249
+ //# sourceMappingURL=wallet-management-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet-management-tools.d.ts","sourceRoot":"","sources":["../../src/tools/wallet-management-tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AASlF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAoC/C,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAI1B,CAAC;AAEH,QAAA,MAAM,qBAAqB;;;;;;EAEzB,CAAC;AAEH,QAAA,MAAM,kBAAkB;;;;;;EAEtB,CAAC;AAEH,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH,QAAA,MAAM,+BAA+B;;;;;;;;;EAGnC,CAAC;AAEH,QAAA,MAAM,yBAAyB;;;;;;;;;;;;EAI7B,CAAC;AAEH,QAAA,MAAM,uBAAuB;;;;;;;;;EAM3B,CAAC;AAEH,QAAA,MAAM,gCAAgC;;;;;;EAEpC,CAAC;AAEH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,qBAAqB;;;;uBAK/C,OAAO,CAAC,YAAY,CAAC;;;;;uBAkBrB,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAalB,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAa7D,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;wBA6B1D,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;wBAqB9D,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;wBAanE,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;wBAmBvE,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;;;;wBAiBjE,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;uBAiBlE,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAgBlB,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAgBxE,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;;;;;;;;;;wBAiBxE,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,KAAG,OAAO,CAAC,YAAY,CAAC;;EAUzG"}
@@ -23,10 +23,10 @@ export interface NetworkConfig {
23
23
  */
24
24
  export interface TonMcpConfig {
25
25
  /**
26
- * Wallet instance to use for operations.
27
- * Required.
26
+ * Optional fixed wallet instance for backward-compatible single-wallet mode.
27
+ * If omitted, the server can run against the local config registry.
28
28
  */
29
- wallet: Wallet;
29
+ wallet?: Wallet;
30
30
  /**
31
31
  * Optional contact resolver for name-to-address resolution.
32
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;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"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;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"}
@@ -0,0 +1,15 @@
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 { Address } from '@ton/core';
9
+ export type McpAddressNetwork = 'mainnet' | 'testnet';
10
+ export declare function formatWalletAddress(address: string | Address, network: McpAddressNetwork): string;
11
+ export declare function formatWalletAddressSafe(address: string | null | undefined, network: McpAddressNetwork): string | undefined;
12
+ export declare function formatAssetAddress(address: string | Address, network: McpAddressNetwork): string;
13
+ export declare function formatAssetAddressSafe(address: string | null | undefined, network: McpAddressNetwork): string | undefined;
14
+ export declare function normalizeAddressForComparison(address: string): string | null;
15
+ //# sourceMappingURL=address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/utils/address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAGjG;AAED,wBAAgB,uBAAuB,CACnC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,OAAO,EAAE,iBAAiB,GAC3B,MAAM,GAAG,SAAS,CAUpB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAGhG;AAED,wBAAgB,sBAAsB,CAClC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAClC,OAAO,EAAE,iBAAiB,GAC3B,MAAM,GAAG,SAAS,CAUpB;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5E"}
@@ -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 type { ApiClient } from '@ton/walletkit';
9
+ import type { TonNetwork } from '../registry/config.js';
10
+ export interface AgenticImportCandidate {
11
+ address: string;
12
+ balanceNano: string;
13
+ balanceTon: string;
14
+ ownerAddress: string;
15
+ operatorPublicKey?: string;
16
+ originOperatorPublicKey?: string;
17
+ collectionAddress: string;
18
+ deployedByUser?: boolean;
19
+ name?: string;
20
+ }
21
+ type AgenticWalletValidationErrorCode = 'inactive_contract' | 'wrong_contract_type' | 'uninitialized_agentic_wallet' | 'unsupported_agentic_wallet_layout';
22
+ export declare class AgenticWalletValidationError extends Error {
23
+ readonly code: AgenticWalletValidationErrorCode;
24
+ constructor(code: AgenticWalletValidationErrorCode, message: string);
25
+ }
26
+ export declare function generateOperatorKeyPair(): Promise<{
27
+ privateKey: string;
28
+ publicKey: string;
29
+ }>;
30
+ export declare function resolveOperatorCredentials(privateKey: string, expectedPublicKey?: string, deps?: {
31
+ createSigner?: (seed: Uint8Array) => Promise<{
32
+ publicKey: string;
33
+ }>;
34
+ }): Promise<{
35
+ privateKey: string;
36
+ publicKey: string;
37
+ }>;
38
+ export declare function buildAgenticCreateDeepLink(input: {
39
+ operatorPublicKey: string;
40
+ callbackUrl: string;
41
+ agentName?: string;
42
+ source?: string;
43
+ tonDeposit?: string;
44
+ }): string;
45
+ export declare function buildAgenticDashboardLink(address: string): string;
46
+ export declare function buildAgenticChangeKeyDeepLink(address: string, nextOperatorPublicKey: string): string;
47
+ export declare function listAgenticWalletsByOwner(input: {
48
+ client: ApiClient;
49
+ ownerAddress: string;
50
+ collectionAddress: string;
51
+ network: TonNetwork;
52
+ }): Promise<AgenticImportCandidate[]>;
53
+ export declare function validateAgenticWalletAddress(input: {
54
+ client: ApiClient;
55
+ address: string;
56
+ collectionAddress?: string;
57
+ ownerAddress?: string;
58
+ network: TonNetwork;
59
+ }): Promise<AgenticImportCandidate>;
60
+ export {};
61
+ //# sourceMappingURL=agentic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentic.d.ts","sourceRoot":"","sources":["../../src/utils/agentic.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAoB,MAAM,gBAAgB,CAAC;AAGlE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAsBxD,MAAM,WAAW,sBAAsB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,KAAK,gCAAgC,GAC/B,mBAAmB,GACnB,qBAAqB,GACrB,8BAA8B,GAC9B,mCAAmC,CAAC;AAE1C,qBAAa,4BAA6B,SAAQ,KAAK;aAE/B,IAAI,EAAE,gCAAgC;gBAAtC,IAAI,EAAE,gCAAgC,EACtD,OAAO,EAAE,MAAM;CAKtB;AAgGD,wBAAsB,uBAAuB,IAAI,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAOlG;AAED,wBAAsB,0BAA0B,CAC5C,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,IAAI,CAAC,EAAE;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvE,GACF,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAcpD;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAC9C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAcT;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAKpG;AAgHD,wBAAsB,yBAAyB,CAAC,KAAK,EAAE;IACnD,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,UAAU,CAAC;CACvB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAqDpC;AAED,wBAAsB,4BAA4B,CAAC,KAAK,EAAE;IACtD,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,UAAU,CAAC;CACvB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAwClC"}
@@ -0,0 +1,9 @@
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 declare const UINT_256_MAX: bigint;
9
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,YAAY,QAAoB,CAAC"}
@@ -0,0 +1,14 @@
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 ParsedPrivateKeyInput {
9
+ normalizedHex: string;
10
+ seed: Buffer;
11
+ wasCombinedKeypair: boolean;
12
+ }
13
+ export declare function parsePrivateKeyInput(privateKey: string): ParsedPrivateKeyInput;
14
+ //# sourceMappingURL=private-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-key.d.ts","sourceRoot":"","sources":["../../src/utils/private-key.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB,CAoB9E"}
@@ -0,0 +1,14 @@
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 { ApiClient } from '@ton/walletkit';
9
+ import type { TonNetwork } from '../registry/config.js';
10
+ export declare function getApiClientRequestIntervalMs(apiKey?: string): number;
11
+ export declare function resolveToncenterApiKey(network: TonNetwork, apiKey?: string): string;
12
+ export declare function createRateLimitedFetch(delayMs: number, fetchImpl?: typeof fetch): typeof fetch;
13
+ export declare function createApiClient(network: TonNetwork, apiKey?: string): ApiClient;
14
+ //# sourceMappingURL=ton-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ton-client.d.ts","sourceRoot":"","sources":["../../src/utils/ton-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAiBxD,wBAAgB,6BAA6B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,OAAO,KAAa,GAAG,OAAO,KAAK,CAuBrG;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAU/E"}