Removed db_env creation, no more __db files and the app is now fully readonly and should work any filesystem, tried on read-only filesystem and worked without errors.
Brilliant! Much easier to use now. I can already tell this is going to replace pywallet as the go-to tool for working with wallets.
I sent you 1 BTC at 16xe1bCgnDLe27FAWHb4pmKzjiEWzMxLG8. My list below contains some things not in the OP so I'll bump up the total to 2.0 BTC (1.0 BTC left) if these are added.
- --wallet: Can we get rid of the need to type --wallet? Instead just use the first non-option parameter as the wallet file, i.e. wi.py --is-encrypted somewallet.dat
- Note/warning/error formats: For any note/warning/error, let's follow these rules:
- Notes start with NOTE:, warnings start with WARN:, errors start with ERR:
- Always go to stderr instead of stdout
- Always one line
- For any command that requires decrypting the wallet (e.g. --list-keys, --list-private-keys) and an incorrect or missing passphrase is provided, continue running the operation but output wherever an unencrypted private key would normally appear
- Note/warning/error conditions: These are the places I can think of where a message is needed now:
- WARN: whenever a command requires decrypting the wallet and an incorrect/missing passphrase is provided (except for --test-passphrase since that is the whole point of the command)
- NOTE: whenever a command requires decrypting the wallet, the wallet is encrypted, and the correct passphrase is provided
- NOTE: when the wallet is unencrypted and a passphrase is provided
- ERR: whenever the script encounters an error condition during processing it should output an ERR line and keep going if possible. Ideally only one line will be output and not a traceback/debug dump unless a --debug type option is provided. If a traceback/dump is output though it should go to stderr.
- ERR: when --determine-coin is used but the coin is unknown (even if the script knows the "otherversion" still output an ERR since we don't know the coin name. So the output would be ERR to stderr and Unknown,123 to stdout where 123 is the otherversion)
- --balances: This is the major change and why I'm adding the 0.5 BTC since this may take some work. For BTC, LTC, and any other currency that blockr.io supports, use their multi-request API in order to get multiple balances at once. You can pass up to 20 addresses at a time (I think it's 20) and that will greatly speed up --balances.
- --balances: For other non-blockr.io currencies, can the script re-use the existing connection to the web server instead of closing and starting a new request? That should help the speed too.
- --balances: Currently if a lookup fails for one address the script stops. Instead it should output an ERR line and output the public key with "Error" as the balance and keep going.
- --list-public-keys, --balances: Add an --include-contacts option. When this is provided the public keys/balances for addresses in the contact list will be included in the output too. No label is needed, the addresses from the contact list should appear in the output the same way as local addresses.
- --balances: VTC addresses that have not been seen on the network are reported as having a balance of 7.0 by the script. It should report 0.
- Blackcoin/Ultracoin/Mintcoin: Any command I run on Blackcoin/Ultracoin/Mintcoin wallets gives this error message:
Traceback (most recent call last):
File "wi.py", line 1562, in parse_wallet
d['txIn'].append(parse_TxIn(vds))
File "wi.py", line 1502, in parse_TxIn
d['sequence'] = vds.read_uint32()
File "wi.py", line 782, in read_uint32
return self._read_num(' File "wi.py", line 838, in _read_num
(i,) = struct.unpack_from(format, self.input, self.read_cursor)
error: unpack_from requires a buffer of at least 4 bytes
ERROR parsing wallet.dat, type tx
[...]