Bitcoin Forum
December 01, 2022, 10:32:01 AM *
News: Bitcointalk Community Awards
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does signrawtransaction know which private key to use?  (Read 602 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
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1669890721
Hero Member
*
Offline Offline

Posts: 1669890721

View Profile Personal Message (Offline)

Ignore
1669890721
Reply with quote  #2

1669890721
Report to moderator
1669890721
Hero Member
*
Offline Offline

Posts: 1669890721

View Profile Personal Message (Offline)

Ignore
1669890721
Reply with quote  #2

1669890721
Report to moderator
1669890721
Hero Member
*
Offline Offline

Posts: 1669890721

View Profile Personal Message (Offline)

Ignore
1669890721
Reply with quote  #2

1669890721
Report to moderator
piotr_n
Legendary
*
Offline Offline

Activity: 2054
Merit: 1292


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: 3822
Merit: 7210



View Profile
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!