Bitcoin Forum
May 11, 2024, 09:05:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to determine whether an address starting with '3' is SegWit or Not?  (Read 336 times)
CounterEntropy (OP)
Full Member
***
Offline Offline

Activity: 214
Merit: 278


View Profile
January 15, 2021, 11:45:57 AM
Merited by o_e_l_e_o (2)
 #1

Example...

SegWit Address: 3Pih1gsGEufDcE3rnCvH7tSGxYCfAumr7N
Private Key: L31MGtLmx3RVomrNYkNzJqrd5h788GDkJpT6sTRhSu1rd2ZwWimr

Non-SegWit Address: 3FcdxBkv4Va8YLfyCe11pRsZ2uTki7DWvH
Private Key 1: L1QZg6Lqc8pH2RqWuEKzqv3rwjumQ2oMUyp4S8WPnZgWCnXPL4mu
Private Key 2: L3Qh439DtmJS1xKEe2tL7KG2niM4FWE6UvdJzs5DwdBqPZc8rrBe
Private Key 3: L5dhbsNKyzqPPgTFGe6kUVHibFv5QhoAhLJSVAqgTnyDXVimtm1E

Just looking at these addresses, how do we determine that 3Pih1gsGEufDcE3rnCvH7tSGxYCfAumr7N is SegWit and 3FcdxBkv4Va8YLfyCe11pRsZ2uTki7DWvH is not? And, if we can't determine, how do we decide whether to send SegWit Tx to these addresses or not?
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715418301
Hero Member
*
Offline Offline

Posts: 1715418301

View Profile Personal Message (Offline)

Ignore
1715418301
Reply with quote  #2

1715418301
Report to moderator
1715418301
Hero Member
*
Offline Offline

Posts: 1715418301

View Profile Personal Message (Offline)

Ignore
1715418301
Reply with quote  #2

1715418301
Report to moderator
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4856



View Profile
January 15, 2021, 11:49:54 AM
 #2

All Bitcoin address that start with 3 are nested segwit addresses. All Bitcoin addresses that start with bc1 are the native segwit which is the real addresses regarded as segwit addresses. While in addition, addresses that tarts with 1 are the ledacy addresses.

If you use noncustodial wallet, you can send bitcoin transaction to any of the addresses, the transaction will be successful and confirmed, but sending using native segwit has low fee payment while legacy in addition will have high fee if compared to the other two.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 15, 2021, 11:51:45 AM
Last edit: January 15, 2021, 02:56:10 PM by ranochigo
Merited by LoyceV (4), ABCbits (2), o_e_l_e_o (2), nc50lc (1), webtricks (1), NotATether (1)
 #3

All Bitcoin address that start with 3 are nested segwit addresses.
Completely wrong.

You can't. P2SH addresses are identical to each other and there isn't a way to tell if they're a musig (except taproot but that isn't the point of the question) or a P2WPKH nested in P2SH (for simplicity I refer to this as P2SH-P2PWKH) address/other locking conditions. The only time you can differentiate the kind of address is when they sign and spend any UTXOs, the redeem script will reveal what kind of locking script it has.

You don't have to care if the address that you're sending to is a segwit address or not. It doesn't make a difference. As long as the inputs are segwit, the size discount applies.

I've sent two transactions, one to a P2SH-P2PWKH (non-bech32) address and one to a multisig address.
To a P2SH (with multisig) address: efbc21dd2e2a1dc3ff67f853b550b5bab26f3f1a7f7960b0949bd0133f5d9e03
To a P2SH-P2PWKH address: 4a32b0eafad34f5c51c31cde881ecccd5d8a596400abd8b6269608492c6af719

For both, the size is the same at 142vbyte as the conditions are the same except that they're spending to P2SH addresses with different unlocking requirements.
For both, the output script is similar: OP_HASH160 [RIPEMD160(SHA256) hash here]OP_EQUAL

However, when I spend them:
From a P2SH (with multisig) address: 015739847a882dd1d3fb6c1792682cedb0d4155c4f508909cc280d3edf9bfad0
From a P2SH-P2PWKH address: 9dbf5fa4b8b8ffcedceb10ea59be46bb6aeec2b50f817a02a565ed314ea866e2

