Bitcoin Forum
December 09, 2016, 05:33:42 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 »
  Print  
Author Topic: Pywallet 2.2: manage your wallet [Update required]  (Read 137393 times)
riclas
Full Member
***
Offline Offline

Activity: 130


View Profile
August 28, 2014, 10:38:15 AM
 #421

ah yes, then that is what happened. I did a full wallet dump to json thinking that i could import it all later. I now realize the "import transactions" option is not what i though. Maybe you could add an option to pywallet to import keys from a full wallet dump? Wink

i'll send you a part of the file in PM. thank you.

Buy and sell bitcoins through Portuguese or SEPA bank transfer and MBWAY: https://localbitcoins.com/accounts/profile/riclas/?ch=4mm6
1481304822
Hero Member
*
Offline Offline

Posts: 1481304822

View Profile Personal Message (Offline)

Ignore
1481304822
Reply with quote  #2

1481304822
Report to moderator
1481304822
Hero Member
*
Offline Offline

Posts: 1481304822

View Profile Personal Message (Offline)

Ignore
1481304822
Reply with quote  #2

1481304822
Report to moderator
1481304822
Hero Member
*
Offline Offline

Posts: 1481304822

View Profile Personal Message (Offline)

Ignore
1481304822
Reply with quote  #2

1481304822
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 28, 2014, 03:35:15 PM
 #422

ah yes, then that is what happened. I did a full wallet dump to json thinking that i could import it all later. I now realize the "import transactions" option is not what i though. Maybe you could add an option to pywallet to import keys from a full wallet dump? Wink

i'll send you a part of the file in PM. thank you.
Yeah, I'll add that to the new version

I did this, try it out and tell me how it goes
Download it into translate.py, then run
Code:
python translate.py wallet.json
That will make a wallet.json.pywalletexport that will (hopefully) be accepted

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
riclas
Full Member
***
Offline Offline

Activity: 130


View Profile
August 28, 2014, 04:14:06 PM
 #423

first there is something wrong with the first if expression. it always prints the usage when i input the command you gave me.
i don't know python to fix it, but i removed the if and ran the script. what it did was create a .csv of the public addresses and labels, not the private addresses, which are the ones i require...

Buy and sell bitcoins through Portuguese or SEPA bank transfer and MBWAY: https://localbitcoins.com/accounts/profile/riclas/?ch=4mm6
riclas
Full Member
***
Offline Offline

Activity: 130


View Profile
August 28, 2014, 05:12:32 PM
 #424

so i went to learn some python basics, and i think i fixed the script. http://pastebin.com/H07bPtGw

is the format really supposed to be "1privkey;label"? if so, i still need to concatenate the 1. otherwise that should do the trick, I would just like some confirmation

Buy and sell bitcoins through Portuguese or SEPA bank transfer and MBWAY: https://localbitcoins.com/accounts/profile/riclas/?ch=4mm6
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 28, 2014, 05:13:30 PM
 #425

Sorry for the bugs

Change
1)
 "if (sys.argv)!=2:" to "if len(sys.argv)!=2:"
2)
"r+=addr+';'+label+'\n'" to "r+=k['sec']+';'+label+'\n'"



Edit: I didn't see your post. And I can't open pastebin on my phone (crazy...).
The file only needs private keys, that's why there's no 1privkey. They start with K, L or 5.

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
riclas
Full Member
***
Offline Offline

Activity: 130


View Profile
August 28, 2014, 05:24:56 PM
 #426

yeah that is basically what i changed, but i thought "private" was the key, not "sec".
thank you!

Buy and sell bitcoins through Portuguese or SEPA bank transfer and MBWAY: https://localbitcoins.com/accounts/profile/riclas/?ch=4mm6
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 28, 2014, 08:45:55 PM
 #427

yeah that is basically what i changed, but i thought "private" was the key, not "sec".
thank you!
So it works, right?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
riclas
Full Member
***
Offline Offline

