@ton/mcp 0.1.15-alpha.17 → 0.1.15-alpha.19

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 CHANGED
@@ -91806,6 +91806,24 @@ var TonWalletKit = class {
91806
91806
  this.isInitialized = false;
91807
91807
  }
91808
91808
  /**
91809
+ * Add a provider
91810
+ */
91811
+ registerProvider(input) {
91812
+ const provider = typeof input === "function" ? input(this.createFactoryContext()) : input;
91813
+ switch (provider.type) {
91814
+ case "swap":
91815
+ this.swapManager.registerProvider(provider);
91816
+ break;
91817
+ case "staking":
91818
+ this.stakingManager.registerProvider(provider);
91819
+ break;
91820
+ case "streaming":
91821
+ this.streamingManager.registerProvider(provider);
91822
+ break;
91823
+ default: throw new Error("Unknown provider type");
91824
+ }
91825
+ }
91826
+ /**
91809
91827
  * Jettons API access
91810
91828
  */
91811
91829
  get jettons() {
@@ -135628,6 +135646,7 @@ var McpWalletService = class McpWalletService {
135628
135646
  await this.kit.waitForReady();
135629
135647
  const omnistonProvider = new OmnistonSwapProvider({ defaultSlippageBps: 100 });
135630
135648
  this.kit.swap.registerProvider(omnistonProvider);
135649
+ if (this.config.providers) for (const providerInput of this.config.providers) this.kit.registerProvider(providerInput);
135631
135650
  }
135632
135651
  return this.kit;
135633
135652
  }
@@ -136967,13 +136986,13 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
136967
136986
  return nftIndex;
136968
136987
  }
