Bitcoin Forum
December 29, 2025, 04:31:53 PM *
News: Latest Bitcoin Core release: 30.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: test net address different for same seed  (Read 79 times)
jubalix (OP)
Legendary
*
Offline Offline

Activity: 2716
Merit: 1036


View Profile WWW
October 24, 2025, 09:32:51 PM
Last edit: October 26, 2025, 08:24:18 AM by jubalix
 #1

when I restore a wallet in testnet using the same seed I get different addresses

I note when I dumped the Mpriv key they looked entirely different - including the prefix vprv in test net, vs zpr.... in normal mode.

I would have thought you could have tested the exact addresses in test net, or is this a saftey feature and you can assume that if the same seed ---> derivation works in testnet it will work on real chain.

My main concern is malformed addresses that some how you make an address that you can recieve btc to but never send from, or can never send except to  a specific address.

Thus I would want to test exactly the same address on the test net.....I suppose I can try an import the individual privkey and test that.


======
Update - use at your own risk.

ok so I have tried makeing a javascript html file to do this not sure if it works

This seems to work, this requires some external imports

https://github.com/jubalix/BTC-Address-Check/blob/main/btc_address_checker.html

This version does not, you should be able to run it offline but is more limited to bc1 addressess

https://github.com/jubalix/BTC-Address-Check/blob/main/btc_address_checker_offline.html

Admitted Practicing Lawyer::BTC/Crypto Specialist. B.Engineering/B.Laws

https://www.binance.com/?ref=10062065
Charles-Tim
Legendary
*
Offline Offline

Activity: 2142
Merit: 6124


Leading Crypto Sports Betting & Casino Platform


View Profile
October 24, 2025, 09:35:40 PM
 #2

The addresses for mainet and testnet will be different and which is better for people to easily know that is not real bitcoin but testnet.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
BitMaxz
Legendary
*
Offline Offline

Activity: 3850
Merit: 3511


Greediness is destructive.


View Profile WWW
October 24, 2025, 11:59:12 PM
 #3

Are you trying to test and import the mainnet addresses to testnet?
Never done this before. I think you will get a different result, and the address will turn to test addresses.

That's not a bug, but that's a safety feature, but the overall function is completely similar to the mainnet wallet.

The testnet is supposed to be used only for testing purposes; if you are trying to send BTC to a testnet address most of the wallet will shows you invalid address. It's a safety feature for typo error.

.
 betpanda.io 
 
ANONYMOUS & INSTANT
.......ONLINE CASINO.......
▄███████████████████████▄
█████████████████████████
█████████████████████████
████████▀▀▀▀▀▀███████████
████▀▀▀█░▀▀░░░░░░▄███████
████░▄▄█▄▄▀█▄░░░█▄░▄█████
████▀██▀░▄█▀░░░█▀░░██████
██████░░▄▀░░░░▐░░░▐█▄████
██████▄▄█░▀▀░░░█▄▄▄██████
█████████████████████████
█████████████████████████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀░░░▀██████████
█████████░░░░░░░█████████
███████░░░░░░░░░███████
████████░░░░░░░░░████████
█████████▄░░░░░▄█████████
███████▀▀▀█▄▄▄█▀▀▀███████
██████░░░░▄░▄░▄░░░░██████
██████░░░░█▀█▀█░░░░██████
██████░░░░░░░░░░░░░██████
█████████████████████████
▀███████████████████████▀
▄███████████████████████▄
█████████████████████████
██████████▀▀▀▀▀▀█████████
███████▀▀░░░░░░░░░███████
██████░░░░░░░░░░░░▀█████
██████░░░░░░░░░░░░░░▀████
██████▄░░░░░░▄▄░░░░░░████
████▀▀▀▀▀░░░█░░█░░░░░████
████░▀░▀░░░░░▀▀░░░░░█████
████░▀░▀▄░░░░░░▄▄▄▄██████
█████░▀░█████████████████
█████████████████████████
▀███████████████████████▀
.
SLOT GAMES
....SPORTS....
LIVE CASINO
▄░░▄█▄░░▄
▀█▀░▄▀▄░▀█▀
▄▄▄▄▄▄▄▄▄▄▄   
█████████████
█░░░░░░░░░░░█
█████████████

▄▀▄██▀▄▄▄▄▄███▄▀▄
▄▀▄█████▄██▄▀▄
▄▀▄▐▐▌▐▐▌▄▀▄
▄▀▄█▀██▀█▄▀▄
▄▀▄█████▀▄████▄▀▄
▀▄▀▄▀█████▀▄▀▄▀
▀▀▀▄█▀█▄▀▄▀▀

Regional Sponsor of the
Argentina National Team
jubalix (OP)
Legendary
*
Offline Offline

Activity: 2716
Merit: 1036


View Profile WWW
October 25, 2025, 01:02:42 AM
 #4

Are you trying to test and import the mainnet addresses to testnet?
Never done this before. I think you will get a different result, and the address will turn to test addresses.

That's not a bug, but that's a safety feature, but the overall function is completely similar to the mainnet wallet.

