You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -115,9 +115,75 @@ The currently defined global types are as follows:
115
115
| The master key fingerprint as defined by BIP 32 concatenated with the derivation path of the public key. The derivation path is represented as 32-bit little endian unsigned integer indexes concatenated with each other. The number of 32 bit unsigned integer indexes must match the depth provided in the extended public key.
116
116
|
117
117
|
118
-
| 0
118
+
| 0, 2
119
119
| 174
120
120
|-
121
+
| Transaction Version
122
+
| <tt>PSBT_GLOBAL_TX_VERSION = 0x02</tt>
123
+
| None
124
+
| No key data
125
+
| <tt><32-bit uint></tt>
126
+
| The 32-bit little endian signed integer representing the version number of the transaction being created. Note that this is not the same as the PSBT version number specified by the PSBT_GLOBAL_VERSION field.
127
+
| 2
128
+
| 0
129
+
| 2
130
+
| [[bip-psb2.mediawiki|psbt2]]
131
+
|-
132
+
| Fallback Locktime
133
+
| <tt>PSBT_GLOBAL_FALLBACK_LOCKTIME = 0x03</tt>
134
+
| None
135
+
| No key data
136
+
| <tt><32-bit uint></tt>
137
+
| The 32-bit little endian unsigned integer representing the transaction locktime to use if no inputs specify a required locktime.
138
+
|
139
+
| 0
140
+
| 2
141
+
| [[bip-psb2.mediawiki|psbt2]]
142
+
|-
143
+
| Input Count
144
+
| <tt>PSBT_GLOBAL_INPUT_COUNT = 0x04</tt>
145
+
| None
146
+
| No key data
147
+
| <tt><compact size uint></tt>
148
+
| Compact size unsigned integer representing the number of inputs in this PSBT.
149
+
| 2
150
+
| 0
151
+
| 2
152
+
| [[bip-psb2.mediawiki|psbt2]]
153
+
|-
154
+
| Output Count
155
+
| <tt>PSBT_GLOBAL_OUTPUT_COUNT = 0x05</tt>
156
+
| None
157
+
| No key data
158
+
| <tt><compact size uint></tt>
159
+
| Compact size unsigned integer representing the number of outputs in this PSBT.
| A single byte boolean (0 for False, 1 for True) representing whether inputs can be modified, followed by a single byte boolean representing whether outputs can be modified.
| A bit vector representing which input indexes use SIGHASH_SINGLE. If the bit for an index is set to 1, then the input and output pair at that index are tied together with SIGHASH_SINGLE and must be moved together.
182
+
|
183
+
| 0
184
+
| 2
185
+
| [[bip-psb2.mediawiki|psbt2]]
186
+
|-
121
187
| PSBT Version Number
122
188
| <tt>PSBT_GLOBAL_VERSION = 0xFB</tt>
123
189
| None
@@ -126,7 +192,7 @@ The currently defined global types are as follows:
126
192
| The 32-bit little endian unsigned integer representing the version number of this PSBT. If ommitted, the version number is 0.
127
193
|
128
194
|
129
-
| 0
195
+
| 0, 2
130
196
| 174
131
197
|-
132
198
| Proprietary Use Type
@@ -137,7 +203,7 @@ The currently defined global types are as follows:
137
203
| Any value data as defined by the proprietary type user.
138
204
|
139
205
|
140
-
| 0
206
+
| 0, 2
141
207
| 174
142
208
|}
143
209
@@ -163,18 +229,18 @@ The currently defined per-input types are defined as follows:
163
229
| The transaction in network serialization format the current input spends from. This should be present for inputs that spend non-segwit outputs and can be present for inputs that spend segwit outputs. An input can have both <tt>PSBT_IN_NON_WITNESS_UTXO</tt> and <tt>PSBT_IN_WITNESS_UTXO</tt>. <ref>'''Why can both UTXO types be provided?''' Many wallets began requiring the full previous transaction (i.e. <tt>PSBT_IN_NON_WITNESS_UTXO</tt>) for segwit inputs when PSBT was already in use. In order to be compatible with software which were expecting <tt>PSBT_IN_WITNESS_UTXO</tt>, both UTXO types must be allowed.</ref>
| 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. An input can have both <tt>PSBT_IN_NON_WITNESS_UTXO</tt> and <tt>PSBT_IN_WITNESS_UTXO</tt>
175
241
|
176
242
|
177
-
| 0
243
+
| 0, 2
178
244
| 174
179
245
|-
180
246
| Partial Signature
@@ -185,7 +251,7 @@ The currently defined per-input types are defined as follows:
185
251
| The signature as would be pushed to the stack from a scriptSig or witness.
186
252
|
187
253
|
188
-
| 0
254
+
| 0, 2
189
255
| 174
190
256
|-
191
257
| Sighash Type
@@ -196,7 +262,7 @@ The currently defined per-input types are defined as follows:
196
262
| The 32-bit unsigned integer specifying the sighash type to be used for this input. Signatures for this input must use the sighash type, finalizers must fail to finalize inputs which have signatures that do not match the specified sighash type. Signers who cannot produce signatures with the sighash type must not provide a signature.
197
263
|
198
264
|
199
-
| 0
265
+
| 0, 2
200
266
| 174
201
267
|-
202
268
| Redeem Script
@@ -207,7 +273,7 @@ The currently defined per-input types are defined as follows:
207
273
| The redeemScript for this input if it has one.
208
274
|
209
275
|
210
-
| 0
276
+
| 0, 2
211
277
| 174
212
278
|-
213
279
| Witness Script
@@ -218,7 +284,7 @@ The currently defined per-input types are defined as follows:
218
284
| The witnessScript for this input if it has one.
219
285
|
220
286
|
221
-
| 0
287
+
| 0, 2
222
288
| 174
223
289
|-
224
290
| BIP 32 Derivation Path
@@ -229,7 +295,7 @@ The currently defined per-input types are defined as follows:
229
295
| The master key fingerprint as defined by BIP 32 concatenated with the derivation path of the public key. The derivation path is represented as 32 bit unsigned integer indexes concatenated with each other. Public keys are those that will be needed to sign this input.
230
296
|
231
297
|
232
-
| 0
298
+
| 0, 2
233
299
| 174
234
300
|-
235
301
| Finalized scriptSig
@@ -240,7 +306,7 @@ The currently defined per-input types are defined as follows:
240
306
| The Finalized scriptSig contains a fully constructed scriptSig with signatures and any other scripts necessary for the input to pass validation.
241
307
|
242
308
|
243
-
| 0
309
+
| 0, 2
244
310
| 174
245
311
|-
246
312
| Finalized scriptWitness
@@ -251,7 +317,7 @@ The currently defined per-input types are defined as follows:
251
317
| The Finalized scriptWitness contains a fully constructed scriptWitness with signatures and any other scripts necessary for the input to pass validation.
252
318
|
253
319
|
254
-
| 0
320
+
| 0, 2
255
321
| 174
256
322
|-
257
323
| Proof-of-reserves commitment
@@ -262,7 +328,7 @@ The currently defined per-input types are defined as follows:
262
328
| The UTF-8 encoded commitment message string for the proof-of-reserves. See [[bip-0127.mediawiki|BIP 127]] for more information.
263
329
|
264
330
|
265
-
| 0
331
+
| 0, 2
266
332
| [[bip-0127.mediawiki|127]]
267
333
|-
268
334
| RIPEMD160 preimage
@@ -273,7 +339,7 @@ The currently defined per-input types are defined as follows:
273
339
| The hash preimage, encoded as a byte vector, which must equal the key when run through the <tt>RIPEMD160</tt> algorithm
274
340
|
275
341
|
276
-
| 0
342
+
| 0, 2
277
343
| 174
278
344
|-
279
345
| SHA256 preimage
@@ -284,7 +350,7 @@ The currently defined per-input types are defined as follows:
284
350
| The hash preimage, encoded as a byte vector, which must equal the key when run through the <tt>SHA256</tt> algorithm
285
351
|
286
352
|
287
-
| 0
353
+
| 0, 2
288
354
| 174
289
355
|-
290
356
| HASH160 preimage
@@ -295,7 +361,7 @@ The currently defined per-input types are defined as follows:
295
361
| The hash preimage, encoded as a byte vector, which must equal the key when run through the <tt>SHA256</tt> algorithm followed by the <tt>RIPEMD160</tt> algorithm
296
362
|
297
363
|
298
-
| 0
364
+
| 0, 2
299
365
| 174
300
366
|-
301
367
| HASH256 preimage
@@ -306,9 +372,64 @@ The currently defined per-input types are defined as follows:
306
372
| The hash preimage, encoded as a byte vector, which must equal the key when run through the <tt>SHA256</tt> algorithm twice
307
373
|
308
374
|
309
-
| 0
375
+
| 0, 2
310
376
| 174
311
377
|-
378
+
| Previous TXID
379
+
| <tt>PSBT_IN_PREVIOUS_TXID = 0x0e</tt>
380
+
| None
381
+
| No key data
382
+
| <tt><txid></tt>
383
+
| 32 byte txid of the previous transaction whose output at PSBT_IN_OUTPUT_INDEX is being spent.
384
+
| 2
385
+
| 0
386
+
| 2
387
+
| [[bip-psb2.mediawiki|psbt2]]
388
+
|-
389
+
| Spent Output Index
390
+
| <tt>PSBT_IN_OUTPUT_INDEX = 0x0f</tt>
391
+
| None
392
+
| No key data
393
+
| <tt><32-bit uint></tt>
394
+
| 32 bit little endian integer representing the index of the output being spent in the transaction with the txid of PSBT_IN_PREVIOUS_TXID.
395
+
| 2
396
+
| 0
397
+
| 2
398
+
| [[bip-psb2.mediawiki|psbt2]]
399
+
|-
400
+
| Sequence Number
401
+
| <tt>PSBT_IN_SEQUENCE = 0x10</tt>
402
+
| None
403
+
| No key data
404
+
| <tt><32-bit uint></tt>
405
+
| The 32 bit unsigned little endian integer for the sequence number of this input. If omitted, the sequence number is assumed to be the final sequence number (0xffffffff).
406
+
|
407
+
| 0
408
+
| 2
409
+
| [[bip-psb2.mediawiki|psbt2]]
410
+
|-
411
+
| Required Time-based Locktime
412
+
| <tt>PSBT_IN_REQUIRED_TIME_LOCKTIME = 0x11</tt>
413
+
| None
414
+
| No key data
415
+
| <tt><32-bit uint></tt>
416
+
| 32 bit unsigned little endian integer greater than or equal to 500000000 representing the minimum Unix timestamp that this input requires to be set as the transaction's lock time.
| 32 bit unsigned little endian integer less than 500000000 representing the minimum block height that this input requires to be set as the transaction's lock time.
@@ -317,7 +438,7 @@ The currently defined per-input types are defined as follows:
317
438
| Any value data as defined by the proprietary type user.
318
439
|
319
440
|
320
-
| 0
441
+
| 0, 2
321
442
| 174
322
443
|}
323
444
@@ -345,7 +466,7 @@ determine which outputs are change outputs and verify that the change is returni
345
466
| The redeemScript for this output if it has one.
346
467
|
347
468
|
348
-
| 0
469
+
| 0, 2
349
470
| 174
350
471
|-
351
472
| Witness Script
@@ -356,7 +477,7 @@ determine which outputs are change outputs and verify that the change is returni
356
477
| The witnessScript for this output if it has one.
357
478
|
358
479
|
359
-
| 0
480
+
| 0, 2
360
481
| 174
361
482
|-
362
483
| BIP 32 Derivation Path
@@ -367,9 +488,31 @@ determine which outputs are change outputs and verify that the change is returni
367
488
| The master key fingerprint concatenated with the derivation path of the public key. The derivation path is represented as 32-bit little endian unsigned integer indexes concatenated with each other. Public keys are those needed to spend this output.
368
489
|
369
490
|
370
-
| 0
491
+
| 0, 2
371
492
| 174
372
493
|-
494
+
| Output Amount
495
+
| <tt>PSBT_OUT_AMOUNT = 0x03</tt>
496
+
| None
497
+
| No key data
498
+
| <tt><64-bit int></tt>
499
+
| 64 bit signed little endian integer representing the output's amount in satoshis.
500
+
| 2
501
+
| 0
502
+
| 2
503
+
| [[bip-psb2.mediawiki|psbt2]]
504
+
|-
505
+
| Output Script
506
+
| <tt>PSBT_OUT_SCRIPT = 0x03</tt>
507
+
| None
508
+
| No key data
509
+
| <tt><script></tt>
510
+
| The script for this output, also known as the scriptPubKey. Must be omitted in PSBTv0. Must be provided in PSBTv2.
0 commit comments