Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [p2pk]

Pay To Public Key is an output format that refers directly to a public key. It is the earliest used output format and has no associated address standard.

Filter by
Sorted by
Tagged with
1 vote
1 answer

get source address of a transaction

I have been conducting research on the web and Bitcoin Stack Exchange to find a method for obtaining the source address of a transaction. I have come across multiple answers, some suggesting the use ...
Monte Conte's user avatar
0 votes
3 answers

Move p2pk with addresses

This is strange for me that there exist over 30 000 of p2pk with addresses mainly with very high balance and these funds weren't moved yet. There are Linux tools to scan blockchain for them and note ...
pbies's user avatar
  • 159
0 votes
1 answer

Do p2pk and SIGHASH_SINGLE still working nowadays?

Seems like p2pk - pay to public key may be working or not in modern wallet apps. Is it still working or not? EDIT: Can old p2pk addresses be used to move balance to new addresses (for example bc1q...)?...
pbies's user avatar
  • 159
3 votes
1 answer

Different balances between fullnode and bitcoin explorer

I looked up Block 200 at and found out that coinbase transaction was made and sent 50 BTC to 1HwmP33SaknLYShXfjVU8KmVThU3JiuVgH. But if I check utxos ...
Jin's user avatar
  • 61
2 votes
2 answers

How to figure out the output address when there is no "address" key in vout["scriptPubKey"]

Context: I have a bitcoin core node(v.24), and using bitcoinrpc library. So, when I am running the getrawtransaction() function, sometimes the vout doesn't have the key "address", and the ...
Block_Mole's user avatar
2 votes
2 answers

How to recover and sweep P2PK coins

In an effort to recover some old dust, I've been working on a sweep script to be used on a bunch of old private keys with a little BTC locked inside multiple p2pk utxos. First I tried using python's ...
smk's user avatar
  • 29
1 vote
2 answers

Retrieve address corresponding to pubkey using bitcoin-cli/RPC

We are using jgarzik/python-bitcoinrpc and in some cases curl to retrieve data from bitcoin core using RPC. However, for some txns where pubkey is used, bitcoin-cli/rpc gives no address in ...
curious's user avatar
  • 43
0 votes
1 answer

P2SH to P2PK transaction - mandatory-script-verify-flag-failed (Opcode missing or not understood) (error 26)

I am trying to spend a P2SH UTXO based on a redeem script that requires no signatures and simply needs the correct input to equal the OP_HASH160 digest in the corresponding P2SH locking script. My ...
Peter's user avatar
  • 115
2 votes
3 answers

A question about the role of OP_DUP in the P2PK(H) transaction specification, and possibility of slightly smaller single address transactions

Original Thread: Why OP_DUP instead of providing the PubKey twice in P2PKH? I am struggling to understand the logic in the most popular answer and my "reputation" is < 50 so I cannot ...
Poseidon's user avatar
  • 643
1 vote
1 answer

Need a detailed step-by-step P2PK signature validation example

In the process of validating transactions by hand with a new library in elixir. I am starting with f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16, which is one of the first P2PK ...
RooSoft's user avatar
  • 157
1 vote
1 answer

Can I create a P2PK tx?

Is it still possible to send to a pub key directly? How would I construct such a tx in raw hex, and would the mempool accept it? Thanks
Paul Otto's user avatar
7 votes
1 answer

How were P2PK transactions made?

I understand that P2PK scripts do not have a corresponding address type. However, we see a lot of P2PK transactions, both coinbase outputs and non-coinbase outputs. What software was used to make ...
Casey Rodarmor's user avatar
0 votes
1 answer

How bitcoin browsers check P2PK and P2SH balance?

Suppose someone sends bitcoins to me using P2PK, I only enter my address starting with 1 in the bitcoin browser, can i get results? my public key hash doesn't appear in either UTXO, only one UTXO has ...
KHJUAF403456ZS3K564WAEF's user avatar
0 votes
1 answer

Get Address from pubkey scriptPubKey

Given that address is a "convenience" field, it makes sense that it is not provided by default in many transactions. However, it seems to be possible to extract address from hex. I am ...
Dr. Strangelove's user avatar
0 votes
2 answers

Block 170 transaction validation in the old days

I'm trying to understand how to validate the first non-coinbase transaction, that is transaction 1 of block 169, as it was validated in the old days. This transaction has one input, which decoded ...
StashOfCode's user avatar
-1 votes
1 answer

What is scriptpubkey for in the coinbase transaction ? (and more..)

I'm about to mine and I reached a part when I want to generate the coinbase transaction. I won't complicate things by putting in the new block transactions and getting the fees for them. All that ...
Svetoslav's user avatar
2 votes
1 answer

p2pkh vs. p2pk keeping public key private

I just got into learning Bitcoin programming through Jimmy Song's Programming Bitcoin. Jimmy says that some of p2pkh's advantages over p2pk include: a smaller ScriptPubKey keeping one's public key ...
yoyobigmanyo's user avatar
2 votes
1 answer

How Bitcoin decide which scriptPubKey use?

I'm studying Bitcoin protocol, and I'm able to create address by my bash script. The addresses "P2PKH" and "P2PK" have the same procedure. Compressed or uncompressed public key – ...
monkeyUser's user avatar
0 votes
1 answer

cannot decode block 0 to find the output address. I can decode much higher blocks. what am i missing?

Can you please decode block 0 output transaction manually showing me how to get the output address namely: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
Walid Tabar's user avatar
1 vote
1 answer

Does getreceivedbyaddress or listreceivedbyaddress or listunspent shows pay to pubkey and bare mutlisig transactions?

Couldn’t find the answer inside the source code. If I receive a pay to pubkey transaction to the pubkey of a 1r address, will it shows up using getreceivedbyaddress or listreceivedbyaddress or ...
user2284570's user avatar
2 votes
2 answers

How to extract all the bitcoin addresses with bitcoin-cli?

I am trying to get all existing addresses on the bitcoin blockchain with bitcoin-cli. It seems that I can get addresses from vout that are of type "pubkeyhash". If the type of vout is "...
Daniel's user avatar
  • 37
5 votes
2 answers

Why does vout sometimes not have address?

I am trying to parse all transactions. I found that some transactions do not have addresses in their vout. There are two situations that vout does not have addresses. The first one is the miner reward....
Mars Lee's user avatar
  • 173
1 vote
1 answer

bitcoinj java library not decoding input addresses for some transactions

I'm trying to "extract" sender's addresses from OP_RETURN Bitcoin transactions, but my code is not working properly. getWalletAddressOfSender(final Transaction tx) public static Address ...
Bruno's user avatar
  • 220
0 votes
2 answers

Why most of pubkeys in the first batch of blocks in blk00000.dat are different

For example: the pubkey in the first 3 coinbase's output are 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f ...
Carpemer's user avatar
  • 311
0 votes
1 answer

bitcoin public key vs public key hash vs. pub key [duplicate]

I am not talking about the privacy related concerns just the security aspect and the ability for someone to 'break my private key'. The addresses that my wallet generates are p2pkh addresses. If i ...
user3554230's user avatar
0 votes
1 answer

P2PUBKEY in witness program (P2WPUBKEY)

Old standard transactions format included 3 types: P2PUBKEY, P2PKH, P2SH. After Segwit soft fork, we have got 2 additional types: P2WPKH and P2WSH. If we compare the cost of spending inputs (in bytes ...'s user avatar
6 votes
2 answers

How did pay-to-pubkey hash come about? What is its history?

We know that early blocks all used pay-to-pubkey (p2pk) and at some point, we mostly switched to pay-to-pubkey-hash (p2pkh). What is the history behind this? Who made the changes and when did p2pkh ...
Jimmy Song's user avatar
  • 7,759
8 votes
2 answers

Why don't P2PK scripts have their own address?

If I understand addresses correctly, different types of addresses are used to map to a particular locking script (scriptPubKey). So based on the leading character of an address, a wallet will decode ...
inersha's user avatar
  • 3,155
16 votes
3 answers

Why is P2PKH used instead of the simpler P2PK?

If elliptic curve cryptography is secure enough to be able to give away a public key without fear of anyone being able to calculate our private key from it, what's the reason for hashing our public ...
inersha's user avatar
  • 3,155
30 votes
1 answer

What is P2PK, P2PKH, P2SH, P2WPKH - ELI5

Explain like I'm 5 years old and my other half of the brain is surgically removed :) I don't want to put a lot of stress on my brain Also what is the difference between BTC held in P2SH and Unspent ...
user380208's user avatar
0 votes
1 answer

What is type 'pubkey' in a scriptpubkey output from getrawtransaction?

Here is an output from getrawtransaction: { ... "vout": [ { "value": 12.50000000, "n": 0, "scriptPubKey": { "asm": "...
Jus12's user avatar
  • 1,365
4 votes
1 answer

Trying to understand Pay-to-Public-Key-Hash

I am new to bitcoin and I am trying to understand Pay-to-Public-Key-Hash (P2PKH) from the book: Mastering Bitcoin: Unlocking Digital Cryptocurrencies (p. 127). I understand that digital keys (which ...
Node.JS's user avatar
  • 143
20 votes
2 answers

Why do you use Bitcoin addresses instead of public keys?

Why do you hash the public key twice? Are there security benefits to abstracting away from the public key? Is it because the address can represent multiple things? I'm missing something. Could you ...
ihtkwot's user avatar
  • 331
9 votes
1 answer

Why does the default miner implementation use pay-to-pubkey?

Looking at the v0.9.3 source in miner.cpp: CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey) { CPubKey pubkey; if (!reservekey.GetReservedKey(pubkey)) return NULL; ...
morsecoder's user avatar
  • 14.2k
2 votes
3 answers

Could the standard pay to address script be simpler? e.g. no compare of the HASH160?

What if I had a scriptPubKey of <pubKey>OP_CHECKSIG And an scriptSig of <sig> Question Would that work in the standard client? Why do we need to check the hash? The only possible ...
makerofthings7's user avatar