Pages:
Author

Topic: .05BTC (~$1,700) to whoever helps me successfully extract my BTC from CLI wallet - page 4. (Read 1848 times)

legendary
Activity: 952
Merit: 1385
Quote
2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0


I'm getting lots of errors when I run this command: https://ibb.co/rfVqcbn

show us the bottom of error

https://ibb.co/ySLHP2y

Code:
apt-get install python-dev
jr. member
Activity: 57
Merit: 29
Quote
2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0


I'm getting lots of errors when I run this command: https://ibb.co/rfVqcbn

show us the bottom of error

https://ibb.co/ySLHP2y
legendary
Activity: 952
Merit: 1385
Quote
2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0


I'm getting lots of errors when I run this command: https://ibb.co/rfVqcbn

show us the bottom of error
jr. member
Activity: 57
Merit: 29
Quote
2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0


I'm getting lots of errors when I run this command: https://ibb.co/rfVqcbn
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Any update?
Did OP open the wallet and forgot about his promise?


I was able to download Blockstack .18 on Ubuntu thanks to the instructions PawGo gave my via DM (thanks PawGo).

The wallet has 3 keys (data, payment, owner). But I only have a "master key". So I'm not sure if I need to download an even earlier version of Blockstack or if I need to extract the payment key from the master key somehow in version .18.

I emailed Blockstack support but they still haven't responded.


If I install an earlier version of Blockstack, I need to delete Blockstack .18 first right?

So, it looks like Blockstack has it's own private key format that is 64 to 66 characters long. Apparently, even the address types in Blockstack are different from bitcoin addresses but can be converted to and from them.

