@@ -105,17 +105,29 @@ function signInput(
105105}
106106
107107class TxCombo {
108+ public walletKeys : BIP32Interface [ ] ;
109+ public inputTypes : string [ ] ;
110+ public outputTypes : TestUnspentType [ ] ;
111+ public expectedDims : Readonly < Dimensions > ;
112+ public signKeys ?: BIP32Interface [ ] ;
113+ public inputValue : number ;
108114 public unspents : IUnspent [ ] ;
109115 public inputTx : any ;
110116
111117 constructor (
112- public walletKeys : BIP32Interface [ ] ,
113- public inputTypes : string [ ] ,
114- public outputTypes : TestUnspentType [ ] ,
115- public expectedDims : Readonly < Dimensions > = Dimensions . ZERO ,
116- public signKeys ?: BIP32Interface [ ] ,
117- public inputValue : number = 10
118+ walletKeys : BIP32Interface [ ] ,
119+ inputTypes : string [ ] ,
120+ outputTypes : TestUnspentType [ ] ,
121+ expectedDims : Readonly < Dimensions > = Dimensions . ZERO ,
122+ signKeys ?: BIP32Interface [ ] ,
123+ inputValue = 10
118124 ) {
125+ this . walletKeys = walletKeys ;
126+ this . inputTypes = inputTypes ;
127+ this . outputTypes = outputTypes ;
128+ this . expectedDims = expectedDims ;
129+ this . signKeys = signKeys ;
130+ this . inputValue = inputValue ;
119131 this . unspents = inputTypes . map ( ( inputType ) =>
120132 createUnspent (
121133 walletKeys . map ( ( key ) => key . publicKey ) ,
@@ -180,9 +192,12 @@ const runCombinations = (
180192} ;
181193
182194class Histogram {
195+ public map : Map < number , number > ;
183196 public total = 0 ;
184197
185- constructor ( public map : Map < number , number > = new Map ( ) ) { }
198+ constructor ( map : Map < number , number > = new Map ( ) ) {
199+ this . map = map ;
200+ }
186201
187202 public add ( size : number ) : void {
188203 this . map . set ( size , ( this . map . get ( size ) || 0 ) + 1 ) ;
0 commit comments