Ethereum: Is it possible to convert an address from p2pkh to p2sh?

·

Converting P2PKH PSHSH addresses: a guide

Ekarram’s underlying block addresses consisting of two types: P2PH and P2SH. Both addresses are used for transactions and they are different in their structure and are used. In this article we will explore whether the process of converting a P2PKK address to a PCSH address and the former balance is the second.

P2PH Address Structure

Address with a p2phkh address with an eroded hexadecian string, and the rest of the string consists of character sequences, representing a bite. In general, this format:

0x ... 00000 ... 00000123457890123498989898989898901231112890123456789

P2SH Address Structure

A p2sh address represents a hexagonal string, but the first 45 bites are different from the first 45 bytes. The main difference exists by using '0x ...0x. This allows a more composite representation.

Converting P2PKH PSHSH addresses

To convert a p2pkh address to P2Sh Address Here’s an example of how to do this:

Becomes 0x ‘0x

… 00000123456789012349898989898989898911111123457890123456789

When you translate a P2PKH address, the resulting hexagonal string is longer than 45 characters. For instance, IF WE TAKE The Address 0x ... 00000 ... 00000 ... 345678901234567891.

Will the balance beyond?

In general, yes, yes, will be taken to the corresponding p2sh address of a P2PKH address. However, this is not always the case.

When creating a public Erart account with a P2phK address, the balance is preserved and can be transferred directly to P2Sh address. This is called “Address Reuse”.

However, if you use a P2PKH address for an existing lame account, the balance is not taken to the new address. Instead, you have to create a new watcher with the updated public key.

conclusion

P2PKH address address can be converted to P2SH addresses, but requires replacement of the first 45 bytes of hexadecient string with `0x. In addition, the balance is not taken to a new address when using a common key in the existing Ethemeum account. Nevertheless, this process is useful for the same seed phrase or to create multiple addresses from the private key.

Build, transferring (such as P2 Sch Malzig) (such as P2 Sch Malzig), be free to hear!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *