@gala-chain/launchpad-mcp-server
Version:
MCP server for Gala Launchpad - 102 tools (pool management, event watchers, GSwap DEX trading, price history, token creation, wallet management, DEX pool discovery, liquidity positions, token locks, locked token queries, composite pool data, cross-chain b
67 lines • 2.61 kB
JavaScript
;
/**
* Token Transfer Tools
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.transferTools = exports.transferTokenTool = exports.transferGalaTool = void 0;
const response_formatter_js_1 = require("../../utils/response-formatter.js");
const error_handler_js_1 = require("../../utils/error-handler.js");
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
// 1. Transfer GALA
exports.transferGalaTool = {
name: 'gala_launchpad_transfer_gala',
description: 'Transfer GALA tokens via GalaChain',
inputSchema: {
type: 'object',
properties: {
recipientAddress: {
...common_schemas_js_1.ADDRESS_SCHEMA,
description: 'Recipient wallet address',
},
amount: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
uniqueKey: common_schemas_js_1.UNIQUE_KEY_SCHEMA,
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
},
required: ['recipientAddress', 'amount'],
},
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
const result = await sdk.transferGala({
recipientAddress: args.recipientAddress,
amount: args.amount,
uniqueKey: args.uniqueKey,
privateKey: args.privateKey,
});
return (0, response_formatter_js_1.formatSuccess)(result);
}),
};
// 2. Transfer Token
exports.transferTokenTool = {
name: 'gala_launchpad_transfer_token',
description: 'Transfer launchpad tokens via GalaChain',
inputSchema: {
type: 'object',
properties: {
to: {
...common_schemas_js_1.ADDRESS_SCHEMA,
description: 'Recipient wallet address',
},
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
amount: common_schemas_js_1.INTEGER_AMOUNT_SCHEMA,
uniqueKey: common_schemas_js_1.UNIQUE_KEY_SCHEMA,
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
},
required: ['to', 'tokenName', 'amount'],
},
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
const result = await sdk.transferToken({
to: args.to,
tokenName: args.tokenName,
amount: args.amount,
uniqueKey: args.uniqueKey,
privateKey: args.privateKey,
});
return (0, response_formatter_js_1.formatSuccess)(result);
}),
};
exports.transferTools = [exports.transferGalaTool, exports.transferTokenTool];
//# sourceMappingURL=index.js.map