@goplausible/algorand-mcp 3.5.5 → 3.7.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/tools/transactionManager/accountTransactions.d.ts +20 -0
- package/dist/tools/transactionManager/accountTransactions.js +22 -2
- package/dist/tools/transactionManager/appTransactions/index.js +11 -1
- package/dist/tools/transactionManager/appTransactions/types.d.ts +70 -0
- package/dist/tools/transactionManager/appTransactions/types.js +21 -7
- package/dist/tools/transactionManager/assetTransactions.d.ts +50 -0
- package/dist/tools/transactionManager/assetTransactions.js +32 -10
- package/dist/tools/utilityManager.js +1 -1
- package/package.json +1 -1
|
@@ -31,6 +31,16 @@ export declare const accountTransactionSchemas: {
|
|
|
31
31
|
optional: boolean;
|
|
32
32
|
description: string;
|
|
33
33
|
};
|
|
34
|
+
fee: {
|
|
35
|
+
type: string;
|
|
36
|
+
optional: boolean;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
flatFee: {
|
|
40
|
+
type: string;
|
|
41
|
+
optional: boolean;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
34
44
|
};
|
|
35
45
|
required: string[];
|
|
36
46
|
};
|
|
@@ -80,6 +90,16 @@ export declare const accountTransactionSchemas: {
|
|
|
80
90
|
optional: boolean;
|
|
81
91
|
description: string;
|
|
82
92
|
};
|
|
93
|
+
fee: {
|
|
94
|
+
type: string;
|
|
95
|
+
optional: boolean;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
flatFee: {
|
|
99
|
+
type: string;
|
|
100
|
+
optional: boolean;
|
|
101
|
+
description: string;
|
|
102
|
+
};
|
|
83
103
|
};
|
|
84
104
|
required: string[];
|
|
85
105
|
};
|
|
@@ -34,6 +34,16 @@ export const accountTransactionSchemas = {
|
|
|
34
34
|
type: 'string',
|
|
35
35
|
optional: true,
|
|
36
36
|
description: 'Optional rekey to address in standard Algorand format'
|
|
37
|
+
},
|
|
38
|
+
fee: {
|
|
39
|
+
type: 'integer',
|
|
40
|
+
optional: true,
|
|
41
|
+
description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network'
|
|
42
|
+
},
|
|
43
|
+
flatFee: {
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
optional: true,
|
|
46
|
+
description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte'
|
|
37
47
|
}
|
|
38
48
|
},
|
|
39
49
|
required: ['from', 'to', 'amount']
|
|
@@ -50,7 +60,9 @@ export const accountTransactionSchemas = {
|
|
|
50
60
|
voteKeyDilution: { type: 'integer', description: 'Dilution for the 2-level participation key' },
|
|
51
61
|
nonParticipation: { type: 'boolean', optional: true, description: 'Mark account as nonparticipating for rewards' },
|
|
52
62
|
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
53
|
-
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' }
|
|
63
|
+
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' },
|
|
64
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
65
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
54
66
|
},
|
|
55
67
|
required: ['from', 'voteKey', 'selectionKey', 'stateProofKey', 'voteFirst', 'voteLast', 'voteKeyDilution']
|
|
56
68
|
}
|
|
@@ -93,6 +105,13 @@ export class AccountTransactionManager {
|
|
|
93
105
|
const network = extractNetwork(args);
|
|
94
106
|
const algodClient = getAlgodClient(network);
|
|
95
107
|
const suggestedParams = await algodClient.getTransactionParams().do();
|
|
108
|
+
// Apply fee overrides if provided
|
|
109
|
+
if (typeof args.fee === 'number') {
|
|
110
|
+
suggestedParams.fee = BigInt(args.fee);
|
|
111
|
+
}
|
|
112
|
+
if (args.flatFee === true) {
|
|
113
|
+
suggestedParams.flatFee = true;
|
|
114
|
+
}
|
|
96
115
|
switch (name) {
|
|
97
116
|
case 'make_payment_txn':
|
|
98
117
|
if (!args.from || !args.to || typeof args.amount !== 'number') {
|
|
@@ -121,7 +140,8 @@ export class AccountTransactionManager {
|
|
|
121
140
|
genesisHash: suggestedParams.genesisHash instanceof Uint8Array
|
|
122
141
|
? algosdk.bytesToBase64(suggestedParams.genesisHash)
|
|
123
142
|
: suggestedParams.genesisHash,
|
|
124
|
-
type: 'pay'
|
|
143
|
+
type: 'pay',
|
|
144
|
+
flatFee: suggestedParams.flatFee || false
|
|
125
145
|
};
|
|
126
146
|
// Add note if provided
|
|
127
147
|
if (typeof args.note === 'string') {
|
|
@@ -34,15 +34,25 @@ export class AppTransactionManager {
|
|
|
34
34
|
const network = extractNetwork(args);
|
|
35
35
|
const algodClient = getAlgodClient(network);
|
|
36
36
|
const suggestedParams = await algodClient.getTransactionParams().do();
|
|
37
|
+
// Apply fee overrides if provided
|
|
38
|
+
if (typeof args.fee === 'number') {
|
|
39
|
+
suggestedParams.fee = BigInt(args.fee);
|
|
40
|
+
}
|
|
41
|
+
if (args.flatFee === true) {
|
|
42
|
+
suggestedParams.flatFee = true;
|
|
43
|
+
}
|
|
37
44
|
const handler = toolHandlers[name];
|
|
38
45
|
if (!handler) {
|
|
39
46
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown application transaction tool: ${name}`);
|
|
40
47
|
}
|
|
41
48
|
try {
|
|
49
|
+
const result = handler(args, suggestedParams);
|
|
50
|
+
// Include flatFee in response
|
|
51
|
+
result.flatFee = suggestedParams.flatFee || false;
|
|
42
52
|
return {
|
|
43
53
|
content: [{
|
|
44
54
|
type: 'text',
|
|
45
|
-
text: JSON.stringify(
|
|
55
|
+
text: JSON.stringify(result, null, 2),
|
|
46
56
|
}],
|
|
47
57
|
};
|
|
48
58
|
}
|
|
@@ -125,6 +125,16 @@ export declare const appTransactionSchemas: {
|
|
|
125
125
|
optional: boolean;
|
|
126
126
|
description: string;
|
|
127
127
|
};
|
|
128
|
+
fee: {
|
|
129
|
+
type: string;
|
|
130
|
+
optional: boolean;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
flatFee: {
|
|
134
|
+
type: string;
|
|
135
|
+
optional: boolean;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
128
138
|
};
|
|
129
139
|
required: string[];
|
|
130
140
|
};
|
|
@@ -199,6 +209,16 @@ export declare const appTransactionSchemas: {
|
|
|
199
209
|
optional: boolean;
|
|
200
210
|
description: string;
|
|
201
211
|
};
|
|
212
|
+
fee: {
|
|
213
|
+
type: string;
|
|
214
|
+
optional: boolean;
|
|
215
|
+
description: string;
|
|
216
|
+
};
|
|
217
|
+
flatFee: {
|
|
218
|
+
type: string;
|
|
219
|
+
optional: boolean;
|
|
220
|
+
description: string;
|
|
221
|
+
};
|
|
202
222
|
};
|
|
203
223
|
required: string[];
|
|
204
224
|
};
|
|
@@ -265,6 +285,16 @@ export declare const appTransactionSchemas: {
|
|
|
265
285
|
optional: boolean;
|
|
266
286
|
description: string;
|
|
267
287
|
};
|
|
288
|
+
fee: {
|
|
289
|
+
type: string;
|
|
290
|
+
optional: boolean;
|
|
291
|
+
description: string;
|
|
292
|
+
};
|
|
293
|
+
flatFee: {
|
|
294
|
+
type: string;
|
|
295
|
+
optional: boolean;
|
|
296
|
+
description: string;
|
|
297
|
+
};
|
|
268
298
|
};
|
|
269
299
|
required: string[];
|
|
270
300
|
};
|
|
@@ -331,6 +361,16 @@ export declare const appTransactionSchemas: {
|
|
|
331
361
|
optional: boolean;
|
|
332
362
|
description: string;
|
|
333
363
|
};
|
|
364
|
+
fee: {
|
|
365
|
+
type: string;
|
|
366
|
+
optional: boolean;
|
|
367
|
+
description: string;
|
|
368
|
+
};
|
|
369
|
+
flatFee: {
|
|
370
|
+
type: string;
|
|
371
|
+
optional: boolean;
|
|
372
|
+
description: string;
|
|
373
|
+
};
|
|
334
374
|
};
|
|
335
375
|
required: string[];
|
|
336
376
|
};
|
|
@@ -397,6 +437,16 @@ export declare const appTransactionSchemas: {
|
|
|
397
437
|
optional: boolean;
|
|
398
438
|
description: string;
|
|
399
439
|
};
|
|
440
|
+
fee: {
|
|
441
|
+
type: string;
|
|
442
|
+
optional: boolean;
|
|
443
|
+
description: string;
|
|
444
|
+
};
|
|
445
|
+
flatFee: {
|
|
446
|
+
type: string;
|
|
447
|
+
optional: boolean;
|
|
448
|
+
description: string;
|
|
449
|
+
};
|
|
400
450
|
};
|
|
401
451
|
required: string[];
|
|
402
452
|
};
|
|
@@ -463,6 +513,16 @@ export declare const appTransactionSchemas: {
|
|
|
463
513
|
optional: boolean;
|
|
464
514
|
description: string;
|
|
465
515
|
};
|
|
516
|
+
fee: {
|
|
517
|
+
type: string;
|
|
518
|
+
optional: boolean;
|
|
519
|
+
description: string;
|
|
520
|
+
};
|
|
521
|
+
flatFee: {
|
|
522
|
+
type: string;
|
|
523
|
+
optional: boolean;
|
|
524
|
+
description: string;
|
|
525
|
+
};
|
|
466
526
|
};
|
|
467
527
|
required: string[];
|
|
468
528
|
};
|
|
@@ -514,6 +574,16 @@ export declare const appTransactionSchemas: {
|
|
|
514
574
|
optional: boolean;
|
|
515
575
|
description: string;
|
|
516
576
|
};
|
|
577
|
+
fee: {
|
|
578
|
+
type: string;
|
|
579
|
+
optional: boolean;
|
|
580
|
+
description: string;
|
|
581
|
+
};
|
|
582
|
+
flatFee: {
|
|
583
|
+
type: string;
|
|
584
|
+
optional: boolean;
|
|
585
|
+
description: string;
|
|
586
|
+
};
|
|
517
587
|
};
|
|
518
588
|
required: string[];
|
|
519
589
|
};
|
|
@@ -38,7 +38,9 @@ export const appTransactionSchemas = {
|
|
|
38
38
|
items: { type: 'integer' },
|
|
39
39
|
optional: true,
|
|
40
40
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
43
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
42
44
|
},
|
|
43
45
|
required: ['from', 'approvalProgram', 'clearProgram', 'numGlobalByteSlices', 'numGlobalInts', 'numLocalByteSlices', 'numLocalInts']
|
|
44
46
|
},
|
|
@@ -76,7 +78,9 @@ export const appTransactionSchemas = {
|
|
|
76
78
|
optional: true,
|
|
77
79
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
78
80
|
},
|
|
79
|
-
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' }
|
|
81
|
+
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' },
|
|
82
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
83
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
80
84
|
},
|
|
81
85
|
required: ['from', 'appIndex', 'approvalProgram', 'clearProgram']
|
|
82
86
|
},
|
|
@@ -112,7 +116,9 @@ export const appTransactionSchemas = {
|
|
|
112
116
|
optional: true,
|
|
113
117
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
114
118
|
},
|
|
115
|
-
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' }
|
|
119
|
+
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' },
|
|
120
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
121
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
116
122
|
},
|
|
117
123
|
required: ['from', 'appIndex']
|
|
118
124
|
},
|
|
@@ -148,7 +154,9 @@ export const appTransactionSchemas = {
|
|
|
148
154
|
optional: true,
|
|
149
155
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
150
156
|
},
|
|
151
|
-
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' }
|
|
157
|
+
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' },
|
|
158
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
159
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
152
160
|
},
|
|
153
161
|
required: ['from', 'appIndex']
|
|
154
162
|
},
|
|
@@ -184,7 +192,9 @@ export const appTransactionSchemas = {
|
|
|
184
192
|
optional: true,
|
|
185
193
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
186
194
|
},
|
|
187
|
-
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' }
|
|
195
|
+
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' },
|
|
196
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
197
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
188
198
|
},
|
|
189
199
|
required: ['from', 'appIndex']
|
|
190
200
|
},
|
|
@@ -220,7 +230,9 @@ export const appTransactionSchemas = {
|
|
|
220
230
|
optional: true,
|
|
221
231
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
222
232
|
},
|
|
223
|
-
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' }
|
|
233
|
+
onComplete: { type: 'integer', optional: true, description: 'Application call completion behavior (0=NoOp, 1=OptIn, 2=CloseOut, 3=ClearState, 4=UpdateApplication, 5=DeleteApplication)' },
|
|
234
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
235
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
224
236
|
},
|
|
225
237
|
required: ['from', 'appIndex']
|
|
226
238
|
},
|
|
@@ -253,7 +265,9 @@ export const appTransactionSchemas = {
|
|
|
253
265
|
optional: true,
|
|
254
266
|
description: 'IDs of assets that may be accessed (max 8 assets)'
|
|
255
267
|
},
|
|
256
|
-
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' }
|
|
268
|
+
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
269
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
270
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
257
271
|
},
|
|
258
272
|
required: ['from', 'appIndex']
|
|
259
273
|
}
|
|
@@ -69,6 +69,16 @@ export declare const assetTransactionSchemas: {
|
|
|
69
69
|
optional: boolean;
|
|
70
70
|
description: string;
|
|
71
71
|
};
|
|
72
|
+
fee: {
|
|
73
|
+
type: string;
|
|
74
|
+
optional: boolean;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
flatFee: {
|
|
78
|
+
type: string;
|
|
79
|
+
optional: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
72
82
|
};
|
|
73
83
|
required: string[];
|
|
74
84
|
};
|
|
@@ -117,6 +127,16 @@ export declare const assetTransactionSchemas: {
|
|
|
117
127
|
optional: boolean;
|
|
118
128
|
description: string;
|
|
119
129
|
};
|
|
130
|
+
fee: {
|
|
131
|
+
type: string;
|
|
132
|
+
optional: boolean;
|
|
133
|
+
description: string;
|
|
134
|
+
};
|
|
135
|
+
flatFee: {
|
|
136
|
+
type: string;
|
|
137
|
+
optional: boolean;
|
|
138
|
+
description: string;
|
|
139
|
+
};
|
|
120
140
|
};
|
|
121
141
|
required: string[];
|
|
122
142
|
};
|
|
@@ -141,6 +161,16 @@ export declare const assetTransactionSchemas: {
|
|
|
141
161
|
optional: boolean;
|
|
142
162
|
description: string;
|
|
143
163
|
};
|
|
164
|
+
fee: {
|
|
165
|
+
type: string;
|
|
166
|
+
optional: boolean;
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
flatFee: {
|
|
170
|
+
type: string;
|
|
171
|
+
optional: boolean;
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
144
174
|
};
|
|
145
175
|
required: string[];
|
|
146
176
|
};
|
|
@@ -173,6 +203,16 @@ export declare const assetTransactionSchemas: {
|
|
|
173
203
|
optional: boolean;
|
|
174
204
|
description: string;
|
|
175
205
|
};
|
|
206
|
+
fee: {
|
|
207
|
+
type: string;
|
|
208
|
+
optional: boolean;
|
|
209
|
+
description: string;
|
|
210
|
+
};
|
|
211
|
+
flatFee: {
|
|
212
|
+
type: string;
|
|
213
|
+
optional: boolean;
|
|
214
|
+
description: string;
|
|
215
|
+
};
|
|
176
216
|
};
|
|
177
217
|
required: string[];
|
|
178
218
|
};
|
|
@@ -210,6 +250,16 @@ export declare const assetTransactionSchemas: {
|
|
|
210
250
|
optional: boolean;
|
|
211
251
|
description: string;
|
|
212
252
|
};
|
|
253
|
+
fee: {
|
|
254
|
+
type: string;
|
|
255
|
+
optional: boolean;
|
|
256
|
+
description: string;
|
|
257
|
+
};
|
|
258
|
+
flatFee: {
|
|
259
|
+
type: string;
|
|
260
|
+
optional: boolean;
|
|
261
|
+
description: string;
|
|
262
|
+
};
|
|
213
263
|
};
|
|
214
264
|
required: string[];
|
|
215
265
|
};
|
|
@@ -20,7 +20,9 @@ export const assetTransactionSchemas = {
|
|
|
20
20
|
freeze: { type: 'string', optional: true, description: 'Address that can freeze/unfreeze holder accounts' },
|
|
21
21
|
clawback: { type: 'string', optional: true, description: 'Address that can revoke the asset from holders' },
|
|
22
22
|
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
23
|
-
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' }
|
|
23
|
+
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' },
|
|
24
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
25
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
24
26
|
},
|
|
25
27
|
required: ['from', 'total', 'decimals', 'defaultFrozen']
|
|
26
28
|
},
|
|
@@ -35,7 +37,9 @@ export const assetTransactionSchemas = {
|
|
|
35
37
|
clawback: { type: 'string', optional: true, description: 'New address that can revoke the asset from holders' },
|
|
36
38
|
strictEmptyAddressChecking: { type: 'boolean', description: 'Whether to error if any provided address is empty' },
|
|
37
39
|
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
38
|
-
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' }
|
|
40
|
+
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' },
|
|
41
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
42
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
39
43
|
},
|
|
40
44
|
required: ['from', 'assetIndex', 'strictEmptyAddressChecking']
|
|
41
45
|
},
|
|
@@ -45,7 +49,9 @@ export const assetTransactionSchemas = {
|
|
|
45
49
|
from: { type: 'string', description: 'Sender address in standard Algorand format (58 characters)' },
|
|
46
50
|
assetIndex: { type: 'integer', description: 'Index of the asset to destroy' },
|
|
47
51
|
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
48
|
-
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' }
|
|
52
|
+
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' },
|
|
53
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
54
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
49
55
|
},
|
|
50
56
|
required: ['from', 'assetIndex']
|
|
51
57
|
},
|
|
@@ -57,7 +63,9 @@ export const assetTransactionSchemas = {
|
|
|
57
63
|
freezeTarget: { type: 'string', description: 'Address of the account whose asset is being frozen/unfrozen' },
|
|
58
64
|
freezeState: { type: 'boolean', description: 'True to freeze the asset, false to unfreeze' },
|
|
59
65
|
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
60
|
-
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' }
|
|
66
|
+
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' },
|
|
67
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
68
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
61
69
|
},
|
|
62
70
|
required: ['from', 'assetIndex', 'freezeTarget', 'freezeState']
|
|
63
71
|
},
|
|
@@ -70,7 +78,9 @@ export const assetTransactionSchemas = {
|
|
|
70
78
|
amount: { type: 'integer', description: 'Amount of asset base units to transfer' },
|
|
71
79
|
note: { type: 'string', optional: true, description: 'Transaction note field (up to 1000 bytes)' },
|
|
72
80
|
closeRemainderTo: { type: 'string', optional: true, description: 'Address to send remaining asset balance to (close asset holding)' },
|
|
73
|
-
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' }
|
|
81
|
+
rekeyTo: { type: 'string', optional: true, description: 'Address to rekey the sender account to' },
|
|
82
|
+
fee: { type: 'integer', optional: true, description: 'Transaction fee in microAlgos. If not set, uses suggested fee from the network' },
|
|
83
|
+
flatFee: { type: 'boolean', optional: true, description: 'If true, fee is used as-is (flat fee). If false (default), fee is per-byte' }
|
|
74
84
|
},
|
|
75
85
|
required: ['from', 'to', 'assetIndex', 'amount']
|
|
76
86
|
}
|
|
@@ -139,6 +149,13 @@ export class AssetTransactionManager {
|
|
|
139
149
|
const network = extractNetwork(args);
|
|
140
150
|
const algodClient = getAlgodClient(network);
|
|
141
151
|
const suggestedParams = await algodClient.getTransactionParams().do();
|
|
152
|
+
// Apply fee overrides if provided
|
|
153
|
+
if (typeof args.fee === 'number') {
|
|
154
|
+
suggestedParams.fee = BigInt(args.fee);
|
|
155
|
+
}
|
|
156
|
+
if (args.flatFee === true) {
|
|
157
|
+
suggestedParams.flatFee = true;
|
|
158
|
+
}
|
|
142
159
|
switch (name) {
|
|
143
160
|
case 'make_asset_create_txn':
|
|
144
161
|
if (!args.from || typeof args.total !== 'number' || typeof args.decimals !== 'number' ||
|
|
@@ -158,7 +175,8 @@ export class AssetTransactionManager {
|
|
|
158
175
|
genesisHash: suggestedParams.genesisHash instanceof Uint8Array
|
|
159
176
|
? algosdk.bytesToBase64(suggestedParams.genesisHash)
|
|
160
177
|
: suggestedParams.genesisHash,
|
|
161
|
-
type: 'acfg'
|
|
178
|
+
type: 'acfg',
|
|
179
|
+
flatFee: suggestedParams.flatFee || false
|
|
162
180
|
};
|
|
163
181
|
// Handle optional fields
|
|
164
182
|
if (typeof args.unitName === 'string') {
|
|
@@ -215,7 +233,8 @@ export class AssetTransactionManager {
|
|
|
215
233
|
? algosdk.bytesToBase64(suggestedParams.genesisHash)
|
|
216
234
|
: suggestedParams.genesisHash,
|
|
217
235
|
type: 'acfg',
|
|
218
|
-
strictEmptyAddressChecking: Boolean(args.strictEmptyAddressChecking)
|
|
236
|
+
strictEmptyAddressChecking: Boolean(args.strictEmptyAddressChecking),
|
|
237
|
+
flatFee: suggestedParams.flatFee || false
|
|
219
238
|
};
|
|
220
239
|
// Handle optional fields
|
|
221
240
|
if (typeof args.manager === 'string') {
|
|
@@ -258,7 +277,8 @@ export class AssetTransactionManager {
|
|
|
258
277
|
genesisHash: suggestedParams.genesisHash instanceof Uint8Array
|
|
259
278
|
? algosdk.bytesToBase64(suggestedParams.genesisHash)
|
|
260
279
|
: suggestedParams.genesisHash,
|
|
261
|
-
type: 'acfg'
|
|
280
|
+
type: 'acfg',
|
|
281
|
+
flatFee: suggestedParams.flatFee || false
|
|
262
282
|
};
|
|
263
283
|
// Handle optional fields
|
|
264
284
|
if (typeof args.note === 'string') {
|
|
@@ -292,7 +312,8 @@ export class AssetTransactionManager {
|
|
|
292
312
|
genesisHash: suggestedParams.genesisHash instanceof Uint8Array
|
|
293
313
|
? algosdk.bytesToBase64(suggestedParams.genesisHash)
|
|
294
314
|
: suggestedParams.genesisHash,
|
|
295
|
-
type: 'afrz'
|
|
315
|
+
type: 'afrz',
|
|
316
|
+
flatFee: suggestedParams.flatFee || false
|
|
296
317
|
};
|
|
297
318
|
// Handle optional fields
|
|
298
319
|
if (typeof args.note === 'string') {
|
|
@@ -325,7 +346,8 @@ export class AssetTransactionManager {
|
|
|
325
346
|
genesisHash: suggestedParams.genesisHash instanceof Uint8Array
|
|
326
347
|
? algosdk.bytesToBase64(suggestedParams.genesisHash)
|
|
327
348
|
: suggestedParams.genesisHash,
|
|
328
|
-
type: 'axfer'
|
|
349
|
+
type: 'axfer',
|
|
350
|
+
flatFee: suggestedParams.flatFee || false
|
|
329
351
|
};
|
|
330
352
|
// Handle optional fields
|
|
331
353
|
if (typeof args.note === 'string') {
|
|
@@ -86,7 +86,7 @@ export class UtilityManager {
|
|
|
86
86
|
type: 'text',
|
|
87
87
|
text: JSON.stringify({
|
|
88
88
|
name: 'Algorand MCP Server',
|
|
89
|
-
version: '3.
|
|
89
|
+
version: '3.7.0',
|
|
90
90
|
builder: 'GoPlausible',
|
|
91
91
|
description: 'A Model Context Protocol (MCP) server providing comprehensive access to the Algorand blockchain. Supports account management, transaction building and signing, smart contract interaction, asset operations, ARC-26 URI generation, and deep integration with Algorand ecosystem services including NFDomains, Tinyman, Vestige, and Ultrade.',
|
|
92
92
|
blockchain: 'Algorand — a carbon-negative, pure proof-of-stake Layer 1 blockchain delivering instant finality, low fees, and advanced smart contract capabilities via AVM (Algorand Virtual Machine).',
|