( psbt: bitcoin.Psbt, utxo: IUtxo, p2tr: any, tapLeafScript: any )
| 142 | } |
| 143 | |
| 144 | function addNoteInput( |
| 145 | psbt: bitcoin.Psbt, |
| 146 | utxo: IUtxo, |
| 147 | p2tr: any, |
| 148 | tapLeafScript: any |
| 149 | ) { |
| 150 | const input = { |
| 151 | hash: utxo.txId, |
| 152 | index: utxo.outputIndex, |
| 153 | sequence: MAX_SEQUENCE, |
| 154 | witnessUtxo: { |
| 155 | script: p2tr.output!, |
| 156 | value: utxo.satoshis, |
| 157 | }, |
| 158 | tapLeafScript: [tapLeafScript], |
| 159 | }; |
| 160 | psbt.addInput(input); |
| 161 | return utxo.satoshis; |
| 162 | } |
| 163 | |
| 164 | function addOutputs(psbt: bitcoin.Psbt, toAddresses: ISendToAddress[]) { |
| 165 | let totalOutput = 0; |
no outgoing calls
no test coverage detected