Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Minimal CLI wallet for Spark

License

nodecattel/thunder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thunder

Minimal CLI wallet for Spark.

Setup

yarn install

Basic Operations

Create wallet

yarn run create

Show info

yarn run info

Deposit

yarn run deposit

Balance

yarn run balance

Send

yarn run send

Withdraw

yarn run withdraw

New Features

Interactive Mode

Launch the interactive menu-driven interface:

yarn start

Transfer History

View your transaction history:

yarn run history

Transfer Monitor

Monitor incoming transfers in real-time:

yarn run monitor

Network Configuration

Switch between MAINNET and REGTEST networks:

yarn run network

Network Support

Thunder supports two networks:

  • MAINNET (sp) - Production network
  • REGTEST (sprt) - Local testing network

Network configuration is stored in .spark-config.json and can be changed using the network script or by setting the SPARK_NETWORK environment variable.

Bitcoin Withdrawal

Thunder supports withdrawing Bitcoin from your Spark wallet to any Bitcoin address:

Features

  • Minimum Amount: 10,000 sats minimum withdrawal
  • Exit Speed Options: Choose between SLOW, MEDIUM, or FAST confirmation speeds
  • Network Validation: Ensures Bitcoin address matches current network (mainnet/regtest)
  • Balance Checking: Verifies sufficient balance before withdrawal
  • Fee Transparency: Clear warnings about withdrawal fees

Exit Speed Options

  • SLOW: Lower fees, 6-12 blocks confirmation time
  • MEDIUM: Balanced fees, 3-6 blocks confirmation time
  • FAST: Higher fees, 1-3 blocks confirmation time

Usage

yarn run withdraw

The withdrawal process will:

  1. Check your current balance
  2. Prompt for withdrawal amount (minimum 10,000 sats)
  3. Request destination Bitcoin address
  4. Validate address format and network compatibility
  5. Allow selection of exit speed (fee tier)
  6. Show confirmation summary with warnings
  7. Process withdrawal and provide transaction ID

Important Notes

  • Withdrawal fees are deducted from the withdrawal amount
  • Withdrawals cannot be undone once confirmed
  • Ensure the destination address is correct before confirming
  • Network compatibility warnings should be heeded

Address Validation

Thunder includes comprehensive address validation:

Spark Address Validation:

  • Validates bech32m address format
  • Checks network compatibility (MAINNET vs REGTEST)
  • Rejects unsupported network addresses (testnet, signet, liquid)
  • Provides clear error messages for invalid addresses

Bitcoin Address Validation:

  • Supports all standard Bitcoin address formats (P2PKH, P2SH, Bech32, Bech32m)
  • Network-aware validation (mainnet vs regtest)
  • Validates address format before withdrawal operations

Notes

  • A wallet.json file is created. Delete it to reset.
  • STORE THE SEED SAFELY AND NEVER SHARE IT.
  • Network configuration is stored in .spark-config.json
  • Transfer logs are stored in logs/thunder.log

Disclaimer

  • This is experimental software. Use at your own risk.
  • Do not trust random code from the internet with real funds.
  • Verify the code yourself before use. Keep your SATS safe.

About

Minimal CLI wallet for Spark

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%