@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
27 lines • 1.05 kB
JavaScript
;
/**
* Get Wallet Tool
*
* Retrieves the wallet instance currently configured in the SDK.
* Returns the wallet object if configured, or null if in read-only mode.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWalletTool = void 0;
const tool_factory_js_1 = require("../../utils/tool-factory.js");
exports.getWalletTool = (0, tool_factory_js_1.createNoParamTool)({
name: 'gala_launchpad_get_wallet',
description: 'Get the wallet instance currently configured in the SDK. Returns wallet object if available, or null if in read-only mode.',
handler: (sdk) => {
const wallet = sdk.getWallet();
// Return wallet metadata if available, or null
if (wallet && typeof wallet === 'object' && 'address' in wallet) {
return {
address: wallet.address,
hasPrivateKey: 'privateKey' in wallet && Boolean(wallet.privateKey),
};
}
return null;
},
resultKey: 'wallet',
});
//# sourceMappingURL=getWallet.js.map