1

Looks like bip174 doesn't specify string encoding (utf8, ascii) for bytes identifier field of PSBT_IN_PROPRIETARY key.

Now how a psbt lib can check if the bytes identifier is a a valid string bytes or not?

Otherwise, any non-string bytes can also be stored in bytes identifier.

Ref https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#proprietary-use-type

1 Answer 1

1

It doesn't really matter. PSBT parsers that don't understand the proprietary type will safely ignore them, and those that do will already need to know what the actual bytes are and can just do a byte comparison regardless of the encoding.

3
  • So, does it mean, here string identifer in the bip is just a suggestion? The actual data type that can be stored as bytes is totally up to the user of the proprietary key-val user?
    – solar
    Mar 6, 2023 at 20:18
  • Yes, the data is just bytes.
    – Ava Chow
    Mar 6, 2023 at 22:34
  • Thank you Andrew.
    – solar
    Mar 7, 2023 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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