Skip to content

Commit 4a3aff7

Browse files
author
22388o⚡️
authored
Update covenants.js
1 parent 450841b commit 4a3aff7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/dlc/covenants.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,9 @@ async function runDLC() {
9090
runDLC().catch(console.error);
9191

9292
// Bitcoin script
93-
const script = Script.fromOpCode(settlementTXOpCode); const opCode = await. script.opcode(OP_CTV); await script.broadcast(opCode.setScript().toScript());
93+
const script = Script.fromOps([OP_CTV]); // Assuming fromOps takes an array of opcodes.
94+
const tx = new TransactionBuilder();
95+
tx.addInput('prev-tx-hash', 0); // Example previous transaction input.
96+
tx.addOutput(script, amount); // Set your custom script as the output.
97+
const txHex = tx.build().toHex();
98+
await broadcastTransaction(txHex); // Assuming broadcastTransaction is your method to send the tx.

0 commit comments

Comments
 (0)