@tongateway/mcp 0.5.0 → 0.6.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.
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -140,9 +140,9 @@ server.tool('get_auth_token', 'Check if the user has completed wallet authentica
|
|
|
140
140
|
server.tool('request_transfer', 'Request a TON transfer from the wallet owner. The request will be queued and the owner must approve it via TON Connect.', {
|
|
141
141
|
to: z.string().describe('Destination TON address'),
|
|
142
142
|
amountNano: z.string().describe('Amount in nanoTON (1 TON = 1000000000)'),
|
|
143
|
-
|
|
143
|
+
payload: z.string().optional().describe('Optional BOC-encoded payload for the transaction'),
|
|
144
144
|
stateInit: z.string().optional().describe('Optional stateInit BOC for deploying new contracts'),
|
|
145
|
-
}, async ({ to, amountNano,
|
|
145
|
+
}, async ({ to, amountNano, payload, stateInit }) => {
|
|
146
146
|
if (!TOKEN) {
|
|
147
147
|
return {
|
|
148
148
|
content: [{ type: 'text', text: 'No token configured. Use request_auth first to authenticate.' }],
|
|
@@ -151,8 +151,8 @@ server.tool('request_transfer', 'Request a TON transfer from the wallet owner. T
|
|
|
151
151
|
}
|
|
152
152
|
try {
|
|
153
153
|
const body = { to, amountNano };
|
|
154
|
-
if (
|
|
155
|
-
body.
|
|
154
|
+
if (payload)
|
|
155
|
+
body.payload = payload;
|
|
156
156
|
if (stateInit)
|
|
157
157
|
body.stateInit = stateInit;
|
|
158
158
|
const result = await apiCall('/v1/safe/tx/transfer', {
|