<blockquote>
<p><strong>So before broadcast to the network what a wallet do internally is encode the psbt string to hex format and after broadcast. Is it that correct?</strong></p>
</blockquote>
<p>The network format is binary, not hex.</p>
<p>That means the number twenty could be sent as a single byte not as two bytes of ASCII data showing the hexadecimal representation &quot;14&quot;.</p>
<p>Encodings like decimal, hex and base58 are intended for presenting numbers to humans, not for transmission between computers. Though things like XML and JSON may confuse the issue.</p>
<hr />
<p>Addendum:</p>
<p>Internally the wallet will store the PSBT in some binary structure native to the development language and platform, it will serialize it to a standard network binary serialization and then encode it as Hex to show to you on screen. When transmitting it will serialize the internal binary representation but not encode it as hex, just transmit the network binary serialisation format.</p>

CC BY-SA 4.0
2023-08-22T09:13:37.420Z
ok, that make sense! So them the final piece that we broadcast is binary but before of that, we have to create a tx. In that creation, the first piece would be PSBT, after that one converted to hexadecimal format for human reability which it calls `serialised transaction`. Finally, when we broadcast, the wallet (in my case sparrow) will do that conversion to binary.
DustInTheSilence
CC BY-SA 4.0
2023-08-22T09:23:41.433Z
Internally the wallet will store the PSBT in some binary structure native to the development language and platform, it will serialize it to a standard network binary serialization and then encode it as Hex to show to you on screen. When transmitting it will serialize the internal binary representation but not encode it as hex, just transmit the binary serialisation format.
RedGrittyBrick
CC BY-SA 4.0
2023-08-22T09:27:21.843Z
thanks for your time! now makes sense ;)
DustInTheSilence
CC BY-SA 4.0
2023-08-22T09:01:57.043Z
2023-08-22T09:54:33.580Z
2023-08-22T09:54:33.580Z
RedGrittyBrick
<p>Is it some difference between <em>psbt hex</em> and <em>transaction hex</em> or both of them are the same? I guess the psbt format is in <code>base58</code> and the <em>raw transaction</em> and <em>transaction id</em> is in <code>hex</code> format. So before broadcast to the network what a wallet do internally is encode the <em>psbt</em> string to <em>hex</em> format and after broadcast. Is it that correct?</p>

CC BY-SA 4.0
2023-08-22T14:07:12.127Z
AFAIK, _base58check_ is only used to encode addresses and keys.
Murch
<transactions><base58><encoding>
Mixing some concepts with encodings
DustInTheSilence
# Mixing some concepts with encodings

(Asked by: username_0 on 2023-08-22)

Is it some difference between *psbt hex* and *transaction hex* or both of them are the same? I guess the psbt format is in `base58` and the *raw transaction* and *transaction id* is in `hex` format. So before broadcast to the network what a wallet do internally is encode the *psbt* string to *hex* format and after broadcast. Is it that correct?

**Tags:** transactions, base58, encoding

> **Comments:**
> **username_1**: AFAIK, _base58check_ is only used to encode addresses and keys.  

---

## 1 answers

### Answer by username_2 on 2023-08-22. Score: 1 | Accepted answer

> **So before broadcast to the network what a wallet do internally is encode the psbt string to hex format and after broadcast. Is it that correct?**

The network format is binary, not hex.

That means the number twenty could be sent as a single byte not as two bytes of ASCII data showing the hexadecimal representation "14".

Encodings like decimal, hex and base58 are intended for presenting numbers to humans, not for transmission between computers. Though things like XML and JSON may confuse the issue.

---

Addendum:

Internally the wallet will store the PSBT in some binary structure native to the development language and platform, it will serialize it to a standard network binary serialization and then encode it as Hex to show to you on screen. When transmitting it will serialize the internal binary representation but not encode it as hex, just transmit the network binary serialisation format.

> **Comments:**
> **username_0**: ok, that make sense! So them the final piece that we broadcast is binary but before of that, we have to create a tx. In that creation, the first piece would be PSBT, after that one converted to hexadecimal format for human reability which it calls `serialised transaction`. Finally, when we broadcast, the wallet (in my case sparrow) will do that conversion to binary.  
> **username_2**: Internally the wallet will store the PSBT in some binary structure native to the development language and platform, it will serialize it to a standard network binary serialization and then encode it as Hex to show to you on screen. When transmitting it will serialize the internal binary representation but not encode it as hex, just transmit the binary serialisation format.  
> **username_0**: thanks for your time! now makes sense ;)  

---