The testnet is supposed to be used only for testing purposes; if you are trying to send BTC to a testnet address most of the wallet will shows you invalid address. It's a safety feature for typo error.

Sort of, I am trying to test the idenitcal address on both, I would have thought that you could send testnet btc to the same address on the testnet - I see why its a sfatey feature, the trade off, is it's not an identical check/test

Admitted Practicing Lawyer::BTC/Crypto Specialist. B.Engineering/B.Laws

https://www.binance.com/?ref=10062065
nc50lc
Legendary
*
Offline Offline

Activity: 3010
Merit: 8180


Self-proclaimed Genius


View Profile
October 25, 2025, 04:24:08 AM
Merited by khaled0111 (1), Cricktor (1)
 #5

-snip- the trade off, is it's not an identical check/test
That's the same address but with different network bytes appended.
If you want to check, you can view your inbound transaction(s) on blockstream blockexplorer and cross-check the "scriptPubKey" of the output which should be the same to its mainnet counterpart.

Or for an Electrum-exclusive method: decode each raw transaction in Electrum's console and check the "scriptPubKey" in the output(s):
Copy the raw transaction in your history first (Share->Copy to clipboard) then go to console and use the command:
Code:
deserialize("raw transaction hex")

My main concern is malformed addresses that some how you make an address that you can recieve btc to but never send from, or can never send except to  a specific address.
That'll rarely happen due to a "checksum" that could mitigate that and Electrum doesn't have a known bug that breaks that feature.

Most clients can detect if there's at least one wrong character in the address.
I've seen buggy clients that doesn't detect checksum a few years ago but those must have been patched by now. (definitely not Electrum)
But Legacy addresses has a low chance of 1 out of 2^32 of not being detecting due to its 4Bytes size, and it's a limitation by the address' design not the client's fault.
For SegWit, it depends on the length: /bip-0173.mediawiki#checksum-design

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
jubalix (OP)
Legendary
*
Offline Offline

Activity: 2716
Merit: 1036


View Profile WWW
October 26, 2025, 06:24:33 AM
Last edit: October 26, 2025, 08:23:30 AM by jubalix
 #6

ok so I have tried makeing a javascript html file to do this not sure if it works but seem to

This seems to work, this requires some external imports

https://github.com/jubalix/BTC-Address-Check/blob/main/btc_address_checker.html

This version does not, you should be able to run it offline but is more limited to bc1 addressess

https://github.com/jubalix/BTC-Address-Check/blob/main/btc_address_checker_offline.html


code for first one
Quote
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>BTC Address Equivalence Checker</title>
<style>
  body { font-family: system-ui, sans-serif; max-width: 600px; margin: 2rem auto; }
  input, button { width: 100%; padding: .5rem; margin-top: .5rem; font-size: 1rem; }
  pre { background:#f6f6f6; padding:1rem; border-radius:8px; }
  .ok { color:green; }
  .no { color:red; }
</style>
</head>
<body>
<h2>Bitcoin Mainnet ↔ Testnet Address Checker</h2>

<label>Mainnet or Testnet Address A:</label>
<input id="addrA" placeholder="bc1... or 1... or m...">

<label>Address B:</label>
<input id="addrB" placeholder="tb1... or m... or 1...">

<button id="btn">Compare</button>

<pre id="out"></pre>

<script type="module">
import { bech32 } from 'https://cdn.jsdelivr.net/npm/@scure/[email protected]/+esm';
import bs58check from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';

function decodeAddress(addr) {
  addr = addr.trim();
  if (addr.toLowerCase().startsWith('bc1') || addr.toLowerCase().startsWith('tb1')) {
    const { prefix, words } = bech32.decode(addr);
    const version = words[0];
    const program = bech32.fromWords(words.slice(1));
    return { type: 'bech32', hrp: prefix, version, payload: bytesToHex(program) };
  } else {
    const buf = bs58check.decode(addr);
    const version = buf[0];
    const payload = buf.slice(1);
    return { type: 'base58', version, payload: bytesToHex(payload) };
  }
}

function bytesToHex(b){return Array.from(b, x=>x.toString(16).padStart(2,'0')).join('');}

function compare(a,b){
  try {
    const A = decodeAddress(a), B = decodeAddress(b);
    const eq = A.payload === B.payload && A.type === B.type;
    return {A,B,equivalent:eq};
  } catch(e){ return {error:e.message}; }
}

document.getElementById('btn').onclick = () => {
  const a = document.getElementById('addrA').value;
  const b = document.getElementById('addrB').value;
  const r = compare(a,b);
  const out = document.getElementById('out');
  if (r.error) { out.innerHTML = `<span class=no>Error:</span> ${r.error}`; return; }
  out.innerHTML = `
A → ${JSON.stringify(r.A, null, 2)}
\nB → ${JSON.stringify(r.B, null, 2)}
\nResult: <strong class="${r.equivalent?'ok':'no'}">
${r.equivalent ? 'Equivalent ✅' : 'Different ❌'}
</strong>`;
};
</script>
</body>
</html>

Admitted Practicing Lawyer::BTC/Crypto Specialist. B.Engineering/B.Laws

https://www.binance.com/?ref=10062065
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!