Ir al contenido principal

What is P2PK, P2PKH, P2SH, P2WPKH - ELI5

What is P2PK, P2PKH, P2SH, P2WPKH - ELI5

This is from this entry from StackExchange, I just copy it for backup.

  • P2PKH: "Pay To Public Key Hash"
  • This is how transactions are made. You are requiring the sender to supply a valid signature (from the private key) and public key. The transaction output script will use the signature and public key and through some cryptographic functions will check if it matches with the public key hash, if it does, then the funds will be spendable. This method conceals your public key in the form of a hash for extra security.

  • P2PK: "Pay To Public Key"
  • This is similar to P2PKH; the difference is that it does not conceal your public key. Anyone using this method to send funds over the P2P network is showing people their public key in the transaction details.

  • P2SH: "Pay To Script Hash"
  • The outputs of a transaction are just scripts that, if are executed with specific parameters, will result in a boolean of true or false. If a miner runs the output script with the supplied parameters and results in true, the money will be sent to your desired output. P2SH is used for multi-signature wallets making the output scripts logic that checks for multiple signatures before accepting the transaction. P2SH can also be used to allow anyone, or no one, to spend the funds. If the output script of a P2SH transaction is just 1 for true, then attempting to spend the output without supplying parameters will just result in 1 making the money spendable by anyone who tries. This also applies to scripts that return 0, making the output spendable by no one.

    This can also be used for puzzles like this one.

  • P2WPKH: "Pay To Witness Public Key Hash"
  • This was a feature of segwit which stands for Segregated Witness. Instead of using scriptSig parameters to check the transaction validity, there is a new part of the transaction called witness where the validity occurs.

Recuerda compartir esta entrada con tus amigos, porque el conocimiento es la mejor inversión que se puede hacer.

Comentarios

Entradas populares de este blog

Préstamos Bullet y Full Bullet

En Estateguru hay préstamos que se indican como bullet y otros como full bullet , al buscar con google cuesta encontrar una definición que incluya el segundo tipo. La única que he encontrado es la de Estateguru (que no está bien enlazada por el buscador de Google). Bullet repayment schedule means that loan interest is being paid periodically and principal amount is being paid at the end of the loan period. Full bullet schedule indicated that both interest and principal are being paid at the end of the loan period. Por tanto bullet paga el principal al final e intereses durante el préstamo, mientras que full bullet lo paga todo al final, tanto el principal como los intereses. Recuerda compartir esta entrada con tus amigos, porque el conocimiento es la mejor inversión que se puede hacer.