Bitcoin Forum
December 11, 2024, 03:34:58 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: send remain coins after timeout to the default address  (Read 565 times)
init1 (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 7


View Profile
September 03, 2015, 11:42:22 AM
Merited by ABCbits (1)
 #1

hello!

Can I send remain coins after delay to the default address

for example

1. create raw TX and get address = "p2shaddresstest"
2. prepare TX which send all coins from "p2shaddresstest" to the "defaultaddress"
3. set timeout, for example 24h
4. send TX to the bitcoin network

The main aim, prepare some transaction which will send all remained coins from one address to the another after time out.

Does API has any methods for this purpose ?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3570
Merit: 6927


Just writing some code


View Profile WWW
September 03, 2015, 11:51:47 AM
Merited by ABCbits (1)
 #2

You probably should use a transaction with locktime for the second transaction.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4894



View Profile
September 03, 2015, 02:55:36 PM
Merited by ABCbits (1)
 #3

- snip -
2. prepare TX which send all coins from "p2shaddresstest" to the "defaultaddress"
3. set timeout, for example 24h
4. send TX to the bitcoin network

The main aim, prepare some transaction which will send all remained coins from one address to the another after time out.
- snip -

Transactions do not spend "from an address".  Transactions spend specifically listed unspent outputs.  If you spend any of those outputs before the timeout, then the transaction becomes invalid and will be rejected by the network.

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!