@elisym/mcp 0.8.17 → 0.8.18

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/index.js CHANGED
@@ -1832,6 +1832,12 @@ ${wrapped}`);
1832
1832
  `Provider "${input.provider_npub}" has no Solana payment address for capability "${input.capability}". Cannot verify payment recipient - refusing to proceed. Ask the provider to publish a capability card with a payment address.`
1833
1833
  );
1834
1834
  }
1835
+ const buyerWallet = agent.solanaKeypair?.publicKey;
1836
+ if (buyerWallet && expectedRecipient && buyerWallet === expectedRecipient) {
1837
+ return errorResult(
1838
+ `Cannot buy from yourself - your agent's Solana wallet (${buyerWallet}) matches the provider's payment address. Use a different agent or provider.`
1839
+ );
1840
+ }
1835
1841
  const submittedAt = Date.now();
1836
1842
  const jobId = await agent.client.marketplace.submitJobRequest(agent.identity, {
1837
1843
  input: input.input,
@@ -1990,6 +1996,12 @@ To confirm, call buy_capability again with max_price_lamports set (e.g. ${price}
1990
1996
  `Provider "${input.provider_npub}" has no Solana payment address for capability "${input.capability}". Cannot verify payment recipient.`
1991
1997
  );
1992
1998
  }
1999
+ const buyerWallet = agent.solanaKeypair?.publicKey;
2000
+ if (buyerWallet && expectedRecipient && buyerWallet === expectedRecipient) {
2001
+ return errorResult(
2002
+ `Cannot buy from yourself - your agent's Solana wallet (${buyerWallet}) matches the provider's payment address. Use a different agent or provider.`
2003
+ );
2004
+ }
1993
2005
  const submittedAt = Date.now();
1994
2006
  const jobId = await agent.client.marketplace.submitJobRequest(agent.identity, {
1995
2007
  input: input.input || "",