MCPcopy Create free account
hub / github.com/NoteProtocol/NoteWallet / addOutputs

Function addOutputs

src/btc/btc-p2tr-note.ts:164–175  ·  view source on GitHub ↗
(psbt: bitcoin.Psbt, toAddresses: ISendToAddress[])

Source from the content-addressed store, hash-verified

162}
163
164function 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//添加找零输出
178function addChangeOutput(

Callers 1

createP2TRNotePsbtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected