After 24 aug 2017 starting from block #481824 blockchain DB consist transactions with the segwit-addresses.

For example (have a look to the address, specified in the output): https://btc.com/461e8a4aa0a0e75c06602c505bd7aa06e7116ba5cd98fd6e046e8cbeb00379d6

address bc1qeklep85ntjz4605drds6aww9u0qr46qzrv5xswd35uhjuj8ahfcqgf6hak or (how I understand it is the same address, but in another format) cdbf909e935c855d3e8d1b61aeb9c5e3c03ae8021b286839b1a72f2e48fdba70

I have to notice that only btc.com parsed this output (for example, blocktrail.com or blockexplorer.com couldn't parse this).

In the same time json-rpc of bitcoin-core client couldn't parse this address too.

[vout] => Array ( [0] => Array ( [value] => 0.005 [n] => 0 [scriptPubKey] => Array ( [asm] => 0 cdbf909e935c855d3e8d1b61aeb9c5e3c03ae8021b286839b1a72f2e48fdba70 [hex] => 0020cdbf909e935c855d3e8d1b61aeb9c5e3c03ae8021b286839b1a72f2e48fdba70 [type] => witness_v0_scripthash ) ) )

How we see - no section "addresses" in the section "scriptPubKey" (in case of "legacy" addresses json-rpc returns information about the addresses).

So what I want to ask:

1) What is the difference between bc1qeklep85ntjz4605drds6aww9u0qr46qzrv5xswd35uhjuj8ahfcqgf6hak and cdbf909e935c855d3e8d1b61aeb9c5e3c03ae8021b286839b1a72f2e48fdba70 ? Is it different formats of 1 address?

2) How could I know hash of legace-address of the followed transaction? Is it possible? May be I have to parse scriptBubKey hash for this?

3) Why bitcoin-core json-rpc doesn't provide this info? I use last version of bitcoin-core client.

Thanks a lot for the any information.

  • I thought segwit addresses starts with 3?
    – nacholibre
    Aug 31, 2017 at 7:35
  • 1
    Native SegWit addresses use the bech32 encoding and start with bc1, for now, most people use SegWit with P2SH addresses that start with 3
    – alcio
    Aug 31, 2017 at 8:33

1 Answer 1


While technically it is possible to generate one address from another, after all they are simply representations of public keys, it is strongly discouraged to do so, if you are not the owner of the address (at which point the wallet should provide you with an option to use either format). The problem is that if you send a transaction to a segwit address, that the recipient is not expecting/supporting then they will not recognize the payment.

Now for the apparent aliasing you mention above: the recipient address of the transaction you link to is a P2WSH (pay-to-witness-script-hash) address. cdbf909e935c855d3e8d1b61aeb9c5e3c03ae8021b286839b1a72f2e48fdba70 is the hash of a script that currently only the owner knows (until an output to that address has been spent). The bc1... representation is the bech32 encoded BIP142 address, which includes a checksum and a human readable currency identifier bc. It contains exactly the same information, i.e., a P2WSH script of the form `0 .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.