UNPKG

@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

40 lines 1.5 kB
"use strict"; /** * Set Wallet Tool * * Configures a wallet for signing operations. * Takes a private key string and sets it as the active wallet in the SDK. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.setWalletTool = void 0; const tool_factory_js_1 = require("../../utils/tool-factory.js"); const launchpad_sdk_1 = require("@gala-chain/launchpad-sdk"); exports.setWalletTool = (0, tool_factory_js_1.createFetchTool)({ name: 'gala_launchpad_set_wallet', description: 'Configure a wallet for signing operations. Takes a private key and sets it as the active wallet.', inputSchema: { type: 'object', properties: { privateKey: { type: 'string', description: 'Private key (0x prefixed hexadecimal string) to configure as the active wallet', pattern: '^0x[a-fA-F0-9]{64}$', }, }, required: ['privateKey'], }, handler: async (sdk, args) => { const privateKey = args.privateKey; // Create wallet from private key const generatedWallet = (0, launchpad_sdk_1.createWallet)(privateKey); // Set the wallet on the SDK sdk.setWallet(generatedWallet.wallet); return { success: true, message: 'Wallet configured successfully', address: generatedWallet.wallet.address, walletConfigured: sdk.hasWallet(), }; }, }); //# sourceMappingURL=setWallet.js.map