diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-08-01 14:36:25 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2019-08-01 14:36:25 -0400 |
commit | 20fdf77a2bcb04886b2b1d4d1b20b0135388ac4b (patch) | |
tree | e216e30c38443bd36b7a9a8f5ae31edb58e1bf61 /bip-0174.mediawiki | |
parent | 503f35a9a066a51be29d9c81e73f72f54a403b76 (diff) | |
download | bips-20fdf77a2bcb04886b2b1d4d1b20b0135388ac4b.tar.xz |
Specify that types are compact size unsigned ints to allow for multi-byte types
Diffstat (limited to 'bip-0174.mediawiki')
-rw-r--r-- | bip-0174.mediawiki | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bip-0174.mediawiki b/bip-0174.mediawiki index bbc0fc6..d30b05d 100644 --- a/bip-0174.mediawiki +++ b/bip-0174.mediawiki @@ -106,8 +106,10 @@ The format of each key-value map is as follows: | Must be <tt>0x00</tt>. |} -The first byte of each key specifies the type of the key-value pair. There are global types, -per-input types, and per-output types. +At the beginning of each key is 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. +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. +There are global types, per-input types, and per-output types. The currently defined global types are as follows: @@ -436,8 +438,6 @@ The Partially Signed Transaction format can be extended in the future by adding new types for key-value pairs. Backwards compatibilty will still be maintained as those new types will be ignored and passed-through by signers which do not know about them. -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. - ===Version Numbers=== The Version number field exists only as a safeguard in the event that a backwards incompatible change is introduced to PSBT. |