The Cryptonomics™
  • Home
  • Blockchain
  • Bitcoin
  • Ethereum
  • NFTS
  • Altcoin
  • Mining
  • Consulting
Reading: The transaction historical past made to the handle by way of the Electrum Testnet pockets just isn’t displayed
Share
Please enter CoinGecko Free Api Key to get this plugin works.
The Cryptonomics™The Cryptonomics™
Font ResizerAa
Search
  • Home
  • Blockchain
  • Bitcoin
  • Ethereum
  • NFTS
  • Altcoin
  • Mining
  • Consulting
Follow US
  • About Us
  • Advertising Solutions
  • Privacy
  • Terms
  • Advertise
Copyright © MetaMedia™ Capital Inc, All right reserved
The Cryptonomics™ > Bitcoin > The transaction historical past made to the handle by way of the Electrum Testnet pockets just isn’t displayed
Bitcoin

The transaction historical past made to the handle by way of the Electrum Testnet pockets just isn’t displayed

admin
Last updated: May 31, 2025 8:21 am
admin Published May 31, 2025
Share
The transaction historical past made to the handle by way of the Electrum Testnet pockets just isn’t displayed


I’m new to this enterprise, so I apologize for such a probably fundamental and silly query, I attempted to search out any data, however I could not.

I made various transfers to the handle proven within the following instance.

I even have these transfers in my historical past, and they’re marked as profitable. For reference, I made a switch from my pockets to the handle that’s linked to mywallet.

2

I even have a connection to the take a look at community.

3

Within the pockets, as proven, every part is there, every part is okay, however once you attempt to verify the knowledge of my handle, there’s nothing there.

Right here I checked the handle via a particular web site.

4


I wrote a small program to verify the historical past of the handle, steadiness, however nothing is displayed there.

Connecting to Electrum server...
Efficiently related to Electrum server.
Deal with: tb1qc7j5j80s02gupl0qa3svg5kr99smjdq9a7yezd
ScriptHash: bb72dcabbea723d56aa49cd29575e53aaabf832f9dbdb45f251b56e187ce915a
Uncooked historical past response: []
Fetching transaction historical past...
Discovered 0 transactions.
Whole steadiness for tb1qc7j5j80s02gupl0qa3svg5kr99smjdq9a7yezd: 0 satoshis (0 BTC)
Present block top: 900621
Disconnected from Electrum server.

Right here is the code of this system itself:

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

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

perform addressToElectrumScriptHash(handle: string, community: bitcoin.Community): string | null {
  attempt {
    const outputScript = bitcoin.handle.toOutputScript(handle, community);
    const hash = bitcoin.crypto.sha256(outputScript);
    return Buffer.from(hash.reverse()).toString('hex');
  } catch (e) {
    console.error(`Didn't convert handle ${handle} to scripthash: ${e.message}`);
    return null;
  }
}

async perform debugScripthashHistory(consumer: ElectrumClient<ElectrumClientEvents>, scriptHash: string) {
  attempt {
    const historical past = await consumer.request('blockchain.scripthash.get_history', scriptHash);
    console.log('Uncooked historical past response:', JSON.stringify(historical past, null, 2));
  } catch (error) {
    console.error('Error fetching uncooked historical past:', error.message);
  }
}

