sol_walletWallet

Mock Jutsu HOW-TO | EN

In the rapidly evolving landscape of decentralized finance and Web3 applications, generating high-fidelity test data is a prerequisite for robust software development. The mock-jutsu library addresses this critical need for Solana developers through its dedicated sol_wallet function. This utility provides a streamlined way to create realistic wallet data that mimics the exact structure and security standards of the Solana blockchain, ensuring that your staging and development environments remain as close to production as possible without the risks associated with using real mainnet credentials.

At its technical core, the sol_wallet generator utilizes the Ed25519 elliptic curve signature scheme, the same cryptographic standard used by the Solana protocol. The function performs Ed25519 scalar multiplication to derive public keys from randomly generated private scalars, which are then processed through base58 encoding to produce standard Solana addresses. The resulting output is a comprehensive JSON object containing the private_key, public_key, and the human-readable address. Crucially, it also includes a keypair array formatted specifically for compatibility with the Phantom wallet and the Solana CLI, making it an indispensable tool for developers building browser-based extensions or mobile dApps that require specific import formats.

Integrating this function into your existing workflow is remarkably simple, regardless of your preferred environment. For those working within a Pythonic stack, calling jutsu.generate('sol_wallet') provides immediate access to structured mock data for unit tests or database seeding. DevOps engineers can leverage the command-line interface by executing "mockjutsu generate sol_wallet" for rapid prototyping or script automation. Furthermore, performance testers can utilize the JMeter plugin with the ${__mockjutsu(sol_wallet,)} syntax to inject dynamic wallet data directly into load testing scripts, effectively simulating high-concurrency wallet creation or transaction signing events at scale.

The benefits of using sol_wallet extend beyond simple data generation; it enhances the entire testing lifecycle by providing valid-looking but cryptographically isolated keys. Developers can safely test multi-signature logic, account initialization, and complex transaction flows within their CI/CD pipelines. This level of precision in test data helps identify edge cases in address validation and UI rendering early in the development cycle. Ultimately, mock-jutsu empowers engineering teams to build faster and with greater confidence by removing the manual friction and security risks associated with manual wallet creation.

CLI Usage
mockjutsu generate sol_walletmockjutsu bulk sol_wallet --count 10mockjutsu export sol_wallet --count 10 --format jsonmockjutsu export sol_wallet --count 10 --format csvmockjutsu export sol_wallet --count 10 --format sql
Python API
from mockjutsu import jutsujutsu.generate('sol_wallet')jutsu.bulk('sol_wallet', count=10)jutsu.template(['sol_wallet'], count=5)
JMeter
${__mockjutsu_wallet(sol_wallet)}# JMeter Function: __mockjutsu_wallet# Parameter 1: sol_wallet# Parameter 2: (not required for this function)
REST API
GET /generate/sol_wallet# → {"type":"sol_wallet","result":"...","status":"ok"}GET /bulk/sol_wallet?count=10POST /template {"types":["sol_wallet"],"count":1}

Other Languages