<p>It's definitely possible and you've done the nesting correctly.
Also, aside from being "useless and meaningless", it's more expensive since the scriptSig for redeeming outputs sent to this address will have to contain the 26 bytes of the redeemScript (the p2pkh script itself) and the push operation of it, along with the public key and signature.</p>

CC BY-SA 4.0
2018-12-22T06:12:44.603Z
2018-12-22T06:12:44.603Z
arubi
<p>There is a known form of address that called <code>P2SH-wrapped SegWit</code>, wrapping SegWit address as Base58 (P2SH) address.<br>
Thinking about such address type, I come up with the question: <code>Is P2SH-wrapped P2PKH possible?</code><br>
I know that it is completely useless and meaningless, but I want to think about it now.     </p>

<h1>Step 1: Decide an address to convert</h1>

<p>Let's use the address <code>1CciesT23BNionJeXrbxmjc7ywfiyM4oLW</code> as it is used as a sample <a href="https://en.bitcoin.it/wiki/Mini_private_key_format" rel="nofollow noreferrer">here</a>.</p>

<h1>Step 2: Convert it into "output script", then hash it using "hash160"</h1>

<p>I got <code>OP_DUP OP_HASH160 7f6ab65fa911f558ca2dde3e9d073acb02c0d5c6 OP_EQUALVERIFY OP_CHECKSIG</code>.<br>
Hashed result is <code>c852ac34a1c76b63a279c97502c9ccc4e3cb9e8b</code>.</p>

<h1>Step 3: Make P2SH address from hashed script</h1>

<p><code>toBase58Check(c852ac34a1c76b63a279c97502c9ccc4e3cb9e8b, 5) = 3KxE77EHe1ip6WGRifwr9fZ5WBDGsLyWFz</code><br>
The result <code>3KxE77EHe1ip6WGRifwr9fZ5WBDGsLyWFz</code> is what I want.    </p>

<p><a href="https://gist.github.com/nao20010128nao/49f1a5c94f006a49fe68200a03bf5955" rel="nofollow noreferrer">Here</a> is the code to reproduce this address generation.</p>

<h1>Question</h1>

<p>Is that possible to spend coins sent to <code>3KxE77EHe1ip6WGRifwr9fZ5WBDGsLyWFz</code> (P2SH-wrapped P2PKH address), like how we spend coins sent to P2PKH addresses?</p>

<p2sh><p2pkh>
Is P2SH-wrapped P2PKH possible?
LesMiserables25
# Is P2SH-wrapped P2PKH possible?

(Asked by: username_0 on 2018-12-22)

There is a known form of address that called `P2SH-wrapped SegWit`, wrapping SegWit address as Base58 (P2SH) address.  
Thinking about such address type, I come up with the question: `Is P2SH-wrapped P2PKH possible?`  
I know that it is completely useless and meaningless, but I want to think about it now.

# Step 1: Decide an address to convert

Let's use the address `1CciesT23BNionJeXrbxmjc7ywfiyM4oLW` as it is used as a sample [here](https://en.bitcoin.it/wiki/Mini_private_key_format).

# Step 2: Convert it into "output script", then hash it using "hash160"

I got `OP_DUP OP_HASH160 7f6ab65fa911f558ca2dde3e9d073acb02c0d5c6 OP_EQUALVERIFY OP_CHECKSIG`.  
Hashed result is `c852ac34a1c76b63a279c97502c9ccc4e3cb9e8b`.

# Step 3: Make P2SH address from hashed script

`toBase58Check(c852ac34a1c76b63a279c97502c9ccc4e3cb9e8b, 5) = 3KxE77EHe1ip6WGRifwr9fZ5WBDGsLyWFz`  
The result `3KxE77EHe1ip6WGRifwr9fZ5WBDGsLyWFz` is what I want.

[Here](https://gist.github.com/nao20010128nao/49f1a5c94f006a49fe68200a03bf5955) is the code to reproduce this address generation.

# Question

Is that possible to spend coins sent to `3KxE77EHe1ip6WGRifwr9fZ5WBDGsLyWFz` (P2SH-wrapped P2PKH address), like how we spend coins sent to P2PKH addresses?

**Tags:** p2sh, p2pkh


---

## 1 answers

### Answer by username_1 on 2018-12-22. Score: 1 | Accepted answer

It's definitely possible and you've done the nesting correctly.
Also, aside from being "useless and meaningless", it's more expensive since the scriptSig for redeeming outputs sent to this address will have to contain the 26 bytes of the redeemScript (the p2pkh script itself) and the push operation of it, along with the public key and signature.


---

