get_private_key_of_wallet
Retrieve the private key for a Solana wallet address to enable secure payment transactions through the P-Link-MCP server.
Instructions
Get the private key of your wallet on secured app https://p-link.io
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| solanaWalletAddress | No | Solana wallet address |
Implementation Reference
- src/tools/auth.ts:33-35 (handler)The core handler function for the "get_private_key_of_wallet" tool. It returns instructions directing the user to the secure app at https://p-link.io to retrieve the private key, rather than exposing it directly.export async function get_PK(args: any) { return { "instructions": "In order to get your private key, you need to connect on https://p-link.io" } }
- src/tools/auth.ts:23-25 (schema)Zod schema defining the optional input parameter 'solanaWalletAddress' for the tool.export const GetPKInput = { solanaWalletAddress: solAddressZod.optional().describe("Solana wallet address"), };
- src/solution.ts:42-47 (registration)Tool registration in the 'tools' array used for ListToolsRequest responses, specifying name, description from get_PK_title, input schema derived from GetPKInput, and annotations.{ name: "get_private_key_of_wallet", description: get_PK_title, inputSchema: jsonSchema(zodToJsonSchema(z.object(GetPKInput))).jsonSchema, annotations: { title: get_PK_title, readOnlyHint: true } },
- src/solution.ts:132-134 (handler)Switch case in the CallToolRequest handler that dispatches to the get_PK function when this tool is called.case "get_private_key_of_wallet": result = await get_PK(args); break;
- src/tools/auth.ts:28-28 (helper)Title/description string used in tool annotations and registration.export const get_PK_title = 'Get the private key of your wallet on secured app https://p-link.io';