async perform checkAddress() {
  const consumer = new ElectrumClient(
    'Deal with Checker',
    '1.4.1',
    ELECTRUM_HOST,
  );

  attempt {
    console.log('Connecting to Electrum server...');
    await consumer.join();
    console.log('Efficiently related to Electrum server.');

    const scriptHash = addressToElectrumScriptHash(ADDRESS, NETWORK);
    if (!scriptHash) {
      console.error('Didn't generate scripthash for handle.');
      return;
    }
    console.log(`Deal with: ${ADDRESS}`);
    console.log(`ScriptHash: ${scriptHash}`);
    await debugScripthashHistory(consumer, scriptHash);

    console.log('Fetching transaction historical past...');
    const historyResult = await consumer.request('blockchain.scripthash.get_history', scriptHash);
    if (historyResult instanceof Error) {
      console.error(`Error fetching historical past: ${historyResult.message}`);
      return;
    }
    if (!Array.isArray(historyResult)) {
      console.error('Surprising historical past response:', historyResult);
      return;
    }

    const historical past = historyResult as { tx_hash: string; top: quantity }[];
    console.log(`Discovered ${historical past.size} transactions.`);

    let totalBalance = 0;
    for (const tx of historical past) {
      const txHash = tx.tx_hash;
      console.log(`Processing transaction: ${txHash} (Block top: ${tx.top})`);

      const txDataResult = await consumer.request('blockchain.transaction.get', txHash, true);
      if (txDataResult instanceof Error) {
        console.error(`Error fetching transaction ${txHash}: ${txDataResult.message}`);
        proceed;
      }
      if (!txDataResult || typeof txDataResult !== 'object') {
        console.error(`Invalid transaction knowledge for ${txHash}`);
        proceed;
      }

      const txData = txDataResult as { vout: { worth: string; scriptPubKey: { hex: string } }[] };
      const outputScriptHex = bitcoin.handle.toOutputScript(ADDRESS, NETWORK).toString('hex');

      for (const vout of txData.vout) {
        if (vout.scriptPubKey.hex === outputScriptHex) {
          const quantity = Math.spherical(parseFloat(vout.worth) * 1e8); // Конвертация BTC в сатоши
          totalBalance += quantity;
          console.log(`Discovered output to handle: ${quantity} satoshis`);
        }
      }
    }

    console.log(`Whole steadiness for ${ADDRESS}: ${totalBalance} satoshis (${totalBalance / 1e8} BTC)`);

    const blockHeightResponse = await consumer.request('blockchain.headers.subscribe');
    if (blockHeightResponse && typeof blockHeightResponse === 'object' && 'top' in blockHeightResponse) {
      console.log(`Present block top: ${blockHeightResponse.top}`);
    }

  } catch (error) {
    console.error('Error throughout handle verify:', error.message);
  } lastly {
    attempt {
      await consumer.disconnect();
      console.log('Disconnected from Electrum server.');
    } catch (e) {
      console.error('Error throughout disconnection:', e.message);
    }
  }
}

checkAddress().catch(console.error);



Supply hyperlink

You Might Also Like

Who Owns the Most BTC This 12 months?

TANSSI is on the market for buying and selling!

Gate.io Pulls Pump.enjoyable’s $600M PUMP Token Sale Web page

Bitcoin Inches up as Inflation Fears Subside

Bitcoin Bull Run Has Room To Run, Mayer A number of Hints

Share This Article
Facebook Twitter Email Copy Link Print
Previous Article Sui group approves launch of 2M in tokens frozen throughout Cetus hack Sui group approves launch of $162M in tokens frozen throughout Cetus hack
Next Article FTX Chapter Property distributes  billion FTX Chapter Property distributes $5 billion
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe to our newslettern

Get Newest Articles Instantly!

- Advertisement -
Ad imageAd image
Popular News
Ethereum grows twice as quick as Bitcoin in newest B crypto fund influx
Ethereum grows twice as quick as Bitcoin in newest $1B crypto fund influx
The journey to a mature asset administration system
The journey to a mature asset administration system
High 3 Meme Coin Gems Price Shopping for Earlier than Could 2024 – PEPE, WIF, and DOGEVERSE
High 3 Meme Coin Gems Price Shopping for Earlier than Could 2024 – PEPE, WIF, and DOGEVERSE

Follow Us on Socials

We use social media to react to breaking news, update supporters and share information

Facebook Instagram Linkedin Pinterest Tiktok Twitter Youtube
The Cryptonomics™

Cryptonomics Magazine is your premier digital source for blockchain insights, offering cutting-edge research, news, interviews, and ICO updates for everyone from entrepreneurs to institutions. We drive blockchain knowledge and growth.

Subscribe to our newsletter

Always Stay Up to Date

Subscribe to our newsletter to get our newest articles instantly!

Ethereum grows twice as quick as Bitcoin in newest $1B crypto fund influx
July 9, 2025
Hyperliquid DEX And Userbase Development Could Set off Rally To $45
July 9, 2025
Dogecoin (DOGE) Eyes Breakout — Can Bulls Unleash the Subsequent Surge?
July 9, 2025
GMX V1 attacked by hackers for $40 million
July 9, 2025
Who Owns the Most BTC This 12 months?
July 9, 2025
Copyright © The Cryptonomics™ , All right reserved
  • About Us
  • Advertising Solutions
  • Privacy
  • Terms
  • Advertise
Join Us!

Subscribe & Stay Ahead of the Curve with Cryptonomics !

Zero spam, Unsubscribe at any time.
Welcome Back!

Sign in to your account

Lost your password?