Bulwark icon indicating copy to clipboard operation
Bulwark copied to clipboard

bulwark-cli support transaction export

Open jdonohoo opened this issue 6 years ago • 6 comments

Title says it all, programmatic access to exporting transactions via cli would be awesome.

jdonohoo avatar Oct 30 '18 08:10 jdonohoo

We do have gettransaction and gettxout from the cli plus a few other get commands, let us know if this suffices

https://github.com/bulwark-crypto/Bulwark/blob/master/doc/bulwark-core/Bulwark-API-Calls.md#full-list

ghost avatar Nov 06 '18 23:11 ghost

@padraiq I was referring to programmatic access to the Export button on the transaction tab.

jdonohoo avatar Nov 08 '18 00:11 jdonohoo

RPC Commands to pull transaction information for accounts.

listaccounts

This will list the accounts and their balances.

listtransactions ( "account" count from includeWatchonly)

Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.

Arguments:
1. "account"    (string, optional) The account name. If not included, it will list all transactions for all accounts.
                                     If "" is set, it will list transactions for the default account.
2. count          (numeric, optional, default=10) The number of transactions to return
3. from           (numeric, optional, default=0) The number of transactions to skip
4. includeWatchonly (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')

This will return the transactions for an account.

dustinengle avatar Nov 11 '18 17:11 dustinengle

I wouldn't call this the same, as the outputs are the raw non pretty cleaned up stuff that the export button provides... It's a work around that requires some heavy data massaging / further commands to get the same dataset. @dustinengle

jdonohoo avatar Jan 04 '19 00:01 jdonohoo

Would a RPC command like exporttransactions {path} that would export the .csv file to the path provided work? The {path} value would be something like /home/user/Documents/bwktxs.csv for example so the whole command would be bulwark-cli exporttransactions /home/user/Documents/bwktxs.csv to run it from the command line.

dustinengle avatar Jan 04 '19 00:01 dustinengle

@dustinengle yea, that's literally how I was thinking when I requested this originally. Sorry, that I wasn't more clear. I was thinking a command like bulwark-cli exporttransactions and it defaults to your bulwark directory, and the path is an optional arg.

Something Like This: Windows Default: %appdata%/bulwark/bwk-transactions.csv Linux Default: ~/.bulwark/bwk-transactions.csv

jdonohoo avatar Jan 04 '19 14:01 jdonohoo