Skip to main content
Glama

create_wallet

Generate BIP-39 mnemonics and derive VeChain wallet keys using standard derivation paths for blockchain account creation and management.

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 handler function (callback) that generates a BIP-39 mnemonic based on wordlistSize, derives the secp256k1 private key, computes its hex representation and public key address, and returns them as JSON. Handles errors gracefully.
    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 optional wordlistSize (12,15,18,21,24 words).
    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/tools.ts:464-517 (registration)
    The tool registration object in the vechainTools array, including name, title, description, inputSchema, and callback handler.
    { name: "create_wallet", title: "Create a VeChain wallet (mnemonic + keys)", description: "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).", 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") }, 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 ), }, ], }; } } },

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