You can observe that the redeem script contains the requirements to unlock that script and/or the HASH160 of the original address and it's witness.

There are of course a myriad of conditions to be used in a P2SH address but I chose Multisig as the simplest and most common form of it as a demonstration.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Charles-Tim
Legendary
*
Offline Offline

Activity: 1540
Merit: 4856



View Profile
January 15, 2021, 12:56:41 PM
 #4

All Bitcoin address that start with 3 are nested segwit addresses.
Completely wrong.
How is it wrong, are multisig addresses not nested segwit? Or, why?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 15, 2021, 01:07:37 PM
Merited by mocacinno (1), ABCbits (1), Charles-Tim (1)
 #5

How is it wrong, are multisig addresses not nested segwit? Or, why?
Doesn't have to be.

P2SH addresses (AKA those starting with 3) are defined in BIP16. It defines addresses which has a specific condition within the redeem script that has to be fulfilled for the transaction to be vallid. Multisig addresses do not necessarily have to be a Segwit; there are also bech32 script addresses (P2WSH) which allows you to have scripts in bech32 or P2SH-P2WSH which would yield a P2SH address but those are for a different topic. OP is specifically asking about P2SH addresses and they are versatile in the sense that you can put complicated scripts and conditions for the UTXOs to be spent. Most of the multisig that most services uses are not P2SH-P2WSH but are actually just a P2SH by itself without any witness scripts.

So, it'll be incorrect to say that all P2SH addresses are nested Segwit. Nested segwit is just a very small subset of P2SH scripting.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
LoyceV
Legendary
*
Online Online

Activity: 3304
Merit: 16635


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
January 15, 2021, 02:33:54 PM
 #6

are multisig addresses not nested segwit?
Multisig addresses existed long before Segwit was implemented.

BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
January 15, 2021, 03:15:20 PM
 #7

You can not tell if it will be Multisig or Segwit unless you hold the private key(s) and thus know the type.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
January 15, 2021, 08:32:47 PM
 #8

How is it wrong, are multisig addresses not nested segwit? Or, why?
No.

Have a read about the "3" type (aka "Pay to Script Hash" aka P2SH) addresses here: https://en.bitcoin.it/wiki/Pay_to_script_hash

- All multisig addresses are P2SH, but not all P2SH addresses are multisig.
- Likewise, all "Nested SegWit" (aka P2SH-P2WPKH) addresses are P2SH, but not all P2SH addresses are Nested SegWit


And as rightly explained by ranochigo... unless you are the "owner" of the address, which access to the private keys and wallet etc... you cannot determine if the address is MultiSig or NestedSegwit or something else until a UTXO has been spent from that address in a transaction and you can see the transaction details and redeem script.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18512


View Profile
January 16, 2021, 03:40:54 PM
Merited by HCP (2), ABCbits (1)
 #9

- All multisig addresses are P2SH, but not all P2SH addresses are multisig.
Well, that's not quite accurate either. To throw even more confusion in to the mix, you can have multi-sig addresses using P2WSH.

If you are making a legacy multi-sig or nested segwit multi-sig, they will both start with "3", but "3" can also be used to create other scripts which have nothing to do with segwit or multi-sig.
If you are making a native segwit multi-sig, then it will start with "bc1", but "bc1" can also be used to create regular segwit address which have nothing to do with multi-sig.
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 17, 2021, 11:14:39 AM
 #10

Are there any wallet which utilize P2WSH today?
Electrum. Their 2FA TrustedCoin as well as their multisig wallet supports P2WSH but you can choose P2SH as well.

P2SH-P2WSH is quite rare I think, I haven't found a wallet that supports that as of yet. Its like a P2SH-P2WPKH but with P2WSH instead.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
January 17, 2021, 02:47:55 PM
 #11

P2SH-P2WSH is quite rare I think, I haven't found a wallet that supports that as of yet.

electrum devs have always kept the scripts used very simple so i don't think it can even support some of the OP codes let alone custom witness scripts nested in a script hash.
there has been requests to add advanced scripts but hasn't happened
https://github.com/spesmilo/electrum/issues/5949

