script – Is it potential to “label” Segwit spendable output ScriptPubKeys with arbitrary bytes? – CoinNewsTrend

script – Is it potential to “label” Segwit spendable output ScriptPubKeys with arbitrary bytes?

[ad_1]

    1. Wouldn’t it be legitimate; spendable by a Segwit transaction?

It’s legitimate to create such an output, however it might not be thought-about a segwit output (see BIP141), and thus not spendable utilizing a segwit enter.

As a substitute, the script can be interpreted in response to naked script guidelines as an alternative, which enable spending such an output with empty scriptSig (and empty scriptWitness).

    1. Can an arbitrary bytes “label” be put right into a Segwit P2WPKH kind output by another means?

No. A P2WPKH output incorporates script that’s precisely OP_0 OP_PUSHBYTES_20 <20 byte pubkey hash>.

In the event you completely wish to put your labelling contained in the output, your solely possibility is to grind the general public key till you hit one whose hash conveys your label (which prices 256N tries for an N-byte label), or to applicable a few of the low-order bits of the quantity despatched.

[ad_2]

Supply hyperlink