@scure/btc-signer 2.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/psbt.d.ts CHANGED
@@ -1,12 +1,44 @@
1
1
  import * as P from 'micro-packed';
2
- import { type Bytes } from './utils.ts';
3
- export declare const TaprootControlBlock: P.CoderType<P.StructInput<{
2
+ import { type Bytes, type TArg, type TRet } from './utils.ts';
3
+ /**
4
+ * Taproot control block coder.
5
+ * @example
6
+ * Encode the Taproot control block attached to a script-path witness.
7
+ * ```ts
8
+ * import { TaprootControlBlock } from '@scure/btc-signer/psbt.js';
9
+ * import { pubSchnorr, randomPrivateKeyBytes } from '@scure/btc-signer/utils.js';
10
+ * TaprootControlBlock.encode({
11
+ * version: 0xc0,
12
+ * internalKey: pubSchnorr(randomPrivateKeyBytes()),
13
+ * merklePath: [],
14
+ * });
15
+ * ```
16
+ */
17
+ export declare const TaprootControlBlock: Readonly<P.CoderType<P.StructInput<{
4
18
  version: number;
5
19
  internalKey: P.Bytes;
6
20
  merklePath: P.Bytes[];
7
- }>>;
8
- export declare const PSBTGlobal: {
9
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
21
+ }>>>;
22
+ type PSBTKeyCoder = P.CoderType<any> | false;
23
+ type PSBTKeyMapInfo = Readonly<[
24
+ number,
25
+ PSBTKeyCoder,
26
+ any,
27
+ readonly number[],
28
+ readonly number[],
29
+ boolean
30
+ ]>;
31
+ /**
32
+ * PSBT global key definitions.
33
+ * @example
34
+ * Keep only the fields that are valid for the target PSBT version before serializing.
35
+ * ```ts
36
+ * import { PSBTGlobal, cleanPSBTFields } from '@scure/btc-signer/psbt.js';
37
+ * cleanPSBTFields(2, PSBTGlobal, { txVersion: 2, inputCount: 1, outputCount: 1 });
38
+ * ```
39
+ */
40
+ export declare const PSBTGlobal: Readonly<{
41
+ readonly unsignedTx: readonly [number, false, Readonly<P.CoderType<P.StructInput<{
10
42
  version: number;
11
43
  inputs: P.StructInput<{
12
44
  txid: /*elided*/ any;
@@ -19,21 +51,42 @@ export declare const PSBTGlobal: {
19
51
  script: /*elided*/ any;
20
52
  }>[];
21
53
  lockTime: number;
22
- }>>, readonly [0], readonly [0], false];
23
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
54
+ }>>>, number[], number[], false];
55
+ readonly xpub: readonly [number, P.CoderType<P.StructInput<{
56
+ version: number;
57
+ depth: number;
58
+ parentFingerprint: number;
59
+ childNumber: number;
60
+ chainCode: P.Bytes;
61
+ publicKey: Bytes;
62
+ }>>, P.CoderType<P.StructInput<{
24
63
  fingerprint: number;
25
64
  path: number[];
26
- }>>, readonly [], readonly [0, 2], false];
27
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
28
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
29
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
30
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
31
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
32
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
33
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
34
- };
35
- export declare const PSBTInput: {
36
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
65
+ }>>, never[], number[], false];
66
+ readonly txVersion: readonly [number, false, P.CoderType<number>, number[], number[], false];
67
+ readonly fallbackLocktime: readonly [number, false, P.CoderType<number>, never[], number[], false];
68
+ readonly inputCount: readonly [number, false, P.CoderType<number>, number[], number[], false];
69
+ readonly outputCount: readonly [number, false, P.CoderType<number>, number[], number[], false];
70
+ readonly txModifiable: readonly [number, false, P.CoderType<number>, never[], number[], false];
71
+ readonly version: readonly [number, false, P.CoderType<number>, never[], number[], false];
72
+ readonly proprietary: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
73
+ }>;
74
+ /**
75
+ * PSBT input key definitions.
76
+ * @example
77
+ * Strip input fields that do not belong in the requested PSBT version.
78
+ * ```ts
79
+ * import { hex } from '@scure/base';
80
+ * import { PSBTInput, cleanPSBTFields } from '@scure/btc-signer/psbt.js';
81
+ * cleanPSBTFields(2, PSBTInput, {
82
+ * txid: hex.decode('0000000000000000000000000000000000000000000000000000000000000001'),
83
+ * index: 0,
84
+ * witnessUtxo: { amount: 2n, script: new Uint8Array([0x51]) },
85
+ * });
86
+ * ```
87
+ */
88
+ export declare const PSBTInput: Readonly<{
89
+ readonly nonWitnessUtxo: readonly [number, false, P.CoderType<P.StructInput<{
37
90
  version: number;
38
91
  segwitFlag: boolean | undefined;
39
92
  inputs: P.StructInput<{
@@ -46,90 +99,120 @@ export declare const PSBTInput: {
46
99
  amount: /*elided*/ any;
47
100
  script: /*elided*/ any;
48
101
  }>[];
49
- witnesses: P.Option<Bytes[][]>;
102
+ witnesses: P.Option<P.Bytes[][]>;
50
103
  lockTime: number;
51
- }>>, readonly [], readonly [0, 2], false];
52
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
104
+ }>>, never[], number[], false];
105
+ readonly witnessUtxo: readonly [number, false, Readonly<P.CoderType<P.StructInput<{
53
106
  amount: bigint;
54
- script: Bytes;
55
- }>>, readonly [], readonly [0, 2], false];
56
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
57
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
58
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
59
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
60
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
107
+ script: P.Bytes;
108
+ }>>>, never[], number[], false];
109
+ readonly partialSig: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
110
+ readonly sighashType: readonly [number, false, P.CoderType<number>, never[], number[], false];
111
+ readonly redeemScript: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
112
+ readonly witnessScript: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
113
+ readonly bip32Derivation: readonly [number, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
61
114
  fingerprint: number;
62
115
  path: number[];
63
- }>>, readonly [], readonly [0, 2], false];
64
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
65
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
66
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
67
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
68
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
69
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
70
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
71
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
72
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
73
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
74
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
75
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
76
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
77
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
116
+ }>>, never[], number[], false];
117
+ readonly finalScriptSig: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
118
+ readonly finalScriptWitness: readonly [number, false, P.CoderType<Bytes[]>, never[], number[], false];
119
+ readonly porCommitment: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
120
+ readonly ripemd160: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
121
+ readonly sha256: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
122
+ readonly hash160: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
123
+ readonly hash256: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
124
+ readonly txid: readonly [number, false, P.CoderType<P.Bytes>, number[], number[], true];
125
+ readonly index: readonly [number, false, P.CoderType<number>, number[], number[], true];
126
+ readonly sequence: readonly [number, false, P.CoderType<number>, never[], number[], true];
127
+ readonly requiredTimeLocktime: readonly [number, false, P.CoderType<number>, never[], number[], false];
128
+ readonly requiredHeightLocktime: readonly [number, false, P.CoderType<number>, never[], number[], false];
129
+ readonly tapKeySig: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
130
+ readonly tapScriptSig: readonly [number, P.CoderType<P.StructInput<{
78
131
  pubKey: Bytes;
79
132
  leafHash: P.Bytes;
80
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
81
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
133
+ }>>, P.CoderType<Bytes>, never[], number[], false];
134
+ readonly tapLeafScript: readonly [number, Readonly<P.CoderType<P.StructInput<{
82
135
  version: number;
83
136
  internalKey: P.Bytes;
84
137
  merklePath: P.Bytes[];
85
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
86
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
138
+ }>>>, P.CoderType<Bytes>, never[], number[], false];
139
+ readonly tapBip32Derivation: readonly [number, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
87
140
  hashes: P.Bytes[];
88
141
  der: P.StructInput<{
89
142
  fingerprint: /*elided*/ any;
90
143
  path: /*elided*/ any;
91
144
  }>;
92
- }>>, readonly [], readonly [0, 2], false];
93
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
94
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
95
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
96
- };
97
- export declare const PSBTInputFinalKeys: (keyof TransactionInput)[];
98
- export declare const PSBTInputUnsignedKeys: (keyof TransactionInput)[];
99
- export declare const PSBTOutput: {
100
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
101
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
102
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
145
+ }>>, never[], number[], false];
146
+ readonly tapInternalKey: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
147
+ readonly tapMerkleRoot: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
148
+ readonly proprietary: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
149
+ }>;
150
+ /**
151
+ * Input fields preserved after finalization.
152
+ * @example
153
+ * Use the allowlist when stripping transient signing fields after finalization.
154
+ * ```ts
155
+ * import { PSBTInputFinalKeys } from '@scure/btc-signer/psbt.js';
156
+ * const finalKeys = new Set(PSBTInputFinalKeys);
157
+ * finalKeys.has('finalScriptWitness');
158
+ * ```
159
+ */
160
+ export declare const PSBTInputFinalKeys: readonly ("index" | "unknown" | "sequence" | "txid" | "finalScriptSig" | "proprietary" | "nonWitnessUtxo" | "witnessUtxo" | "partialSig" | "sighashType" | "redeemScript" | "witnessScript" | "bip32Derivation" | "finalScriptWitness" | "porCommitment" | "ripemd160" | "sha256" | "hash160" | "hash256" | "requiredTimeLocktime" | "requiredHeightLocktime" | "tapKeySig" | "tapScriptSig" | "tapLeafScript" | "tapBip32Derivation" | "tapInternalKey" | "tapMerkleRoot")[];
161
+ /**
162
+ * Input fields that may still change after signing starts.
163
+ * @example
164
+ * Signed inputs may still update these fields while new signatures are being added.
165
+ * ```ts
166
+ * import { PSBTInputUnsignedKeys } from '@scure/btc-signer/psbt.js';
167
+ * const mutableKeys = new Set(PSBTInputUnsignedKeys);
168
+ * mutableKeys.has('tapScriptSig');
169
+ * ```
170
+ */
171
+ export declare const PSBTInputUnsignedKeys: readonly ("index" | "unknown" | "sequence" | "txid" | "finalScriptSig" | "proprietary" | "nonWitnessUtxo" | "witnessUtxo" | "partialSig" | "sighashType" | "redeemScript" | "witnessScript" | "bip32Derivation" | "finalScriptWitness" | "porCommitment" | "ripemd160" | "sha256" | "hash160" | "hash256" | "requiredTimeLocktime" | "requiredHeightLocktime" | "tapKeySig" | "tapScriptSig" | "tapLeafScript" | "tapBip32Derivation" | "tapInternalKey" | "tapMerkleRoot")[];
172
+ /**
173
+ * PSBT output key definitions.
174
+ * @example
175
+ * Strip output fields that are not valid for the target PSBT version.
176
+ * ```ts
177
+ * import { PSBTOutput, cleanPSBTFields } from '@scure/btc-signer/psbt.js';
178
+ * cleanPSBTFields(2, PSBTOutput, { amount: 2n, script: new Uint8Array([0x51]) });
179
+ * ```
180
+ */
181
+ export declare const PSBTOutput: Readonly<{
182
+ readonly redeemScript: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
183
+ readonly witnessScript: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
184
+ readonly bip32Derivation: readonly [number, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
103
185
  fingerprint: number;
104
186
  path: number[];
105
- }>>, readonly [], readonly [0, 2], false];
106
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
107
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
108
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
109
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
187
+ }>>, never[], number[], false];
188
+ readonly amount: readonly [number, false, P.CoderType<bigint>, number[], number[], true];
189
+ readonly script: readonly [number, false, P.CoderType<Bytes>, number[], number[], true];
190
+ readonly tapInternalKey: readonly [number, false, P.CoderType<Bytes>, never[], number[], false];
191
+ readonly tapTree: readonly [number, false, P.CoderType<P.StructInput<{
110
192
  depth: number;
111
193
  version: number;
112
- script: Bytes;
113
- }>[]>, readonly [], readonly [0, 2], false];
114
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
194
+ script: Bytes & Uint8Array<ArrayBuffer>;
195
+ }>[]>, never[], number[], false];
196
+ readonly tapBip32Derivation: readonly [number, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
115
197
  hashes: P.Bytes[];
116
198
  der: P.StructInput<{
117
199
  fingerprint: /*elided*/ any;
118
200
  path: /*elided*/ any;
119
201
  }>;
120
- }>>, readonly [], readonly [0, 2], false];
121
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
122
- };
123
- export declare const PSBTOutputUnsignedKeys: (keyof typeof PSBTOutput)[];
124
- type PSBTKeyCoder = P.CoderType<any> | false;
125
- type PSBTKeyMapInfo = Readonly<[
126
- number,
127
- PSBTKeyCoder,
128
- any,
129
- readonly number[],
130
- readonly number[],
131
- boolean
132
- ]>;
202
+ }>>, never[], number[], false];
203
+ readonly proprietary: readonly [number, P.CoderType<Bytes>, P.CoderType<Bytes>, never[], number[], false];
204
+ }>;
205
+ /**
206
+ * Output fields that may still change after signing starts.
207
+ * @example
208
+ * PSBTv2 outputs are fully committed once signing starts, so the set stays empty.
209
+ * ```ts
210
+ * import { PSBTOutputUnsignedKeys } from '@scure/btc-signer/psbt.js';
211
+ * const mutableKeys = new Set(PSBTOutputUnsignedKeys);
212
+ * mutableKeys.size; // 0
213
+ * ```
214
+ */
215
+ export declare const PSBTOutputUnsignedKeys: readonly ("script" | "amount" | "proprietary" | "redeemScript" | "witnessScript" | "bip32Derivation" | "tapBip32Derivation" | "tapInternalKey" | "tapTree")[];
133
216
  type PSBTKeyMap = Record<string, PSBTKeyMapInfo>;
