Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
Crypto Flexs
Home»BITCOIN NEWS»Electrum testnet wallets do not display the trading record for the address.
BITCOIN NEWS

Electrum testnet wallets do not display the trading record for the address.

By Crypto FlexsJune 2, 20253 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Electrum testnet wallets do not display the trading record for the address.
Share
Facebook Twitter LinkedIn Pinterest Email

I apologize for the basic and foolish questions because I first encountered this business. I tried to find information, but I couldn’t do it.

I have sent multiple transfer to the address shown in the following example.

I also have this transmission in my history, and they are marked as successful. For reference, I moved from the wallet to the address connected to the wallet.

2

It is also connected to the test network.

3

As you can see in the wallet, everything exists and everything is okay, but there is nothing when trying to check my address.

Here, I checked the address through a special site.

4


I wrote a small program to confirm the history and balance of the address, but nothing is displayed.

Connecting to Electrum server...
Successfully connected to Electrum server.
Address: tb1qc7j5j80s02gupl0qa3svg5kr99smjdq9a7yezd
ScriptHash: bb72dcabbea723d56aa49cd29575e53aaabf832f9dbdb45f251b56e187ce915a
Raw history response: ()
Fetching transaction history...
Found 0 transactions.
Total balance for tb1qc7j5j80s02gupl0qa3svg5kr99smjdq9a7yezd: 0 satoshis (0 BTC)
Current block height: 900621
Disconnected from Electrum server.

Here is the code of the program itself.

import * as bitcoin from 'bitcoinjs-lib';
import  ElectrumClient, ElectrumClientEvents  from '@electrum-cash/network';

const ELECTRUM_HOST = 'blackie.c3-soft.com';
const ADDRESS = 'tb1qc7j5j80s02gupl0qa3svg5kr99smjdq9a7yezd';
const NETWORK = bitcoin.networks.testnet;

function addressToElectrumScriptHash(address: string, network: bitcoin.Network): string | null 
  try 
    const outputScript = bitcoin.address.toOutputScript(address, network);
    const hash = bitcoin.crypto.sha256(outputScript);
    return Buffer.from(hash.reverse()).toString('hex');
   catch (e) 
    console.error(`Failed to convert address $address to scripthash: $e.message`);
    return null;
  


async function debugScripthashHistory(client: ElectrumClient<ElectrumClientEvents>, scriptHash: string) 
  try 
    const history = await client.request('blockchain.scripthash.get_history', scriptHash);
    console.log('Raw history response:', JSON.stringify(history, null, 2));
   catch (error) 
    console.error('Error fetching raw history:', error.message);
  


async function checkAddress() {
  const client = new ElectrumClient(
    'Address Checker',
    '1.4.1',
    ELECTRUM_HOST,
  );

  try {
    console.log('Connecting to Electrum server...');
    await client.connect();
    console.log('Successfully connected to Electrum server.');

    const scriptHash = addressToElectrumScriptHash(ADDRESS, NETWORK);
    if (!scriptHash) 
      console.error('Failed to generate scripthash for address.');
      return;
    
    console.log(`Address: $ADDRESS`);
    console.log(`ScriptHash: $scriptHash`);
    await debugScripthashHistory(client, scriptHash);

    console.log('Fetching transaction history...');
    const historyResult = await client.request('blockchain.scripthash.get_history', scriptHash);
    if (historyResult instanceof Error) 
      console.error(`Error fetching history: $historyResult.message`);
      return;
    
    if (!Array.isArray(historyResult)) 
      console.error('Unexpected history response:', historyResult);
      return;
    

    const history = historyResult as  tx_hash: string; height: number ();
    console.log(`Found $history.length transactions.`);

    let totalBalance = 0;
    for (const tx of history)  typeof txDataResult !== 'object') 
        console.error(`Invalid transaction data for $txHash`);
        continue;
      

      const txData = txDataResult as  vout:  value: string; scriptPubKey:  hex: string  () ;
      const outputScriptHex = bitcoin.address.toOutputScript(ADDRESS, NETWORK).toString('hex');

      for (const vout of txData.vout) 
        if (vout.scriptPubKey.hex === outputScriptHex) 
          const amount = Math.round(parseFloat(vout.value) * 1e8); // Конвертация BTC в сатоши
          totalBalance += amount;
          console.log(`Found output to address: $amount satoshis`);
        
      
    

    console.log(`Total balance for $ADDRESS: $totalBalance satoshis ($totalBalance / 1e8 BTC)`);

    const blockHeightResponse = await client.request('blockchain.headers.subscribe');
    if (blockHeightResponse && typeof blockHeightResponse === 'object' && 'height' in blockHeightResponse) 
      console.log(`Current block height: $blockHeightResponse.height`);
    

  } catch (error) 
    console.error('Error during address check:', error.message);
   finally 
    try 
      await client.disconnect();
      console.log('Disconnected from Electrum server.');
     catch (e) 
      console.error('Error during disconnection:', e.message);
    
  
}

checkAddress().catch(console.error);
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Bitcoin Is An Unreplicable Lifeline In Authoritarian Regimes

June 6, 2025

South Africa central bank insists on the ‘old -fashioned’ exchange control law, which is still valid for encryption regulations.

June 5, 2025

Price prediction of BTC, ETH, XRP, BNB, SOL, DOGE, ADA, Sui, Hype, Link

June 4, 2025
Add A Comment

Comments are closed.

Recent Posts

NVIDIA’s BLACKWELL Architecture MLPERF has set up new performance standards.

June 6, 2025

ZK-Proof Blockchain Altcoin Lagrange (LA) New Coinbase

June 6, 2025

ZK-Proof Blockchain Altcoin Lagrange (LA) New Coinbase

June 6, 2025

Bitfinex updates version 1.116 improved platforms

June 6, 2025

Encryption leverage: 2025 trend and change analysis

June 6, 2025

Why DEGO Price tank 60%after moving USD1 Stablecoin

June 6, 2025

SEI Network opens up the way of autonomous AI economy.

June 6, 2025

SEI hit 621K wallet and $ 930m tvL, but two regions should pay attention.

June 6, 2025

Bitcoin Is An Unreplicable Lifeline In Authoritarian Regimes

June 6, 2025

COREWEAVE is a NVIDIA GB200 Super Chip that achieves recorded MLPERF benchmarks.

June 6, 2025

Bitcoin dives for less than $ 102K in fading momentum and macroscopic uncertainty.

June 6, 2025

Crypto Flexs is a Professional Cryptocurrency News Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of Cryptocurrency. We hope you enjoy our Cryptocurrency News as much as we enjoy offering them to you.

Contact Us : Partner(@)Cryptoflexs.com

Top Insights

NVIDIA’s BLACKWELL Architecture MLPERF has set up new performance standards.

June 6, 2025

ZK-Proof Blockchain Altcoin Lagrange (LA) New Coinbase

June 6, 2025

ZK-Proof Blockchain Altcoin Lagrange (LA) New Coinbase

June 6, 2025
Most Popular

Easily earned $ 9,800 a day, attracting investors’ attention

February 20, 2025

Bitcoin falls below $60,000 as investors fear global economic slowdown

August 14, 2024

Zeek, a new decentralized social collaboration network, raises $3 million in seed funding to reinvent social reputation on Web3

June 20, 2024
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2025 Crypto Flexs

Type above and press Enter to search. Press Esc to cancel.