Bitcoin Forum
December 15, 2024, 04:45:20 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Script to Autocombine Inputs per Address  (Read 160 times)
buzzkillb (OP)
Sr. Member
****
Offline Offline

Activity: 1021
Merit: 324


View Profile
April 07, 2020, 11:54:21 PM
 #1

deDust is a simple bash script to clean up wallet inputs, written to work on Denarius. This searches through listunspent on a running wallet daemon and looks for minimum balance and inputs based on user input. From there this creates the rawtransaction to combine all the inputs and sends back to the same address. Its like an automated QT coin control which also keeps the inputs separated so addresses don't get tied together. Very basic bash script using jq, bc, sed, awk and maybe someone who knows what they are doing can make this even more useful. Not sure if there is a limit of inputs per send but I hope someone finds out what the limit could be. I like to keep text files of what I am doing so that's why my scripts create them. In this case if you hit an input limit you could manually take one of the .txt files and quickly do the raw transactions manually.

No private keys being used as the idea is this runs on the user live wallet.

This was intended for Denarius but should be able to change the txfee and daemon calls to work with whatever bitcoin forks.

Someone could tweak this to getnewaddress per send and send each combination of inputs out to a new address 1 by 1, or send it all to 1 address.

WARNING: I am not responsible if you screw this up, think before changing the txfees, or if you have no idea what you are doing.

https://gist.github.com/buzzkillb/878ff03068f141b01fa8afdcc92d9a25
buzzkillb (OP)
Sr. Member
****
Offline Offline

Activity: 1021
Merit: 324


View Profile
April 21, 2020, 10:20:38 PM
 #2

Maybe someone out there will find this more interesting. https://github.com/buzzkillb/bash-denariusrpc
chrysophylax
Legendary
*
Offline Offline

Activity: 2926
Merit: 1091


--- ChainWorks Industries ---


View Profile WWW
April 22, 2020, 03:40:27 PM
 #3

Looks interesting Buzz! ...

Will keep an eye on what you are building and add to if we have anything to add.

Thanks mate!

#crysx

buzzkillb (OP)
Sr. Member
****
Offline Offline

Activity: 1021
Merit: 324


View Profile
April 23, 2020, 08:04:10 AM
 #4

Looks interesting Buzz! ...

Will keep an eye on what you are building and add to if we have anything to add.

Thanks mate!

#crysx

Thanks. Its mainly a way for people who don't know how to code to control their wallet. Someone might look at part of this and say, wow that would be easy to convert into c++ or rust and do some type of universal dedusting app or who knows what. I just got the Denarius IPFS uploader, proof of data and sending messages working. In bash script that is super easy to tie all together and message another address links to IPFS and datahashes. I am thinking maybe 30-50 lines total for powerful stuff, and anyone can learn bash in an hour.
chrysophylax
Legendary
*
Offline Offline

Activity: 2926
Merit: 1091


--- ChainWorks Industries ---


View Profile WWW
April 24, 2020, 01:51:17 AM
 #5

Looks interesting Buzz! ...

Will keep an eye on what you are building and add to if we have anything to add.

Thanks mate!

#crysx

Thanks. Its mainly a way for people who don't know how to code to control their wallet. Someone might look at part of this and say, wow that would be easy to convert into c++ or rust and do some type of universal dedusting app or who knows what. I just got the Denarius IPFS uploader, proof of data and sending messages working. In bash script that is super easy to tie all together and message another address links to IPFS and datahashes. I am thinking maybe 30-50 lines total for powerful stuff, and anyone can learn bash in an hour.

Something like this ...

Would be good for our INFX and SWEEP coins as well. Though I don't hav ethe time to go through it, I am sure your estimation of it not being too difficult would be spot on.

Well done mate. This pretty much helps any wallet that suffers from small/multiple tx limits and issues that accompany that.

Thanks again mate.

#crysx

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!