there is also support for different hardware wallets that some of which i think support nested SegWit addresses. from the source code of electrum it seems like bitbox has such option calling it p2wsh-p2sh (reverse of what it should be called). the script that is used is a simple multisig though.

There is a FOMO brewing...
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
January 17, 2021, 04:40:57 PM
 #12

You can not tell if it will be Multisig or Segwit unless you hold the private key(s) and thus know the type.

You don't need to know the private key.
When the output is being spend, the unlocking script has to be revealed. And once you observe this, you can tell whether it is P2WPKH nested into P2SH or a multisig P2SH. Or even something completely different.

However, if the UTXO is not spent yet, there is no way of knowing this other than having the unlocking script created by yourself (i.e. you are the recipient).

BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
January 17, 2021, 04:48:45 PM
 #13

You can not tell if it will be Multisig or Segwit unless you hold the private key(s) and thus know the type.

You don't need to know the private key.
When the output is being spend, the unlocking script has to be revealed. And once you observe this, you can tell whether it is P2WPKH nested into P2SH or a multisig P2SH. Or even something completely different.

However, if the UTXO is not spent yet, there is no way of knowing this other than having the unlocking script created by yourself (i.e. you are the recipient).

Okay so tell me what type this address is then: 38AruHmY94Yih9cvc8d144Z8BHZnUDSH35
ranochigo
Legendary
*
Offline Offline

Activity: 2968
Merit: 4179



View Profile
January 17, 2021, 05:08:09 PM
 #14

Okay so tell me what type this address is then: 38AruHmY94Yih9cvc8d144Z8BHZnUDSH35
You can't. None of the UTXOs in the address has been spent and thus the redeem script is not revealed. You should pick an address with at least one of the UTXOs spent so we can see the redeem script.

If you would refer to my transactions, you'll notice that it's easy to get the redeem script from the second set of TXes and thus the kind of P2SH scripts it contains.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
January 17, 2021, 05:13:11 PM
 #15

Okay so tell me what type this address is then: 38AruHmY94Yih9cvc8d144Z8BHZnUDSH35

As i have mentioned.. since none of these 4 UTXO's has been spend, no script has been revealed.
And therefore only the person who created that unlocking script knows whether it is a multisig P2SH or P2WPKH nested into P2SH or any other P2SH.

The 4 UTXO contain:
Code:
OP_HASH160 4714deea7bae98a2ae990bd1ff059911529eddff OP_EQUAL

Therefore, all we know is that the unlock script's hash will be 4714deea7bae98a2ae990bd1ff059911529eddff.
But we don't know what kind of script this is.

BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
January 18, 2021, 08:14:03 AM
 #16

So i was right and you can not know it unless you have the private key and made that transaction. Wink
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4653



View Profile
January 18, 2021, 09:34:07 AM
 #17

So i was right and you can not know it unless you have the private key and/or made that transaction address. Wink
FTFY  Wink
Also, you could just wait until the bitcoins which were received with that address are spent.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
January 18, 2021, 09:34:20 AM
Merited by ABCbits (1)
 #18

So i was right and you can not know it unless you have the private key and made that transaction. Wink

No, you were not right.
It seems you misunderstand something.

Read my response again:
You can not tell if it will be Multisig or Segwit unless you hold the private key(s) and thus know the type.

You don't need to know the private key.
When the output is being spend, the unlocking script has to be revealed. And once you observe this, you can tell whether it is P2WPKH nested into P2SH or a multisig P2SH. Or even something completely different.

However, if the UTXO is not spent yet, there is no way of knowing this other than having the unlocking script created by yourself (i.e. you are the recipient).


So, to summarize and to reference your statement:

1) You don't necessarily need the private key. Observing the unlocking script being published (a.k.a. the output is being spend) is enough.

2) Even if you made the transaction creating the UTXO, you don't know anything about the unlocking script.
As a sender, you just use the address provided by the recipient to to create that new UTXO. You, as a sender, don't know wheter this is multisig or P2WPKH nested into P2SH. It is irrelevant whether you or someone else created the transaction/UTXO.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!