<blockquote>
  <p>How does an updater, signer, or finalizer know what this XPub is for?</p>
</blockquote>

<p>It's not just an xpub. It's an xpub with key origin information. The fingerprint of the master public key and the derivation path to that xpub is provided. This means that a prefix match can be done with the derivation paths given in the input and output maps to find which xpub can be used to derive a particular pubkey.</p>

<blockquote>
  <p>Doesn't this expose some privacy?</p>
</blockquote>

<p>Yes.</p>

<blockquote>
  <p>For outputs, do I have to enter the public keys?</p>
</blockquote>

<p>No. You don't have to provide any information for the output maps.</p>

<blockquote>
  <p>Is there no option to enter an address instead? </p>
</blockquote>

<p>No. Addresses are not useful in PSBTs.</p>

<p>The output fields do <em>not</em> specify the outputs themselves. That is done in the global transaction. Addresses only serve to specify the scriptPubKey to use in an output. The global unsigned transaction already has the output specified with their scriptPubKeys. So providing an address is not useful as it is just duplicate information.</p>

<blockquote>
  <p>Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this? </p>
</blockquote>

<p>The txid and vout are already provided by the Global unsigned transaction. Both the Non-witness UTXO and witness UTXO are needed in the inputs in order to sign the transaction. The signing algorithm requires knowing the scriptPubKey for the output being spent, and for segwit, the amount too. The full previous transaction needs to be provided to prevent attacks where users are signing for an output that they don't intend to spend. By providing the full transaction, signers can verify that the txid they compute for it matches the txid that is specified in the global unsigned transaction.</p>

CC BY-SA 4.0
2020-06-13T19:23:06.793Z
2020-06-13T19:23:06.793Z
Ava Chow
<p>I have a few questions on BIP 174: 
XPUBs: I am looking at BIP174, and I see that I can define a global XPub. How is this used. How does an updater, signer, or finalizer know what this XPub is for? Doesn't this expose some privacy? </p>

<p>Public Keys: For outputs, do I have to enter the public keys? Is there no option to enter an address instead? </p>

<p>Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this? </p>

<bip174-psbt>
Why does BIP174 take Xpubs but no addresses?
Sachin Meier
# Why does BIP174 take Xpubs but no addresses?

(Asked by: username_0 on 2020-06-13)

I have a few questions on BIP 174:
XPUBs: I am looking at BIP174, and I see that I can define a global XPub. How is this used. How does an updater, signer, or finalizer know what this XPub is for? Doesn't this expose some privacy?

Public Keys: For outputs, do I have to enter the public keys? Is there no option to enter an address instead?

Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this?

**Tags:** bip174-psbt


---

## 1 answers

### Answer by username_1 on 2020-06-13. Score: 1 | Accepted answer

> How does an updater, signer, or finalizer know what this XPub is for?

It's not just an xpub. It's an xpub with key origin information. The fingerprint of the master public key and the derivation path to that xpub is provided. This means that a prefix match can be done with the derivation paths given in the input and output maps to find which xpub can be used to derive a particular pubkey.

> Doesn't this expose some privacy?

Yes.

> For outputs, do I have to enter the public keys?

No. You don't have to provide any information for the output maps.

> Is there no option to enter an address instead?

No. Addresses are not useful in PSBTs.

The output fields do *not* specify the outputs themselves. That is done in the global transaction. Addresses only serve to specify the scriptPubKey to use in an output. The global unsigned transaction already has the output specified with their scriptPubKeys. So providing an address is not useful as it is just duplicate information.

> Inputs: An input Non-Witness UTXO seems to require the entire previous transaction, instead of simply the txid and vout. Why is this?

The txid and vout are already provided by the Global unsigned transaction. Both the Non-witness UTXO and witness UTXO are needed in the inputs in order to sign the transaction. The signing algorithm requires knowing the scriptPubKey for the output being spent, and for segwit, the amount too. The full previous transaction needs to be provided to prevent attacks where users are signing for an output that they don't intend to spend. By providing the full transaction, signers can verify that the txid they compute for it matches the txid that is specified in the global unsigned transaction.


---