Activity: 130


View Profile
August 29, 2014, 02:46:37 AM
 #428

yes it worked perfectly. thank you

Buy and sell bitcoins through Portuguese or SEPA bank transfer and MBWAY: https://localbitcoins.com/accounts/profile/riclas/?ch=4mm6
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 29, 2014, 08:55:16 AM
 #429

For future reference the final version is this:
Code:
#!/usr/bin/env python

import json,sys

if len(sys.argv)!=2:
print 'usage: '+sys.argv[0]+' wallet_dump.json'
exit()

f=open(sys.argv[1],'r')
c=f.read()
f.close()

d=json.loads(c)
print d
r=''
for k in d['keys']:
label=''
addr=k['addr']
if addr in d['names'].keys():
label=d['names'][addr]
r+=k['sec']+';'+label+'\n'

f=open(sys.argv[1]+'.pywalletexport','w')
f.write(r)
f.close()

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
digitizing
Member
**
Offline Offline

Activity: 108


View Profile
August 29, 2014, 04:14:43 PM
 #430

How to import private key from file with cli ? not web interface I mean.
madmartyk
Legendary
*
Offline Offline

Activity: 1050


Yes I am a pirate, 300 years too late!


View Profile
August 29, 2014, 04:24:30 PM
 #431

pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string
digitizing
Member
**
Offline Offline

Activity: 108


View Profile
August 31, 2014, 11:02:20 AM
 #432

pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string
I mean importing from file. I have file that contain thousand private key in base58 format.
Can I import them using pywallet cli ?
madmartyk
Legendary
*
Offline Offline

Activity: 1050


Yes I am a pirate, 300 years too late!


View Profile
August 31, 2014, 11:42:46 AM
 #433

pywallet.py --datadir c:\users\username\appdata\roaming\coin name --namecoin --importprivkey Key string
I mean importing from file. I have file that contain thousand private key in base58 format.
Can I import them using pywallet cli ?

Yes, but it will take a while.  I had a wallet with 13,000 keys and it ran for 3 days.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 31, 2014, 12:48:11 PM
 #434

With the web interface you can import them all at once
If you really can't use the WUI then wait a few hours until I release a new version of the new pywallet (I'll post here when it's done)

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
madmartyk
Legendary
*
Offline Offline

Activity: 1050


Yes I am a pirate, 300 years too late!


View Profile
August 31, 2014, 12:53:19 PM
 #435

With the web interface you can import them all at once
If you really can't use the WUI then wait a few hours until I release a new version of the new pywallet (I'll post here when it's done)

The web interface never worked for me, the command line has been a pain in the ass, but it works great!  Great utility jackjack!!
digitizing
Member
**
Offline Offline

Activity: 108


View Profile
August 31, 2014, 02:28:27 PM
 #436

Yes, but it will take a while.  I had a wallet with 13,000 keys and it ran for 3 days.
wow, are you sure it take 3 days to import 13,000 keys ?
so i think it's faster using this command
Code:
cat privkeyfile | while read privkey; do ./bitcoind importprivkey $privkey mylabel false ; done
it was only take about 4 hours to import 20,000 keys.
madmartyk
Legendary
*
Offline Offline

Activity: 1050


Yes I am a pirate, 300 years too late!


View Profile
August 31, 2014, 02:33:11 PM
 #437

Yes, but it will take a while.  I had a wallet with 13,000 keys and it ran for 3 days.
wow, are you sure it take 3 days to import 13,000 keys ?
so i think it's faster using this command
Code:
cat privkeyfile | while read privkey; do ./bitcoind importprivkey $privkey mylabel false ; done
it was only take about 4 hours to import 20,000 keys.

Remember I'm using sucky Windows!!!
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
August 31, 2014, 04:21:16 PM
 #438

I just implemented the multi-import into the new pywallet
I'll post here when it's released

