Bitcoin Forum
January 20, 2021, 06:25:40 AM *
News: Latest Bitcoin Core release: 0.21.0 [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 621 times)
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1000



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
1611123940
Hero Member
*
Offline Offline

Posts: 1611123940

View Profile Personal Message (Offline)

Ignore
1611123940
Reply with quote  #2

1611123940
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1611123940
Hero Member
*
Offline Offline

Posts: 1611123940

View Profile Personal Message (Offline)

Ignore
1611123940
Reply with quote  #2

1611123940
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1001



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: 2352
Merit: 1770



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: 250


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!