Bitcoin Forum
June 17, 2024, 02:51:30 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / BitcoinJ / How to interpret a Wallet.toString() dump? on: September 27, 2016, 05:16:37 PM
Hi everyone.

I'm trying to get the Extended private key (xprv) for a wallet at MultibitHD.
An option would be finding the correct derivation path for MBHD, but I've been through all the documentation I can find, tried several options and wasn't able to derive addresses I see on MBHD.

I used wallet-tool.jar to dump the wallet. It gives me the MasterKey in hex, which I don't know how to import.
Full paste here of a test wallet:

http://pastebin.com/3aEDSV4q

Code:
    network_identifier: "org.bitcoi[Suspicious link removed]oduction"
key {
  type: DETERMINISTIC_MNEMONIC
  secret_bytes: "unknown liberty blind legend online wing blush eternal develop category ski please"
  creation_timestamp: 1381276800000
  deterministic_seed: "\310&b\301\337PX\263\335\337\262@\204\021\333\366Z\315\033\3014jl\001Ub\030\312\357\271\353\267i\211\026\031\331\366\vA\255\025\321\033e\370(\352aa\f<\315\240!R7\252M\227:\372a"
}
key {
  type: DETERMINISTIC_KEY
  secret_bytes: "\267\344\v\335i\364d\360\'\267\265\361P\2121<\005\342\245\346F\272\302+\315\037o\240\244\2732"
  public_key: "\002\234Q\245\251-\2164~\202\2752a\v}\250k=\375\334\345H\244\230YY\365\'\024\317N\262\352"
  creation_timestamp: 1381276800000
  deterministic_key {
    chain_code: "\025\303\361ms\334[\340\004\236\350%\265\361\021;\240\337T4M\316mcc`\254pT\260t."
  }
}

I could try using those secret bytes to import into NBitcoin, which I know how to use, but I can't convert them to hex.

Thanks for any help.
2  Other / MultiBit / Re: Need help dumping master private key from wallet. Can offer 0.1 btc for the help on: September 27, 2016, 01:04:58 AM
Do you have the seed?

If so, you can use https://dcpos.github.io/bip39/ to generate your extended master private key (your "xprv") from your seed. (Follow the directions to use that tool offline before actually using it, though).

To verify, that tool can also generate your addresses. Select the BIP32 tab, and use a derivation path of m/0'/0/0 for your first address, m/0/0/1 for your second, etc.

If you don't have your seed, you can extract it from your wallet file (assuming you have the password of course) with this: https://github.com/gurnec/decrypt_bitcoinj_seed.

Hello Chris, thanks for the reply.
I tried with that tool, another found here: https://github.com/bip32JP/bip32JP.github.io and deriving manually using NBitcoin, a library for C#, but I can't find an address I know is part of that seed (I can see it in Multibit HD).

I'm trying with the paths "m/0'/0/N" (receiving addresses) and "m/0'/1/N" (for change).

Derived N=100 and haven't found it.
You sure that's the path?
Thanks again.
3  Other / MultiBit / Need help dumping master private key from wallet. Can offer 0.1 btc for the help on: September 26, 2016, 10:58:05 PM
So, title! Need help manipulating BitcoinJ's wallet object in order to dump the master private key of a MultibitHD Wallet. 0.1 BTC.

I have the wallet file and password. I would like to be able to get the BIP32 extended private key (xprv) from it.
Additionally, be able to derive it from the wallet seed. I can't figure out the derivation path.

This is as far as I've gotten:

What I do is restore a wallet and then try to get the private key from the Wallet object:

    NetworkParameters PARAMS = MainNetParams.get();
    DeterministicKeyChain kc = wallet.getActiveKeychain();
    DeterministicKey rk = kc.getRootKey();
    String key = rk.getPrivateKeyAsWiF(PARAMS);


I'm getting an exception saying java.lang.IllegalStateException: Private key bytes not available
4  Bitcoin / BitcoinJ / How to get the master private key from a Wallet object? on: September 26, 2016, 03:29:07 AM
Hi people.
I'm trying to dump the master private key from MultibitHD to monitor from other wallet, but I can't get it right.
What I do is restore a wallet and then try to get the private key from the Wallet object:

Code:
NetworkParameters PARAMS = MainNetParams.get();
DeterministicKeyChain kc = wallet.getActiveKeychain();
DeterministicKey rk = kc.getRootKey();
String key = rk.getPrivateKeyAsWiF(PARAMS);

I'm getting an exception saying java.lang.IllegalStateException: Private key bytes not available

