How can i create an Anyone can spend output?

0

How can i create an Anyone can spend transaction using p2pkh outputs?

Also how would such a transaction in hex look like?

Errol

Posted 2018-03-27T00:53:12.207

Reputation: 77

Answers

2

If it's a P2PKH output, it's not anyone-can-spend. P2PKH implies there is a public key that needs to sign for spending.

You can use a P2SH or P2WSH output which sends to an OP_TRUE script, though.

You can also manually craft a transaction with a scriptPubKey that is literally OP_TRUE. No address corresponds to such an output, so you couldn't use off the shelf wallet software for it.

Pieter Wuille

Posted 2018-03-27T00:53:12.207

Reputation: 54 032

So how can i create an anyone can spend transaction?Errol 2018-03-27T01:49:56.067

1I've expanded the answer a bit.Pieter Wuille 2018-03-27T02:38:02.063

You also have how the transaction will look like (the P2SH Pieter referred to) in a question you asked a few days ago: https://bitcoin.stackexchange.com/q/72773/30668

sr-gi 2018-03-27T08:38:50.607

0

For a P2PKH anyone-can-spend, just send to the address 1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH -- its private key is the integer 1, or in WIF format, KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn. Anyone can spend from this address since the private key is known to all.

Mark Lundeberg

Posted 2018-03-27T00:53:12.207

Reputation: 64

1I don't think "the private key is known" is actually the answer he's looking for.Tiago Loriato Simões 2019-03-29T03:50:10.060