136969
136988
  async createSignedTransferBody(input, options, authType) {
136970
- const actions = packActionsList(input.messages.map((message) => this.createTransferAction(message)));
136989
+ const outActions = extractOutActions(packActionsList(input.messages.map((message) => this.createTransferAction(message))));
136971
136990
  let seqno = 0;
136972
136991
  try {
136973
136992
  seqno = await CallForSuccess(async () => this.getSeqno(), 5, 1e3);
136974
136993
  } catch (_) {}
136975
136994
  const walletNftIndex = await this.getWalletNftIndex();
136976
- return this.createSignedBody(seqno, walletNftIndex, actions, {
136995
+ return this.createSignedBody(seqno, walletNftIndex, outActions, {
136977
136996
  ...options,
136978
136997
  authType,
136979
136998
  validUntil: this.resolveValidUntil(input.validUntil)
@@ -137066,6 +137085,9 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
137066
137085
  ];
137067
137086
  }
137068
137087
  };
137088
+ function extractOutActions(actionsList) {
137089
+ return actionsList.beginParse().loadMaybeRef();
137090
+ }
137069
137091
  //#endregion
137070
137092
  //#region src/runtime/wallet-runtime.ts
137071
137093
  /**
@@ -137113,7 +137135,7 @@ async function createStandardAdapter(input) {
137113
137135
  network
137114
137136
  });
137115
137137
  }
137116
- async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey) {
137138
+ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey, providers) {
137117
137139
  const signer = await createSignerFromSecrets({
137118
137140
  mnemonic: wallet.mnemonic,
137119
137141
  privateKey: wallet.private_key
@@ -137131,7 +137153,8 @@ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey
137131
137153
  const service = await McpWalletService.create({
137132
137154
  wallet: adapter,
137133
137155
  contacts,
137134
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
137156
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
137157
+ providers
137135
137158
  });
137136
137159
  return {
137137
137160
  service,
@@ -137154,7 +137177,7 @@ function parseStoredWalletNftIndex(value) {
137154
137177
  return;
137155
137178
  }
137156
137179
  }
137157
- async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning) {
137180
+ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning, providers) {
137158
137181
  if (requiresSigning && !wallet.operator_private_key) throw new Error(`Agentic wallet "${wallet.name}" is missing operator_private_key.`);
137159
137182
  const signer = wallet.operator_private_key ? await createSignerFromSecrets({ privateKey: wallet.operator_private_key }) : await createPlaceholderSigner();
137160
137183
  const kit = createKit(wallet.network, toncenterApiKey);
@@ -137177,7 +137200,8 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
137177
137200
  const service = await McpWalletService.create({
137178
137201
  wallet: adapter,
137179
137202
  contacts,
137180
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
137203
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
137204
+ providers
137181
137205
  });
137182
137206
  return {
137183
137207
  service,
@@ -137191,7 +137215,7 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
137191
137215
  }
137192
137216
  }
137193
137217
  async function createMcpWalletServiceFromStoredWallet(input) {
137194
- return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning);
137218
+ return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey, input.providers) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning, input.providers);
137195
137219
  }
137196
137220
  //#endregion
137197
137221
  //#region src/utils/agentic.ts
@@ -137427,9 +137451,11 @@ function defaultWalletName(prefix, address) {
137427
137451
  return `${prefix} ${address.slice(0, 6)}...${address.slice(-4)}`;
137428
137452
  }
137429
137453
  var WalletRegistryService = class {
137454
+ config;
137430
137455
  contacts;
137431
137456
  networkOverrides;
137432
- constructor(contacts, networkOverrides) {
137457
+ constructor(config, contacts, networkOverrides) {
137458
+ this.config = config;
137433
137459
  this.contacts = contacts;
137434
137460
  this.networkOverrides = networkOverrides;
137435
137461
  }
@@ -137502,7 +137528,8 @@ var WalletRegistryService = class {
137502
137528
  wallet,
137503
137529
  contacts: this.contacts,
137504
137530
  toncenterApiKey,
137505
- requiresSigning: options?.requiresSigning
137531
+ requiresSigning: options?.requiresSigning,
137532
+ providers: this.config.providers
137506
137533
  }),
137507
137534
  wallet
137508
137535
  };
@@ -139599,7 +139626,7 @@ async function createTonWalletMCP(config) {
139599
139626
  name: SERVER_NAME$1,
139600
139627
  version: SERVER_VERSION
139601
139628
  });
139602
- const registry = new WalletRegistryService(config.contacts, config.networks);
139629
+ const registry = new WalletRegistryService(config, config.contacts, config.networks);
139603
139630
  const knownJettonsTools = createMcpKnownJettonsTools();
139604
139631
  const registerTool = (name, tool) => {
139605
139632
  server.registerTool(name, {
@@ -139612,7 +139639,8 @@ async function createTonWalletMCP(config) {
139612
139639
  const walletService = await McpWalletService.create({
139613
139640
  wallet: config.wallet,
139614
139641
  contacts: config.contacts,
139615
- networks: config.networks
139642
+ networks: config.networks,
139643
+ providers: config.providers
139616
139644
  });
139617
139645
  const balanceTools = createMcpBalanceTools(walletService);
139618
139646
  const transferTools = createMcpTransferTools(walletService);
@@ -1 +1 @@
1
- {"version":3,"file":"AgenticWalletAdapter.d.ts","sourceRoot":"","sources":["../../../src/contracts/agentic_wallet/AgenticWalletAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACH,OAAO,EAEP,IAAI,EAQP,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EACR,SAAS,EACT,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,GAAG,EACH,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,4BAA4B,EAC/B,MAAM,gBAAgB,CAAC;AAexB,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,KAAK,qBAAqB,GAAG,UAAU,GAAG,UAAU,CAAC;AAErD,UAAU,wBAAyB,SAAQ,4BAA4B;IACnE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,qBAAqB,CAAC;CACnC;AAED,MAAM,WAAW,0BAA0B;IACvC,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IAC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"}
package/dist/factory.d.ts CHANGED
@@ -9,7 +9,7 @@
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 { WalletAdapter } from '@ton/walletkit';
12
+ import type { BaseProvider, ProviderInput, WalletAdapter } from '@ton/walletkit';
13
13
  import type { IContactResolver } from './types/contacts.js';
14
14
  import type { NetworkConfig } from './services/McpWalletService.js';
15
15
  import { McpWalletService } from './services/McpWalletService.js';
@@ -40,6 +40,10 @@ export interface TonMcpFactoryConfig {
40
40
  * Optional shared session manager for agentic onboarding callback handling.
41
41
  */
42
42
  agenticSessionManager?: AgenticSetupSessionManager;
43
+ /**
44
+ * Optional additional providers to register on the wallet kit instance (e.g. custom swap or staking providers).
45
+ */
46
+ providers?: Array<ProviderInput<BaseProvider>>;
43
47
  }
44
48
  export declare function createTonWalletMCP(config: TonMcpFactoryConfig): Promise<McpServer>;
45
49
  export declare function createShutdownHandler(walletService: McpWalletService): () => Promise<void>;
@@ -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;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,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;AAElE,OAAO,EACH,0BAA0B,EAE7B,MAAM,0CAA0C,CAAC;AAoBlD,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IAE5C;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AA0B,CAAC;IAEnD;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC;CAClD;AAcD,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,CAqQxF;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,gBAAgB,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAE1F"}
package/dist/index.cjs CHANGED
@@ -92313,6 +92313,24 @@ var TonWalletKit = class {
92313
92313
  this.isInitialized = false;
92314
92314
  }
92315
92315
  /**
92316
+ * Add a provider
92317
+ */
92318
+ registerProvider(input) {
92319
+ const provider = typeof input === "function" ? input(this.createFactoryContext()) : input;
92320
+ switch (provider.type) {
92321
+ case "swap":
92322
+ this.swapManager.registerProvider(provider);
92323
+ break;
92324
+ case "staking":
92325
+ this.stakingManager.registerProvider(provider);
92326
+ break;
92327
+ case "streaming":
92328
+ this.streamingManager.registerProvider(provider);
92329
+ break;
92330
+ default: throw new Error("Unknown provider type");
92331
+ }
92332
+ }
92333
+ /**
92316
92334
  * Jettons API access
92317
92335
  */
92318
92336
  get jettons() {
@@ -134827,6 +134845,7 @@ var McpWalletService = class McpWalletService {
134827
134845
  await this.kit.waitForReady();
134828
134846
  const omnistonProvider = new OmnistonSwapProvider({ defaultSlippageBps: 100 });
134829
134847
  this.kit.swap.registerProvider(omnistonProvider);
134848
+ if (this.config.providers) for (const providerInput of this.config.providers) this.kit.registerProvider(providerInput);
134830
134849
  }
134831
134850
  return this.kit;
134832
134851
  }
@@ -136166,13 +136185,13 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
136166
136185
  return nftIndex;
136167
136186
  }
