bulwark-crypto / Bulwark

The primary development repository for the Bulwark project
https://bulwarkcrypto.com/
MIT License
58 stars 57 forks source link

bulwark-cli support transaction export #119

Open jdonohoo opened 6 years ago

jdonohoo commented 6 years ago

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

ghost commented 6 years ago

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

jdonohoo commented 6 years ago

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

dustinengle commented 6 years ago

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.

jdonohoo commented 5 years ago

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

dustinengle commented 5 years ago

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.

jdonohoo commented 5 years ago

@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