Skip to content

Commit c2216a0

Browse files
refactor(abstract-utxo): split off BaseParsedTransactionOutputs
Issue: BTC-1450
1 parent f56dda5 commit c2216a0

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

modules/abstract-utxo/src/abstractUtxoCoin.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,7 @@ export interface ParseTransactionOptions<TNumber extends number | bigint = numbe
206206
reqId?: IRequestTracer;
207207
}
208208

209-
export type BaseParsedTransaction<TNumber extends number | bigint, TOutput> = {
210-
keychains: UtxoNamedKeychains;
211-
keySignatures: {
212-
backupPub?: string;
213-
bitgoPub?: string;
214-
};
209+
export type BaseParsedTransactionOutputs<TNumber extends number | bigint, TOutput> = {
215210
/** all transaction outputs */
216211
outputs: TOutput[];
217212
/** transaction outputs that were specified as recipients but are missing from the transaction */
@@ -226,6 +221,17 @@ export type BaseParsedTransaction<TNumber extends number | bigint, TOutput> = {
226221
explicitExternalSpendAmount: TNumber;
227222
/** sum of all implicit external outputs */
228223
implicitExternalSpendAmount: TNumber;
224+
};
225+
226+
export type BaseParsedTransaction<TNumber extends number | bigint, TOutput> = BaseParsedTransactionOutputs<
227+
TNumber,
228+
TOutput
229+
> /** Some extra properties that have nothing to do with an individual transaction */ & {
230+
keychains: UtxoNamedKeychains;
231+
keySignatures: {
232+
backupPub?: string;
233+
bitgoPub?: string;
234+
};
229235
needsCustomChangeKeySignatureVerification: boolean;
230236
customChange?: CustomChangeOptions;
231237
};

0 commit comments

Comments
 (0)