Author Topic: 2 x 300 PTS Bounty to Import Electrum or Armory Wallet [CLOSED]  (Read 8061 times)

0 Members and 1 Guest are viewing this topic.

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile

Offline bytemaster

I can see the payment to batmaninpink, but not the one to me for the armory wallet.

Dang, I read the prior bounty regarding the Armory and completely missed yours.   So here is what I can do.  I can either send you 600 PTS today or I can send you 300 PTS today and 400 BTS when the wallet is ready.   
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
I can see the payment to batmaninpink, but not the one to me for the armory wallet.

Offline bytemaster

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline batmaninpink

  • Newbie
  • *
  • Posts: 12
    • View Profile
Both my Electrum wallet support and Brownbear's Armory support has now been successfully merge into main tree - so time to close and pay now that it happens to be the 28th? ;)
All ur PTS belong to Pe8tGCH7uGjjQjfBGAbJ6FjQRwgK5u9rUK

Offline thisisausername

Can we get unit tests for this code.  I need more assurances than 'may work' :)

Done.  Though badmaninpink's solution is probably better.  Mine definitely depends heavily upon python.

The benefit of nigh-instantly adapting to electrum changing the way they do wallets...  eh, not very likely.
Pjo39s6hfpWexsZ6gEBC9iwH9HTAgiEXTG

Offline batmaninpink

  • Newbie
  • *
  • Posts: 12
    • View Profile
Here is my take on the support for importing keys from Electrum wallets  - no external dependencies - uses Boost::Spirit to parse the python wallet dictionary:

https://github.com/InvictusInnovations/BitShares/pull/45
All ur PTS belong to Pe8tGCH7uGjjQjfBGAbJ6FjQRwgK5u9rUK

Offline bytemaster

Regenerate keys needs 32 byte raw key data.

Awesomeness, thanks for the info.  Pull request updated with code that may work, much better than the previous code that certainly didn't!

Can we get unit tests for this code.  I need more assurances than 'may work' :)
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline batmaninpink

  • Newbie
  • *
  • Posts: 12
    • View Profile
I am working on the Electrum support as well, should be done by tonight and does not rely on Python.
All ur PTS belong to Pe8tGCH7uGjjQjfBGAbJ6FjQRwgK5u9rUK

Offline thisisausername

Regenerate keys needs 32 byte raw key data.

Awesomeness, thanks for the info.  Pull request updated with code that may work, much better than the previous code that certainly didn't!
Pjo39s6hfpWexsZ6gEBC9iwH9HTAgiEXTG

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
Regenerate keys needs 32 byte raw key data.

Offline thisisausername

Sorry for not getting to this yesterday, had to deal with some snow.

In any case, I think I'm done.  See pull request here.

A few caveats:


0) Haven't tested it yet (beyond that it compiles and that the generated C++ code properly dumps keys -- haven't tested the glue C++.)  I'll get on that as time permits in the next day or two.


1) I'm especially unsure about
Code: [Select]
fc::datastream<const char*> stream(keys[i].c_str(), keys[i].size());
fc::sha256 bits;
stream >> bits;
keysRet.push_back(fc::ecc::private_key::regenerate(bits));

I took it from DerKorb's multibit wallet import implementation.  In my case keys{i} is going to be a 51-character, starts-with-a-5 style uncompressed key -- but I haven't looked into whether that's what he was dealing with as well.


2) The cython-generated C++ file isn't very clean.  I realized that a better way to do things than to make a minimal private key extractor from the electrum code would be to minimally modify the electrum code, thereby making it easier to keep the import function working should electrum change the way they handle wallets.  In any case I added to vendor (wrong place, I know, there wasn't anywheres that fit too well) a makefile script and patch that lets one copy over the electrum lib directory and easily regenerate the C++ code.


3) I made the cmake file rely upon python 2.7.5 exactly.  This isn't right, we just need python 2.x, but I cannot for the life of me figure out how to set a maximum (minimum required versions are easy) that cmake will find and it always goes for 3.3 on my system.
« Last Edit: February 14, 2014, 11:45:33 am by thisisausername »
Pjo39s6hfpWexsZ6gEBC9iwH9HTAgiEXTG

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
It can read BTC wallets as well as PTS wallets.

Offline bytemaster

I've added support for Armory:
https://github.com/InvictusInnovations/BitShares/pull/39
https://github.com/InvictusInnovations/fc/pull/9

Note:
this is compatible with DreKrobs PTSArmory wallets, which have a different structure due to compressed public keys

Is it compatible with BTCArmory  wallets which may have given to the ags address?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline BrownBear

  • Full Member
  • ***
  • Posts: 51
    • View Profile
I've added support for Armory:
https://github.com/InvictusInnovations/BitShares/pull/39
https://github.com/InvictusInnovations/fc/pull/9

Note:
this is compatible with DreKrobs PTSArmory wallets, which have a different structure due to compressed public keys
« Last Edit: February 13, 2014, 09:19:00 pm by BrownBear »