(psbt: bitcoin.Psbt, toAddresses: ISendToAddress[])
| 162 | } |
| 163 | |
| 164 | function addOutputs(psbt: bitcoin.Psbt, toAddresses: ISendToAddress[]) { |
| 165 | let totalOutput = 0; |
| 166 | for (const to of toAddresses) { |
| 167 | const amount = to.amount; |
| 168 | psbt.addOutput({ |
| 169 | address: to.address, |
| 170 | value: Number(amount), |
| 171 | }); |
| 172 | totalOutput += Number(amount); |
| 173 | } |
| 174 | return totalOutput; |
| 175 | } |
| 176 | |
| 177 | //添加找零输出 |
| 178 | function addChangeOutput( |
no outgoing calls
no test coverage detected