Skip to main content
Glama

create_wallet

Generate a BIP-39 mnemonic and derive a VeChain account key for wallet creation on the VeChain blockchain, with configurable wordlist size and secure private key handling.

Instructions

Generate a BIP-39 mnemonic (12/15/18/21/24 words) and derive the account-level secp256k1 key at path m/44'/818'/0'/0 (VET coin type = 818). By default, the private key is REDACTED in the response. Set includeSecret=true to include it (handle with care).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wordlistSizeNoLength of the BIP-39 mnemonic wordlist. Default: 12

Implementation Reference

  • The asynchronous callback function that executes the create_wallet tool. It generates a BIP-39 mnemonic based on wordlistSize, derives the secp256k1 private key and public key address for VeChain, and returns the details in JSON format. Handles errors including timeouts.
    callback: async ({ wordlistSize = 12 }: { wordlistSize?: 12 | 15 | 18 | 21 | 24 }) => { try { const mnemonic = Mnemonic.of(wordlistSize); const secretKey = Mnemonic.toPrivateKey(mnemonic); const secretKeyHex = Hex.of(secretKey).toString(); const publicKey = Secp256k1.derivePublicKey(secretKey); const publicKeyAddress = Address.ofPublicKey(publicKey).toString(); const result = { mnemonic, secretKey, secretKeyHex, publicKey: publicKeyAddress }; return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (err) { const isAbort = (err as Error)?.name === "AbortError"; return { content: [ { type: "text", text: JSON.stringify( { error: isAbort ? "Request timed out" : "Failed to create wallet", reason: String((err as Error)?.message ?? err), }, null, 2 ), }, ], }; } }
  • Zod input schema defining the optional wordlistSize parameter as a union of literal values 12,15,18,21,24 with description.
    inputSchema: { wordlistSize: z .union([z.literal(12), z.literal(15), z.literal(18), z.literal(21), z.literal(24)]) .optional() .describe("Length of the BIP-39 mnemonic wordlist. Default: 12") },
  • src/server.ts:74-92 (registration)
    Loop that registers each tool in the vechainTools array (imported from tools.ts, which includes create_wallet) with the MCP server. Uses the tool's name, description, inputSchema, and wraps the tool's callback handler.
    for (const t of vechainTools) { server.registerTool( t.name, { title: t.name, description: t.description, inputSchema: t.inputSchema }, async (args) => { const result = await t.callback(args); return { content: result.content.map(item => ({ ...item, type: "text" as const })) }; } ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leandrogavidia/vechain-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server