136168
136187
  async createSignedTransferBody(input, options, authType) {
136169
- const actions = packActionsList(input.messages.map((message) => this.createTransferAction(message)));
136188
+ const outActions = extractOutActions(packActionsList(input.messages.map((message) => this.createTransferAction(message))));
136170
136189
  let seqno = 0;
136171
136190
  try {
136172
136191
  seqno = await CallForSuccess(async () => this.getSeqno(), 5, 1e3);
136173
136192
  } catch (_) {}
136174
136193
  const walletNftIndex = await this.getWalletNftIndex();
136175
- return this.createSignedBody(seqno, walletNftIndex, actions, {
136194
+ return this.createSignedBody(seqno, walletNftIndex, outActions, {
136176
136195
  ...options,
136177
136196
  authType,
136178
136197
  validUntil: this.resolveValidUntil(input.validUntil)
@@ -136265,6 +136284,9 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
136265
136284
  ];
136266
136285
  }
136267
136286
  };
136287
+ function extractOutActions(actionsList) {
136288
+ return actionsList.beginParse().loadMaybeRef();
136289
+ }
136268
136290
  //#endregion
136269
136291
  //#region src/runtime/wallet-runtime.ts
136270
136292
  /**
@@ -136312,7 +136334,7 @@ async function createStandardAdapter(input) {
136312
136334
  network
136313
136335
  });
136314
136336
  }
136315
- async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey) {
136337
+ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey, providers) {
136316
136338
  const signer = await createSignerFromSecrets({
136317
136339
  mnemonic: wallet.mnemonic,
136318
136340
  privateKey: wallet.private_key
@@ -136330,7 +136352,8 @@ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey
136330
136352
  const service = await McpWalletService.create({
136331
136353
  wallet: adapter,
136332
136354
  contacts,
136333
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
136355
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
136356
+ providers
136334
136357
  });
136335
136358
  return {
136336
136359
  service,
@@ -136353,7 +136376,7 @@ function parseStoredWalletNftIndex(value) {
136353
136376
  return;
136354
136377
  }
136355
136378
  }
136356
- async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning) {
136379
+ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning, providers) {
136357
136380
  if (requiresSigning && !wallet.operator_private_key) throw new Error(`Agentic wallet "${wallet.name}" is missing operator_private_key.`);
136358
136381
  const signer = wallet.operator_private_key ? await createSignerFromSecrets({ privateKey: wallet.operator_private_key }) : await createPlaceholderSigner();
136359
136382
  const kit = createKit(wallet.network, toncenterApiKey);
@@ -136376,7 +136399,8 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
136376
136399
  const service = await McpWalletService.create({
136377
136400
  wallet: adapter,
136378
136401
  contacts,
136379
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
136402
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
136403
+ providers
136380
136404
  });
136381
136405
  return {
136382
136406
  service,
@@ -136390,7 +136414,7 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
136390
136414
  }
136391
136415
  }
136392
136416
  async function createMcpWalletServiceFromStoredWallet(input) {
136393
- return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning);
136417
+ return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey, input.providers) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning, input.providers);
136394
136418
  }
136395
136419
  //#endregion
136396
136420
  //#region src/utils/agentic.ts
@@ -136626,9 +136650,11 @@ function defaultWalletName(prefix, address) {
136626
136650
  return `${prefix} ${address.slice(0, 6)}...${address.slice(-4)}`;
136627
136651
  }
136628
136652
  var WalletRegistryService = class {
136653
+ config;
136629
136654
  contacts;
136630
136655
  networkOverrides;
136631
- constructor(contacts, networkOverrides) {
136656
+ constructor(config, contacts, networkOverrides) {
136657
+ this.config = config;
136632
136658
  this.contacts = contacts;
136633
136659
  this.networkOverrides = networkOverrides;
136634
136660
  }
@@ -136701,7 +136727,8 @@ var WalletRegistryService = class {
136701
136727
  wallet,
136702
136728
  contacts: this.contacts,
136703
136729
  toncenterApiKey,
136704
- requiresSigning: options?.requiresSigning
136730
+ requiresSigning: options?.requiresSigning,
136731
+ providers: this.config.providers
136705
136732
  }),
136706
136733
  wallet
136707
136734
  };
@@ -138798,7 +138825,7 @@ async function createTonWalletMCP(config) {
138798
138825
  name: SERVER_NAME,
138799
138826
  version: SERVER_VERSION
138800
138827
  });
138801
- const registry = new WalletRegistryService(config.contacts, config.networks);
138828
+ const registry = new WalletRegistryService(config, config.contacts, config.networks);
138802
138829
  const knownJettonsTools = createMcpKnownJettonsTools();
138803
138830
  const registerTool = (name, tool) => {
138804
138831
  server.registerTool(name, {
@@ -138811,7 +138838,8 @@ async function createTonWalletMCP(config) {
138811
138838
  const walletService = await McpWalletService.create({
138812
138839
  wallet: config.wallet,
138813
138840
  contacts: config.contacts,
138814
- networks: config.networks
138841
+ networks: config.networks,
138842
+ providers: config.providers
138815
138843
  });
138816
138844
  const balanceTools = createMcpBalanceTools(walletService);
138817
138845
  const transferTools = createMcpTransferTools(walletService);
package/dist/index.js CHANGED
@@ -92309,6 +92309,24 @@ var TonWalletKit = class {
92309
92309
  this.isInitialized = false;
92310
92310
  }
92311
92311
  /**
92312
+ * Add a provider
92313
+ */
92314
+ registerProvider(input) {
92315
+ const provider = typeof input === "function" ? input(this.createFactoryContext()) : input;
92316
+ switch (provider.type) {
92317
+ case "swap":
92318
+ this.swapManager.registerProvider(provider);
92319
+ break;
92320
+ case "staking":
92321
+ this.stakingManager.registerProvider(provider);
92322
+ break;
92323
+ case "streaming":
92324
+ this.streamingManager.registerProvider(provider);
92325
+ break;
92326
+ default: throw new Error("Unknown provider type");
92327
+ }
92328
+ }
92329
+ /**
92312
92330
  * Jettons API access
92313
92331
  */
92314
92332
  get jettons() {
@@ -134823,6 +134841,7 @@ var McpWalletService = class McpWalletService {
134823
134841
  await this.kit.waitForReady();
134824
134842
  const omnistonProvider = new OmnistonSwapProvider({ defaultSlippageBps: 100 });
134825
134843
  this.kit.swap.registerProvider(omnistonProvider);
134844
+ if (this.config.providers) for (const providerInput of this.config.providers) this.kit.registerProvider(providerInput);
134826
134845
  }
134827
134846
  return this.kit;
134828
134847
  }
@@ -136162,13 +136181,13 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
136162
136181
  return nftIndex;
136163
136182
  }
136164
136183
  async createSignedTransferBody(input, options, authType) {
136165
- const actions = packActionsList(input.messages.map((message) => this.createTransferAction(message)));
136184
+ const outActions = extractOutActions(packActionsList(input.messages.map((message) => this.createTransferAction(message))));
136166
136185
  let seqno = 0;
136167
136186
  try {
136168
136187
  seqno = await CallForSuccess(async () => this.getSeqno(), 5, 1e3);
136169
136188
  } catch (_) {}
136170
136189
  const walletNftIndex = await this.getWalletNftIndex();
136171
- return this.createSignedBody(seqno, walletNftIndex, actions, {
136190
+ return this.createSignedBody(seqno, walletNftIndex, outActions, {
136172
136191
  ...options,
136173
136192
  authType,
136174
136193
  validUntil: this.resolveValidUntil(input.validUntil)
@@ -136261,6 +136280,9 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
136261
136280
  ];
136262
136281
  }
136263
136282
  };
136283
+ function extractOutActions(actionsList) {
136284
+ return actionsList.beginParse().loadMaybeRef();
136285
+ }
136264
136286
  //#endregion
136265
136287
  //#region src/runtime/wallet-runtime.ts
136266
136288
  /**
@@ -136308,7 +136330,7 @@ async function createStandardAdapter(input) {
136308
136330
  network
136309
136331
  });
136310
136332
  }
136311
- async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey) {
136333
+ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey, providers) {
136312
136334
  const signer = await createSignerFromSecrets({
136313
136335
  mnemonic: wallet.mnemonic,
136314
136336
  privateKey: wallet.private_key
@@ -136326,7 +136348,8 @@ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey
136326
136348
  const service = await McpWalletService.create({
136327
136349
  wallet: adapter,
136328
136350
  contacts,
136329
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
136351
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
136352
+ providers
136330
136353
  });
136331
136354
  return {
136332
136355
  service,
@@ -136349,7 +136372,7 @@ function parseStoredWalletNftIndex(value) {
136349
136372
  return;
136350
136373
  }
136351
136374
  }
136352
- async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning) {
136375
+ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning, providers) {
136353
136376
  if (requiresSigning && !wallet.operator_private_key) throw new Error(`Agentic wallet "${wallet.name}" is missing operator_private_key.`);
136354
136377
  const signer = wallet.operator_private_key ? await createSignerFromSecrets({ privateKey: wallet.operator_private_key }) : await createPlaceholderSigner();
136355
136378
  const kit = createKit(wallet.network, toncenterApiKey);
@@ -136372,7 +136395,8 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
136372
136395
  const service = await McpWalletService.create({
136373
136396
  wallet: adapter,
136374
136397
  contacts,
136375
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
136398
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
136399
+ providers
136376
136400
  });
136377
136401
  return {
136378
136402
  service,
@@ -136386,7 +136410,7 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
136386
136410
  }
136387
136411
  }
136388
136412
  async function createMcpWalletServiceFromStoredWallet(input) {
136389
- return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning);
136413
+ return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey, input.providers) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning, input.providers);
136390
136414
  }
136391
136415
  //#endregion
136392
136416
  //#region src/utils/agentic.ts
@@ -136622,9 +136646,11 @@ function defaultWalletName(prefix, address) {
136622
136646
  return `${prefix} ${address.slice(0, 6)}...${address.slice(-4)}`;
136623
136647
  }
136624
136648
  var WalletRegistryService = class {
136649
+ config;
136625
136650
  contacts;
136626
136651
  networkOverrides;
136627
- constructor(contacts, networkOverrides) {
136652
+ constructor(config, contacts, networkOverrides) {
136653
+ this.config = config;
136628
136654
  this.contacts = contacts;
136629
136655
  this.networkOverrides = networkOverrides;
136630
136656
  }
@@ -136697,7 +136723,8 @@ var WalletRegistryService = class {
136697
136723
  wallet,
136698
136724
  contacts: this.contacts,
136699
136725
  toncenterApiKey,
136700
- requiresSigning: options?.requiresSigning
136726
+ requiresSigning: options?.requiresSigning,
136727
+ providers: this.config.providers
136701
136728
  }),
136702
136729
  wallet
136703
136730
  };
@@ -138794,7 +138821,7 @@ async function createTonWalletMCP(config) {
138794
138821
  name: SERVER_NAME,
138795
138822
  version: SERVER_VERSION
138796
138823
  });
138797
- const registry = new WalletRegistryService(config.contacts, config.networks);
138824
+ const registry = new WalletRegistryService(config, config.contacts, config.networks);
138798
138825
  const knownJettonsTools = createMcpKnownJettonsTools();
138799
138826
  const registerTool = (name, tool) => {
138800
138827
  server.registerTool(name, {
@@ -138807,7 +138834,8 @@ async function createTonWalletMCP(config) {
138807
138834
  const walletService = await McpWalletService.create({
138808
138835
  wallet: config.wallet,
138809
138836
  contacts: config.contacts,
138810
- networks: config.networks
138837
+ networks: config.networks,
138838
+ providers: config.providers
138811
138839
  });
138812
138840
  const balanceTools = createMcpBalanceTools(walletService);
138813
138841
  const transferTools = createMcpTransferTools(walletService);
@@ -5,10 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import type { TonWalletKit as TonWalletKitType, WalletAdapter, WalletSigner } from '@ton/walletkit';
8
+ import type { ProviderInput, TonWalletKit as TonWalletKitType, WalletAdapter, WalletSigner } from '@ton/walletkit';
9
9
  import type { IContactResolver } from '../types/contacts.js';
10
10
  import { McpWalletService } from '../services/McpWalletService.js';
11
11
  import type { StandardWalletVersion, StoredWallet, TonNetwork } from '../registry/config.js';
12
+ import type { BaseProvider } from '../../../walletkit/dist/cjs/index.js';
12
13
  export interface WalletServiceContext {
13
14
  service: McpWalletService;
14
15
  close: () => Promise<void>;
@@ -24,6 +25,7 @@ export declare function createMcpWalletServiceFromStoredWallet(input: {
24
25
  contacts?: IContactResolver;
25
26
  toncenterApiKey?: string;
26
27
  requiresSigning?: boolean;
28
+ providers?: Array<ProviderInput<BaseProvider>>;
27
29
  }): Promise<WalletServiceContext>;
28
30
  export declare function deriveStandardWalletAddress(input: {
29
31
  mnemonic?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"wallet-runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/wallet-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAU,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EACR,qBAAqB,EAGrB,YAAY,EACZ,UAAU,EACb,MAAM,uBAAuB,CAAC;AAI/B,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAiDD,wBAAsB,qBAAqB,CAAC,KAAK,EAAE;IAC/C,OAAO,EAAE,UAAU,CAAC;IACpB,aAAa,EAAE,qBAAqB,CAAC;IACrC,MAAM,EAAE,YAAY,CAAC;IACrB,GAAG,EAAE,gBAAgB,CAAC;CACzB,GAAG,OAAO,CAAC,aAAa,CAAC,CAWzB;AA0GD,wBAAsB,sCAAsC,CAAC,KAAK,EAAE;IAChE,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE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E;IAChE,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC;CAClD,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAUhC;AAED,wBAAsB,2BAA2B,CAAC,KAAK,EAAE;IACrD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,aAAa,EAAE,qBAAqB,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBlB"}
@@ -80178,6 +80178,24 @@ var TonWalletKit = class {
80178
80178
  this.isInitialized = false;
80179
80179
  }
80180
80180
  /**
80181
+ * Add a provider
80182
+ */
80183
+ registerProvider(input) {
80184
+ const provider = typeof input === "function" ? input(this.createFactoryContext()) : input;
80185
+ switch (provider.type) {
80186
+ case "swap":
80187
+ this.swapManager.registerProvider(provider);
80188
+ break;
80189
+ case "staking":
80190
+ this.stakingManager.registerProvider(provider);
80191
+ break;
80192
+ case "streaming":
80193
+ this.streamingManager.registerProvider(provider);
80194
+ break;
80195
+ default: throw new Error("Unknown provider type");
80196
+ }
80197
+ }
80198
+ /**
80181
80199
  * Jettons API access
80182
80200
  */
80183
80201
  get jettons() {
@@ -136013,6 +136031,7 @@ var McpWalletService = class McpWalletService {
136013
136031
  await this.kit.waitForReady();
136014
136032
  const omnistonProvider = new OmnistonSwapProvider({ defaultSlippageBps: 100 });
136015
136033
  this.kit.swap.registerProvider(omnistonProvider);
136034
+ if (this.config.providers) for (const providerInput of this.config.providers) this.kit.registerProvider(providerInput);
136016
136035
  }
136017
136036
  return this.kit;
136018
136037
  }
@@ -137352,13 +137371,13 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
137352
137371
  return nftIndex;
137353
137372
  }
137354
137373
  async createSignedTransferBody(input, options, authType) {
137355
- const actions = packActionsList(input.messages.map((message) => this.createTransferAction(message)));
137374
+ const outActions = extractOutActions(packActionsList(input.messages.map((message) => this.createTransferAction(message))));
137356
137375
  let seqno = 0;
137357
137376
  try {
137358
137377
  seqno = await CallForSuccess(async () => this.getSeqno(), 5, 1e3);
137359
137378
  } catch (_) {}
137360
137379
  const walletNftIndex = await this.getWalletNftIndex();
137361
- return this.createSignedBody(seqno, walletNftIndex, actions, {
137380
+ return this.createSignedBody(seqno, walletNftIndex, outActions, {
137362
137381
  ...options,
137363
137382
  authType,
137364
137383
  validUntil: this.resolveValidUntil(input.validUntil)
@@ -137451,6 +137470,9 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
137451
137470
  ];
137452
137471
  }
137453
137472
  };
137473
+ function extractOutActions(actionsList) {
137474
+ return actionsList.beginParse().loadMaybeRef();
137475
+ }
137454
137476
  //#endregion
137455
137477
  //#region src/runtime/wallet-runtime.ts
137456
137478
  /**
@@ -137498,7 +137520,7 @@ async function createStandardAdapter(input) {
137498
137520
  network
137499
137521
  });
137500
137522
  }
137501
- async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey) {
137523
+ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey, providers) {
137502
137524
  const signer = await createSignerFromSecrets({
137503
137525
  mnemonic: wallet.mnemonic,
137504
137526
  privateKey: wallet.private_key
@@ -137516,7 +137538,8 @@ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey
137516
137538
  const service = await McpWalletService.create({
137517
137539
  wallet: adapter,
137518
137540
  contacts,
137519
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
137541
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
137542
+ providers
137520
137543
  });
137521
137544
  return {
137522
137545
  service,
@@ -137539,7 +137562,7 @@ function parseStoredWalletNftIndex(value) {
137539
137562
  return;
137540
137563
  }
137541
137564
  }
137542
- async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning) {
137565
+ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning, providers) {
137543
137566
  if (requiresSigning && !wallet.operator_private_key) throw new Error(`Agentic wallet "${wallet.name}" is missing operator_private_key.`);
137544
137567
  const signer = wallet.operator_private_key ? await createSignerFromSecrets({ privateKey: wallet.operator_private_key }) : await createPlaceholderSigner();
137545
137568
  const kit = createKit(wallet.network, toncenterApiKey);
@@ -137562,7 +137585,8 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
137562
137585
  const service = await McpWalletService.create({
137563
137586
  wallet: adapter,
137564
137587
  contacts,
137565
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
137588
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
137589
+ providers
137566
137590
  });
137567
137591
  return {
137568
137592
  service,
@@ -137576,7 +137600,7 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
137576
137600
  }
137577
137601
  }
137578
137602
  async function createMcpWalletServiceFromStoredWallet(input) {
137579
- return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning);
137603
+ return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey, input.providers) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning, input.providers);
137580
137604
  }
137581
137605
  //#endregion
137582
137606
  //#region src/utils/agentic.ts
@@ -137812,9 +137836,11 @@ function defaultWalletName(prefix, address) {
137812
137836
  return `${prefix} ${address.slice(0, 6)}...${address.slice(-4)}`;
137813
137837
  }
137814
137838
  var WalletRegistryService = class {
137839
+ config;
137815
137840
  contacts;
137816
137841
  networkOverrides;
137817
- constructor(contacts, networkOverrides) {
137842
+ constructor(config, contacts, networkOverrides) {
137843
+ this.config = config;
137818
137844
  this.contacts = contacts;
137819
137845
  this.networkOverrides = networkOverrides;
137820
137846
  }
@@ -137887,7 +137913,8 @@ var WalletRegistryService = class {
137887
137913
  wallet,
137888
137914
  contacts: this.contacts,
137889
137915
  toncenterApiKey,
137890
- requiresSigning: options?.requiresSigning
137916
+ requiresSigning: options?.requiresSigning,
137917
+ providers: this.config.providers
137891
137918
  }),
137892
137919
  wallet
137893
137920
  };
@@ -139984,7 +140011,7 @@ async function createTonWalletMCP(config) {
139984
140011
  name: SERVER_NAME,
139985
140012
  version: SERVER_VERSION
139986
140013
  });
139987
- const registry = new WalletRegistryService(config.contacts, config.networks);
140014
+ const registry = new WalletRegistryService(config, config.contacts, config.networks);
139988
140015
  const knownJettonsTools = createMcpKnownJettonsTools();
139989
140016
  const registerTool = (name, tool) => {
139990
140017
  server.registerTool(name, {
@@ -139997,7 +140024,8 @@ async function createTonWalletMCP(config) {
139997
140024
  const walletService = await McpWalletService.create({
139998
140025
  wallet: config.wallet,
139999
140026
  contacts: config.contacts,
140000
- networks: config.networks
140027
+ networks: config.networks,
140028
+ providers: config.providers
140001
140029
  });
140002
140030
  const balanceTools = createMcpBalanceTools(walletService);
140003
140031
  const transferTools = createMcpTransferTools(walletService);
@@ -80174,6 +80174,24 @@ var TonWalletKit = class {
80174
80174
  this.isInitialized = false;
80175
80175
  }
80176
80176
  /**
80177
+ * Add a provider
80178
+ */
80179
+ registerProvider(input) {
80180
+ const provider = typeof input === "function" ? input(this.createFactoryContext()) : input;
80181
+ switch (provider.type) {
80182
+ case "swap":
80183
+ this.swapManager.registerProvider(provider);
80184
+ break;
80185
+ case "staking":
80186
+ this.stakingManager.registerProvider(provider);
80187
+ break;
80188
+ case "streaming":
80189
+ this.streamingManager.registerProvider(provider);
80190
+ break;
80191
+ default: throw new Error("Unknown provider type");
80192
+ }
80193
+ }
80194
+ /**
80177
80195
  * Jettons API access
80178
80196
  */
80179
80197
  get jettons() {
@@ -136009,6 +136027,7 @@ var McpWalletService = class McpWalletService {
136009
136027
  await this.kit.waitForReady();
136010
136028
  const omnistonProvider = new OmnistonSwapProvider({ defaultSlippageBps: 100 });
136011
136029
  this.kit.swap.registerProvider(omnistonProvider);
136030
+ if (this.config.providers) for (const providerInput of this.config.providers) this.kit.registerProvider(providerInput);
136012
136031
  }
136013
136032
  return this.kit;
136014
136033
  }
@@ -137348,13 +137367,13 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
137348
137367
  return nftIndex;
137349
137368
  }
137350
137369
  async createSignedTransferBody(input, options, authType) {
137351
- const actions = packActionsList(input.messages.map((message) => this.createTransferAction(message)));
137370
+ const outActions = extractOutActions(packActionsList(input.messages.map((message) => this.createTransferAction(message))));
137352
137371
  let seqno = 0;
137353
137372
  try {
137354
137373
  seqno = await CallForSuccess(async () => this.getSeqno(), 5, 1e3);
137355
137374
  } catch (_) {}
137356
137375
  const walletNftIndex = await this.getWalletNftIndex();
137357
- return this.createSignedBody(seqno, walletNftIndex, actions, {
137376
+ return this.createSignedBody(seqno, walletNftIndex, outActions, {
137358
137377
  ...options,
137359
137378
  authType,
137360
137379
  validUntil: this.resolveValidUntil(input.validUntil)
@@ -137447,6 +137466,9 @@ var AgenticWalletAdapter = class AgenticWalletAdapter {
137447
137466
  ];
137448
137467
  }
137449
137468
  };
137469
+ function extractOutActions(actionsList) {
137470
+ return actionsList.beginParse().loadMaybeRef();
137471
+ }
137450
137472
  //#endregion
137451
137473
  //#region src/runtime/wallet-runtime.ts
137452
137474
  /**
@@ -137494,7 +137516,7 @@ async function createStandardAdapter(input) {
137494
137516
  network
137495
137517
  });
137496
137518
  }
137497
- async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey) {
137519
+ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey, providers) {
137498
137520
  const signer = await createSignerFromSecrets({
137499
137521
  mnemonic: wallet.mnemonic,
137500
137522
  privateKey: wallet.private_key
@@ -137512,7 +137534,8 @@ async function createServiceFromStoredStandard(wallet, contacts, toncenterApiKey
137512
137534
  const service = await McpWalletService.create({
137513
137535
  wallet: adapter,
137514
137536
  contacts,
137515
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
137537
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
137538
+ providers
137516
137539
  });
137517
137540
  return {
137518
137541
  service,
@@ -137535,7 +137558,7 @@ function parseStoredWalletNftIndex(value) {
137535
137558
  return;
137536
137559
  }
137537
137560
  }
137538
- async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning) {
137561
+ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey, requiresSigning, providers) {
137539
137562
  if (requiresSigning && !wallet.operator_private_key) throw new Error(`Agentic wallet "${wallet.name}" is missing operator_private_key.`);
137540
137563
  const signer = wallet.operator_private_key ? await createSignerFromSecrets({ privateKey: wallet.operator_private_key }) : await createPlaceholderSigner();
137541
137564
  const kit = createKit(wallet.network, toncenterApiKey);
@@ -137558,7 +137581,8 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
137558
137581
  const service = await McpWalletService.create({
137559
137582
  wallet: adapter,
137560
137583
  contacts,
137561
- networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 }
137584
+ networks: { [wallet.network]: toncenterApiKey ? { apiKey: toncenterApiKey } : void 0 },
137585
+ providers
137562
137586
  });
137563
137587
  return {
137564
137588
  service,
@@ -137572,7 +137596,7 @@ async function createServiceFromStoredAgentic(wallet, contacts, toncenterApiKey,
137572
137596
  }
137573
137597
  }
137574
137598
  async function createMcpWalletServiceFromStoredWallet(input) {
137575
- return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning);
137599
+ return input.wallet.type === "standard" ? createServiceFromStoredStandard(input.wallet, input.contacts, input.toncenterApiKey, input.providers) : createServiceFromStoredAgentic(input.wallet, input.contacts, input.toncenterApiKey, input.requiresSigning, input.providers);
137576
137600
  }
137577
137601
  //#endregion
137578
137602
  //#region src/utils/agentic.ts
@@ -137808,9 +137832,11 @@ function defaultWalletName(prefix, address) {
137808
137832
  return `${prefix} ${address.slice(0, 6)}...${address.slice(-4)}`;
137809
137833
  }
137810
137834
  var WalletRegistryService = class {
137835
+ config;
137811
137836
  contacts;
137812
137837
  networkOverrides;
137813
- constructor(contacts, networkOverrides) {
137838
+ constructor(config, contacts, networkOverrides) {
137839
+ this.config = config;
137814
137840
  this.contacts = contacts;
137815
137841
  this.networkOverrides = networkOverrides;
137816
137842
  }
@@ -137883,7 +137909,8 @@ var WalletRegistryService = class {
137883
137909
  wallet,
137884
137910
  contacts: this.contacts,
137885
137911
  toncenterApiKey,
137886
- requiresSigning: options?.requiresSigning
137912
+ requiresSigning: options?.requiresSigning,
137913
+ providers: this.config.providers
137887
137914
  }),
137888
137915
  wallet
137889
137916
  };
@@ -139980,7 +140007,7 @@ async function createTonWalletMCP(config) {
139980
140007
  name: SERVER_NAME,
139981
140008
  version: SERVER_VERSION
139982
140009
  });
139983
- const registry = new WalletRegistryService(config.contacts, config.networks);
140010
+ const registry = new WalletRegistryService(config, config.contacts, config.networks);
139984
140011
  const knownJettonsTools = createMcpKnownJettonsTools();
139985
140012
  const registerTool = (name, tool) => {
139986
140013
  server.registerTool(name, {
@@ -139993,7 +140020,8 @@ async function createTonWalletMCP(config) {
139993
140020
  const walletService = await McpWalletService.create({
139994
140021
  wallet: config.wallet,
139995
140022
  contacts: config.contacts,
139996
- networks: config.networks
140023
+ networks: config.networks,
140024
+ providers: config.providers
139997
140025
  });
139998
140026
  const balanceTools = createMcpBalanceTools(walletService);
139999
140027
  const transferTools = createMcpTransferTools(walletService);
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import type { WalletAdapter, TransactionStatusResponse } from '@ton/walletkit';
8
+ import type { WalletAdapter, TransactionStatusResponse, BaseProvider, ProviderInput } from '@ton/walletkit';
9
9
  import type { IContactResolver } from '../types/contacts.js';
10
10
  import type { NetworkType } from '../types/config.js';
11
11
  /**
@@ -148,6 +148,7 @@ export interface McpWalletServiceConfig {
148
148
  mainnet?: NetworkConfig;
149
149
  testnet?: NetworkConfig;
150
150
  };
151
+ providers?: Array<ProviderInput<BaseProvider>>;
151
152
  }
152
153
  interface DeployAgenticSubwalletParams {
153
154
  operatorPublicKey: string;
@@ -1 +1 @@
1
- {"version":3,"file":"McpWalletService.d.ts","sourceRoot":"","sources":["../../src/services/McpWalletService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,OAAO,KAAK,EAIR,aAAa,EAEb,yBAAyB,EAE5B,MAAM,gBAAgB,CAAC;AAMxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAUtD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;IA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QD;;OAEG;IACG,OAAO,CAAC,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAyB/E;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,EAAE,MAAM,GAAE,MAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA4BzG;;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;IAuB/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;IAMxD;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAM7D;;;OAGG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAiChF;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAM/B"}
@@ -10,6 +10,7 @@ import type { NetworkConfig as RuntimeNetworkConfig } from './McpWalletService.j
10
10
  import type { ConfigNetwork, PendingAgenticDeployment, PendingAgenticKeyRotation, StoredAgenticWallet, StoredWallet, TonConfig, TonNetwork } from '../registry/config.js';
11
11
  import type { WalletServiceContext } from '../runtime/wallet-runtime.js';
12
12
  import type { AgenticImportCandidate } from '../utils/agentic.js';
13
+ import type { TonMcpFactoryConfig } from '../factory.js';
13
14
  export interface StartAgenticKeyRotationResult {
14
15
  wallet: StoredAgenticWallet;
15
16
  pendingRotation: PendingAgenticKeyRotation;
@@ -22,9 +23,10 @@ export interface CompleteAgenticKeyRotationResult {
22
23
  dashboardUrl: string;
23
24
  }
24
25
  export declare class WalletRegistryService {
26
+ private readonly config;
25
27
  private readonly contacts?;
26
28
  private readonly networkOverrides?;
27
- constructor(contacts?: IContactResolver | undefined, networkOverrides?: {
29
+ constructor(config: TonMcpFactoryConfig, contacts?: IContactResolver | undefined, networkOverrides?: {
28
30
  mainnet?: RuntimeNetworkConfig;
29
31
  testnet?: RuntimeNetworkConfig;
30
32
  } | undefined);
@@ -1 +1 @@
1
- {"version":3,"file":"WalletRegistryService.d.ts","sourceRoot":"","sources":["../../src/services/WalletRegistryService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AA4BnF,OAAO,KAAK,EACR,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,UAAU,EACb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AASzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAOlE,MAAM,WAAW,6BAA6B;IAC1C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,eAAe,EAAE,yBAAyB,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gCAAgC;IAC7C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,eAAe,EAAE,yBAAyB,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,qBAAa,qBAAqB;IAE1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;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GAAG,IAAI,CAAC;IAIjF,yBAAyB,CAAC,KAAK,EAAE;QACnC,OAAO,EAAE,UAAU,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;QAC3B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAO/B,yBAAyB,CAAC,KAAK,EAAE;QACnC,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,UAAU,CAAC;QACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC9B,GAAG,OAAO,CAAC,IAAI,CAAC;IAKX,2BAA2B,CAAC,KAAK,EAAE;QACrC,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,sBAAsB,CAAC;QACxC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA8DnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ton/mcp",
3
- "version": "0.1.15-alpha.17",
3
+ "version": "0.1.15-alpha.19",
4
4
  "description": "TON MCP Server - Model Context Protocol server for TON blockchain wallet operations",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  "author": "TON Tech",
51
51
  "repository": {
52
52
  "type": "git",
53
- "url": "https://github.com/ton-connect/kit"
53
+ "url": "https://github.com/ton-org/kit"
54
54
  },
55
55
  "dependencies": {
56
56
  "@modelcontextprotocol/sdk": "^1.29.0",
@@ -61,7 +61,7 @@
61
61
  "undici": "8.0.2",
62
62
  "ws": "^8.20.0",
63
63
  "zod": "^3.25.76",
64
- "@ton/walletkit": "1.0.0-alpha.2"
64
+ "@ton/walletkit": "1.0.0-alpha.3"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@modelcontextprotocol/sdk": "^1.25.1"