@t2000/engine 0.5.0 → 0.5.1
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 +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { getSwapQuote } from '@t2000/sdk';
|
|
2
3
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
4
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
4
5
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
@@ -1260,8 +1261,9 @@ var swapQuoteTool = buildTool({
|
|
|
1260
1261
|
},
|
|
1261
1262
|
isReadOnly: true,
|
|
1262
1263
|
async call(input, context) {
|
|
1263
|
-
const
|
|
1264
|
-
const result = await
|
|
1264
|
+
const walletAddress = context.agent ? context.agent.address() : getWalletAddress(context);
|
|
1265
|
+
const result = await getSwapQuote({
|
|
1266
|
+
walletAddress,
|
|
1265
1267
|
from: input.from,
|
|
1266
1268
|
to: input.to,
|
|
1267
1269
|
amount: input.amount,
|