Any help would be greatly appreciated.

Alternatively, if someone knows how to properly derive the master key from the seed using a third party tool, that'd help!
5  Economy / Currency exchange / Buy ReSharper for me with PayPal, will pay 25% more for the trouble. on: September 24, 2016, 04:14:10 AM
I need someone to buy the software for me with PayPal.

It's 12.90 euros.
https://www.jetbrains.com/resharper/buy/#edition=personal
6  Bitcoin / Electrum / Re: How to get Master Private Key on: August 31, 2016, 02:15:49 AM
I didn't lost my seed so no problem...

Just wanted to know if it is possible to do that

Yep:

1) Remove password from your wallet
2) Open the wallet file with a text editor and search for "xprv"

Protip: put a password back in and take care of the master private key as you would the seed.
7  Economy / Service Discussion / Re: Can't do POST request on C# to blockr.io on: April 22, 2016, 08:54:49 PM
Where is the "Response" function ? Isn't it suppose to be followed by the "Request" client ? I have never used Blockr API but check the req,res part again.

Hey Ken.
The issue was that I was selecting the whole transaction as the input and not choosing the appropriate indexes, so I was creating a transaction with no signatures for those inputs I didn't have the private keys for.

Damn, you think you get Bitcoin, until you need to create a TX manually.
8  Economy / Service Discussion / Can't do POST request on C# to blockr.io on: April 22, 2016, 09:02:42 AM
Trying to write a method to push a TX, I never programatically done a POST request, so I'm clearly messing somewhere bad.

According to the documentation from blockr, I'm supposed to do this:

Quote
    To publish a transaction make a POST (!) request with your transaction hex to the push API.

    Using curl this would be like (shell example):

    curl -d '{"hex":"TX_HASH"}' http://btc.blockr.io/api/v1/tx/push

I'm getting 500 errors left and right.

I'm doing this on C#, could someone help?

Code:
Post("http://btc.blockr.io/api/v1/tx/push", "hex", HexString);


    public static void Post(string RequestURL, string Post1, string Post2)
    {
        using (var wb = new WebClient())
        {
            var data = new NameValueCollection();
            data[Post1] = Post2;
            var response = wb.UploadValues(RequestURL, "POST", data);
        }
    }
9  Other / MultiBit / Re: Lost my seed, have the password and the mbhd.wallet.aes & mbhd.yaml files on: April 21, 2016, 07:05:59 AM
OK, so I got something.

I added this code to the test and ran it with a newly created wallet file, so I can post the results here:
Code:
 File encrypted = new File("/tmp/mbhd.wallet.aes");
    File decrypted = new File("/tmp/mbhd.wallet");
    CharSequence passwordTest = "DFopdjfj0ps0u3Fjns02";
    
    InputStream decryptedInputStreamTest = EncryptedFileReaderWriter.readAndDecrypt(
            encrypted,
            passwordTest
    );
    OutputStream out = new FileOutputStream(decrypted);
    byte[] buf = new byte[4096];
    int len;
    while((len=decryptedInputStreamTest.read(buf))>0){
    out.write(buf,0,len);
}
    out.close();
    decryptedInputStreamTest.close();



