Bitcoin Forum
November 19, 2024, 12:18:19 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I can't access to my wallet  (Read 197 times)
BTCProFan (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
May 30, 2020, 10:22:50 AM
 #1

Hello,

I have my wallet in Bitcoin Core old 3 years, and I have some money on my wallet.
I want to make withdrawal, and I can't because... I have my private key also I export wallet.dat.
Problem is if import key to electrum or bitcoin.com I got different public address and in different I dont have money...

I have make one test in another pc and I only replace wallet.dat I got the correct public address.

How is that possible?
FatFork
Legendary
*
Offline Offline

Activity: 1792
Merit: 2675


Crypto Swap Exchange


View Profile WWW
May 30, 2020, 10:35:09 AM
 #2

Since you managed to import wallet.dat on another computer, why don't you just send all coins to the new address (new wallet) from there?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Thasins61
Newbie
*
Offline Offline

Activity: 44
Merit: 0


View Profile
May 30, 2020, 01:42:23 PM
 #3

The wallet follows the traditional way to derive the public key from the private key, so you will see the address as p2pkh address.
You must define the wallet that you want to derive p2wpkh-p2sh/p2wpkh from the address by adding the appropriate word before importing the private key.
The solution above is correct, as you can try with electrum console:

Code:
key = 'your_key'
txin_type, secret, compressed = bitcoin.deserialize_privkey(key)
wif2 = bitcoin.serialize_privkey(secret, compressed, 'p2wpkh-p2sh')
print(wif2)
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!