Tried using EBNF to specify the format, and reworked the definitions to explicitly reference this.
If this works, I’ll rework the rest of the text to use unified <xxx>
names as cross-references?
Tried using EBNF to specify the format, and reworked the definitions to explicitly reference this.
If this works, I’ll rework the rest of the text to use unified <xxx>
names as cross-references?
"Variable length string identifier" is not defined anywhere, and the suggestion
to use "0x00" is also deeply unclear. I assumed it meant a nul-terminated
string!
Be explicit: you mean it must be a compact siz1\e unsigned int length, followed
by that many identifier bytes, followed by a compact size unsigned int subtype,
followed by optional keydata.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
124+: A compact size unsigned integer representing the type. This compact size unsigned integer must be minimally encoded, i.e. if the value can be represented using one byte, it must be represented as one byte. This must be unique within a specific <nowiki><map></nowiki>.
125+;<tt><nowiki><keylen></nowiki></tt>
126+: The compact size unsigned integer containing the combined length of <nowiki><keytype></nowiki> and <nowiki><keydata></nowiki>.
127+;<tt><nowiki><valuelen></nowiki></tt>
128+: The compact size unsigned integer containing the combined length of <nowiki><valuedata></nowiki>.
129+;<tt><nowiki><mafic></nowiki></tt>
0;<tt><nowiki><magic></nowiki></tt>
252+** <nowiki><valuedata></nowiki> The transaction in network serialization format the current input spends from. This should only be present for inputs which spend non-segwit outputs. However, if it is unknown whether an input spends a segwit output, this type should be used.
253+*** <tt><nowiki><transaction></nowiki></tt>
254+
255+* <nowiki><keytype></nowiki>: Witness UTXO <tt>PSBT_IN_WITNESS_UTXO = 0x01</tt>
256+** <nowiki><keydata></nowiki>: None.
257+** <nowiki><valuedata></nowiki> The entire transaction output in network serialization which the current input spends from. This should only be present for inputs which spend segwit outputs, including P2SH embedded ones.
0** <nowiki><valuedata></nowiki> The entire transaction output (amount + scriptPubkey) in network serialization which the current input spends from. This should only be present for inputs which spend segwit outputs, including P2SH embedded ones.