I can't make sense of most of the result, probably forgot some extra step in decoding the contents?
I could find anything related to an xprv or xpub, only addresses (not mine, it's a new walelt, maybe BRIT fees?) and some strings related to the wallet file.
Here's part of the end,  where you can see something that makes sense and a lot of gibberish.

Could you point me to the right direction? Thank you!

Code:
r3.-k껛 enM3&(2

8u`08R
MatcherResponse
2
1461219107720
1DHzpZTVFQ3MZkEP3sEWumwu1ThuGXD8gY
13wETtwjJPJcCzuHetRVpY9VaSpqtrsSD6
1MMRdXYaUbZYP3UM18aiY6FksZ9nUGvdYA
1YPNNE8YnxRPniPKsgAE2ztZ5KsBu4DTA
12hJX5x6h1dsqNYcw7QHyFv3WBFm3Aa2c8
1BVo2JKBFpamY8EPJxL62tWUX2zuyCYPWw
1Ei8Ag71MsZ1e9bL9s7fJ2YygRMakmFcvM
1obX8EaiEa7qXtC3D9gg2MrxbghvBcNEk
1GVhrppb9gdUMmKMANWjH3sm4hi1AiPsV4
1EAqLzhiJtf33TJpEQCEUX7FYfgBbyRSMT
1NyaDvBj9w7VnQkPXMh3BQKuCh3vYcsCee
1DRvyqQ4obyHX3r1Q1vwXUSVedm1nndLm
1LUsCyniXYiyjRBd2uHwHrf8qm16Pd2aE1
12oNUKXSKZQdYMmVADG5pV3hzuV45vJEuM
1BbpFZHCDfL2XoDGaap6NU4ujgrQ5uuuAE
1JfefEEn7HYPB7nYZr25zC8RQvD3uWTaWX
1M6Jh469nDR547RAEPrhEwMjVDd2Yi59FU
1AAtURnLRHdEU97hJeyN2gAcdm2uB8em3G
1ATBw7YcX2Hnu9LFBdP1bpHBx3DaDkG7Cs
1Ax6QDCu6ADjhVe5bhm3uNCponv3JTjEHL
14h5VRV1FgAkENBVsNEmp2g9PkYbSpnToN
1GNBmNXpgx9jRAGj5AE3XfwNLT11NF6Fj5
123wL8jeuh6q1LaTXpiKiNKB8JVovFSAhP
1QBTDymkKrMxWj9VQfbg14r7YFbZN2NVsZ
1DuxDq7YaAgRhHqbnkEePpnfW1r8HWCRGP
1GNPdT2MpbTkDvPHRePhtbJEYE7nQEoq2W
15cgY1LQfY53SpuADmUNSM2QTUL9iAq7UV
1EW4x8cRfPTT2esQ8cqjQ9iQtW8PqRaXac
1HESXFGSSoXLBx9RzdU5fZ1xPAifh7AVgq
1921X1MbUK4LNiCEgK9d1cr3Eef68wLV7w
1cktWAVMNnt4JFsEMUzu7fhxgudsWayqX
1GiZk527CbmSQX9x9D1ekqGrCn9UKRHSjU
1BWo8tzsFMD8Ugo8vjey3vTV6uekSGP7iV
1LtN28EhMxLZui9wiaaT73dHjUKgigQJX9
18LhJHhmUPJH99Wx6dY572BCquTkrbbbF6
1KJMvWRKi3qhtn2qEehUzhgcwoQiZsW5F1
1CMBM9HDtR96S3Ca5U3z6a1T5WxrPpsrLU
1Dr4XRnDQLFLo9aRetMDRZaMEnK132H4Ar
1FjZwrusi8uFopJeXqb5znjbrkJaoJ2tfY
1MV35kjvmMXp47jQ3d4sEk56a3cZpdwWn2
15QqKvnGHrv6C6jrxAykaMHYpDwTj7n4v7
16rcDHBwWL9x1tQkLT92i1mwo4F7QQGCUh
12i2444dq46Bz1sScMbsmgbSYzdd3h6UzG
1JCofCtx7GMiQjoUG5CJnhPkysuh4PK3XS
1B931xX2cJ1zXSwNkZa9Bd3eZD2vt8gKoY
1EzUxmvSEp5R4xpT5MSakhVjjbNwKAovaa
1MxpFR89jBmSG3LsWHXmYaHmo98n7N969B
1GQj7CtcNA4Km8d4cfNpdB4zqjWLe5jXyH
1BhaFjq7hcLCU1kqn5AjCuhC34WjanuyZE
18R8XarzzqjzNQkZg1aMdhqjKU9wk39WZJ
 RD
(org.multibit.hd.core.WalletTypeExtensionMBHD_SOFT_WALLET_BIP32 `h pŖ


10  Other / MultiBit / Re: Lost my seed, have the password and the mbhd.wallet.aes & mbhd.yaml files on: April 19, 2016, 07:14:01 AM
Bump! Anyone?
11  Other / MultiBit / Re: Lost my seed, have the password and the mbhd.wallet.aes & mbhd.yaml files on: April 17, 2016, 10:00:45 AM
Not using the UI of MultiBit HD no.

You need one of the encrypted backups that are created and the wallet words to decrypt them to recreate a complete wallet directory for everything to work properly.

The wallet is encrypted with the wallet password so you could do it programmatically and dump the private keys yes.

Hi Jim, thanks for the response.
I tried some tools on a Linux box and wasn't able to decrypt the .aes file.
Could you let me know which one should I use?

Thank you.
12  Other / MultiBit / Lost my seed, have the password and the mbhd.wallet.aes & mbhd.yaml files on: February 04, 2016, 07:02:38 PM
Hello people. How can I reconstruct my wallet with those 2 files or at least extract the xpriv or private keys?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!