Lynx Blockchain
  • Welcome
  • Technical Evolution and Architecture Overview
  • History of Lynx
    • Evolution of a Blockchain
    • Hybrid Proof of Work (HPoW) Protocol
    • Pioneering Blockchain Data Storage
    • Evolution to Proof of Stake
    • Next Generation Data Storage Architecture
    • Preserving Knowledge
  • Lynx Core
    • Hardware and System Requirements
    • Lynx Dynamics
    • Open Source
    • Core Parameters and Strategy
    • Sustainability
    • Circulating Supply Analysis
    • Locked Addresses
    • Data Storage
      • auth
      • fetch
      • fetchall
      • store
      • status
      • list
    • Understanding the Encryption Option
    • Understanding Lynx Staking Wait Times
    • Understanding Asset Retrieval Times
    • Understanding Block Time Targeting in the Lynx Blockchain
    • Understanding the Lynx Blockchain Statistics Report
  • Lynx Administration
    • Public Peer Nodes
    • Understanding Blockchain Bootstrap Files
      • Bootstrap Extraction Script
      • Bootstrap Creation Script
    • How to Sweep a Lynx Wallet
    • Enable/Disable Staking
  • Clevver
    • Revolutionizing Digital Preservation
    • Permanent Storage for Digital Assets
    • Permanent Digital Archives for Journalism
    • How did Clevver originate?
    • Shortened URL Support
    • Assigning Tags to Assets
    • How to delete content
    • Clevver Terms of Service Agreement
  • Clevver API
    • Public Methods
      • Batches
      • Files
      • User
  • ElectrumX
    • Lynx ElectrumX nodes
    • Build Script Details
  • External Links
    • Lynx Explorer
    • Lynx Github
    • Lynx Uptime Report
    • Clevver Website
  • Lynx Bootstraps
  • Wallet Links
    • Komodo Wallet
    • Wally.id Wallet
    • Lynx Paper Wallet
  • Social Links
    • Lynx Discord
    • Lynx on Bluesky
    • Clevver on Bluesky
  • Exchange Links
    • FreiXLite (LYNX/LTC)
  • FreiExchange (LYNX/BTC)
  • Komodo Wallet (SWAP)
  • XredX (LYNX/LTC)
  • XredX (LYNX/DOGE)
  • XredX (LYNX/IL8P)
Powered by GitBook
On this page
  • Understanding Wallet Sweeping
  • The Challenge of Sweeping
  • How to Sweep a Lynx Wallet
  • Understanding How It Works
  • Important Considerations
  • After the Sweep
  • Verifying the Sweep
  1. Lynx Administration

How to Sweep a Lynx Wallet

Published: January 2025 | Last updated: January 2025

Understanding Wallet Sweeping

When managing cryptocurrency, there are times when you need to completely empty a wallet by transferring all funds to another address. This process is called "sweeping" the wallet. Sweeping is accomplished through a special transaction technique that ensures no unspent transaction outputs (UTXOs) remain in the source wallet.

The Challenge of Sweeping

Normally, when sending cryptocurrency, the transaction fee is deducted from the sending wallet. This creates a challenge when trying to send exactly all funds, as you need to subtract the fee from the total amount. Depending on the complexity of the transaction, the fee can be difficult to calculate prior to execution. However, Lynx provides a solution to this problem by allowing the recipient to pay the transaction fee instead.

How to Sweep a Lynx Wallet

Step 1: Check Your Balance

First, you need to know exactly how many coins are in your wallet. Use the getbalances RPC command:

lynx-cli getbalances

The response will look something like this:

{
  "mine": {
    "trusted": 5010958.70982113,
    "untrusted_pending": 0.00000000,
    "immature": 0.00000000
  }
}

The "trusted" value shows your available balance. Be sure the untrusted_pending and immature amounts equal zero. Make note of this exact number.

Step 2: Send All Funds

Use the sendtoaddress RPC command with these specific parameters:

lynx-cli sendtoaddress <recipient_address> <exact_balance> "" "" true

For example:

lynx-cli sendtoaddress KVgjrQdpYzjHKAhP4uXqaRJ7 5010958.70982113 "" "" true

Let's break down the parameters:

  1. The recipient's Lynx address

  2. The exact balance from Step 1

  3. Empty comment ("")

  4. Empty comment-to ("")

  5. true to specify that the recipient pays the fee

Understanding How It Works

This technique works because:

  1. The true parameter at the end tells the network that the recipient will pay the transaction fee

  2. Since the sender isn't paying the fee, you can specify the exact amount in your wallet

  3. The network processes this as a special type of transaction where the fee is deducted from the receiving end

  4. This ensures that every UTXO in the sending wallet is included in the transaction

Important Considerations

  • Always double-check the recipient address before sending

  • Verify your balance immediately before sending to ensure accuracy

  • Make sure your untrusted_pending and immature coins are zero

  • Once completed, the sending wallet will have a balance of exactly zero

  • This operation cannot be undone, so proceed with caution

  • Before deleting your source wallet, be sure to wait for a few block confirmations

After the Sweep

After successfully sweeping your wallet:

  1. The entire balance will be transferred to the recipient address

  2. The transaction fee will be paid by the recipient

  3. Your source wallet will show a zero balance

  4. All UTXOs from your source wallet will be consumed

Verifying the Sweep

To confirm the sweep was successful:

  1. Check your wallet balance again using getbalances after a few blocks have passed

  2. Verify the receiving address shows the correct balance minus the transaction fee

Remember that sweeping a wallet is a powerful operation that should be used carefully and only when you truly need to transfer all funds from one wallet to another. Always double-check your work and make sure you understand the implications before proceeding.

PreviousBootstrap Creation ScriptNextEnable/Disable Staking

Last updated 2 months ago

Look for the transaction in a

blockchain explorer
Page cover image