Bitcoin Forum
May 10, 2024, 11:52:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Questions about p2sh addresses  (Read 657 times)
yampi (OP)
Sr. Member
****
Offline Offline

Activity: 433
Merit: 250


View Profile
April 23, 2015, 08:32:19 PM
 #1

If I generated a p2sh address from a raw transaction, would I be able to spend it?
Or is p2sh only for multi signature transactions?
1715341957
Hero Member
*
Offline Offline

Posts: 1715341957

View Profile Personal Message (Offline)

Ignore
1715341957
Reply with quote  #2

1715341957
Report to moderator
1715341957
Hero Member
*
Offline Offline

Posts: 1715341957

View Profile Personal Message (Offline)

Ignore
1715341957
Reply with quote  #2

1715341957
Report to moderator
1715341957
Hero Member
*
Offline Offline

Posts: 1715341957

View Profile Personal Message (Offline)

Ignore
1715341957
Reply with quote  #2

1715341957
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715341957
Hero Member
*
Offline Offline

Posts: 1715341957

View Profile Personal Message (Offline)

Ignore
1715341957
Reply with quote  #2

1715341957
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
April 23, 2015, 08:44:18 PM
 #2

If I generated a p2sh address from a raw transaction, would I be able to spend it?

That depends on the particular script that you choose to create.

P2SH just means "Pay To Script Hash"  So, until you define what script is being hashed, it isn't possible to determine if the output will be spendable.

Or is p2sh only for multi signature transactions?

Nope.  P2SH can be used for any valid bitcoin output script.  Multi-sig is just a common and convenient use.
Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1129


View Profile
April 24, 2015, 09:40:47 PM
 #3

If I generated a p2sh address from a raw transaction, would I be able to spend it?
Or is p2sh only for multi signature transactions?

You can certainly create a p2sh address that you can spend.  p2sh is for any script, not just multi-signature scripts.

Of course, you can also create a p2sh address which cannot be spent because there is no script that both hashes to that value and succeeds when checked. 

IOW, anyone can write a script that says, in effect,

if (false) then
   the output may be spent.

and put funds in a p2sh transaction having a hash that corresponds to that script.  It's just not a very useful script.  There's already 1BitcoinEaterAddressDontSendf59kuE, which does the same thing.  But people don't usually create such scripts (which can't be spent) on purpose. 

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!