134
217
  declare const PSBTUnknownKey: P.CoderType<P.StructInput<{
135
218
  type: number;
@@ -138,12 +221,27 @@ declare const PSBTUnknownKey: P.CoderType<P.StructInput<{
138
221
  type PSBTUnknownFields = {
139
222
  unknown?: [P.UnwrapCoder<typeof PSBTUnknownKey>, Bytes][];
140
223
  };
224
+ /** Maps a PSBT key-definition table to the decoded key-map shape. */
141
225
  export type PSBTKeyMapKeys<T extends PSBTKeyMap> = {
142
226
  -readonly [K in keyof T]?: T[K][1] extends false ? P.UnwrapCoder<T[K][2]> : [P.UnwrapCoder<T[K][1]>, P.UnwrapCoder<T[K][2]>][];
143
227
  } & PSBTUnknownFields;
144
- declare function PSBTKeyMap<T extends PSBTKeyMap>(psbtEnum: T): P.CoderType<PSBTKeyMapKeys<T>>;
145
- export declare const PSBTInputCoder: P.CoderType<PSBTKeyMapKeys<{
146
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
228
+ declare function PSBTKeyMap<T extends PSBTKeyMap>(psbtEnum: T): TRet<P.CoderType<PSBTKeyMapKeys<T>>>;
229
+ /**
230
+ * Validated PSBT input coder.
231
+ * @example
232
+ * Validate a decoded PSBT input before serializing it back to bytes.
233
+ * ```ts
234
+ * import { hex } from '@scure/base';
235
+ * import { PSBTInputCoder } from '@scure/btc-signer/psbt.js';
236
+ * PSBTInputCoder.encode({
237
+ * txid: hex.decode('0000000000000000000000000000000000000000000000000000000000000001'),
238
+ * index: 0,
239
+ * witnessUtxo: { amount: 1n, script: new Uint8Array([0x51]) },
240
+ * });
241
+ * ```
242
+ */
243
+ export declare const PSBTInputCoder: Readonly<P.CoderType<{
244
+ nonWitnessUtxo?: P.StructInput<{
147
245
  version: number;
148
246
  segwitFlag: boolean | undefined;
149
247
  inputs: P.StructInput<{
@@ -156,665 +254,2966 @@ export declare const PSBTInputCoder: P.CoderType<PSBTKeyMapKeys<{
156
254
  amount: /*elided*/ any;
157
255
  script: /*elided*/ any;
158
256
  }>[];
159
- witnesses: P.Option<Bytes[][]>;
257
+ witnesses: P.Option<P.Bytes[][]>;
160
258
  lockTime: number;
161
- }>>, readonly [], readonly [0, 2], false];
162
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
259
+ }> | undefined;
260
+ witnessUtxo?: P.StructInput<{
163
261
  amount: bigint;
164
- script: Bytes;
165
- }>>, readonly [], readonly [0, 2], false];
166
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
167
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
168
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
169
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
170
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
262
+ script: P.Bytes;
263
+ }> | undefined;
264
+ partialSig?: [Bytes, Bytes][] | undefined;
265
+ sighashType?: number | undefined;
266
+ redeemScript?: Bytes | undefined;
267
+ witnessScript?: Bytes | undefined;
268
+ bip32Derivation?: [Bytes, P.StructInput<{
171
269
  fingerprint: number;
172
270
  path: number[];
173
- }>>, readonly [], readonly [0, 2], false];
174
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
175
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
176
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
177
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
178
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
179
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
180
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
181
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
182
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
183
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
184
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
185
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
186
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
187
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
271
+ }>][] | undefined;
272
+ finalScriptSig?: Bytes | undefined;
273
+ finalScriptWitness?: Bytes[] | undefined;
274
+ porCommitment?: Bytes | undefined;
275
+ ripemd160?: [Bytes, Bytes][] | undefined;
276
+ sha256?: [Bytes, Bytes][] | undefined;
277
+ hash160?: [Bytes, Bytes][] | undefined;
278
+ hash256?: [Bytes, Bytes][] | undefined;
279
+ txid?: P.Bytes | undefined;
280
+ index?: number | undefined;
281
+ sequence?: number | undefined;
282
+ requiredTimeLocktime?: number | undefined;
283
+ requiredHeightLocktime?: number | undefined;
284
+ tapKeySig?: Bytes | undefined;
285
+ tapScriptSig?: [P.StructInput<{
188
286
  pubKey: Bytes;
189
287
  leafHash: P.Bytes;
190
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
191
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
288
+ }>, Bytes][] | undefined;
289
+ tapLeafScript?: [P.StructInput<{
192
290
  version: number;
193
291
  internalKey: P.Bytes;
194
292
  merklePath: P.Bytes[];
195
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
196
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
293
+ }>, Bytes][] | undefined;
294
+ tapBip32Derivation?: [Bytes, P.StructInput<{
197
295
  hashes: P.Bytes[];
198
296
  der: P.StructInput<{
199
297
  fingerprint: /*elided*/ any;
200
298
  path: /*elided*/ any;
201
299
  }>;
202
- }>>, readonly [], readonly [0, 2], false];
203
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
204
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
205
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
300
+ }>][] | undefined;
301
+ tapInternalKey?: Bytes | undefined;
302
+ tapMerkleRoot?: Bytes | undefined;
303
+ proprietary?: [Bytes, Bytes][] | undefined;
304
+ } & PSBTUnknownFields & {
305
+ nonWitnessUtxo?: ({
306
+ version: number;
307
+ inputs: P.StructInput<{
308
+ txid: P.Bytes;
309
+ index: number;
310
+ finalScriptSig: P.Bytes;
311
+ sequence: number;
312
+ }>[];
313
+ outputs: P.StructInput<{
314
+ amount: bigint;
315
+ script: P.Bytes;
316
+ }>[];
317
+ lockTime: number;
318
+ } & {
319
+ segwitFlag?: boolean | undefined;
320
+ witnesses?: P.Option<P.Bytes[][]>;
321
+ } & {
322
+ version: number;
323
+ inputs: P.StructInput<{
324
+ txid: P.Bytes;
325
+ index: number;
326
+ finalScriptSig: P.Bytes;
327
+ sequence: number;
328
+ }>[] & ({
329
+ index: number;
330
+ sequence: number;
331
+ txid: P.Bytes;
332
+ finalScriptSig: P.Bytes;
333
+ } & {} & {
334
+ index: number;
335
+ sequence: number;
336
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
337
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
338
+ })[];
339
+ outputs: P.StructInput<{
340
+ amount: bigint;
341
+ script: P.Bytes;
342
+ }>[] & ({
343
+ script: P.Bytes;
344
+ amount: bigint;
345
+ } & {} & {
346
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
347
+ amount: bigint;
348
+ })[];
349
+ lockTime: number;
350
+ segwitFlag?: boolean | undefined;
351
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
352
+ }) | undefined;
353
+ witnessUtxo?: ({
354
+ script: P.Bytes;
355
+ amount: bigint;
356
+ } & {} & {
357
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
358
+ amount: bigint;
359
+ }) | undefined;
360
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
361
+ sighashType?: number | undefined;
362
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
363
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
364
+ bip32Derivation?: ([Bytes, P.StructInput<{
365
+ fingerprint: number;
366
+ path: number[];
367
+ }>][] & ([Bytes, P.StructInput<{
368
+ fingerprint: number;
369
+ path: number[];
370
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
371
+ path: number[];
372
+ fingerprint: number;
373
+ } & {} & {
374
+ path: number[] & number[];
375
+ fingerprint: number;
376
+ }])[]) | undefined;
377
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
378
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
379
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
380
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
381
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
382
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
383
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
384
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
385
+ index?: number | undefined;
386
+ sequence?: number | undefined;
387
+ requiredTimeLocktime?: number | undefined;
388
+ requiredHeightLocktime?: number | undefined;
389
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
390
+ tapScriptSig?: ([P.StructInput<{
391
+ pubKey: Bytes;
392
+ leafHash: P.Bytes;
393
+ }>, Bytes][] & ([P.StructInput<{
394
+ pubKey: Bytes;
395
+ leafHash: P.Bytes;
396
+ }>, Bytes] & [{
397
+ pubKey: Bytes;
398
+ leafHash: P.Bytes;
399
+ } & {} & {
400
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
401
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
402
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
403
+ tapLeafScript?: ([P.StructInput<{
404
+ version: number;
405
+ internalKey: P.Bytes;
406
+ merklePath: P.Bytes[];
407
+ }>, Bytes][] & ([P.StructInput<{
408
+ version: number;
409
+ internalKey: P.Bytes;
410
+ merklePath: P.Bytes[];
411
+ }>, Bytes] & [{
412
+ version: number;
413
+ internalKey: P.Bytes;
414
+ merklePath: P.Bytes[];
415
+ } & {} & {
416
+ version: number;
417
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
418
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
419
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
420
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
421
+ hashes: P.Bytes[];
422
+ der: P.StructInput<{
423
+ fingerprint: /*elided*/ any;
424
+ path: /*elided*/ any;
425
+ }>;
426
+ }>][] & ([Bytes, P.StructInput<{
427
+ hashes: P.Bytes[];
428
+ der: P.StructInput<{
429
+ fingerprint: /*elided*/ any;
430
+ path: /*elided*/ any;
431
+ }>;
432
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
433
+ der: P.StructInput<{
434
+ fingerprint: number;
435
+ path: number[];
436
+ }>;
437
+ hashes: P.Bytes[];
438
+ } & {} & {
439
+ der: {
440
+ path: number[];
441
+ fingerprint: number;
442
+ } & {} & {
443
+ path: number[] & number[];
444
+ fingerprint: number;
445
+ };
446
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
447
+ }])[]) | undefined;
448
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
449
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
450
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
451
+ unknown?: ([P.StructInput<{
452
+ type: number;
453
+ key: Bytes;
454
+ }>, Bytes][] & ([P.StructInput<{
455
+ type: number;
456
+ key: Bytes;
457
+ }>, Bytes] & [{
458
+ type: number;
459
+ key: Bytes;
460
+ } & {} & {
461
+ type: number;
462
+ key: Bytes & Uint8Array<ArrayBuffer>;
463
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
206
464
  }>>;
465
+ /** Replaces selected keys in `T` with widened update shapes from `E`. */
207
466
  export type ExtendType<T, E> = {
208
467
  [K in keyof T]: K extends keyof E ? E[K] | T[K] : T[K];
209
468
  };
469
+ /** Marks selected keys in `T` as required. */
210
470
  export type RequireType<T, K extends keyof T> = T & {
211
471
  [P in K]-?: T[P];
212
472
  };
213
- export type TransactionInput = P.UnwrapCoder<typeof PSBTInputCoder>;
214
- export type TransactionInputUpdate = ExtendType<TransactionInput, {
473
+ /** Fully decoded PSBT input. */
474
+ export type TransactionInput = PSBTKeyMapKeys<typeof PSBTInput>;
475
+ /** PSBT input update shape accepted by mutation helpers. */
476
+ export type TransactionInputUpdate = ExtendType<PSBTKeyMapKeys<typeof PSBTInput>, {
215
477
  nonWitnessUtxo?: string | Bytes;
216
478
  txid?: string;
217
479
  }>;
218
- export declare const PSBTOutputCoder: P.CoderType<PSBTKeyMapKeys<{
219
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
220
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
221
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
480
+ /**
481
+ * Validated PSBT output coder.
482
+ * @example
483
+ * Validate a decoded PSBT output before serializing it back to bytes.
484
+ * ```ts
485
+ * import { PSBTOutputCoder } from '@scure/btc-signer/psbt.js';
486
+ * PSBTOutputCoder.encode({ amount: 1n, script: new Uint8Array([0x51]) });
487
+ * ```
488
+ */
489
+ export declare const PSBTOutputCoder: Readonly<P.CoderType<{
490
+ redeemScript?: Bytes | undefined;
491
+ witnessScript?: Bytes | undefined;
492
+ bip32Derivation?: [Bytes, P.StructInput<{
493
+ fingerprint: number;
494
+ path: number[];
495
+ }>][] | undefined;
496
+ amount?: bigint | undefined;
497
+ script?: Bytes | undefined;
498
+ tapInternalKey?: Bytes | undefined;
499
+ tapTree?: P.StructInput<{
500
+ depth: number;
501
+ version: number;
502
+ script: Bytes & Uint8Array<ArrayBuffer>;
503
+ }>[] | undefined;
504
+ tapBip32Derivation?: [Bytes, P.StructInput<{
505
+ hashes: P.Bytes[];
506
+ der: P.StructInput<{
507
+ fingerprint: /*elided*/ any;
508
+ path: /*elided*/ any;
509
+ }>;
510
+ }>][] | undefined;
511
+ proprietary?: [Bytes, Bytes][] | undefined;
512
+ } & PSBTUnknownFields & {
513
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
514
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
515
+ bip32Derivation?: ([Bytes, P.StructInput<{
516
+ fingerprint: number;
517
+ path: number[];
518
+ }>][] & ([Bytes, P.StructInput<{
222
519
  fingerprint: number;
223
520
  path: number[];
224
- }>>, readonly [], readonly [0, 2], false];
225
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
226
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
227
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
228
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
521
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
522
+ path: number[];
523
+ fingerprint: number;
524
+ } & {} & {
525
+ path: number[] & number[];
526
+ fingerprint: number;
527
+ }])[]) | undefined;
528
+ amount?: bigint | undefined;
529
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
530
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
531
+ tapTree?: (P.StructInput<{
532
+ depth: number;
533
+ version: number;
534
+ script: Bytes & Uint8Array<ArrayBuffer>;
535
+ }>[] & ({
229
536
  depth: number;
537
+ script: Bytes & Uint8Array<ArrayBuffer>;
230
538
  version: number;
231
- script: Bytes;
232
- }>[]>, readonly [], readonly [0, 2], false];
233
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
539
+ } & {} & {
540
+ depth: number;
541
+ script: Bytes & Uint8Array<ArrayBuffer>;
542
+ version: number;
543
+ })[]) | undefined;
544
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
545
+ hashes: P.Bytes[];
546
+ der: P.StructInput<{
547
+ fingerprint: /*elided*/ any;
548
+ path: /*elided*/ any;
549
+ }>;
550
+ }>][] & ([Bytes, P.StructInput<{
234
551
  hashes: P.Bytes[];
235
552
  der: P.StructInput<{
236
553
  fingerprint: /*elided*/ any;
237
554
  path: /*elided*/ any;
238
555
  }>;
239
- }>>, readonly [], readonly [0, 2], false];
240
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
556
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
557
+ der: P.StructInput<{
558
+ fingerprint: number;
559
+ path: number[];
560
+ }>;
561
+ hashes: P.Bytes[];
562
+ } & {} & {
563
+ der: {
564
+ path: number[];
565
+ fingerprint: number;
566
+ } & {} & {
567
+ path: number[] & number[];
568
+ fingerprint: number;
569
+ };
570
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
571
+ }])[]) | undefined;
572
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
573
+ unknown?: ([P.StructInput<{
574
+ type: number;
575
+ key: Bytes;
576
+ }>, Bytes][] & ([P.StructInput<{
577
+ type: number;
578
+ key: Bytes;
579
+ }>, Bytes] & [{
580
+ type: number;
581
+ key: Bytes;
582
+ } & {} & {
583
+ type: number;
584
+ key: Bytes & Uint8Array<ArrayBuffer>;
585
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
241
586
  }>>;
242
- export type TransactionOutput = P.UnwrapCoder<typeof PSBTOutputCoder>;
243
- export type TransactionOutputUpdate = ExtendType<TransactionOutput, {
587
+ /** Fully decoded PSBT output. */
588
+ export type TransactionOutput = PSBTKeyMapKeys<typeof PSBTOutput>;
589
+ /** PSBT output update shape accepted by mutation helpers. */
590
+ export type TransactionOutputUpdate = ExtendType<PSBTKeyMapKeys<typeof PSBTOutput>, {
244
591
  script?: string;
245
592
  }>;
593
+ /** Transaction output fields required for serialization. */
246
594
  export type TransactionOutputRequired = {
595
+ /** Serialized scriptPubKey bytes. */
247
596
  script: Bytes;
597
+ /** Output value in satoshis. */
248
598
  amount: bigint;
249
599
  };
250
- export declare const _RawPSBTV0: P.CoderType<P.StructInput<{
600
+ export declare const _RawPSBTV0: Readonly<P.CoderType<P.StructInput<{
251
601
  magic: undefined;
252
- global: PSBTKeyMapKeys<{
253
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
602
+ global: {
603
+ unsignedTx?: P.StructInput<{
254
604
  version: /*elided*/ any;
255
605
  inputs: /*elided*/ any;
256
606
  outputs: /*elided*/ any;
257
607
  lockTime: /*elided*/ any;
258
- }>>, readonly [0], readonly [0], false];
259
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
260
- fingerprint: /*elided*/ any;
261
- path: /*elided*/ any;
262
- }>>, readonly [], readonly [0, 2], false];
263
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
264
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
265
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
266
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
267
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
268
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
269
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
270
- }>;
271
- inputs: PSBTKeyMapKeys<{
272
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
608
+ }> | undefined;
609
+ xpub?: [P.StructInput<{
610
+ version: /*elided*/ any;
611
+ depth: /*elided*/ any;
612
+ parentFingerprint: /*elided*/ any;
613
+ childNumber: /*elided*/ any;
614
+ chainCode: /*elided*/ any;
615
+ publicKey: /*elided*/ any;
616
+ }>, P.StructInput<{
617
+ fingerprint: /*elided*/ any;
618
+ path: /*elided*/ any;
619
+ }>][] | undefined;
620
+ txVersion?: number | undefined;
621
+ fallbackLocktime?: number | undefined;
622
+ inputCount?: number | undefined;
623
+ outputCount?: number | undefined;
624
+ txModifiable?: number | undefined;
625
+ version?: number | undefined;
626
+ proprietary?: [Bytes, Bytes][] | undefined;
627
+ } & PSBTUnknownFields & {
628
+ unsignedTx?: ({
629
+ version: number;
630
+ inputs: P.StructInput<{
631
+ txid: /*elided*/ any;
632
+ index: /*elided*/ any;
633
+ finalScriptSig: /*elided*/ any;
634
+ sequence: /*elided*/ any;
635
+ }>[];
636
+ outputs: P.StructInput<{
637
+ amount: /*elided*/ any;
638
+ script: /*elided*/ any;
639
+ }>[];
640
+ lockTime: number;
641
+ } & {} & {
642
+ version: number;
643
+ inputs: P.StructInput<{
644
+ txid: /*elided*/ any;
645
+ index: /*elided*/ any;
646
+ finalScriptSig: /*elided*/ any;
647
+ sequence: /*elided*/ any;
648
+ }>[] & ({
649
+ index: number;
650
+ sequence: number;
651
+ txid: P.Bytes;
652
+ finalScriptSig: P.Bytes;
653
+ } & {} & {
654
+ index: number;
655
+ sequence: number;
656
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
657
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
658
+ })[];
659
+ outputs: P.StructInput<{
660
+ amount: /*elided*/ any;
661
+ script: /*elided*/ any;
662
+ }>[] & ({
663
+ script: P.Bytes;
664
+ amount: bigint;
665
+ } & {} & {
666
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
667
+ amount: bigint;
668
+ })[];
669
+ lockTime: number;
670
+ }) | undefined;
671
+ xpub?: ([P.StructInput<{
672
+ version: /*elided*/ any;
673
+ depth: /*elided*/ any;
674
+ parentFingerprint: /*elided*/ any;
675
+ childNumber: /*elided*/ any;
676
+ chainCode: /*elided*/ any;
677
+ publicKey: /*elided*/ any;
678
+ }>, P.StructInput<{
679
+ fingerprint: /*elided*/ any;
680
+ path: /*elided*/ any;
681
+ }>][] & ([P.StructInput<{
682
+ version: /*elided*/ any;
683
+ depth: /*elided*/ any;
684
+ parentFingerprint: /*elided*/ any;
685
+ childNumber: /*elided*/ any;
686
+ chainCode: /*elided*/ any;
687
+ publicKey: /*elided*/ any;
688
+ }>, P.StructInput<{
689
+ fingerprint: /*elided*/ any;
690
+ path: /*elided*/ any;
691
+ }>] & [{
692
+ depth: number;
693
+ version: number;
694
+ parentFingerprint: number;
695
+ childNumber: number;
696
+ chainCode: P.Bytes;
697
+ publicKey: Bytes;
698
+ } & {} & {
699
+ depth: number;
700
+ version: number;
701
+ parentFingerprint: number;
702
+ childNumber: number;
703
+ chainCode: P.Bytes & Uint8Array<ArrayBuffer>;
704
+ publicKey: Bytes & Uint8Array<ArrayBuffer>;
705
+ }, {
706
+ path: number[];
707
+ fingerprint: number;
708
+ } & {} & {
709
+ path: number[] & number[];
710
+ fingerprint: number;
711
+ }])[]) | undefined;
712
+ txVersion?: number | undefined;
713
+ fallbackLocktime?: number | undefined;
714
+ inputCount?: number | undefined;
715
+ outputCount?: number | undefined;
716
+ txModifiable?: number | undefined;
717
+ version?: number | undefined;
718
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
719
+ unknown?: ([P.StructInput<{
720
+ type: number;
721
+ key: Bytes;
722
+ }>, Bytes][] & ([P.StructInput<{
723
+ type: number;
724
+ key: Bytes;
725
+ }>, Bytes] & [{
726
+ type: number;
727
+ key: Bytes;
728
+ } & {} & {
729
+ type: number;
730
+ key: Bytes & Uint8Array<ArrayBuffer>;
731
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
732
+ };
733
+ inputs: ({
734
+ nonWitnessUtxo?: P.StructInput<{
273
735
  version: /*elided*/ any;
274
736
  segwitFlag: /*elided*/ any;
275
737
  inputs: /*elided*/ any;
276
738
  outputs: /*elided*/ any;
277
739
  witnesses: /*elided*/ any;
278
740
  lockTime: /*elided*/ any;
279
- }>>, readonly [], readonly [0, 2], false];
280
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
741
+ }> | undefined;
742
+ witnessUtxo?: P.StructInput<{
281
743
  amount: /*elided*/ any;
282
744
  script: /*elided*/ any;
283
- }>>, readonly [], readonly [0, 2], false];
284
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
285
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
286
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
287
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
288
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
289
- fingerprint: /*elided*/ any;
290
- path: /*elided*/ any;
291
- }>>, readonly [], readonly [0, 2], false];
292
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
293
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
294
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
295
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
296
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
297
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
298
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
299
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
300
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
301
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
302
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
303
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
304
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
305
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
745
+ }> | undefined;
746
+ partialSig?: [Bytes, Bytes][] | undefined;
747
+ sighashType?: number | undefined;
748
+ redeemScript?: Bytes | undefined;
749
+ witnessScript?: Bytes | undefined;
750
+ bip32Derivation?: [Bytes, P.StructInput<{
751
+ fingerprint: /*elided*/ any;
752
+ path: /*elided*/ any;
753
+ }>][] | undefined;
754
+ finalScriptSig?: Bytes | undefined;
755
+ finalScriptWitness?: Bytes[] | undefined;
756
+ porCommitment?: Bytes | undefined;
757
+ ripemd160?: [Bytes, Bytes][] | undefined;
758
+ sha256?: [Bytes, Bytes][] | undefined;
759
+ hash160?: [Bytes, Bytes][] | undefined;
760
+ hash256?: [Bytes, Bytes][] | undefined;
761
+ txid?: P.Bytes | undefined;
762
+ index?: number | undefined;
763
+ sequence?: number | undefined;
764
+ requiredTimeLocktime?: number | undefined;
765
+ requiredHeightLocktime?: number | undefined;
766
+ tapKeySig?: Bytes | undefined;
767
+ tapScriptSig?: [P.StructInput<{
306
768
  pubKey: /*elided*/ any;
307
769
  leafHash: /*elided*/ any;
308
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
309
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
770
+ }>, Bytes][] | undefined;
771
+ tapLeafScript?: [P.StructInput<{
310
772
  version: /*elided*/ any;
311
773
  internalKey: /*elided*/ any;
312
774
  merklePath: /*elided*/ any;
313
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
314
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
315
- hashes: /*elided*/ any;
316
- der: /*elided*/ any;
317
- }>>, readonly [], readonly [0, 2], false];
318
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
319
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
320
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
321
- }>[];
322
- outputs: PSBTKeyMapKeys<{
323
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
324
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
325
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
326
- fingerprint: /*elided*/ any;
327
- path: /*elided*/ any;
328
- }>>, readonly [], readonly [0, 2], false];
329
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
330
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
331
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
332
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
775
+ }>, Bytes][] | undefined;
776
+ tapBip32Derivation?: [Bytes, P.StructInput<{
777
+ hashes: /*elided*/ any;
778
+ der: /*elided*/ any;
779
+ }>][] | undefined;
780
+ tapInternalKey?: Bytes | undefined;
781
+ tapMerkleRoot?: Bytes | undefined;
782
+ proprietary?: [Bytes, Bytes][] | undefined;
783
+ } & PSBTUnknownFields & {
784
+ nonWitnessUtxo?: ({
785
+ version: number;
786
+ inputs: P.StructInput<{
787
+ txid: /*elided*/ any;
788
+ index: /*elided*/ any;
789
+ finalScriptSig: /*elided*/ any;
790
+ sequence: /*elided*/ any;
791
+ }>[];
792
+ outputs: P.StructInput<{
793
+ amount: /*elided*/ any;
794
+ script: /*elided*/ any;
795
+ }>[];
796
+ lockTime: number;
797
+ } & {
798
+ segwitFlag?: boolean | undefined;
799
+ witnesses?: P.Option<P.Bytes[][]>;
800
+ } & {
801
+ version: number;
802
+ inputs: P.StructInput<{
803
+ txid: /*elided*/ any;
804
+ index: /*elided*/ any;
805
+ finalScriptSig: /*elided*/ any;
806
+ sequence: /*elided*/ any;
807
+ }>[] & ({
808
+ index: number;
809
+ sequence: number;
810
+ txid: P.Bytes;
811
+ finalScriptSig: P.Bytes;
812
+ } & {} & {
813
+ index: number;
814
+ sequence: number;
815
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
816
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
817
+ })[];
818
+ outputs: P.StructInput<{
819
+ amount: /*elided*/ any;
820
+ script: /*elided*/ any;
821
+ }>[] & ({
822
+ script: P.Bytes;
823
+ amount: bigint;
824
+ } & {} & {
825
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
826
+ amount: bigint;
827
+ })[];
828
+ lockTime: number;
829
+ segwitFlag?: boolean | undefined;
830
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
831
+ }) | undefined;
832
+ witnessUtxo?: ({
833
+ script: P.Bytes;
834
+ amount: bigint;
835
+ } & {} & {
836
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
837
+ amount: bigint;
838
+ }) | undefined;
839
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
840
+ sighashType?: number | undefined;
841
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
842
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
843
+ bip32Derivation?: ([Bytes, P.StructInput<{
844
+ fingerprint: /*elided*/ any;
845
+ path: /*elided*/ any;
846
+ }>][] & ([Bytes, P.StructInput<{
847
+ fingerprint: /*elided*/ any;
848
+ path: /*elided*/ any;
849
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
850
+ path: number[];
851
+ fingerprint: number;
852
+ } & {} & {
853
+ path: number[] & number[];
854
+ fingerprint: number;
855
+ }])[]) | undefined;
856
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
857
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
858
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
859
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
860
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
861
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
862
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
863
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
864
+ index?: number | undefined;
865
+ sequence?: number | undefined;
866
+ requiredTimeLocktime?: number | undefined;
867
+ requiredHeightLocktime?: number | undefined;
868
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
869
+ tapScriptSig?: ([P.StructInput<{
870
+ pubKey: /*elided*/ any;
871
+ leafHash: /*elided*/ any;
872
+ }>, Bytes][] & ([P.StructInput<{
873
+ pubKey: /*elided*/ any;
874
+ leafHash: /*elided*/ any;
875
+ }>, Bytes] & [{
876
+ pubKey: Bytes;
877
+ leafHash: P.Bytes;
878
+ } & {} & {
879
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
880
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
881
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
882
+ tapLeafScript?: ([P.StructInput<{
883
+ version: /*elided*/ any;
884
+ internalKey: /*elided*/ any;
885
+ merklePath: /*elided*/ any;
886
+ }>, Bytes][] & ([P.StructInput<{
887
+ version: /*elided*/ any;
888
+ internalKey: /*elided*/ any;
889
+ merklePath: /*elided*/ any;
890
+ }>, Bytes] & [{
891
+ version: number;
892
+ internalKey: P.Bytes;
893
+ merklePath: P.Bytes[];
894
+ } & {} & {
895
+ version: number;
896
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
897
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
898
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
899
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
900
+ hashes: /*elided*/ any;
901
+ der: /*elided*/ any;
902
+ }>][] & ([Bytes, P.StructInput<{
903
+ hashes: /*elided*/ any;
904
+ der: /*elided*/ any;
905
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
906
+ der: P.StructInput<{
907
+ fingerprint: /*elided*/ any;
908
+ path: /*elided*/ any;
909
+ }>;
910
+ hashes: P.Bytes[];
911
+ } & {} & {
912
+ der: {
913
+ path: number[];
914
+ fingerprint: number;
915
+ } & {} & {
916
+ path: number[] & number[];
917
+ fingerprint: number;
918
+ };
919
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
920
+ }])[]) | undefined;
921
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
922
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
923
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
924
+ unknown?: ([P.StructInput<{
925
+ type: number;
926
+ key: Bytes;
927
+ }>, Bytes][] & ([P.StructInput<{
928
+ type: number;
929
+ key: Bytes;
930
+ }>, Bytes] & [{
931
+ type: number;
932
+ key: Bytes;
933
+ } & {} & {
934
+ type: number;
935
+ key: Bytes & Uint8Array<ArrayBuffer>;
936
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
937
+ })[];
938
+ outputs: ({
939
+ redeemScript?: Bytes | undefined;
940
+ witnessScript?: Bytes | undefined;
941
+ bip32Derivation?: [Bytes, P.StructInput<{
942
+ fingerprint: /*elided*/ any;
943
+ path: /*elided*/ any;
944
+ }>][] | undefined;
945
+ amount?: bigint | undefined;
946
+ script?: Bytes | undefined;
947
+ tapInternalKey?: Bytes | undefined;
948
+ tapTree?: P.StructInput<{
333
949
  depth: /*elided*/ any;
334
950
  version: /*elided*/ any;
335
951
  script: /*elided*/ any;
336
- }>[]>, readonly [], readonly [0, 2], false];
337
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
952
+ }>[] | undefined;
953
+ tapBip32Derivation?: [Bytes, P.StructInput<{
338
954
  hashes: /*elided*/ any;
339
955
  der: /*elided*/ any;
340
- }>>, readonly [], readonly [0, 2], false];
341
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
342
- }>[];
343
- }>>;
344
- export declare const _RawPSBTV2: P.CoderType<P.StructInput<{
956
+ }>][] | undefined;
957
+ proprietary?: [Bytes, Bytes][] | undefined;
958
+ } & PSBTUnknownFields & {
959
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
960
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
961
+ bip32Derivation?: ([Bytes, P.StructInput<{
962
+ fingerprint: /*elided*/ any;
963
+ path: /*elided*/ any;
964
+ }>][] & ([Bytes, P.StructInput<{
965
+ fingerprint: /*elided*/ any;
966
+ path: /*elided*/ any;
967
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
968
+ path: number[];
969
+ fingerprint: number;
970
+ } & {} & {
971
+ path: number[] & number[];
972
+ fingerprint: number;
973
+ }])[]) | undefined;
974
+ amount?: bigint | undefined;
975
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
976
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
977
+ tapTree?: (P.StructInput<{
978
+ depth: /*elided*/ any;
979
+ version: /*elided*/ any;
980
+ script: /*elided*/ any;
981
+ }>[] & ({
982
+ depth: number;
983
+ script: Bytes & Uint8Array<ArrayBuffer>;
984
+ version: number;
985
+ } & {} & {
986
+ depth: number;
987
+ script: Bytes & Uint8Array<ArrayBuffer>;
988
+ version: number;
989
+ })[]) | undefined;
990
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
991
+ hashes: /*elided*/ any;
992
+ der: /*elided*/ any;
993
+ }>][] & ([Bytes, P.StructInput<{
994
+ hashes: /*elided*/ any;
995
+ der: /*elided*/ any;
996
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
997
+ der: P.StructInput<{
998
+ fingerprint: /*elided*/ any;
999
+ path: /*elided*/ any;
1000
+ }>;
1001
+ hashes: P.Bytes[];
1002
+ } & {} & {
1003
+ der: {
1004
+ path: number[];
1005
+ fingerprint: number;
1006
+ } & {} & {
1007
+ path: number[] & number[];
1008
+ fingerprint: number;
1009
+ };
1010
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1011
+ }])[]) | undefined;
1012
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1013
+ unknown?: ([P.StructInput<{
1014
+ type: number;
1015
+ key: Bytes;
1016
+ }>, Bytes][] & ([P.StructInput<{
1017
+ type: number;
1018
+ key: Bytes;
1019
+ }>, Bytes] & [{
1020
+ type: number;
1021
+ key: Bytes;
1022
+ } & {} & {
1023
+ type: number;
1024
+ key: Bytes & Uint8Array<ArrayBuffer>;
1025
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1026
+ })[];
1027
+ }>>>;
1028
+ export declare const _RawPSBTV2: Readonly<P.CoderType<P.StructInput<{
345
1029
  magic: undefined;
346
- global: PSBTKeyMapKeys<{
347
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
1030
+ global: {
1031
+ unsignedTx?: P.StructInput<{
348
1032
  version: /*elided*/ any;
349
1033
  inputs: /*elided*/ any;
350
1034
  outputs: /*elided*/ any;
351
1035
  lockTime: /*elided*/ any;
352
- }>>, readonly [0], readonly [0], false];
353
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
354
- fingerprint: /*elided*/ any;
355
- path: /*elided*/ any;
356
- }>>, readonly [], readonly [0, 2], false];
357
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
358
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
359
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
360
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
361
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
362
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
363
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
364
- }>;
365
- inputs: PSBTKeyMapKeys<{
366
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
1036
+ }> | undefined;
1037
+ xpub?: [P.StructInput<{
1038
+ version: /*elided*/ any;
1039
+ depth: /*elided*/ any;
1040
+ parentFingerprint: /*elided*/ any;
1041
+ childNumber: /*elided*/ any;
1042
+ chainCode: /*elided*/ any;
1043
+ publicKey: /*elided*/ any;
1044
+ }>, P.StructInput<{
1045
+ fingerprint: /*elided*/ any;
1046
+ path: /*elided*/ any;
1047
+ }>][] | undefined;
1048
+ txVersion?: number | undefined;
1049
+ fallbackLocktime?: number | undefined;
1050
+ inputCount?: number | undefined;
1051
+ outputCount?: number | undefined;
1052
+ txModifiable?: number | undefined;
1053
+ version?: number | undefined;
1054
+ proprietary?: [Bytes, Bytes][] | undefined;
1055
+ } & PSBTUnknownFields & {
1056
+ unsignedTx?: ({
1057
+ version: number;
1058
+ inputs: P.StructInput<{
1059
+ txid: /*elided*/ any;
1060
+ index: /*elided*/ any;
1061
+ finalScriptSig: /*elided*/ any;
1062
+ sequence: /*elided*/ any;
1063
+ }>[];
1064
+ outputs: P.StructInput<{
1065
+ amount: /*elided*/ any;
1066
+ script: /*elided*/ any;
1067
+ }>[];
1068
+ lockTime: number;
1069
+ } & {} & {
1070
+ version: number;
1071
+ inputs: P.StructInput<{
1072
+ txid: /*elided*/ any;
1073
+ index: /*elided*/ any;
1074
+ finalScriptSig: /*elided*/ any;
1075
+ sequence: /*elided*/ any;
1076
+ }>[] & ({
1077
+ index: number;
1078
+ sequence: number;
1079
+ txid: P.Bytes;
1080
+ finalScriptSig: P.Bytes;
1081
+ } & {} & {
1082
+ index: number;
1083
+ sequence: number;
1084
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
1085
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
1086
+ })[];
1087
+ outputs: P.StructInput<{
1088
+ amount: /*elided*/ any;
1089
+ script: /*elided*/ any;
1090
+ }>[] & ({
1091
+ script: P.Bytes;
1092
+ amount: bigint;
1093
+ } & {} & {
1094
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
1095
+ amount: bigint;
1096
+ })[];
1097
+ lockTime: number;
1098
+ }) | undefined;
1099
+ xpub?: ([P.StructInput<{
1100
+ version: /*elided*/ any;
1101
+ depth: /*elided*/ any;
1102
+ parentFingerprint: /*elided*/ any;
1103
+ childNumber: /*elided*/ any;
1104
+ chainCode: /*elided*/ any;
1105
+ publicKey: /*elided*/ any;
1106
+ }>, P.StructInput<{
1107
+ fingerprint: /*elided*/ any;
1108
+ path: /*elided*/ any;
1109
+ }>][] & ([P.StructInput<{
1110
+ version: /*elided*/ any;
1111
+ depth: /*elided*/ any;
1112
+ parentFingerprint: /*elided*/ any;
1113
+ childNumber: /*elided*/ any;
1114
+ chainCode: /*elided*/ any;
1115
+ publicKey: /*elided*/ any;
1116
+ }>, P.StructInput<{
1117
+ fingerprint: /*elided*/ any;
1118
+ path: /*elided*/ any;
1119
+ }>] & [{
1120
+ depth: number;
1121
+ version: number;
1122
+ parentFingerprint: number;
1123
+ childNumber: number;
1124
+ chainCode: P.Bytes;
1125
+ publicKey: Bytes;
1126
+ } & {} & {
1127
+ depth: number;
1128
+ version: number;
1129
+ parentFingerprint: number;
1130
+ childNumber: number;
1131
+ chainCode: P.Bytes & Uint8Array<ArrayBuffer>;
1132
+ publicKey: Bytes & Uint8Array<ArrayBuffer>;
1133
+ }, {
1134
+ path: number[];
1135
+ fingerprint: number;
1136
+ } & {} & {
1137
+ path: number[] & number[];
1138
+ fingerprint: number;
1139
+ }])[]) | undefined;
1140
+ txVersion?: number | undefined;
1141
+ fallbackLocktime?: number | undefined;
1142
+ inputCount?: number | undefined;
1143
+ outputCount?: number | undefined;
1144
+ txModifiable?: number | undefined;
1145
+ version?: number | undefined;
1146
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1147
+ unknown?: ([P.StructInput<{
1148
+ type: number;
1149
+ key: Bytes;
1150
+ }>, Bytes][] & ([P.StructInput<{
1151
+ type: number;
1152
+ key: Bytes;
1153
+ }>, Bytes] & [{
1154
+ type: number;
1155
+ key: Bytes;
1156
+ } & {} & {
1157
+ type: number;
1158
+ key: Bytes & Uint8Array<ArrayBuffer>;
1159
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1160
+ };
1161
+ inputs: ({
1162
+ nonWitnessUtxo?: P.StructInput<{
367
1163
  version: /*elided*/ any;
368
1164
  segwitFlag: /*elided*/ any;
369
1165
  inputs: /*elided*/ any;
370
1166
  outputs: /*elided*/ any;
371
1167
  witnesses: /*elided*/ any;
372
1168
  lockTime: /*elided*/ any;
373
- }>>, readonly [], readonly [0, 2], false];
374
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
1169
+ }> | undefined;
1170
+ witnessUtxo?: P.StructInput<{
375
1171
  amount: /*elided*/ any;
376
1172
  script: /*elided*/ any;
377
- }>>, readonly [], readonly [0, 2], false];
378
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
379
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
380
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
381
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
382
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
383
- fingerprint: /*elided*/ any;
384
- path: /*elided*/ any;
385
- }>>, readonly [], readonly [0, 2], false];
386
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
387
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
388
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
389
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
390
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
391
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
392
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
393
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
394
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
395
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
396
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
397
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
398
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
399
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
1173
+ }> | undefined;
1174
+ partialSig?: [Bytes, Bytes][] | undefined;
1175
+ sighashType?: number | undefined;
1176
+ redeemScript?: Bytes | undefined;
1177
+ witnessScript?: Bytes | undefined;
1178
+ bip32Derivation?: [Bytes, P.StructInput<{
1179
+ fingerprint: /*elided*/ any;
1180
+ path: /*elided*/ any;
1181
+ }>][] | undefined;
1182
+ finalScriptSig?: Bytes | undefined;
1183
+ finalScriptWitness?: Bytes[] | undefined;
1184
+ porCommitment?: Bytes | undefined;
1185
+ ripemd160?: [Bytes, Bytes][] | undefined;
1186
+ sha256?: [Bytes, Bytes][] | undefined;
1187
+ hash160?: [Bytes, Bytes][] | undefined;
1188
+ hash256?: [Bytes, Bytes][] | undefined;
1189
+ txid?: P.Bytes | undefined;
1190
+ index?: number | undefined;
1191
+ sequence?: number | undefined;
1192
+ requiredTimeLocktime?: number | undefined;
1193
+ requiredHeightLocktime?: number | undefined;
1194
+ tapKeySig?: Bytes | undefined;
1195
+ tapScriptSig?: [P.StructInput<{
1196
+ pubKey: /*elided*/ any;
1197
+ leafHash: /*elided*/ any;
1198
+ }>, Bytes][] | undefined;
1199
+ tapLeafScript?: [P.StructInput<{
1200
+ version: /*elided*/ any;
1201
+ internalKey: /*elided*/ any;
1202
+ merklePath: /*elided*/ any;
1203
+ }>, Bytes][] | undefined;
1204
+ tapBip32Derivation?: [Bytes, P.StructInput<{
1205
+ hashes: /*elided*/ any;
1206
+ der: /*elided*/ any;
1207
+ }>][] | undefined;
1208
+ tapInternalKey?: Bytes | undefined;
1209
+ tapMerkleRoot?: Bytes | undefined;
1210
+ proprietary?: [Bytes, Bytes][] | undefined;
1211
+ } & PSBTUnknownFields & {
1212
+ nonWitnessUtxo?: ({
1213
+ version: number;
1214
+ inputs: P.StructInput<{
1215
+ txid: /*elided*/ any;
1216
+ index: /*elided*/ any;
1217
+ finalScriptSig: /*elided*/ any;
1218
+ sequence: /*elided*/ any;
1219
+ }>[];
1220
+ outputs: P.StructInput<{
1221
+ amount: /*elided*/ any;
1222
+ script: /*elided*/ any;
1223
+ }>[];
1224
+ lockTime: number;
1225
+ } & {
1226
+ segwitFlag?: boolean | undefined;
1227
+ witnesses?: P.Option<P.Bytes[][]>;
1228
+ } & {
1229
+ version: number;
1230
+ inputs: P.StructInput<{
1231
+ txid: /*elided*/ any;
1232
+ index: /*elided*/ any;
1233
+ finalScriptSig: /*elided*/ any;
1234
+ sequence: /*elided*/ any;
1235
+ }>[] & ({
1236
+ index: number;
1237
+ sequence: number;
1238
+ txid: P.Bytes;
1239
+ finalScriptSig: P.Bytes;
1240
+ } & {} & {
1241
+ index: number;
1242
+ sequence: number;
1243
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
1244
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
1245
+ })[];
1246
+ outputs: P.StructInput<{
1247
+ amount: /*elided*/ any;
1248
+ script: /*elided*/ any;
1249
+ }>[] & ({
1250
+ script: P.Bytes;
1251
+ amount: bigint;
1252
+ } & {} & {
1253
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
1254
+ amount: bigint;
1255
+ })[];
1256
+ lockTime: number;
1257
+ segwitFlag?: boolean | undefined;
1258
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
1259
+ }) | undefined;
1260
+ witnessUtxo?: ({
1261
+ script: P.Bytes;
1262
+ amount: bigint;
1263
+ } & {} & {
1264
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
1265
+ amount: bigint;
1266
+ }) | undefined;
1267
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1268
+ sighashType?: number | undefined;
1269
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1270
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1271
+ bip32Derivation?: ([Bytes, P.StructInput<{
1272
+ fingerprint: /*elided*/ any;
1273
+ path: /*elided*/ any;
1274
+ }>][] & ([Bytes, P.StructInput<{
1275
+ fingerprint: /*elided*/ any;
1276
+ path: /*elided*/ any;
1277
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1278
+ path: number[];
1279
+ fingerprint: number;
1280
+ } & {} & {
1281
+ path: number[] & number[];
1282
+ fingerprint: number;
1283
+ }])[]) | undefined;
1284
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1285
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
1286
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1287
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1288
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1289
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1290
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1291
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
1292
+ index?: number | undefined;
1293
+ sequence?: number | undefined;
1294
+ requiredTimeLocktime?: number | undefined;
1295
+ requiredHeightLocktime?: number | undefined;
1296
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1297
+ tapScriptSig?: ([P.StructInput<{
1298
+ pubKey: /*elided*/ any;
1299
+ leafHash: /*elided*/ any;
1300
+ }>, Bytes][] & ([P.StructInput<{
400
1301
  pubKey: /*elided*/ any;
401
1302
  leafHash: /*elided*/ any;
402
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
403
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
1303
+ }>, Bytes] & [{
1304
+ pubKey: Bytes;
1305
+ leafHash: P.Bytes;
1306
+ } & {} & {
1307
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
1308
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
1309
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1310
+ tapLeafScript?: ([P.StructInput<{
404
1311
  version: /*elided*/ any;
405
1312
  internalKey: /*elided*/ any;
406
1313
  merklePath: /*elided*/ any;
407
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
408
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
409
- hashes: /*elided*/ any;
410
- der: /*elided*/ any;
411
- }>>, readonly [], readonly [0, 2], false];
412
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
413
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
414
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
415
- }>[];
416
- outputs: PSBTKeyMapKeys<{
417
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
418
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
419
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
420
- fingerprint: /*elided*/ any;
421
- path: /*elided*/ any;
422
- }>>, readonly [], readonly [0, 2], false];
423
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
424
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
425
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
426
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
1314
+ }>, Bytes][] & ([P.StructInput<{
1315
+ version: /*elided*/ any;
1316
+ internalKey: /*elided*/ any;
1317
+ merklePath: /*elided*/ any;
1318
+ }>, Bytes] & [{
1319
+ version: number;
1320
+ internalKey: P.Bytes;
1321
+ merklePath: P.Bytes[];
1322
+ } & {} & {
1323
+ version: number;
1324
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
1325
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1326
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1327
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
1328
+ hashes: /*elided*/ any;
1329
+ der: /*elided*/ any;
1330
+ }>][] & ([Bytes, P.StructInput<{
1331
+ hashes: /*elided*/ any;
1332
+ der: /*elided*/ any;
1333
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1334
+ der: P.StructInput<{
1335
+ fingerprint: /*elided*/ any;
1336
+ path: /*elided*/ any;
1337
+ }>;
1338
+ hashes: P.Bytes[];
1339
+ } & {} & {
1340
+ der: {
1341
+ path: number[];
1342
+ fingerprint: number;
1343
+ } & {} & {
1344
+ path: number[] & number[];
1345
+ fingerprint: number;
1346
+ };
1347
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1348
+ }])[]) | undefined;
1349
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1350
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1351
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1352
+ unknown?: ([P.StructInput<{
1353
+ type: number;
1354
+ key: Bytes;
1355
+ }>, Bytes][] & ([P.StructInput<{
1356
+ type: number;
1357
+ key: Bytes;
1358
+ }>, Bytes] & [{
1359
+ type: number;
1360
+ key: Bytes;
1361
+ } & {} & {
1362
+ type: number;
1363
+ key: Bytes & Uint8Array<ArrayBuffer>;
1364
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1365
+ })[];
1366
+ outputs: ({
1367
+ redeemScript?: Bytes | undefined;
1368
+ witnessScript?: Bytes | undefined;
1369
+ bip32Derivation?: [Bytes, P.StructInput<{
1370
+ fingerprint: /*elided*/ any;
1371
+ path: /*elided*/ any;
1372
+ }>][] | undefined;
1373
+ amount?: bigint | undefined;
1374
+ script?: Bytes | undefined;
1375
+ tapInternalKey?: Bytes | undefined;
1376
+ tapTree?: P.StructInput<{
427
1377
  depth: /*elided*/ any;
428
1378
  version: /*elided*/ any;
429
1379
  script: /*elided*/ any;
430
- }>[]>, readonly [], readonly [0, 2], false];
431
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
1380
+ }>[] | undefined;
1381
+ tapBip32Derivation?: [Bytes, P.StructInput<{
432
1382
  hashes: /*elided*/ any;
433
1383
  der: /*elided*/ any;
434
- }>>, readonly [], readonly [0, 2], false];
435
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
436
- }>[];
437
- }>>;
1384
+ }>][] | undefined;
1385
+ proprietary?: [Bytes, Bytes][] | undefined;
1386
+ } & PSBTUnknownFields & {
1387
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1388
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1389
+ bip32Derivation?: ([Bytes, P.StructInput<{
1390
+ fingerprint: /*elided*/ any;
1391
+ path: /*elided*/ any;
1392
+ }>][] & ([Bytes, P.StructInput<{
1393
+ fingerprint: /*elided*/ any;
1394
+ path: /*elided*/ any;
1395
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1396
+ path: number[];
1397
+ fingerprint: number;
1398
+ } & {} & {
1399
+ path: number[] & number[];
1400
+ fingerprint: number;
1401
+ }])[]) | undefined;
1402
+ amount?: bigint | undefined;
1403
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1404
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1405
+ tapTree?: (P.StructInput<{
1406
+ depth: /*elided*/ any;
1407
+ version: /*elided*/ any;
1408
+ script: /*elided*/ any;
1409
+ }>[] & ({
1410
+ depth: number;
1411
+ script: Bytes & Uint8Array<ArrayBuffer>;
1412
+ version: number;
1413
+ } & {} & {
1414
+ depth: number;
1415
+ script: Bytes & Uint8Array<ArrayBuffer>;
1416
+ version: number;
1417
+ })[]) | undefined;
1418
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
1419
+ hashes: /*elided*/ any;
1420
+ der: /*elided*/ any;
1421
+ }>][] & ([Bytes, P.StructInput<{
1422
+ hashes: /*elided*/ any;
1423
+ der: /*elided*/ any;
1424
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1425
+ der: P.StructInput<{
1426
+ fingerprint: /*elided*/ any;
1427
+ path: /*elided*/ any;
1428
+ }>;
1429
+ hashes: P.Bytes[];
1430
+ } & {} & {
1431
+ der: {
1432
+ path: number[];
1433
+ fingerprint: number;
1434
+ } & {} & {
1435
+ path: number[] & number[];
1436
+ fingerprint: number;
1437
+ };
1438
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1439
+ }])[]) | undefined;
1440
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1441
+ unknown?: ([P.StructInput<{
1442
+ type: number;
1443
+ key: Bytes;
1444
+ }>, Bytes][] & ([P.StructInput<{
1445
+ type: number;
1446
+ key: Bytes;
1447
+ }>, Bytes] & [{
1448
+ type: number;
1449
+ key: Bytes;
1450
+ } & {} & {
1451
+ type: number;
1452
+ key: Bytes & Uint8Array<ArrayBuffer>;
1453
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1454
+ })[];
1455
+ }>>>;
1456
+ /** Raw PSBT coder type. */
438
1457
  export type PSBTRaw = typeof _RawPSBTV0 | typeof _RawPSBTV2;
439
- export declare const _DebugPSBT: P.CoderType<P.StructInput<{
1458
+ export declare const _DebugPSBT: Readonly<P.CoderType<P.StructInput<{
440
1459
  magic: undefined;
441
1460
  items: Record<string, string | P.Bytes>[];
442
- }>>;
443
- export declare function cleanPSBTFields<T extends PSBTKeyMap>(version: number, info: T, lst: PSBTKeyMapKeys<T>): PSBTKeyMapKeys<T>;
444
- export declare function mergeKeyMap<T extends PSBTKeyMap>(psbtEnum: T, val: PSBTKeyMapKeys<T>, cur?: PSBTKeyMapKeys<T>, allowedFields?: (keyof PSBTKeyMapKeys<T>)[], allowUnknown?: boolean): PSBTKeyMapKeys<T>;
445
- export declare const RawPSBTV0: P.CoderType<P.StructInput<{
1461
+ }>>>;
1462
+ /**
1463
+ * Removes fields that are not valid for the requested PSBT version.
1464
+ * @param version - target PSBT version
1465
+ * @param info - PSBT field definition table
1466
+ * @param lst - decoded PSBT key map
1467
+ * @returns Filtered PSBT key map.
1468
+ * @throws If a field cannot be serialized in the requested PSBT version. {@link Error}
1469
+ * @example
1470
+ * Drop fields that are not allowed in the target PSBT version before encoding.
1471
+ * ```ts
1472
+ * import { hex } from '@scure/base';
1473
+ * import { PSBTInput, cleanPSBTFields } from '@scure/btc-signer/psbt.js';
1474
+ * cleanPSBTFields(2, PSBTInput, {
1475
+ * txid: hex.decode('0000000000000000000000000000000000000000000000000000000000000001'),
1476
+ * index: 0,
1477
+ * });
1478
+ * ```
1479
+ */
1480
+ export declare function cleanPSBTFields<T extends PSBTKeyMap>(version: number, info: T, lst: TArg<PSBTKeyMapKeys<T>>): TRet<PSBTKeyMapKeys<T>>;
1481
+ /**
1482
+ * Merges two PSBT key maps while preserving keyed-field uniqueness.
1483
+ * @param psbtEnum - PSBT field definition table
1484
+ * @param val - new values to merge in
1485
+ * @param cur - existing decoded PSBT key map
1486
+ * @param allowedFields - fields still allowed to change
1487
+ * @param allowUnknown - whether to preserve unknown PSBT fields
1488
+ * @returns Merged PSBT key map.
1489
+ * @throws If keyed PSBT fields conflict or signed fields would be removed. {@link Error}
1490
+ * @example
1491
+ * Merge an updated `witnessUtxo` into an existing decoded input map.
1492
+ * ```ts
1493
+ * import { hex } from '@scure/base';
1494
+ * import { PSBTInput, mergeKeyMap } from '@scure/btc-signer/psbt.js';
1495
+ * mergeKeyMap(
1496
+ * PSBTInput,
1497
+ * { witnessUtxo: { amount: 2n, script: new Uint8Array([0x51]) } },
1498
+ * {
1499
+ * txid: hex.decode('0000000000000000000000000000000000000000000000000000000000000001'),
1500
+ * index: 0,
1501
+ * }
1502
+ * );
1503
+ * ```
1504
+ */
1505
+ export declare function mergeKeyMap<T extends PSBTKeyMap>(psbtEnum: T, val: TArg<PSBTKeyMapKeys<T>>, cur?: TArg<PSBTKeyMapKeys<T>>, allowedFields?: TArg<readonly (keyof PSBTKeyMapKeys<T>)[]>, allowUnknown?: boolean): TRet<PSBTKeyMapKeys<T>>;
1506
+ /** Validated PSBTv0 coder. */
1507
+ export declare const RawPSBTV0: Readonly<P.CoderType<P.StructInput<{
446
1508
  magic: undefined;
447
- global: PSBTKeyMapKeys<{
448
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
1509
+ global: {
1510
+ unsignedTx?: P.StructInput<{
449
1511
  version: /*elided*/ any;
450
1512
  inputs: /*elided*/ any;
451
1513
  outputs: /*elided*/ any;
452
1514
  lockTime: /*elided*/ any;
453
- }>>, readonly [0], readonly [0], false];
454
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
455
- fingerprint: /*elided*/ any;
456
- path: /*elided*/ any;
457
- }>>, readonly [], readonly [0, 2], false];
458
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
459
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
460
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
461
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
462
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
463
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
464
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
465
- }>;
466
- inputs: PSBTKeyMapKeys<{
467
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
1515
+ }> | undefined;
1516
+ xpub?: [P.StructInput<{
1517
+ version: /*elided*/ any;
1518
+ depth: /*elided*/ any;
1519
+ parentFingerprint: /*elided*/ any;
1520
+ childNumber: /*elided*/ any;
1521
+ chainCode: /*elided*/ any;
1522
+ publicKey: /*elided*/ any;
1523
+ }>, P.StructInput<{
1524
+ fingerprint: /*elided*/ any;
1525
+ path: /*elided*/ any;
1526
+ }>][] | undefined;
1527
+ txVersion?: number | undefined;
1528
+ fallbackLocktime?: number | undefined;
1529
+ inputCount?: number | undefined;
1530
+ outputCount?: number | undefined;
1531
+ txModifiable?: number | undefined;
1532
+ version?: number | undefined;
1533
+ proprietary?: [Bytes, Bytes][] | undefined;
1534
+ } & PSBTUnknownFields & {
1535
+ unsignedTx?: ({
1536
+ version: number;
1537
+ inputs: P.StructInput<{
1538
+ txid: /*elided*/ any;
1539
+ index: /*elided*/ any;
1540
+ finalScriptSig: /*elided*/ any;
1541
+ sequence: /*elided*/ any;
1542
+ }>[];
1543
+ outputs: P.StructInput<{
1544
+ amount: /*elided*/ any;
1545
+ script: /*elided*/ any;
1546
+ }>[];
1547
+ lockTime: number;
1548
+ } & {} & {
1549
+ version: number;
1550
+ inputs: P.StructInput<{
1551
+ txid: /*elided*/ any;
1552
+ index: /*elided*/ any;
1553
+ finalScriptSig: /*elided*/ any;
1554
+ sequence: /*elided*/ any;
1555
+ }>[] & ({
1556
+ index: number;
1557
+ sequence: number;
1558
+ txid: P.Bytes;
1559
+ finalScriptSig: P.Bytes;
1560
+ } & {} & {
1561
+ index: number;
1562
+ sequence: number;
1563
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
1564
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
1565
+ })[];
1566
+ outputs: P.StructInput<{
1567
+ amount: /*elided*/ any;
1568
+ script: /*elided*/ any;
1569
+ }>[] & ({
1570
+ script: P.Bytes;
1571
+ amount: bigint;
1572
+ } & {} & {
1573
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
1574
+ amount: bigint;
1575
+ })[];
1576
+ lockTime: number;
1577
+ }) | undefined;
1578
+ xpub?: ([P.StructInput<{
1579
+ version: /*elided*/ any;
1580
+ depth: /*elided*/ any;
1581
+ parentFingerprint: /*elided*/ any;
1582
+ childNumber: /*elided*/ any;
1583
+ chainCode: /*elided*/ any;
1584
+ publicKey: /*elided*/ any;
1585
+ }>, P.StructInput<{
1586
+ fingerprint: /*elided*/ any;
1587
+ path: /*elided*/ any;
1588
+ }>][] & ([P.StructInput<{
1589
+ version: /*elided*/ any;
1590
+ depth: /*elided*/ any;
1591
+ parentFingerprint: /*elided*/ any;
1592
+ childNumber: /*elided*/ any;
1593
+ chainCode: /*elided*/ any;
1594
+ publicKey: /*elided*/ any;
1595
+ }>, P.StructInput<{
1596
+ fingerprint: /*elided*/ any;
1597
+ path: /*elided*/ any;
1598
+ }>] & [{
1599
+ depth: number;
1600
+ version: number;
1601
+ parentFingerprint: number;
1602
+ childNumber: number;
1603
+ chainCode: P.Bytes;
1604
+ publicKey: Bytes;
1605
+ } & {} & {
1606
+ depth: number;
1607
+ version: number;
1608
+ parentFingerprint: number;
1609
+ childNumber: number;
1610
+ chainCode: P.Bytes & Uint8Array<ArrayBuffer>;
1611
+ publicKey: Bytes & Uint8Array<ArrayBuffer>;
1612
+ }, {
1613
+ path: number[];
1614
+ fingerprint: number;
1615
+ } & {} & {
1616
+ path: number[] & number[];
1617
+ fingerprint: number;
1618
+ }])[]) | undefined;
1619
+ txVersion?: number | undefined;
1620
+ fallbackLocktime?: number | undefined;
1621
+ inputCount?: number | undefined;
1622
+ outputCount?: number | undefined;
1623
+ txModifiable?: number | undefined;
1624
+ version?: number | undefined;
1625
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1626
+ unknown?: ([P.StructInput<{
1627
+ type: number;
1628
+ key: Bytes;
1629
+ }>, Bytes][] & ([P.StructInput<{
1630
+ type: number;
1631
+ key: Bytes;
1632
+ }>, Bytes] & [{
1633
+ type: number;
1634
+ key: Bytes;
1635
+ } & {} & {
1636
+ type: number;
1637
+ key: Bytes & Uint8Array<ArrayBuffer>;
1638
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1639
+ };
1640
+ inputs: ({
1641
+ nonWitnessUtxo?: P.StructInput<{
468
1642
  version: /*elided*/ any;
469
1643
  segwitFlag: /*elided*/ any;
470
1644
  inputs: /*elided*/ any;
471
1645
  outputs: /*elided*/ any;
472
1646
  witnesses: /*elided*/ any;
473
1647
  lockTime: /*elided*/ any;
474
- }>>, readonly [], readonly [0, 2], false];
475
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
1648
+ }> | undefined;
1649
+ witnessUtxo?: P.StructInput<{
476
1650
  amount: /*elided*/ any;
477
1651
  script: /*elided*/ any;
478
- }>>, readonly [], readonly [0, 2], false];
479
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
480
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
481
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
482
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
483
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
484
- fingerprint: /*elided*/ any;
485
- path: /*elided*/ any;
486
- }>>, readonly [], readonly [0, 2], false];
487
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
488
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
489
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
490
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
491
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
492
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
493
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
494
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
495
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
496
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
497
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
498
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
499
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
500
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
1652
+ }> | undefined;
1653
+ partialSig?: [Bytes, Bytes][] | undefined;
1654
+ sighashType?: number | undefined;
1655
+ redeemScript?: Bytes | undefined;
1656
+ witnessScript?: Bytes | undefined;
1657
+ bip32Derivation?: [Bytes, P.StructInput<{
1658
+ fingerprint: /*elided*/ any;
1659
+ path: /*elided*/ any;
1660
+ }>][] | undefined;
1661
+ finalScriptSig?: Bytes | undefined;
1662
+ finalScriptWitness?: Bytes[] | undefined;
1663
+ porCommitment?: Bytes | undefined;
1664
+ ripemd160?: [Bytes, Bytes][] | undefined;
1665
+ sha256?: [Bytes, Bytes][] | undefined;
1666
+ hash160?: [Bytes, Bytes][] | undefined;
1667
+ hash256?: [Bytes, Bytes][] | undefined;
1668
+ txid?: P.Bytes | undefined;
1669
+ index?: number | undefined;
1670
+ sequence?: number | undefined;
1671
+ requiredTimeLocktime?: number | undefined;
1672
+ requiredHeightLocktime?: number | undefined;
1673
+ tapKeySig?: Bytes | undefined;
1674
+ tapScriptSig?: [P.StructInput<{
501
1675
  pubKey: /*elided*/ any;
502
1676
  leafHash: /*elided*/ any;
503
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
504
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
1677
+ }>, Bytes][] | undefined;
1678
+ tapLeafScript?: [P.StructInput<{
505
1679
  version: /*elided*/ any;
506
1680
  internalKey: /*elided*/ any;
507
1681
  merklePath: /*elided*/ any;
508
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
509
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
510
- hashes: /*elided*/ any;
511
- der: /*elided*/ any;
512
- }>>, readonly [], readonly [0, 2], false];
513
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
514
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
515
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
516
- }>[];
517
- outputs: PSBTKeyMapKeys<{
518
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
519
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
520
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
521
- fingerprint: /*elided*/ any;
522
- path: /*elided*/ any;
523
- }>>, readonly [], readonly [0, 2], false];
524
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
525
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
526
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
527
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
1682
+ }>, Bytes][] | undefined;
1683
+ tapBip32Derivation?: [Bytes, P.StructInput<{
1684
+ hashes: /*elided*/ any;
1685
+ der: /*elided*/ any;
1686
+ }>][] | undefined;
1687
+ tapInternalKey?: Bytes | undefined;
1688
+ tapMerkleRoot?: Bytes | undefined;
1689
+ proprietary?: [Bytes, Bytes][] | undefined;
1690
+ } & PSBTUnknownFields & {
1691
+ nonWitnessUtxo?: ({
1692
+ version: number;
1693
+ inputs: P.StructInput<{
1694
+ txid: /*elided*/ any;
1695
+ index: /*elided*/ any;
1696
+ finalScriptSig: /*elided*/ any;
1697
+ sequence: /*elided*/ any;
1698
+ }>[];
1699
+ outputs: P.StructInput<{
1700
+ amount: /*elided*/ any;
1701
+ script: /*elided*/ any;
1702
+ }>[];
1703
+ lockTime: number;
1704
+ } & {
1705
+ segwitFlag?: boolean | undefined;
1706
+ witnesses?: P.Option<P.Bytes[][]>;
1707
+ } & {
1708
+ version: number;
1709
+ inputs: P.StructInput<{
1710
+ txid: /*elided*/ any;
1711
+ index: /*elided*/ any;
1712
+ finalScriptSig: /*elided*/ any;
1713
+ sequence: /*elided*/ any;
1714
+ }>[] & ({
1715
+ index: number;
1716
+ sequence: number;
1717
+ txid: P.Bytes;
1718
+ finalScriptSig: P.Bytes;
1719
+ } & {} & {
1720
+ index: number;
1721
+ sequence: number;
1722
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
1723
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
1724
+ })[];
1725
+ outputs: P.StructInput<{
1726
+ amount: /*elided*/ any;
1727
+ script: /*elided*/ any;
1728
+ }>[] & ({
1729
+ script: P.Bytes;
1730
+ amount: bigint;
1731
+ } & {} & {
1732
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
1733
+ amount: bigint;
1734
+ })[];
1735
+ lockTime: number;
1736
+ segwitFlag?: boolean | undefined;
1737
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
1738
+ }) | undefined;
1739
+ witnessUtxo?: ({
1740
+ script: P.Bytes;
1741
+ amount: bigint;
1742
+ } & {} & {
1743
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
1744
+ amount: bigint;
1745
+ }) | undefined;
1746
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1747
+ sighashType?: number | undefined;
1748
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1749
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1750
+ bip32Derivation?: ([Bytes, P.StructInput<{
1751
+ fingerprint: /*elided*/ any;
1752
+ path: /*elided*/ any;
1753
+ }>][] & ([Bytes, P.StructInput<{
1754
+ fingerprint: /*elided*/ any;
1755
+ path: /*elided*/ any;
1756
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1757
+ path: number[];
1758
+ fingerprint: number;
1759
+ } & {} & {
1760
+ path: number[] & number[];
1761
+ fingerprint: number;
1762
+ }])[]) | undefined;
1763
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1764
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
1765
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1766
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1767
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1768
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1769
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1770
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
1771
+ index?: number | undefined;
1772
+ sequence?: number | undefined;
1773
+ requiredTimeLocktime?: number | undefined;
1774
+ requiredHeightLocktime?: number | undefined;
1775
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1776
+ tapScriptSig?: ([P.StructInput<{
1777
+ pubKey: /*elided*/ any;
1778
+ leafHash: /*elided*/ any;
1779
+ }>, Bytes][] & ([P.StructInput<{
1780
+ pubKey: /*elided*/ any;
1781
+ leafHash: /*elided*/ any;
1782
+ }>, Bytes] & [{
1783
+ pubKey: Bytes;
1784
+ leafHash: P.Bytes;
1785
+ } & {} & {
1786
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
1787
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
1788
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1789
+ tapLeafScript?: ([P.StructInput<{
1790
+ version: /*elided*/ any;
1791
+ internalKey: /*elided*/ any;
1792
+ merklePath: /*elided*/ any;
1793
+ }>, Bytes][] & ([P.StructInput<{
1794
+ version: /*elided*/ any;
1795
+ internalKey: /*elided*/ any;
1796
+ merklePath: /*elided*/ any;
1797
+ }>, Bytes] & [{
1798
+ version: number;
1799
+ internalKey: P.Bytes;
1800
+ merklePath: P.Bytes[];
1801
+ } & {} & {
1802
+ version: number;
1803
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
1804
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1805
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1806
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
1807
+ hashes: /*elided*/ any;
1808
+ der: /*elided*/ any;
1809
+ }>][] & ([Bytes, P.StructInput<{
1810
+ hashes: /*elided*/ any;
1811
+ der: /*elided*/ any;
1812
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1813
+ der: P.StructInput<{
1814
+ fingerprint: /*elided*/ any;
1815
+ path: /*elided*/ any;
1816
+ }>;
1817
+ hashes: P.Bytes[];
1818
+ } & {} & {
1819
+ der: {
1820
+ path: number[];
1821
+ fingerprint: number;
1822
+ } & {} & {
1823
+ path: number[] & number[];
1824
+ fingerprint: number;
1825
+ };
1826
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1827
+ }])[]) | undefined;
1828
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1829
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1830
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1831
+ unknown?: ([P.StructInput<{
1832
+ type: number;
1833
+ key: Bytes;
1834
+ }>, Bytes][] & ([P.StructInput<{
1835
+ type: number;
1836
+ key: Bytes;
1837
+ }>, Bytes] & [{
1838
+ type: number;
1839
+ key: Bytes;
1840
+ } & {} & {
1841
+ type: number;
1842
+ key: Bytes & Uint8Array<ArrayBuffer>;
1843
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1844
+ })[];
1845
+ outputs: ({
1846
+ redeemScript?: Bytes | undefined;
1847
+ witnessScript?: Bytes | undefined;
1848
+ bip32Derivation?: [Bytes, P.StructInput<{
1849
+ fingerprint: /*elided*/ any;
1850
+ path: /*elided*/ any;
1851
+ }>][] | undefined;
1852
+ amount?: bigint | undefined;
1853
+ script?: Bytes | undefined;
1854
+ tapInternalKey?: Bytes | undefined;
1855
+ tapTree?: P.StructInput<{
1856
+ depth: /*elided*/ any;
1857
+ version: /*elided*/ any;
1858
+ script: /*elided*/ any;
1859
+ }>[] | undefined;
1860
+ tapBip32Derivation?: [Bytes, P.StructInput<{
1861
+ hashes: /*elided*/ any;
1862
+ der: /*elided*/ any;
1863
+ }>][] | undefined;
1864
+ proprietary?: [Bytes, Bytes][] | undefined;
1865
+ } & PSBTUnknownFields & {
1866
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1867
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1868
+ bip32Derivation?: ([Bytes, P.StructInput<{
1869
+ fingerprint: /*elided*/ any;
1870
+ path: /*elided*/ any;
1871
+ }>][] & ([Bytes, P.StructInput<{
1872
+ fingerprint: /*elided*/ any;
1873
+ path: /*elided*/ any;
1874
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1875
+ path: number[];
1876
+ fingerprint: number;
1877
+ } & {} & {
1878
+ path: number[] & number[];
1879
+ fingerprint: number;
1880
+ }])[]) | undefined;
1881
+ amount?: bigint | undefined;
1882
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1883
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
1884
+ tapTree?: (P.StructInput<{
528
1885
  depth: /*elided*/ any;
529
1886
  version: /*elided*/ any;
530
1887
  script: /*elided*/ any;
531
- }>[]>, readonly [], readonly [0, 2], false];
532
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
1888
+ }>[] & ({
1889
+ depth: number;
1890
+ script: Bytes & Uint8Array<ArrayBuffer>;
1891
+ version: number;
1892
+ } & {} & {
1893
+ depth: number;
1894
+ script: Bytes & Uint8Array<ArrayBuffer>;
1895
+ version: number;
1896
+ })[]) | undefined;
1897
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
533
1898
  hashes: /*elided*/ any;
534
1899
  der: /*elided*/ any;
535
- }>>, readonly [], readonly [0, 2], false];
536
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
537
- }>[];
1900
+ }>][] & ([Bytes, P.StructInput<{
1901
+ hashes: /*elided*/ any;
1902
+ der: /*elided*/ any;
1903
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
1904
+ der: P.StructInput<{
1905
+ fingerprint: /*elided*/ any;
1906
+ path: /*elided*/ any;
1907
+ }>;
1908
+ hashes: P.Bytes[];
1909
+ } & {} & {
1910
+ der: {
1911
+ path: number[];
1912
+ fingerprint: number;
1913
+ } & {} & {
1914
+ path: number[] & number[];
1915
+ fingerprint: number;
1916
+ };
1917
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
1918
+ }])[]) | undefined;
1919
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1920
+ unknown?: ([P.StructInput<{
1921
+ type: number;
1922
+ key: Bytes;
1923
+ }>, Bytes][] & ([P.StructInput<{
1924
+ type: number;
1925
+ key: Bytes;
1926
+ }>, Bytes] & [{
1927
+ type: number;
1928
+ key: Bytes;
1929
+ } & {} & {
1930
+ type: number;
1931
+ key: Bytes & Uint8Array<ArrayBuffer>;
1932
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
1933
+ })[];
538
1934
  }> | P.StructInput<{
539
1935
  magic: undefined;
540
- global: PSBTKeyMapKeys<{
541
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
1936
+ global: {
1937
+ unsignedTx?: P.StructInput<{
542
1938
  version: /*elided*/ any;
543
1939
  inputs: /*elided*/ any;
544
1940
  outputs: /*elided*/ any;
545
1941
  lockTime: /*elided*/ any;
546
- }>>, readonly [0], readonly [0], false];
547
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
548
- fingerprint: /*elided*/ any;
549
- path: /*elided*/ any;
550
- }>>, readonly [], readonly [0, 2], false];
551
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
552
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
553
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
554
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
555
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
556
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
557
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
558
- }>;
559
- inputs: PSBTKeyMapKeys<{
560
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
1942
+ }> | undefined;
1943
+ xpub?: [P.StructInput<{
1944
+ version: /*elided*/ any;
1945
+ depth: /*elided*/ any;
1946
+ parentFingerprint: /*elided*/ any;
1947
+ childNumber: /*elided*/ any;
1948
+ chainCode: /*elided*/ any;
1949
+ publicKey: /*elided*/ any;
1950
+ }>, P.StructInput<{
1951
+ fingerprint: /*elided*/ any;
1952
+ path: /*elided*/ any;
1953
+ }>][] | undefined;
1954
+ txVersion?: number | undefined;
1955
+ fallbackLocktime?: number | undefined;
1956
+ inputCount?: number | undefined;
1957
+ outputCount?: number | undefined;
1958
+ txModifiable?: number | undefined;
1959
+ version?: number | undefined;
1960
+ proprietary?: [Bytes, Bytes][] | undefined;
1961
+ } & PSBTUnknownFields & {
1962
+ unsignedTx?: ({
1963
+ version: number;
1964
+ inputs: P.StructInput<{
1965
+ txid: /*elided*/ any;
1966
+ index: /*elided*/ any;
1967
+ finalScriptSig: /*elided*/ any;
1968
+ sequence: /*elided*/ any;
1969
+ }>[];
1970
+ outputs: P.StructInput<{
1971
+ amount: /*elided*/ any;
1972
+ script: /*elided*/ any;
1973
+ }>[];
1974
+ lockTime: number;
1975
+ } & {} & {
1976
+ version: number;
1977
+ inputs: P.StructInput<{
1978
+ txid: /*elided*/ any;
1979
+ index: /*elided*/ any;
1980
+ finalScriptSig: /*elided*/ any;
1981
+ sequence: /*elided*/ any;
1982
+ }>[] & ({
1983
+ index: number;
1984
+ sequence: number;
1985
+ txid: P.Bytes;
1986
+ finalScriptSig: P.Bytes;
1987
+ } & {} & {
1988
+ index: number;
1989
+ sequence: number;
1990
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
1991
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
1992
+ })[];
1993
+ outputs: P.StructInput<{
1994
+ amount: /*elided*/ any;
1995
+ script: /*elided*/ any;
1996
+ }>[] & ({
1997
+ script: P.Bytes;
1998
+ amount: bigint;
1999
+ } & {} & {
2000
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2001
+ amount: bigint;
2002
+ })[];
2003
+ lockTime: number;
2004
+ }) | undefined;
2005
+ xpub?: ([P.StructInput<{
2006
+ version: /*elided*/ any;
2007
+ depth: /*elided*/ any;
2008
+ parentFingerprint: /*elided*/ any;
2009
+ childNumber: /*elided*/ any;
2010
+ chainCode: /*elided*/ any;
2011
+ publicKey: /*elided*/ any;
2012
+ }>, P.StructInput<{
2013
+ fingerprint: /*elided*/ any;
2014
+ path: /*elided*/ any;
2015
+ }>][] & ([P.StructInput<{
2016
+ version: /*elided*/ any;
2017
+ depth: /*elided*/ any;
2018
+ parentFingerprint: /*elided*/ any;
2019
+ childNumber: /*elided*/ any;
2020
+ chainCode: /*elided*/ any;
2021
+ publicKey: /*elided*/ any;
2022
+ }>, P.StructInput<{
2023
+ fingerprint: /*elided*/ any;
2024
+ path: /*elided*/ any;
2025
+ }>] & [{
2026
+ depth: number;
2027
+ version: number;
2028
+ parentFingerprint: number;
2029
+ childNumber: number;
2030
+ chainCode: P.Bytes;
2031
+ publicKey: Bytes;
2032
+ } & {} & {
2033
+ depth: number;
2034
+ version: number;
2035
+ parentFingerprint: number;
2036
+ childNumber: number;
2037
+ chainCode: P.Bytes & Uint8Array<ArrayBuffer>;
2038
+ publicKey: Bytes & Uint8Array<ArrayBuffer>;
2039
+ }, {
2040
+ path: number[];
2041
+ fingerprint: number;
2042
+ } & {} & {
2043
+ path: number[] & number[];
2044
+ fingerprint: number;
2045
+ }])[]) | undefined;
2046
+ txVersion?: number | undefined;
2047
+ fallbackLocktime?: number | undefined;
2048
+ inputCount?: number | undefined;
2049
+ outputCount?: number | undefined;
2050
+ txModifiable?: number | undefined;
2051
+ version?: number | undefined;
2052
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2053
+ unknown?: ([P.StructInput<{
2054
+ type: number;
2055
+ key: Bytes;
2056
+ }>, Bytes][] & ([P.StructInput<{
2057
+ type: number;
2058
+ key: Bytes;
2059
+ }>, Bytes] & [{
2060
+ type: number;
2061
+ key: Bytes;
2062
+ } & {} & {
2063
+ type: number;
2064
+ key: Bytes & Uint8Array<ArrayBuffer>;
2065
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2066
+ };
2067
+ inputs: ({
2068
+ nonWitnessUtxo?: P.StructInput<{
561
2069
  version: /*elided*/ any;
562
2070
  segwitFlag: /*elided*/ any;
563
2071
  inputs: /*elided*/ any;
564
2072
  outputs: /*elided*/ any;
565
2073
  witnesses: /*elided*/ any;
566
2074
  lockTime: /*elided*/ any;
567
- }>>, readonly [], readonly [0, 2], false];
568
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
2075
+ }> | undefined;
2076
+ witnessUtxo?: P.StructInput<{
569
2077
  amount: /*elided*/ any;
570
2078
  script: /*elided*/ any;
571
- }>>, readonly [], readonly [0, 2], false];
572
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
573
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
574
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
575
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
576
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
577
- fingerprint: /*elided*/ any;
578
- path: /*elided*/ any;
579
- }>>, readonly [], readonly [0, 2], false];
580
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
581
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
582
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
583
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
584
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
585
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
586
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
587
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
588
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
589
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
590
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
591
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
592
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
593
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
2079
+ }> | undefined;
2080
+ partialSig?: [Bytes, Bytes][] | undefined;
2081
+ sighashType?: number | undefined;
2082
+ redeemScript?: Bytes | undefined;
2083
+ witnessScript?: Bytes | undefined;
2084
+ bip32Derivation?: [Bytes, P.StructInput<{
2085
+ fingerprint: /*elided*/ any;
2086
+ path: /*elided*/ any;
2087
+ }>][] | undefined;
2088
+ finalScriptSig?: Bytes | undefined;
2089
+ finalScriptWitness?: Bytes[] | undefined;
2090
+ porCommitment?: Bytes | undefined;
2091
+ ripemd160?: [Bytes, Bytes][] | undefined;
2092
+ sha256?: [Bytes, Bytes][] | undefined;
2093
+ hash160?: [Bytes, Bytes][] | undefined;
2094
+ hash256?: [Bytes, Bytes][] | undefined;
2095
+ txid?: P.Bytes | undefined;
2096
+ index?: number | undefined;
2097
+ sequence?: number | undefined;
2098
+ requiredTimeLocktime?: number | undefined;
2099
+ requiredHeightLocktime?: number | undefined;
2100
+ tapKeySig?: Bytes | undefined;
2101
+ tapScriptSig?: [P.StructInput<{
2102
+ pubKey: /*elided*/ any;
2103
+ leafHash: /*elided*/ any;
2104
+ }>, Bytes][] | undefined;
2105
+ tapLeafScript?: [P.StructInput<{
2106
+ version: /*elided*/ any;
2107
+ internalKey: /*elided*/ any;
2108
+ merklePath: /*elided*/ any;
2109
+ }>, Bytes][] | undefined;
2110
+ tapBip32Derivation?: [Bytes, P.StructInput<{
2111
+ hashes: /*elided*/ any;
2112
+ der: /*elided*/ any;
2113
+ }>][] | undefined;
2114
+ tapInternalKey?: Bytes | undefined;
2115
+ tapMerkleRoot?: Bytes | undefined;
2116
+ proprietary?: [Bytes, Bytes][] | undefined;
2117
+ } & PSBTUnknownFields & {
2118
+ nonWitnessUtxo?: ({
2119
+ version: number;
2120
+ inputs: P.StructInput<{
2121
+ txid: /*elided*/ any;
2122
+ index: /*elided*/ any;
2123
+ finalScriptSig: /*elided*/ any;
2124
+ sequence: /*elided*/ any;
2125
+ }>[];
2126
+ outputs: P.StructInput<{
2127
+ amount: /*elided*/ any;
2128
+ script: /*elided*/ any;
2129
+ }>[];
2130
+ lockTime: number;
2131
+ } & {
2132
+ segwitFlag?: boolean | undefined;
2133
+ witnesses?: P.Option<P.Bytes[][]>;
2134
+ } & {
2135
+ version: number;
2136
+ inputs: P.StructInput<{
2137
+ txid: /*elided*/ any;
2138
+ index: /*elided*/ any;
2139
+ finalScriptSig: /*elided*/ any;
2140
+ sequence: /*elided*/ any;
2141
+ }>[] & ({
2142
+ index: number;
2143
+ sequence: number;
2144
+ txid: P.Bytes;
2145
+ finalScriptSig: P.Bytes;
2146
+ } & {} & {
2147
+ index: number;
2148
+ sequence: number;
2149
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
2150
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
2151
+ })[];
2152
+ outputs: P.StructInput<{
2153
+ amount: /*elided*/ any;
2154
+ script: /*elided*/ any;
2155
+ }>[] & ({
2156
+ script: P.Bytes;
2157
+ amount: bigint;
2158
+ } & {} & {
2159
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2160
+ amount: bigint;
2161
+ })[];
2162
+ lockTime: number;
2163
+ segwitFlag?: boolean | undefined;
2164
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
2165
+ }) | undefined;
2166
+ witnessUtxo?: ({
2167
+ script: P.Bytes;
2168
+ amount: bigint;
2169
+ } & {} & {
2170
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2171
+ amount: bigint;
2172
+ }) | undefined;
2173
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2174
+ sighashType?: number | undefined;
2175
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2176
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2177
+ bip32Derivation?: ([Bytes, P.StructInput<{
2178
+ fingerprint: /*elided*/ any;
2179
+ path: /*elided*/ any;
2180
+ }>][] & ([Bytes, P.StructInput<{
2181
+ fingerprint: /*elided*/ any;
2182
+ path: /*elided*/ any;
2183
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2184
+ path: number[];
2185
+ fingerprint: number;
2186
+ } & {} & {
2187
+ path: number[] & number[];
2188
+ fingerprint: number;
2189
+ }])[]) | undefined;
2190
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2191
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
2192
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2193
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2194
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2195
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2196
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2197
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
2198
+ index?: number | undefined;
2199
+ sequence?: number | undefined;
2200
+ requiredTimeLocktime?: number | undefined;
2201
+ requiredHeightLocktime?: number | undefined;
2202
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2203
+ tapScriptSig?: ([P.StructInput<{
594
2204
  pubKey: /*elided*/ any;
595
2205
  leafHash: /*elided*/ any;
596
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
597
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
2206
+ }>, Bytes][] & ([P.StructInput<{
2207
+ pubKey: /*elided*/ any;
2208
+ leafHash: /*elided*/ any;
2209
+ }>, Bytes] & [{
2210
+ pubKey: Bytes;
2211
+ leafHash: P.Bytes;
2212
+ } & {} & {
2213
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
2214
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
2215
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2216
+ tapLeafScript?: ([P.StructInput<{
2217
+ version: /*elided*/ any;
2218
+ internalKey: /*elided*/ any;
2219
+ merklePath: /*elided*/ any;
2220
+ }>, Bytes][] & ([P.StructInput<{
598
2221
  version: /*elided*/ any;
599
2222
  internalKey: /*elided*/ any;
600
2223
  merklePath: /*elided*/ any;
601
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
602
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
603
- hashes: /*elided*/ any;
604
- der: /*elided*/ any;
605
- }>>, readonly [], readonly [0, 2], false];
606
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
607
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
608
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
609
- }>[];
610
- outputs: PSBTKeyMapKeys<{
611
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
612
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
613
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
614
- fingerprint: /*elided*/ any;
615
- path: /*elided*/ any;
616
- }>>, readonly [], readonly [0, 2], false];
617
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
618
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
619
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
620
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
2224
+ }>, Bytes] & [{
2225
+ version: number;
2226
+ internalKey: P.Bytes;
2227
+ merklePath: P.Bytes[];
2228
+ } & {} & {
2229
+ version: number;
2230
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
2231
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
2232
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2233
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
2234
+ hashes: /*elided*/ any;
2235
+ der: /*elided*/ any;
2236
+ }>][] & ([Bytes, P.StructInput<{
2237
+ hashes: /*elided*/ any;
2238
+ der: /*elided*/ any;
2239
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2240
+ der: P.StructInput<{
2241
+ fingerprint: /*elided*/ any;
2242
+ path: /*elided*/ any;
2243
+ }>;
2244
+ hashes: P.Bytes[];
2245
+ } & {} & {
2246
+ der: {
2247
+ path: number[];
2248
+ fingerprint: number;
2249
+ } & {} & {
2250
+ path: number[] & number[];
2251
+ fingerprint: number;
2252
+ };
2253
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
2254
+ }])[]) | undefined;
2255
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2256
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2257
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2258
+ unknown?: ([P.StructInput<{
2259
+ type: number;
2260
+ key: Bytes;
2261
+ }>, Bytes][] & ([P.StructInput<{
2262
+ type: number;
2263
+ key: Bytes;
2264
+ }>, Bytes] & [{
2265
+ type: number;
2266
+ key: Bytes;
2267
+ } & {} & {
2268
+ type: number;
2269
+ key: Bytes & Uint8Array<ArrayBuffer>;
2270
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2271
+ })[];
2272
+ outputs: ({
2273
+ redeemScript?: Bytes | undefined;
2274
+ witnessScript?: Bytes | undefined;
2275
+ bip32Derivation?: [Bytes, P.StructInput<{
2276
+ fingerprint: /*elided*/ any;
2277
+ path: /*elided*/ any;
2278
+ }>][] | undefined;
2279
+ amount?: bigint | undefined;
2280
+ script?: Bytes | undefined;
2281
+ tapInternalKey?: Bytes | undefined;
2282
+ tapTree?: P.StructInput<{
621
2283
  depth: /*elided*/ any;
622
2284
  version: /*elided*/ any;
623
2285
  script: /*elided*/ any;
624
- }>[]>, readonly [], readonly [0, 2], false];
625
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
2286
+ }>[] | undefined;
2287
+ tapBip32Derivation?: [Bytes, P.StructInput<{
626
2288
  hashes: /*elided*/ any;
627
2289
  der: /*elided*/ any;
628
- }>>, readonly [], readonly [0, 2], false];
629
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
630
- }>[];
631
- }>>;
632
- export declare const RawPSBTV2: P.CoderType<P.StructInput<{
2290
+ }>][] | undefined;
2291
+ proprietary?: [Bytes, Bytes][] | undefined;
2292
+ } & PSBTUnknownFields & {
2293
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2294
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2295
+ bip32Derivation?: ([Bytes, P.StructInput<{
2296
+ fingerprint: /*elided*/ any;
2297
+ path: /*elided*/ any;
2298
+ }>][] & ([Bytes, P.StructInput<{
2299
+ fingerprint: /*elided*/ any;
2300
+ path: /*elided*/ any;
2301
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2302
+ path: number[];
2303
+ fingerprint: number;
2304
+ } & {} & {
2305
+ path: number[] & number[];
2306
+ fingerprint: number;
2307
+ }])[]) | undefined;
2308
+ amount?: bigint | undefined;
2309
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2310
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2311
+ tapTree?: (P.StructInput<{
2312
+ depth: /*elided*/ any;
2313
+ version: /*elided*/ any;
2314
+ script: /*elided*/ any;
2315
+ }>[] & ({
2316
+ depth: number;
2317
+ script: Bytes & Uint8Array<ArrayBuffer>;
2318
+ version: number;
2319
+ } & {} & {
2320
+ depth: number;
2321
+ script: Bytes & Uint8Array<ArrayBuffer>;
2322
+ version: number;
2323
+ })[]) | undefined;
2324
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
2325
+ hashes: /*elided*/ any;
2326
+ der: /*elided*/ any;
2327
+ }>][] & ([Bytes, P.StructInput<{
2328
+ hashes: /*elided*/ any;
2329
+ der: /*elided*/ any;
2330
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2331
+ der: P.StructInput<{
2332
+ fingerprint: /*elided*/ any;
2333
+ path: /*elided*/ any;
2334
+ }>;
2335
+ hashes: P.Bytes[];
2336
+ } & {} & {
2337
+ der: {
2338
+ path: number[];
2339
+ fingerprint: number;
2340
+ } & {} & {
2341
+ path: number[] & number[];
2342
+ fingerprint: number;
2343
+ };
2344
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
2345
+ }])[]) | undefined;
2346
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2347
+ unknown?: ([P.StructInput<{
2348
+ type: number;
2349
+ key: Bytes;
2350
+ }>, Bytes][] & ([P.StructInput<{
2351
+ type: number;
2352
+ key: Bytes;
2353
+ }>, Bytes] & [{
2354
+ type: number;
2355
+ key: Bytes;
2356
+ } & {} & {
2357
+ type: number;
2358
+ key: Bytes & Uint8Array<ArrayBuffer>;
2359
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2360
+ })[];
2361
+ }>>>;
2362
+ /** Validated PSBTv2 coder. */
2363
+ export declare const RawPSBTV2: Readonly<P.CoderType<P.StructInput<{
633
2364
  magic: undefined;
634
- global: PSBTKeyMapKeys<{
635
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
2365
+ global: {
2366
+ unsignedTx?: P.StructInput<{
636
2367
  version: /*elided*/ any;
637
2368
  inputs: /*elided*/ any;
638
2369
  outputs: /*elided*/ any;
639
2370
  lockTime: /*elided*/ any;
640
- }>>, readonly [0], readonly [0], false];
641
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
642
- fingerprint: /*elided*/ any;
643
- path: /*elided*/ any;
644
- }>>, readonly [], readonly [0, 2], false];
645
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
646
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
647
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
648
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
649
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
650
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
651
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
652
- }>;
653
- inputs: PSBTKeyMapKeys<{
654
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
2371
+ }> | undefined;
2372
+ xpub?: [P.StructInput<{
2373
+ version: /*elided*/ any;
2374
+ depth: /*elided*/ any;
2375
+ parentFingerprint: /*elided*/ any;
2376
+ childNumber: /*elided*/ any;
2377
+ chainCode: /*elided*/ any;
2378
+ publicKey: /*elided*/ any;
2379
+ }>, P.StructInput<{
2380
+ fingerprint: /*elided*/ any;
2381
+ path: /*elided*/ any;
2382
+ }>][] | undefined;
2383
+ txVersion?: number | undefined;
2384
+ fallbackLocktime?: number | undefined;
2385
+ inputCount?: number | undefined;
2386
+ outputCount?: number | undefined;
2387
+ txModifiable?: number | undefined;
2388
+ version?: number | undefined;
2389
+ proprietary?: [Bytes, Bytes][] | undefined;
2390
+ } & PSBTUnknownFields & {
2391
+ unsignedTx?: ({
2392
+ version: number;
2393
+ inputs: P.StructInput<{
2394
+ txid: /*elided*/ any;
2395
+ index: /*elided*/ any;
2396
+ finalScriptSig: /*elided*/ any;
2397
+ sequence: /*elided*/ any;
2398
+ }>[];
2399
+ outputs: P.StructInput<{
2400
+ amount: /*elided*/ any;
2401
+ script: /*elided*/ any;
2402
+ }>[];
2403
+ lockTime: number;
2404
+ } & {} & {
2405
+ version: number;
2406
+ inputs: P.StructInput<{
2407
+ txid: /*elided*/ any;
2408
+ index: /*elided*/ any;
2409
+ finalScriptSig: /*elided*/ any;
2410
+ sequence: /*elided*/ any;
2411
+ }>[] & ({
2412
+ index: number;
2413
+ sequence: number;
2414
+ txid: P.Bytes;
2415
+ finalScriptSig: P.Bytes;
2416
+ } & {} & {
2417
+ index: number;
2418
+ sequence: number;
2419
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
2420
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
2421
+ })[];
2422
+ outputs: P.StructInput<{
2423
+ amount: /*elided*/ any;
2424
+ script: /*elided*/ any;
2425
+ }>[] & ({
2426
+ script: P.Bytes;
2427
+ amount: bigint;
2428
+ } & {} & {
2429
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2430
+ amount: bigint;
2431
+ })[];
2432
+ lockTime: number;
2433
+ }) | undefined;
2434
+ xpub?: ([P.StructInput<{
2435
+ version: /*elided*/ any;
2436
+ depth: /*elided*/ any;
2437
+ parentFingerprint: /*elided*/ any;
2438
+ childNumber: /*elided*/ any;
2439
+ chainCode: /*elided*/ any;
2440
+ publicKey: /*elided*/ any;
2441
+ }>, P.StructInput<{
2442
+ fingerprint: /*elided*/ any;
2443
+ path: /*elided*/ any;
2444
+ }>][] & ([P.StructInput<{
2445
+ version: /*elided*/ any;
2446
+ depth: /*elided*/ any;
2447
+ parentFingerprint: /*elided*/ any;
2448
+ childNumber: /*elided*/ any;
2449
+ chainCode: /*elided*/ any;
2450
+ publicKey: /*elided*/ any;
2451
+ }>, P.StructInput<{
2452
+ fingerprint: /*elided*/ any;
2453
+ path: /*elided*/ any;
2454
+ }>] & [{
2455
+ depth: number;
2456
+ version: number;
2457
+ parentFingerprint: number;
2458
+ childNumber: number;
2459
+ chainCode: P.Bytes;
2460
+ publicKey: Bytes;
2461
+ } & {} & {
2462
+ depth: number;
2463
+ version: number;
2464
+ parentFingerprint: number;
2465
+ childNumber: number;
2466
+ chainCode: P.Bytes & Uint8Array<ArrayBuffer>;
2467
+ publicKey: Bytes & Uint8Array<ArrayBuffer>;
2468
+ }, {
2469
+ path: number[];
2470
+ fingerprint: number;
2471
+ } & {} & {
2472
+ path: number[] & number[];
2473
+ fingerprint: number;
2474
+ }])[]) | undefined;
2475
+ txVersion?: number | undefined;
2476
+ fallbackLocktime?: number | undefined;
2477
+ inputCount?: number | undefined;
2478
+ outputCount?: number | undefined;
2479
+ txModifiable?: number | undefined;
2480
+ version?: number | undefined;
2481
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2482
+ unknown?: ([P.StructInput<{
2483
+ type: number;
2484
+ key: Bytes;
2485
+ }>, Bytes][] & ([P.StructInput<{
2486
+ type: number;
2487
+ key: Bytes;
2488
+ }>, Bytes] & [{
2489
+ type: number;
2490
+ key: Bytes;
2491
+ } & {} & {
2492
+ type: number;
2493
+ key: Bytes & Uint8Array<ArrayBuffer>;
2494
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2495
+ };
2496
+ inputs: ({
2497
+ nonWitnessUtxo?: P.StructInput<{
655
2498
  version: /*elided*/ any;
656
2499
  segwitFlag: /*elided*/ any;
657
2500
  inputs: /*elided*/ any;
658
2501
  outputs: /*elided*/ any;
659
2502
  witnesses: /*elided*/ any;
660
2503
  lockTime: /*elided*/ any;
661
- }>>, readonly [], readonly [0, 2], false];
662
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
2504
+ }> | undefined;
2505
+ witnessUtxo?: P.StructInput<{
663
2506
  amount: /*elided*/ any;
664
2507
  script: /*elided*/ any;
665
- }>>, readonly [], readonly [0, 2], false];
666
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
667
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
668
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
669
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
670
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
671
- fingerprint: /*elided*/ any;
672
- path: /*elided*/ any;
673
- }>>, readonly [], readonly [0, 2], false];
674
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
675
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
676
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
677
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
678
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
679
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
680
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
681
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
682
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
683
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
684
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
685
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
686
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
687
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
2508
+ }> | undefined;
2509
+ partialSig?: [Bytes, Bytes][] | undefined;
2510
+ sighashType?: number | undefined;
2511
+ redeemScript?: Bytes | undefined;
2512
+ witnessScript?: Bytes | undefined;
2513
+ bip32Derivation?: [Bytes, P.StructInput<{
2514
+ fingerprint: /*elided*/ any;
2515
+ path: /*elided*/ any;
2516
+ }>][] | undefined;
2517
+ finalScriptSig?: Bytes | undefined;
2518
+ finalScriptWitness?: Bytes[] | undefined;
2519
+ porCommitment?: Bytes | undefined;
2520
+ ripemd160?: [Bytes, Bytes][] | undefined;
2521
+ sha256?: [Bytes, Bytes][] | undefined;
2522
+ hash160?: [Bytes, Bytes][] | undefined;
2523
+ hash256?: [Bytes, Bytes][] | undefined;
2524
+ txid?: P.Bytes | undefined;
2525
+ index?: number | undefined;
2526
+ sequence?: number | undefined;
2527
+ requiredTimeLocktime?: number | undefined;
2528
+ requiredHeightLocktime?: number | undefined;
2529
+ tapKeySig?: Bytes | undefined;
2530
+ tapScriptSig?: [P.StructInput<{
688
2531
  pubKey: /*elided*/ any;
689
2532
  leafHash: /*elided*/ any;
690
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
691
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
2533
+ }>, Bytes][] | undefined;
2534
+ tapLeafScript?: [P.StructInput<{
692
2535
  version: /*elided*/ any;
693
2536
  internalKey: /*elided*/ any;
694
2537
  merklePath: /*elided*/ any;
695
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
696
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
697
- hashes: /*elided*/ any;
698
- der: /*elided*/ any;
699
- }>>, readonly [], readonly [0, 2], false];
700
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
701
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
702
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
703
- }>[];
704
- outputs: PSBTKeyMapKeys<{
705
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
706
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
707
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
708
- fingerprint: /*elided*/ any;
709
- path: /*elided*/ any;
710
- }>>, readonly [], readonly [0, 2], false];
711
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
712
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
713
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
714
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
2538
+ }>, Bytes][] | undefined;
2539
+ tapBip32Derivation?: [Bytes, P.StructInput<{
2540
+ hashes: /*elided*/ any;
2541
+ der: /*elided*/ any;
2542
+ }>][] | undefined;
2543
+ tapInternalKey?: Bytes | undefined;
2544
+ tapMerkleRoot?: Bytes | undefined;
2545
+ proprietary?: [Bytes, Bytes][] | undefined;
2546
+ } & PSBTUnknownFields & {
2547
+ nonWitnessUtxo?: ({
2548
+ version: number;
2549
+ inputs: P.StructInput<{
2550
+ txid: /*elided*/ any;
2551
+ index: /*elided*/ any;
2552
+ finalScriptSig: /*elided*/ any;
2553
+ sequence: /*elided*/ any;
2554
+ }>[];
2555
+ outputs: P.StructInput<{
2556
+ amount: /*elided*/ any;
2557
+ script: /*elided*/ any;
2558
+ }>[];
2559
+ lockTime: number;
2560
+ } & {
2561
+ segwitFlag?: boolean | undefined;
2562
+ witnesses?: P.Option<P.Bytes[][]>;
2563
+ } & {
2564
+ version: number;
2565
+ inputs: P.StructInput<{
2566
+ txid: /*elided*/ any;
2567
+ index: /*elided*/ any;
2568
+ finalScriptSig: /*elided*/ any;
2569
+ sequence: /*elided*/ any;
2570
+ }>[] & ({
2571
+ index: number;
2572
+ sequence: number;
2573
+ txid: P.Bytes;
2574
+ finalScriptSig: P.Bytes;
2575
+ } & {} & {
2576
+ index: number;
2577
+ sequence: number;
2578
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
2579
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
2580
+ })[];
2581
+ outputs: P.StructInput<{
2582
+ amount: /*elided*/ any;
2583
+ script: /*elided*/ any;
2584
+ }>[] & ({
2585
+ script: P.Bytes;
2586
+ amount: bigint;
2587
+ } & {} & {
2588
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2589
+ amount: bigint;
2590
+ })[];
2591
+ lockTime: number;
2592
+ segwitFlag?: boolean | undefined;
2593
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
2594
+ }) | undefined;
2595
+ witnessUtxo?: ({
2596
+ script: P.Bytes;
2597
+ amount: bigint;
2598
+ } & {} & {
2599
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2600
+ amount: bigint;
2601
+ }) | undefined;
2602
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2603
+ sighashType?: number | undefined;
2604
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2605
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2606
+ bip32Derivation?: ([Bytes, P.StructInput<{
2607
+ fingerprint: /*elided*/ any;
2608
+ path: /*elided*/ any;
2609
+ }>][] & ([Bytes, P.StructInput<{
2610
+ fingerprint: /*elided*/ any;
2611
+ path: /*elided*/ any;
2612
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2613
+ path: number[];
2614
+ fingerprint: number;
2615
+ } & {} & {
2616
+ path: number[] & number[];
2617
+ fingerprint: number;
2618
+ }])[]) | undefined;
2619
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2620
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
2621
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2622
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2623
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2624
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2625
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2626
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
2627
+ index?: number | undefined;
2628
+ sequence?: number | undefined;
2629
+ requiredTimeLocktime?: number | undefined;
2630
+ requiredHeightLocktime?: number | undefined;
2631
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2632
+ tapScriptSig?: ([P.StructInput<{
2633
+ pubKey: /*elided*/ any;
2634
+ leafHash: /*elided*/ any;
2635
+ }>, Bytes][] & ([P.StructInput<{
2636
+ pubKey: /*elided*/ any;
2637
+ leafHash: /*elided*/ any;
2638
+ }>, Bytes] & [{
2639
+ pubKey: Bytes;
2640
+ leafHash: P.Bytes;
2641
+ } & {} & {
2642
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
2643
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
2644
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2645
+ tapLeafScript?: ([P.StructInput<{
2646
+ version: /*elided*/ any;
2647
+ internalKey: /*elided*/ any;
2648
+ merklePath: /*elided*/ any;
2649
+ }>, Bytes][] & ([P.StructInput<{
2650
+ version: /*elided*/ any;
2651
+ internalKey: /*elided*/ any;
2652
+ merklePath: /*elided*/ any;
2653
+ }>, Bytes] & [{
2654
+ version: number;
2655
+ internalKey: P.Bytes;
2656
+ merklePath: P.Bytes[];
2657
+ } & {} & {
2658
+ version: number;
2659
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
2660
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
2661
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2662
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
2663
+ hashes: /*elided*/ any;
2664
+ der: /*elided*/ any;
2665
+ }>][] & ([Bytes, P.StructInput<{
2666
+ hashes: /*elided*/ any;
2667
+ der: /*elided*/ any;
2668
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2669
+ der: P.StructInput<{
2670
+ fingerprint: /*elided*/ any;
2671
+ path: /*elided*/ any;
2672
+ }>;
2673
+ hashes: P.Bytes[];
2674
+ } & {} & {
2675
+ der: {
2676
+ path: number[];
2677
+ fingerprint: number;
2678
+ } & {} & {
2679
+ path: number[] & number[];
2680
+ fingerprint: number;
2681
+ };
2682
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
2683
+ }])[]) | undefined;
2684
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2685
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2686
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2687
+ unknown?: ([P.StructInput<{
2688
+ type: number;
2689
+ key: Bytes;
2690
+ }>, Bytes][] & ([P.StructInput<{
2691
+ type: number;
2692
+ key: Bytes;
2693
+ }>, Bytes] & [{
2694
+ type: number;
2695
+ key: Bytes;
2696
+ } & {} & {
2697
+ type: number;
2698
+ key: Bytes & Uint8Array<ArrayBuffer>;
2699
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2700
+ })[];
2701
+ outputs: ({
2702
+ redeemScript?: Bytes | undefined;
2703
+ witnessScript?: Bytes | undefined;
2704
+ bip32Derivation?: [Bytes, P.StructInput<{
2705
+ fingerprint: /*elided*/ any;
2706
+ path: /*elided*/ any;
2707
+ }>][] | undefined;
2708
+ amount?: bigint | undefined;
2709
+ script?: Bytes | undefined;
2710
+ tapInternalKey?: Bytes | undefined;
2711
+ tapTree?: P.StructInput<{
2712
+ depth: /*elided*/ any;
2713
+ version: /*elided*/ any;
2714
+ script: /*elided*/ any;
2715
+ }>[] | undefined;
2716
+ tapBip32Derivation?: [Bytes, P.StructInput<{
2717
+ hashes: /*elided*/ any;
2718
+ der: /*elided*/ any;
2719
+ }>][] | undefined;
2720
+ proprietary?: [Bytes, Bytes][] | undefined;
2721
+ } & PSBTUnknownFields & {
2722
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2723
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2724
+ bip32Derivation?: ([Bytes, P.StructInput<{
2725
+ fingerprint: /*elided*/ any;
2726
+ path: /*elided*/ any;
2727
+ }>][] & ([Bytes, P.StructInput<{
2728
+ fingerprint: /*elided*/ any;
2729
+ path: /*elided*/ any;
2730
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2731
+ path: number[];
2732
+ fingerprint: number;
2733
+ } & {} & {
2734
+ path: number[] & number[];
2735
+ fingerprint: number;
2736
+ }])[]) | undefined;
2737
+ amount?: bigint | undefined;
2738
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2739
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
2740
+ tapTree?: (P.StructInput<{
715
2741
  depth: /*elided*/ any;
716
2742
  version: /*elided*/ any;
717
2743
  script: /*elided*/ any;
718
- }>[]>, readonly [], readonly [0, 2], false];
719
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
2744
+ }>[] & ({
2745
+ depth: number;
2746
+ script: Bytes & Uint8Array<ArrayBuffer>;
2747
+ version: number;
2748
+ } & {} & {
2749
+ depth: number;
2750
+ script: Bytes & Uint8Array<ArrayBuffer>;
2751
+ version: number;
2752
+ })[]) | undefined;
2753
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
2754
+ hashes: /*elided*/ any;
2755
+ der: /*elided*/ any;
2756
+ }>][] & ([Bytes, P.StructInput<{
720
2757
  hashes: /*elided*/ any;
721
2758
  der: /*elided*/ any;
722
- }>>, readonly [], readonly [0, 2], false];
723
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
724
- }>[];
2759
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
2760
+ der: P.StructInput<{
2761
+ fingerprint: /*elided*/ any;
2762
+ path: /*elided*/ any;
2763
+ }>;
2764
+ hashes: P.Bytes[];
2765
+ } & {} & {
2766
+ der: {
2767
+ path: number[];
2768
+ fingerprint: number;
2769
+ } & {} & {
2770
+ path: number[] & number[];
2771
+ fingerprint: number;
2772
+ };
2773
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
2774
+ }])[]) | undefined;
2775
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2776
+ unknown?: ([P.StructInput<{
2777
+ type: number;
2778
+ key: Bytes;
2779
+ }>, Bytes][] & ([P.StructInput<{
2780
+ type: number;
2781
+ key: Bytes;
2782
+ }>, Bytes] & [{
2783
+ type: number;
2784
+ key: Bytes;
2785
+ } & {} & {
2786
+ type: number;
2787
+ key: Bytes & Uint8Array<ArrayBuffer>;
2788
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2789
+ })[];
725
2790
  }> | P.StructInput<{
726
2791
  magic: undefined;
727
- global: PSBTKeyMapKeys<{
728
- readonly unsignedTx: readonly [0, false, P.CoderType<P.StructInput<{
2792
+ global: {
2793
+ unsignedTx?: P.StructInput<{
729
2794
  version: /*elided*/ any;
730
2795
  inputs: /*elided*/ any;
731
2796
  outputs: /*elided*/ any;
732
2797
  lockTime: /*elided*/ any;
733
- }>>, readonly [0], readonly [0], false];
734
- readonly xpub: readonly [1, P.CoderType<P.Bytes>, P.CoderType<P.StructInput<{
735
- fingerprint: /*elided*/ any;
736
- path: /*elided*/ any;
737
- }>>, readonly [], readonly [0, 2], false];
738
- readonly txVersion: readonly [2, false, P.CoderType<number>, readonly [2], readonly [2], false];
739
- readonly fallbackLocktime: readonly [3, false, P.CoderType<number>, readonly [], readonly [2], false];
740
- readonly inputCount: readonly [4, false, P.CoderType<number>, readonly [2], readonly [2], false];
741
- readonly outputCount: readonly [5, false, P.CoderType<number>, readonly [2], readonly [2], false];
742
- readonly txModifiable: readonly [6, false, P.CoderType<number>, readonly [], readonly [2], false];
743
- readonly version: readonly [251, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
744
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
745
- }>;
746
- inputs: PSBTKeyMapKeys<{
747
- readonly nonWitnessUtxo: readonly [0, false, P.CoderType<P.StructInput<{
2798
+ }> | undefined;
2799
+ xpub?: [P.StructInput<{
2800
+ version: /*elided*/ any;
2801
+ depth: /*elided*/ any;
2802
+ parentFingerprint: /*elided*/ any;
2803
+ childNumber: /*elided*/ any;
2804
+ chainCode: /*elided*/ any;
2805
+ publicKey: /*elided*/ any;
2806
+ }>, P.StructInput<{
2807
+ fingerprint: /*elided*/ any;
2808
+ path: /*elided*/ any;
2809
+ }>][] | undefined;
2810
+ txVersion?: number | undefined;
2811
+ fallbackLocktime?: number | undefined;
2812
+ inputCount?: number | undefined;
2813
+ outputCount?: number | undefined;
2814
+ txModifiable?: number | undefined;
2815
+ version?: number | undefined;
2816
+ proprietary?: [Bytes, Bytes][] | undefined;
2817
+ } & PSBTUnknownFields & {
2818
+ unsignedTx?: ({
2819
+ version: number;
2820
+ inputs: P.StructInput<{
2821
+ txid: /*elided*/ any;
2822
+ index: /*elided*/ any;
2823
+ finalScriptSig: /*elided*/ any;
2824
+ sequence: /*elided*/ any;
2825
+ }>[];
2826
+ outputs: P.StructInput<{
2827
+ amount: /*elided*/ any;
2828
+ script: /*elided*/ any;
2829
+ }>[];
2830
+ lockTime: number;
2831
+ } & {} & {
2832
+ version: number;
2833
+ inputs: P.StructInput<{
2834
+ txid: /*elided*/ any;
2835
+ index: /*elided*/ any;
2836
+ finalScriptSig: /*elided*/ any;
2837
+ sequence: /*elided*/ any;
2838
+ }>[] & ({
2839
+ index: number;
2840
+ sequence: number;
2841
+ txid: P.Bytes;
2842
+ finalScriptSig: P.Bytes;
2843
+ } & {} & {
2844
+ index: number;
2845
+ sequence: number;
2846
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
2847
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
2848
+ })[];
2849
+ outputs: P.StructInput<{
2850
+ amount: /*elided*/ any;
2851
+ script: /*elided*/ any;
2852
+ }>[] & ({
2853
+ script: P.Bytes;
2854
+ amount: bigint;
2855
+ } & {} & {
2856
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
2857
+ amount: bigint;
2858
+ })[];
2859
+ lockTime: number;
2860
+ }) | undefined;
2861
+ xpub?: ([P.StructInput<{
2862
+ version: /*elided*/ any;
2863
+ depth: /*elided*/ any;
2864
+ parentFingerprint: /*elided*/ any;
2865
+ childNumber: /*elided*/ any;
2866
+ chainCode: /*elided*/ any;
2867
+ publicKey: /*elided*/ any;
2868
+ }>, P.StructInput<{
2869
+ fingerprint: /*elided*/ any;
2870
+ path: /*elided*/ any;
2871
+ }>][] & ([P.StructInput<{
2872
+ version: /*elided*/ any;
2873
+ depth: /*elided*/ any;
2874
+ parentFingerprint: /*elided*/ any;
2875
+ childNumber: /*elided*/ any;
2876
+ chainCode: /*elided*/ any;
2877
+ publicKey: /*elided*/ any;
2878
+ }>, P.StructInput<{
2879
+ fingerprint: /*elided*/ any;
2880
+ path: /*elided*/ any;
2881
+ }>] & [{
2882
+ depth: number;
2883
+ version: number;
2884
+ parentFingerprint: number;
2885
+ childNumber: number;
2886
+ chainCode: P.Bytes;
2887
+ publicKey: Bytes;
2888
+ } & {} & {
2889
+ depth: number;
2890
+ version: number;
2891
+ parentFingerprint: number;
2892
+ childNumber: number;
2893
+ chainCode: P.Bytes & Uint8Array<ArrayBuffer>;
2894
+ publicKey: Bytes & Uint8Array<ArrayBuffer>;
2895
+ }, {
2896
+ path: number[];
2897
+ fingerprint: number;
2898
+ } & {} & {
2899
+ path: number[] & number[];
2900
+ fingerprint: number;
2901
+ }])[]) | undefined;
2902
+ txVersion?: number | undefined;
2903
+ fallbackLocktime?: number | undefined;
2904
+ inputCount?: number | undefined;
2905
+ outputCount?: number | undefined;
2906
+ txModifiable?: number | undefined;
2907
+ version?: number | undefined;
2908
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2909
+ unknown?: ([P.StructInput<{
2910
+ type: number;
2911
+ key: Bytes;
2912
+ }>, Bytes][] & ([P.StructInput<{
2913
+ type: number;
2914
+ key: Bytes;
2915
+ }>, Bytes] & [{
2916
+ type: number;
2917
+ key: Bytes;
2918
+ } & {} & {
2919
+ type: number;
2920
+ key: Bytes & Uint8Array<ArrayBuffer>;
2921
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
2922
+ };
2923
+ inputs: ({
2924
+ nonWitnessUtxo?: P.StructInput<{
748
2925
  version: /*elided*/ any;
749
2926
  segwitFlag: /*elided*/ any;
750
2927
  inputs: /*elided*/ any;
751
2928
  outputs: /*elided*/ any;
752
2929
  witnesses: /*elided*/ any;
753
2930
  lockTime: /*elided*/ any;
754
- }>>, readonly [], readonly [0, 2], false];
755
- readonly witnessUtxo: readonly [1, false, P.CoderType<P.StructInput<{
2931
+ }> | undefined;
2932
+ witnessUtxo?: P.StructInput<{
756
2933
  amount: /*elided*/ any;
757
2934
  script: /*elided*/ any;
758
- }>>, readonly [], readonly [0, 2], false];
759
- readonly partialSig: readonly [2, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
760
- readonly sighashType: readonly [3, false, P.CoderType<number>, readonly [], readonly [0, 2], false];
761
- readonly redeemScript: readonly [4, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
762
- readonly witnessScript: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
763
- readonly bip32Derivation: readonly [6, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
764
- fingerprint: /*elided*/ any;
765
- path: /*elided*/ any;
766
- }>>, readonly [], readonly [0, 2], false];
767
- readonly finalScriptSig: readonly [7, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
768
- readonly finalScriptWitness: readonly [8, false, P.CoderType<Bytes[]>, readonly [], readonly [0, 2], false];
769
- readonly porCommitment: readonly [9, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
770
- readonly ripemd160: readonly [10, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
771
- readonly sha256: readonly [11, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
772
- readonly hash160: readonly [12, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
773
- readonly hash256: readonly [13, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
774
- readonly txid: readonly [14, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
775
- readonly index: readonly [15, false, P.CoderType<number>, readonly [2], readonly [2], true];
776
- readonly sequence: readonly [16, false, P.CoderType<number>, readonly [], readonly [2], true];
777
- readonly requiredTimeLocktime: readonly [17, false, P.CoderType<number>, readonly [], readonly [2], false];
778
- readonly requiredHeightLocktime: readonly [18, false, P.CoderType<number>, readonly [], readonly [2], false];
779
- readonly tapKeySig: readonly [19, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
780
- readonly tapScriptSig: readonly [20, P.CoderType<P.StructInput<{
2935
+ }> | undefined;
2936
+ partialSig?: [Bytes, Bytes][] | undefined;
2937
+ sighashType?: number | undefined;
2938
+ redeemScript?: Bytes | undefined;
2939
+ witnessScript?: Bytes | undefined;
2940
+ bip32Derivation?: [Bytes, P.StructInput<{
2941
+ fingerprint: /*elided*/ any;
2942
+ path: /*elided*/ any;
2943
+ }>][] | undefined;
2944
+ finalScriptSig?: Bytes | undefined;
2945
+ finalScriptWitness?: Bytes[] | undefined;
2946
+ porCommitment?: Bytes | undefined;
2947
+ ripemd160?: [Bytes, Bytes][] | undefined;
2948
+ sha256?: [Bytes, Bytes][] | undefined;
2949
+ hash160?: [Bytes, Bytes][] | undefined;
2950
+ hash256?: [Bytes, Bytes][] | undefined;
2951
+ txid?: P.Bytes | undefined;
2952
+ index?: number | undefined;
2953
+ sequence?: number | undefined;
2954
+ requiredTimeLocktime?: number | undefined;
2955
+ requiredHeightLocktime?: number | undefined;
2956
+ tapKeySig?: Bytes | undefined;
2957
+ tapScriptSig?: [P.StructInput<{
2958
+ pubKey: /*elided*/ any;
2959
+ leafHash: /*elided*/ any;
2960
+ }>, Bytes][] | undefined;
2961
+ tapLeafScript?: [P.StructInput<{
2962
+ version: /*elided*/ any;
2963
+ internalKey: /*elided*/ any;
2964
+ merklePath: /*elided*/ any;
2965
+ }>, Bytes][] | undefined;
2966
+ tapBip32Derivation?: [Bytes, P.StructInput<{
2967
+ hashes: /*elided*/ any;
2968
+ der: /*elided*/ any;
2969
+ }>][] | undefined;
2970
+ tapInternalKey?: Bytes | undefined;
2971
+ tapMerkleRoot?: Bytes | undefined;
2972
+ proprietary?: [Bytes, Bytes][] | undefined;
2973
+ } & PSBTUnknownFields & {
2974
+ nonWitnessUtxo?: ({
2975
+ version: number;
2976
+ inputs: P.StructInput<{
2977
+ txid: /*elided*/ any;
2978
+ index: /*elided*/ any;
2979
+ finalScriptSig: /*elided*/ any;
2980
+ sequence: /*elided*/ any;
2981
+ }>[];
2982
+ outputs: P.StructInput<{
2983
+ amount: /*elided*/ any;
2984
+ script: /*elided*/ any;
2985
+ }>[];
2986
+ lockTime: number;
2987
+ } & {
2988
+ segwitFlag?: boolean | undefined;
2989
+ witnesses?: P.Option<P.Bytes[][]>;
2990
+ } & {
2991
+ version: number;
2992
+ inputs: P.StructInput<{
2993
+ txid: /*elided*/ any;
2994
+ index: /*elided*/ any;
2995
+ finalScriptSig: /*elided*/ any;
2996
+ sequence: /*elided*/ any;
2997
+ }>[] & ({
2998
+ index: number;
2999
+ sequence: number;
3000
+ txid: P.Bytes;
3001
+ finalScriptSig: P.Bytes;
3002
+ } & {} & {
3003
+ index: number;
3004
+ sequence: number;
3005
+ txid: P.Bytes & Uint8Array<ArrayBuffer>;
3006
+ finalScriptSig: P.Bytes & Uint8Array<ArrayBuffer>;
3007
+ })[];
3008
+ outputs: P.StructInput<{
3009
+ amount: /*elided*/ any;
3010
+ script: /*elided*/ any;
3011
+ }>[] & ({
3012
+ script: P.Bytes;
3013
+ amount: bigint;
3014
+ } & {} & {
3015
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
3016
+ amount: bigint;
3017
+ })[];
3018
+ lockTime: number;
3019
+ segwitFlag?: boolean | undefined;
3020
+ witnesses?: (P.Bytes[][] & (P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[])[]) | undefined;
3021
+ }) | undefined;
3022
+ witnessUtxo?: ({
3023
+ script: P.Bytes;
3024
+ amount: bigint;
3025
+ } & {} & {
3026
+ script: P.Bytes & Uint8Array<ArrayBuffer>;
3027
+ amount: bigint;
3028
+ }) | undefined;
3029
+ partialSig?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3030
+ sighashType?: number | undefined;
3031
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3032
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3033
+ bip32Derivation?: ([Bytes, P.StructInput<{
3034
+ fingerprint: /*elided*/ any;
3035
+ path: /*elided*/ any;
3036
+ }>][] & ([Bytes, P.StructInput<{
3037
+ fingerprint: /*elided*/ any;
3038
+ path: /*elided*/ any;
3039
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
3040
+ path: number[];
3041
+ fingerprint: number;
3042
+ } & {} & {
3043
+ path: number[] & number[];
3044
+ fingerprint: number;
3045
+ }])[]) | undefined;
3046
+ finalScriptSig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3047
+ finalScriptWitness?: (Bytes[] & (Bytes & Uint8Array<ArrayBuffer>)[]) | undefined;
3048
+ porCommitment?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3049
+ ripemd160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3050
+ sha256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3051
+ hash160?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3052
+ hash256?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3053
+ txid?: (P.Bytes & Uint8Array<ArrayBuffer>) | undefined;
3054
+ index?: number | undefined;
3055
+ sequence?: number | undefined;
3056
+ requiredTimeLocktime?: number | undefined;
3057
+ requiredHeightLocktime?: number | undefined;
3058
+ tapKeySig?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3059
+ tapScriptSig?: ([P.StructInput<{
3060
+ pubKey: /*elided*/ any;
3061
+ leafHash: /*elided*/ any;
3062
+ }>, Bytes][] & ([P.StructInput<{
781
3063
  pubKey: /*elided*/ any;
782
3064
  leafHash: /*elided*/ any;
783
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
784
- readonly tapLeafScript: readonly [21, P.CoderType<P.StructInput<{
3065
+ }>, Bytes] & [{
3066
+ pubKey: Bytes;
3067
+ leafHash: P.Bytes;
3068
+ } & {} & {
3069
+ pubKey: Bytes & Uint8Array<ArrayBuffer>;
3070
+ leafHash: P.Bytes & Uint8Array<ArrayBuffer>;
3071
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3072
+ tapLeafScript?: ([P.StructInput<{
3073
+ version: /*elided*/ any;
3074
+ internalKey: /*elided*/ any;
3075
+ merklePath: /*elided*/ any;
3076
+ }>, Bytes][] & ([P.StructInput<{
785
3077
  version: /*elided*/ any;
786
3078
  internalKey: /*elided*/ any;
787
3079
  merklePath: /*elided*/ any;
788
- }>>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
789
- readonly tapBip32Derivation: readonly [22, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
790
- hashes: /*elided*/ any;
791
- der: /*elided*/ any;
792
- }>>, readonly [], readonly [0, 2], false];
793
- readonly tapInternalKey: readonly [23, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
794
- readonly tapMerkleRoot: readonly [24, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
795
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
796
- }>[];
797
- outputs: PSBTKeyMapKeys<{
798
- readonly redeemScript: readonly [0, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
799
- readonly witnessScript: readonly [1, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
800
- readonly bip32Derivation: readonly [2, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
801
- fingerprint: /*elided*/ any;
802
- path: /*elided*/ any;
803
- }>>, readonly [], readonly [0, 2], false];
804
- readonly amount: readonly [3, false, P.CoderType<bigint>, readonly [2], readonly [2], true];
805
- readonly script: readonly [4, false, P.CoderType<Bytes>, readonly [2], readonly [2], true];
806
- readonly tapInternalKey: readonly [5, false, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
807
- readonly tapTree: readonly [6, false, P.CoderType<P.StructInput<{
3080
+ }>, Bytes] & [{
3081
+ version: number;
3082
+ internalKey: P.Bytes;
3083
+ merklePath: P.Bytes[];
3084
+ } & {} & {
3085
+ version: number;
3086
+ internalKey: P.Bytes & Uint8Array<ArrayBuffer>;
3087
+ merklePath: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
3088
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3089
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
3090
+ hashes: /*elided*/ any;
3091
+ der: /*elided*/ any;
3092
+ }>][] & ([Bytes, P.StructInput<{
3093
+ hashes: /*elided*/ any;
3094
+ der: /*elided*/ any;
3095
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
3096
+ der: P.StructInput<{
3097
+ fingerprint: /*elided*/ any;
3098
+ path: /*elided*/ any;
3099
+ }>;
3100
+ hashes: P.Bytes[];
3101
+ } & {} & {
3102
+ der: {
3103
+ path: number[];
3104
+ fingerprint: number;
3105
+ } & {} & {
3106
+ path: number[] & number[];
3107
+ fingerprint: number;
3108
+ };
3109
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
3110
+ }])[]) | undefined;
3111
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3112
+ tapMerkleRoot?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3113
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3114
+ unknown?: ([P.StructInput<{
3115
+ type: number;
3116
+ key: Bytes;
3117
+ }>, Bytes][] & ([P.StructInput<{
3118
+ type: number;
3119
+ key: Bytes;
3120
+ }>, Bytes] & [{
3121
+ type: number;
3122
+ key: Bytes;
3123
+ } & {} & {
3124
+ type: number;
3125
+ key: Bytes & Uint8Array<ArrayBuffer>;
3126
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3127
+ })[];
3128
+ outputs: ({
3129
+ redeemScript?: Bytes | undefined;
3130
+ witnessScript?: Bytes | undefined;
3131
+ bip32Derivation?: [Bytes, P.StructInput<{
3132
+ fingerprint: /*elided*/ any;
3133
+ path: /*elided*/ any;
3134
+ }>][] | undefined;
3135
+ amount?: bigint | undefined;
3136
+ script?: Bytes | undefined;
3137
+ tapInternalKey?: Bytes | undefined;
3138
+ tapTree?: P.StructInput<{
808
3139
  depth: /*elided*/ any;
809
3140
  version: /*elided*/ any;
810
3141
  script: /*elided*/ any;
811
- }>[]>, readonly [], readonly [0, 2], false];
812
- readonly tapBip32Derivation: readonly [7, P.CoderType<Bytes>, P.CoderType<P.StructInput<{
3142
+ }>[] | undefined;
3143
+ tapBip32Derivation?: [Bytes, P.StructInput<{
813
3144
  hashes: /*elided*/ any;
814
3145
  der: /*elided*/ any;
815
- }>>, readonly [], readonly [0, 2], false];
816
- readonly proprietary: readonly [252, P.CoderType<Bytes>, P.CoderType<Bytes>, readonly [], readonly [0, 2], false];
817
- }>[];
818
- }>>;
3146
+ }>][] | undefined;
3147
+ proprietary?: [Bytes, Bytes][] | undefined;
3148
+ } & PSBTUnknownFields & {
3149
+ redeemScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3150
+ witnessScript?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3151
+ bip32Derivation?: ([Bytes, P.StructInput<{
3152
+ fingerprint: /*elided*/ any;
3153
+ path: /*elided*/ any;
3154
+ }>][] & ([Bytes, P.StructInput<{
3155
+ fingerprint: /*elided*/ any;
3156
+ path: /*elided*/ any;
3157
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
3158
+ path: number[];
3159
+ fingerprint: number;
3160
+ } & {} & {
3161
+ path: number[] & number[];
3162
+ fingerprint: number;
3163
+ }])[]) | undefined;
3164
+ amount?: bigint | undefined;
3165
+ script?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3166
+ tapInternalKey?: (Bytes & Uint8Array<ArrayBuffer>) | undefined;
3167
+ tapTree?: (P.StructInput<{
3168
+ depth: /*elided*/ any;
3169
+ version: /*elided*/ any;
3170
+ script: /*elided*/ any;
3171
+ }>[] & ({
3172
+ depth: number;
3173
+ script: Bytes & Uint8Array<ArrayBuffer>;
3174
+ version: number;
3175
+ } & {} & {
3176
+ depth: number;
3177
+ script: Bytes & Uint8Array<ArrayBuffer>;
3178
+ version: number;
3179
+ })[]) | undefined;
3180
+ tapBip32Derivation?: ([Bytes, P.StructInput<{
3181
+ hashes: /*elided*/ any;
3182
+ der: /*elided*/ any;
3183
+ }>][] & ([Bytes, P.StructInput<{
3184
+ hashes: /*elided*/ any;
3185
+ der: /*elided*/ any;
3186
+ }>] & [Bytes & Uint8Array<ArrayBuffer>, {
3187
+ der: P.StructInput<{
3188
+ fingerprint: /*elided*/ any;
3189
+ path: /*elided*/ any;
3190
+ }>;
3191
+ hashes: P.Bytes[];
3192
+ } & {} & {
3193
+ der: {
3194
+ path: number[];
3195
+ fingerprint: number;
3196
+ } & {} & {
3197
+ path: number[] & number[];
3198
+ fingerprint: number;
3199
+ };
3200
+ hashes: P.Bytes[] & (P.Bytes & Uint8Array<ArrayBuffer>)[];
3201
+ }])[]) | undefined;
3202
+ proprietary?: ([Bytes, Bytes][] & ([Bytes, Bytes] & [Bytes & Uint8Array<ArrayBuffer>, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3203
+ unknown?: ([P.StructInput<{
3204
+ type: number;
3205
+ key: Bytes;
3206
+ }>, Bytes][] & ([P.StructInput<{
3207
+ type: number;
3208
+ key: Bytes;
3209
+ }>, Bytes] & [{
3210
+ type: number;
3211
+ key: Bytes;
3212
+ } & {} & {
3213
+ type: number;
3214
+ key: Bytes & Uint8Array<ArrayBuffer>;
3215
+ }, Bytes & Uint8Array<ArrayBuffer>])[]) | undefined;
3216
+ })[];
3217
+ }>>>;
819
3218
  export {};
820
3219
  //# sourceMappingURL=psbt.d.ts.map