Bitcoin Forum
September 20, 2024, 10:43:54 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Signing a tx with two input addresses in two steps, is that possible?  (Read 664 times)
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1011



View Profile
May 29, 2013, 11:28:51 AM
 #1

Suppose I want to create a tx like this: (with A1, A2, B1, B2 being Bitcoin addresses)

Input = A1 (0.3 BTC) , A2 (0.2 BTC)

Output = B1 (0.1 BTC) , B2 (0.3995 BTC) , fee (0.0005 BTC)

Can I "partially sign" this transaction with A1's private key first, and then complete the signature with A2's private key, thus signing it in two separate steps? Or must the signing of such a transaction always occur in one single step?

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1026



View Profile
May 29, 2013, 11:37:42 AM
 #2

signrawtransaction returns the intermediate result each time.  This is clearly demonstrated in Gavin's gist on the raw transaction API:

https://gist.github.com/gavinandresen/3966071

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3472
Merit: 4798



View Profile
May 29, 2013, 05:54:50 PM
 #3

signrawtransaction returns the intermediate result each time.  This is clearly demonstrated in Gavin's gist on the raw transaction API:

https://gist.github.com/gavinandresen/3966071

In other words:

Can I "partially sign" this transaction with A1's private key first, and then complete the signature with A2's private key, thus signing it in two separate steps?

Yes.

Or must the signing of such a transaction always occur in one single step?

No.
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
May 29, 2013, 09:58:33 PM
 #4

See this thread for how to do it with the raw transactions API.

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
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!