I just tried to import 1000 keys, it took 140 seconds
That would make 45 minutes for 20k keys

Edit: Released here
https://bitcointalk.org/index.php?topic=294439.msg8614086#msg8614086

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
jackjack
Hero Member
*****
Offline Offline

Activity: 882


May Bitcoin be touched by his Noodly Appendage


View Profile
September 03, 2014, 06:56:07 AM
 #439

question about "hexsec" and "secret"

consider this dump of an unencrypted wallet: (don't worry, I won't store bitcoins at these keys, I'm just experimenting)

Code:
   {
        "addr": "1EJP1Q1JEQdWtR5PEopCRZdE1F8dgk9Wwp",
        "compressed": false,
        "hexsec": "c703063648fd19d64de086064692dd17",
        "private": "308201130201010420c703063648fd19d64de086064692dd17bd31ef4ebc8b8caa043d1fc7347d6a23a081a53081a2020101302c06072a8648ce3d0101022100fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f300604010004010704410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8022100fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141020101a1440342000400481a16f118b4efe54b4783f857a9d45c8b5aec6cf03f7bc177ecc1d2faea443d4e94475ac9312cdfde1a30b4e953356c7e93312eabd92ddb070cdcfb981ee5",
        "pubkey": "0400481a16f118b4efe54b4783f857a9d45c8b5aec6cf03f7bc177ecc1d2faea443d4e94475ac9312cdfde1a30b4e953356c7e93312eabd92ddb070cdcfb981ee5",
        "reserve": 1,
        "sec": "5KKw55iWFRmy614626Fo6ckzS7vxNcfhZJHvvo84W3cAzwfRjVo",
        "secret": "c703063648fd19d64de086064692dd17"
    }

Why are "secret" and "hexsec" only 16 bytes?


This is the same key after loading the wallet with bitcoin 0.9 and encrypting it (and decrypting again with pywallet)

Code:
   {
        "addr": "1EJP1Q1JEQdWtR5PEopCRZdE1F8dgk9Wwp",
        "compressed": false,
        "encrypted_privkey": "cb9f081748ed5d42d010b10baa84748535e5588908e6cc70a28c44c550277ecdcaaf0d5e36cc9f919a0cf3471d2832d8",
        "hexsec": "c703063648fd19d64de086064692dd17bd31ef4ebc8b8caa043d1fc7347d6a23",
        "pubkey": "0400481a16f118b4efe54b4783f857a9d45c8b5aec6cf03f7bc177ecc1d2faea443d4e94475ac9312cdfde1a30b4e953356c7e93312eabd92ddb070cdcfb981ee5",
        "reserve": 1,
        "sec": "5KKw55iWFRmy614626Fo6ckzS7vxNcfhZJHvvo84W3cAzwfRjVo",
        "secret": "c703063648fd19d64de086064692dd17bd31ef4ebc8b8caa043d1fc7347d6a23"
    }

It almost looks like the first version was just cut off in the middle.

Another question: Is there any documentation about the various elements of the json that is produced with pywallet?

* For example what is the meaning of the "pool" array, its repeating all the addresses but without their keys but seems to contain additional info, what is the rationale behind structuring it that way and not just put all info about a key into one object?
* what is the empty ckey array at the beginning of the dump?


It indeed cut the private key in the middle because of a stupid error. Thank you so much for finding that. It's now fixed.

Json keys doc:
Quote
defaultkey: Default address of your wallet
keys: Info about the private keys in the wallet
pool: Addresses inside the pool (bitcoin doc for more info)
tx: Transactions saved inside your wallet
names: Labels of addresses
mkey: Info about the master key when the wallet is encrypted
ckey: Not used

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Jackson_cali
Member
**
Offline Offline

Activity: 70


View Profile
September 03, 2014, 09:58:57 PM
 #440

hi can you help ?
How to import private key from file ?

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [22] 23 24 25 26 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!