Bitcoin Forum
March 01, 2024, 01:24:31 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does signrawtransaction know which private key to use?  (Read 611 times)
ned.ryerson (OP)
Full Member
***
Offline Offline

Activity: 756
Merit: 101


Oikos.cash | Decentralized Finance on Tron


View Profile
June 03, 2014, 03:27:30 PM
 #1

It only has a previous output (hash and vout index) but nothing to tell it which address that output was for, so how can it choose the correct private key to sign the transaction?

OIKOS.CASH      Decentralized finance on Tron   ▬▬▬▬▬▬▬▬▬▬▬▬▬   Collateral-backed stable-coins
         github  telegram    twitter    discord           synthetic asset trading and trustless token exchange on TRON
1709256271
Hero Member
*
Offline Offline

Posts: 1709256271

View Profile Personal Message (Offline)

Ignore
1709256271
Reply with quote  #2

1709256271
Report to moderator
1709256271
Hero Member
*
Offline Offline

Posts: 1709256271

View Profile Personal Message (Offline)

Ignore
1709256271
Reply with quote  #2

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

Posts: 1709256271

View Profile Personal Message (Offline)

Ignore
1709256271
Reply with quote  #2

1709256271
Report to moderator
1709256271
Hero Member
*
Offline Offline

Posts: 1709256271

View Profile Personal Message (Offline)

Ignore
1709256271
Reply with quote  #2

1709256271
Report to moderator
1709256271
Hero Member
*
Offline Offline

Posts: 1709256271

View Profile Personal Message (Offline)

Ignore
1709256271
Reply with quote  #2

1709256271
Report to moderator
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1344


aka tonikt


View Profile WWW
June 03, 2014, 03:39:48 PM
 #2

hash and vout index refer to a UTXO record containing a spend script. the spend script refers to a public address, upon which a private key can be matched.

Check out gocoin - my original project of full bitcoin node & cold wallet written in Go.
PGP fingerprint: AB9E A551 E262 A87A 13BB  9059 1BE7 B545 CDF3 FD0E
ned.ryerson (OP)
Full Member
***
Offline Offline

Activity: 756
Merit: 101


Oikos.cash | Decentralized Finance on Tron


View Profile
June 03, 2014, 03:43:14 PM
 #3

hash and vout index refer to a UTXO record containing a spend script. the spend script refers to a public address, upon which a private key can be matched.
But if you're offline (and no blockchain access), how can it get the UTXO?

OIKOS.CASH      Decentralized finance on Tron   ▬▬▬▬▬▬▬▬▬▬▬▬▬   Collateral-backed stable-coins
         github  telegram    twitter    discord           synthetic asset trading and trustless token exchange on TRON
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4144
Merit: 8335



View Profile WWW
June 03, 2014, 03:48:57 PM
 #4

But if you're offline (and no blockchain access), how can it get the UTXO?
It can't in that case, thats why it has an optional scriptpubkey argument.
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!