UNPKG

mintme-sdk

Version:

A simple and powerful SDK for creating and managing tokens on the Solana blockchain. MintMe SDK simplifies the process of minting SPL tokens with metadata, managing token authorities, and interacting with the Solana token ecosystem.

15 lines (10 loc) 561 B
// Import required modules const bs58 = require("bs58"); // For Base58 encoding/decoding const fs = require("fs"); // For file system operations // Replace this with your actual private key in Base58 format const base58Key = "YOUR_PRIVATE_KEY_HERE"; // Decode the Base58-encoded private key to get the raw byte array const secretKey = bs58.decode(base58Key); // Convert the byte array to a regular array and write it to a JSON file fs.writeFileSync("wallet.json", JSON.stringify(Array.from(secretKey))); console.log("✅ wallet.json successfully created");