Skip to content

Commit 20fdf77

Browse files
committed
Specify that types are compact size unsigned ints to allow for multi-byte types
1 parent 503f35a commit 20fdf77

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bip-0174.mediawiki

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ The format of each key-value map is as follows:
106106
| Must be <tt>0x00</tt>.
107107
|}
108108

109-
The first byte of each key specifies the type of the key-value pair. There are global types,
110-
per-input types, and per-output types.
109+
At the beginning of each key is a compact size unsigned integer representing the type.
110+
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.
111+
For convenience, this BIP will specify types using their full serialization, so a multi-byte type will have it's full prefix and zero padding as necessary.
112+
There are global types, per-input types, and per-output types.
111113

112114
The currently defined global types are as follows:
113115

@@ -436,8 +438,6 @@ The Partially Signed Transaction format can be extended in the future by adding
436438
new types for key-value pairs. Backwards compatibilty will still be maintained as those new
437439
types will be ignored and passed-through by signers which do not know about them.
438440

439-
If one byte type fields were to ever run out, new extensions can still be added by defining multi-byte types where the first byte signals that the next byte indicates the type and so on.
440-
441441
===Version Numbers===
442442

443443
The Version number field exists only as a safeguard in the event that a backwards incompatible change is introduced to PSBT.

0 commit comments

Comments
 (0)