Bitcoin Forum
February 04, 2023, 10:37:09 PM *
News: Latest Bitcoin Core release: 24.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How does signrawtransaction know which private key to use?  (Read 606 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
1675550229
Hero Member
*
Offline Offline

Posts: 1675550229

View Profile Personal Message (Offline)

Ignore
1675550229
Reply with quote  #2

1675550229
Report to moderator
1675550229
Hero Member
*
Offline Offline

Posts: 1675550229

View Profile Personal Message (Offline)

Ignore
1675550229
Reply with quote  #2

1675550229
Report to moderator
1675550229
Hero Member
*
Offline Offline

Posts: 1675550229

View Profile Personal Message (Offline)

Ignore
1675550229
Reply with quote  #2

1675550229
Report to moderator
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.
1675550229
Hero Member
*
Offline Offline

Posts: 1675550229

View Profile Personal Message (Offline)

Ignore
1675550229
Reply with quote  #2

1675550229
Report to moderator
piotr_n
Legendary
*
Offline Offline

Activity: 2053
Merit: 1309


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: 3836
Merit: 7265



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!