You should try using blockstack-client (it is a python binding of blockstack https://pypi.org/project/blockstack-client/, it's the one that makes a json file like the one you showed, when a wallet is created and pesters the user to export it to a file). It needs Python 2 to work.

1. Install Python 2
Code:
sudo apt install -y python2

2. Install pip for python 2 (yes we run this as root user)
Code:
sudo curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py

2. Install blockstsck-client
Code:
pip2 install blockstack-client virtualchain==0.14.0

3. Save this wallet JSON you posted to a file, like wallet.json for example.
Code:
{
"master_private_key": "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd49",
"wallet_password": “kljsef9832nkfssf”
}

4. Run
Code:
blockstack set_advanced_mode
and type "on" to access the inport_wallet command.

5. Run
Code:
blockstack import_wallet wallet.json
, it will import your wallet from wallet.json and display your addresses.

6. To get the private keys run
Code:
blockstack wallet

It will show you output like this:

Code:
Enter wallet password: PUT THE wallet_password HERE, IT IS NOT ENCRYPTED
------------------------------------------------------------
Payment address:        1HxJ767HSYyvPzHKBVP1JUHfefNzg53Hp6
Owner address:          1PcCxR81Y5BrrD4FnwoWuJ8tH7kURTe1nv
Data public key:        035d999986a0de6e61a20dfa2b92b22daf451303e7b34a4b34103c33d712cfc1fd
------------------------------------------------------------
Balance:
1HxJ767HSYyvPzHKBVP1JUHfefNzg53Hp6: 0.0
------------------------------------------------------------
Names Owned:
1PcCxR81Y5BrrD4FnwoWuJ8tH7kURTe1nv: []
------------------------------------------------------------
------------------------------------------------------------
Payment private key info: 5K2qrQ36ZiJRdViu8BJpnizVxkFEr2ZFzxycW6VL1NAbTD3GLXy
Owner private key info:   5JybVGERkbVCPNXSRnBBxkch68o2D39hrrYw4h8VXX8QEUsKjcQ
Data private key info:    L4Z7X5s1v5Tpt6CZZBfLzRVsZpEkJoRuxwRGpe4xD8C28hwjeXun
{
    "data_privkey": "dad7d349dff5637d20192396c6fa31f957c22e261c333aeb5ed5101751031afa01",
    "data_pubkey": "035d999986a0de6e61a20dfa2b92b22daf451303e7b34a4b34103c33d712cfc1fd",
    "owner_address": "1PcCxR81Y5BrrD4FnwoWuJ8tH7kURTe1nv",
    "owner_privkey": "5JybVGERkbVCPNXSRnBBxkch68o2D39hrrYw4h8VXX8QEUsKjcQ",
    "payment_address": "1HxJ767HSYyvPzHKBVP1JUHfefNzg53Hp6",
    "payment_privkey": "5K2qrQ36ZiJRdViu8BJpnizVxkFEr2ZFzxycW6VL1NAbTD3GLXy"
}

Note: this is data for a sample wallet I created using blockstack. Do not send any bitcoins to these addresses; you will lose your money.
jr. member
Activity: 57
Merit: 29
Any update?
Did OP open the wallet and forgot about his promise?


I was able to download Blockstack .18 on Ubuntu thanks to the instructions PawGo gave my via DM (thanks PawGo).

The wallet has 3 keys (data, payment, owner). But I only have a "master key". So I'm not sure if I need to download an even earlier version of Blockstack or if I need to extract the payment key from the master key somehow in version .18.

I emailed Blockstack support but they still haven't responded.


If I install an earlier version of Blockstack, I need to delete Blockstack .18 first right?
member
Activity: 170
Merit: 58
Any update?
Did OP open the wallet and forgot about his promise?
HCP
legendary
Activity: 2086
Merit: 4361
Try using bitaddress.org (download and run offline)... click on "wallet details" tab, paste in the "5" WIF key and get the "compressed" WIF that starts with a "K" or "L"... then import that into Electrum, see if that shows your funds.

If it doesn't, then blockstacks was doing something "weird" in regardless to private keys etc... or that key isn't the one that holds your coins.
jr. member
Activity: 57
Merit: 29
Oh sorry I didn't change the second line. Anyways I just changed it now to "extended = "80" + privatekey" and I got a 51 character key but this one starts with 5K and ends in 4k
Starting with a "5" seems like it is an "uncompressed" WIF private key... try importing it into Electrum and see what you get. It should generate an address that starts with a "1".

Okay under "create a new wallet" I chose "import bitcoin addresses or private keys"

then I pasted my private key and created the following address:

1L4aWTjsKJCwUN9aqUwtjDZvR1anXbvDNK


Although my balance says 0 though.
HCP
legendary
Activity: 2086
Merit: 4361
Oh sorry I didn't change the second line. Anyways I just changed it now to "extended = "80" + privatekey" and I got a 51 character key but this one starts with 5K and ends in 4k
Starting with a "5" seems like it is an "uncompressed" WIF private key... try importing it into Electrum and see what you get. It should generate an address that starts with a "1".
jr. member
Activity: 57
Merit: 29
Okay it worked! The private key is 52 characters and starts with cV and ends in gk


So now I should try to import it into Electrum?

Have you changed the code as i mentioned?

If this part code is

Code:
extended = "ef" + privatekey + "01"

or

Code:
extended = "ef" + privatekey

then you're generating WIF for testnet network


Oh sorry I didn't change the second line. Anyways I just changed it now to "extended = "80" + privatekey" and I got a 51 character key but this one starts with 5K and ends in 4k
legendary
Activity: 952
Merit: 1385
I saved it on my desktop...not sure what you mean by "~"?
~ represents the home directory in Linux I guess it's the same in Mac too.
The location of the file should be in the same place where you are trying to execute it.
You should navigate to where the file is located and then execute the command.


Use ls to list what you have in the directory.


Okay it worked! The private key is 52 characters and starts with cV and ends in gk


So now I should try to import it into Electrum?

cV... means the key is for testnet.

Take a look: https://learnmeabitcoin.com/technical/wif
This same key creates different WIFs - and testnet flag (prefix = ef) causes WIF to starts with cV.
jr. member
Activity: 57
Merit: 29
I managed to install it using cygwin, so on your linux machine it should work... Or on Windows... 
Remember that you will probably need packages libssl-devel (for cryptography/wheels) and python-devel.

Okay so I can install it on Windows, Debian, or Ubuntu....anyways so far I downloaded libssl-devel on Ubuntu using these instructions (https://zoomadmin.com/HowToInstall/UbuntuPackage/libssl-dev) but I'm not sure how to download python-devel?



Okay the above is my current status so far
HCP
legendary
Activity: 2086
Merit: 4361
Okay it worked! The private key is 52 characters and starts with cV and ends in gk

So now I should try to import it into Electrum?
That doesn't look like a Bitcoin private key... Bitcoin private keys (in WIF format) start with "5", "L" or "K".

I honestly think that your best chance of success is to get blockstack working and use that, as it would seem that it is using some sort of proprietary format or method of storing private keys. Huh Undecided
jr. member
Activity: 57
Merit: 29
I saved it on my desktop...not sure what you mean by "~"?
~ represents the home directory in Linux I guess it's the same in Mac too.
The location of the file should be in the same place where you are trying to execute it.
You should navigate to where the file is located and then execute the command.


Use ls to list what you have in the directory.


Okay it worked! The private key is 52 characters and starts with cV and ends in gk


So now I should try to import it into Electrum?
legendary
Activity: 2240
Merit: 3150
₿uy / $ell ..oeleo ;(
I saved it on my desktop...not sure what you mean by "~"?
~ represents the home directory in Linux I guess it's the same in Mac too.
The location of the file should be in the same place where you are trying to execute it.
You should navigate to where the file is located and then execute the command.


Use ls to list what you have in the directory.
jr. member
Activity: 57
Merit: 29
Okay I just installed Ruby but can someone confirm exactly what code I should save in the "ruby your_file_name.rb" document if my private key is: ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01 ?

If your private key length is 66 and end with 01, then you need to change these line

Code:
privatekey = "0351764dc07ee1ad038ff49c0e020799f0a350dd0769017ea09460e150a64019"
extended = "ef" + privatekey + "01" #  you can remove 01 to make your wallet generate uncompressed public key

into

Code:
privatekey = "ef242kfjj24ekf3223jesdkhefsfhk324wuefhw38fhrypofhtr34d342132d34jsd01"
extended = "80" + privatekey

Quote
You need to install ruby, save the code on a file and run it with this command


Code:
ruby your_file_name.rb


https://ibb.co/09S189V

Are you sure notepadwif.rb file is located on ~ ?

I saved it on my desktop...not sure what you mean by "~"?
jr. member
Activity: 57
Merit: 29
I managed to install it using cygwin, so on your linux machine it should work... Or on Windows... 
Remember that you will probably need packages libssl-devel (for cryptography/wheels) and python-devel.

Okay so I can install it on Windows, Debian, or Ubuntu....anyways so far I downloaded libssl-devel on Ubuntu using these instructions (https://zoomadmin.com/HowToInstall/UbuntuPackage/libssl-dev) but I'm not sure how to download python-devel?
legendary
Activity: 2240
Merit: 3150
₿uy / $ell ..oeleo ;(
Focus on installing the cli wallet.
Using a virtual machine gives you the conformity to start all over again very quickly if something goes wrong.
Make a backup of the clean installation.

Post here your steps, there are enough people around who would like to help in the process.

Just a note, Windows 10 comes with0 Ubuntu too, only the console versjon but it will be enough for you.

Good luck Smiley
legendary
Activity: 952
Merit: 1385
I have same question, using blockstack should be far easier (since you've used it on past) than mess with the key when we don't know even how blockstack store user's key.

Code:
def aes_decrypt_legacy(payload, secret):
    """
    Legacy AES decryption (FROM INSECURE ENCRYPTION)!
    Return decrypted secret on success
    Return None on error
    """
    print "Falling back to legacy decryption"
   
    # DO NOT USE TO ENCRYPT
    # legacy hold-over for migrating to stronger encryption
    def ensure_length(secret):
        if len(secret) > 32:
            secret = secret[:32]

        elif len(secret) < 24:
            length = 24 - (len(secret) % 24)
            secret += chr(length)*length
        elif len(secret) > 24 and len(secret) < 32:
            length = 32 - (len(secret) % 32)
            secret += chr(length)*length

        return hexlify(secret)

    try:
        PADDING = '{'

        secret = ensure_length(secret)
        cipher = Cipher(algorithms.AES(unhexlify(secret)), modes.ECB(),
                        backend = default_backend())
        decryptor = cipher.decryptor()
        res = decryptor.update(base64.b64decode(payload)) + decryptor.finalize()
        res = res.rstrip(PADDING)
        return res
    except:
        return None


def aes_decrypt(payload, secret):
    """
    Decrypt a base64-encoded payload with a hex-encoded secret.
    Returns the plaintext on success
    Returns None on error
    """
    try:
        res = scrypt.decrypt(base64.b64decode(payload), unhexlify(secret))
        return res
    except scrypt.error:
        res = aes_decrypt_legacy(payload, secret)
        return res
Pages:
Jump to: