Bitcoin Forum
April 19, 2024, 10:31:59 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Coin Control (Alternative) on the Daemon  (Read 123 times)
rpstatic (OP)
Jr. Member
*
Offline Offline

Activity: 53
Merit: 7


View Profile
July 04, 2018, 07:33:19 AM
 #1

I have a staking wallet on a small VPS with a high amount of small inputs and would like to combine them. Due to the low hardware resources I am running only the wallet daemon without GUI. Is there an easy way to combine only the small inputs (I don't want to lose the weight of the larger inputs)?
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713522719
Hero Member
*
Offline Offline

Posts: 1713522719

View Profile Personal Message (Offline)

Ignore
1713522719
Reply with quote  #2

1713522719
Report to moderator
1713522719
Hero Member
*
Offline Offline

Posts: 1713522719

View Profile Personal Message (Offline)

Ignore
1713522719
Reply with quote  #2

1713522719
Report to moderator
1713522719
Hero Member
*
Offline Offline

Posts: 1713522719

View Profile Personal Message (Offline)

Ignore
1713522719
Reply with quote  #2

1713522719
Report to moderator
mocacinno
Legendary
*
Online Online

Activity: 3360
Merit: 4917


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
July 04, 2018, 07:34:51 AM
 #2

I have a staking wallet on a small VPS with a high amount of small inputs and would like to combine them. Due to the low hardware resources I am running only the wallet daemon without GUI. Is there an easy way to combine only the small inputs (I don't want to lose the weight of the larger inputs)?

If you wallet was forked from bitcoin core, it'll probably allow you to:
listunspent ( minconf maxconf  ["addresses",...] [include_unsafe] [query_options])

followed by
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...} ( locktime ) ( replaceable )

followed by
signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

followed by
sendrawtransaction "hexstring" ( allowhighfees )


Basically: find the txid and vout of all unspent outputs you wish to combine, then manually create a transaction with the unspent outputs from the first step as an input, and an output funding one of your own addresses (sum of the value of the inputs - sum of the value of the outputs = fee). You can easily generate a new address to fund using "getnewaddress ( "account" )"
Afterwards, sign this transaction and broadcast the signed transaction.

AFAIK, that's the only way to spend *some* of your unspent outputs using the cli.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
rpstatic (OP)
Jr. Member
*
Offline Offline

Activity: 53
Merit: 7


View Profile
July 04, 2018, 07:50:11 AM
 #3

Thank you for this detailed instructions. After a few initial parse errors I was able to create the transaction with
Code:
createrawtransaction "[{\"txid\":\"id\",\"vout\":n}]" "{\"address\":amount}"

I just had to escape the double quotes.
mocacinno
Legendary
*
Online Online

Activity: 3360
Merit: 4917


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
July 04, 2018, 07:59:16 AM
 #4

Thank you for this detailed instructions. After a few initial parse errors I was able to create the transaction with
Code:
createrawtransaction "[{\"txid\":\"id\",\"vout\":n}]" "{\"address\":amount}"

I just had to escape the double quotes.

Yup, those quotes get me every time, it usually takes me 3 or 4 tries before i can create a raw transaction  Grin
If you run into any other problems, give us a shout!

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!